diff --git a/Calorimeter/CaloInterface/CaloInterface/ILArNoisyROTool.h b/Calorimeter/CaloInterface/CaloInterface/ILArNoisyROTool.h
index eea22f1a4e3f8102d07cf724f83efc6b34989316..fb36dd7d8315501eb5cef6b64343195c4791d515 100644
--- a/Calorimeter/CaloInterface/CaloInterface/ILArNoisyROTool.h
+++ b/Calorimeter/CaloInterface/CaloInterface/ILArNoisyROTool.h
@@ -20,6 +20,7 @@
 // Forward declaration
 class CaloCellContainer;
 class LArNoisyROSummary;
+class HWIdentifier;
 
 static const InterfaceID IID_ILArNoisyROTool("ILArNoisyROTool", 1, 0);
 
@@ -34,7 +35,7 @@ class ILArNoisyROTool
   static const InterfaceID& interfaceID();
 
   virtual 
-  std::unique_ptr<LArNoisyROSummary> process(const CaloCellContainer*) const =0;
+  std::unique_ptr<LArNoisyROSummary> process(const CaloCellContainer*, const std::set<unsigned int>* knownBadFebs, const std::vector<HWIdentifier>* knownMNBFebs ) const =0;
 
 }; 
 
diff --git a/Calorimeter/CaloRec/CMakeLists.txt b/Calorimeter/CaloRec/CMakeLists.txt
index beb66a73891bb71640716b1771bcef920543d77c..13abd39e55f5f57c9913d6ae7d443369cac4b890 100644
--- a/Calorimeter/CaloRec/CMakeLists.txt
+++ b/Calorimeter/CaloRec/CMakeLists.txt
@@ -55,7 +55,7 @@ atlas_add_library( CaloRecLib
    Identifier xAODCaloEvent GaudiKernel CaloDetDescrLib CaloUtilsLib
    StoreGateLib LArToolsLib
    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES}
-   ${EIGEN_LIBRARIES} AthAllocators DataModel IdDictParser EventKernel
+   ${EIGEN_LIBRARIES} AthAllocators IdDictParser EventKernel
    FourMom NavFourMom )
 
 atlas_add_component( CaloRec
diff --git a/Control/AthContainers/AthContainers/AuxVectorData.h b/Control/AthContainers/AthContainers/AuxVectorData.h
index 13bcfdeb679c05a6b06ebe51eb8318921c03c394..b405b3308b33093bcb9f800db2b9b72717f835c8 100644
--- a/Control/AthContainers/AthContainers/AuxVectorData.h
+++ b/Control/AthContainers/AthContainers/AuxVectorData.h
@@ -389,6 +389,20 @@ protected:
   void setStore (const DataLink< SG::IConstAuxStore >& store);
 
 
+  /**
+   * @brief Set the store associated with this object.
+   * @param store The new store.
+   *
+   * This will set both the const and non-const store pointers, and also
+   * clear the cache.
+   * This is the same as setStore() above with the same signature.
+   * It exists so that it can be called from python; pyroot would not
+   * be able to call the non-const overload of setStore due to its
+   * simplistic overload resolution.
+   */
+  void setNonConstStore (SG::IAuxStore* store);
+
+
   //@}
   //========================================================================
   /** @name Data access. */
diff --git a/Control/AthContainers/AthContainers/AuxVectorData.icc b/Control/AthContainers/AthContainers/AuxVectorData.icc
index 7f2969e8bc6c7b93e9a3ac1290f42ce5143ae2dc..0f270e7829bfd9aabb4de1121975b809d356f726 100644
--- a/Control/AthContainers/AthContainers/AuxVectorData.icc
+++ b/Control/AthContainers/AthContainers/AuxVectorData.icc
@@ -99,6 +99,24 @@ bool AuxVectorData::hasNonConstStore() const
 }
 
 
+/**
+ * @brief Set the store associated with this object.
+ * @param store The new store.
+ *
+ * This will set both the const and non-const store pointers, and also
+ * clear the cache.
+ * This is the same as setStore() above with the same signature.
+ * It exists so that it can be called from python; pyroot would not
+ * be able to call the non-const overload of setStore due to its
+ * simplistic overload resolution.
+ */
+inline
+void AuxVectorData::setNonConstStore (SG::IAuxStore* store)
+{
+  setStore (store);
+}
+
+
 /**
  * @brief Test to see if a variable exists in the store.
  * @param id The variable to test.
diff --git a/Control/AthenaCommon/share/Preparation.py b/Control/AthenaCommon/share/Preparation.py
index e5b2d026be1fdf0baaa50a4cf9fb17569e679f12..480815d784da0e0047089418b5d38d81bdb36451 100644
--- a/Control/AthenaCommon/share/Preparation.py
+++ b/Control/AthenaCommon/share/Preparation.py
@@ -133,7 +133,31 @@ if not opts.run_batch:
    atexit.register( theApp.exit )
 
  # history support
-   atexit.register( readline.write_history_file, fhistory )
+   # The python readline module as of 2.7 has a bug:
+   # errno = write_history(s);
+   # if (!errno && _history_length >= 0)
+   #     history_truncate_file(s, _history_length);
+   # if (errno)
+   #     return PyErr_SetFromErrno(PyExc_IOError);
+   #
+   # History file truncation is controlled by _history_length, which is
+   # set by set_history_length; athena usually sets it to 1024.
+   # If this has been set then history_truncate_file is called.
+   # If the history file has more lines than this setting, then the
+   # file will be truncated.  This internally calls readlink()
+   # on the history file.  In the usual case that this isn't
+   # a symlink, this fails and sets errno to EINVAL.  readline handles
+   # this properly and returns successfully.  The readline module,
+   # however, sees at this point that errno is set and returns an
+   # error to python.  The upshot is that we get an annoying error
+   # on exit.  Try to suppress this by handling the exception here.
+   def write_history_file (f):
+      try:
+         import readline
+         readline.write_history_file (f)
+      except IOError:
+         pass
+   atexit.register( write_history_file, fhistory )
    del readline, atexit
 
 del fhistory
diff --git a/Control/AthenaCommon/share/athena.py b/Control/AthenaCommon/share/athena.py
index 277e59ad385e740804a3892b2588bdacb3a8155e..068658ad566f725dc1ac404e06939431f585d811 100755
--- a/Control/AthenaCommon/share/athena.py
+++ b/Control/AthenaCommon/share/athena.py
@@ -209,6 +209,11 @@ if opts.run_batch and not opts.dbg_stage:
    if os.isatty( sys.stdin.fileno() ):
       os.close( sys.stdin.fileno() )
 else:
+   # Make sure ROOT gets initialized early, so that it shuts down last.
+   # Otherwise, ROOT can get shut down before Gaudi, leading to crashes
+   # when Athena components dereference ROOT objects that have been deleted.
+   import ROOT
+
  # readline support
    import rlcompleter, readline
 
diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py
index aa8d60b274fd8c3d8c5a250e1446a2cb22aea691..5d1b2a93366f1194a425dfd930120c7ed658555d 100644
--- a/Control/AthenaConfiguration/python/ComponentAccumulator.py
+++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py
@@ -48,7 +48,9 @@ class ComponentAccumulator(object):
     def __del__(self):
         if not self._wasMerged and not self.empty():
             #raise ConfigurationError("This componentAccumulator was never merged!")
-            print "ERROR, this componentAccumulator was never merged!"
+            log = logging.getLogger("ComponentAccumulator")
+            log.error("The ComponentAccumulator listed below was never merged!")
+            self.printConfig()
         pass
     
 
@@ -663,6 +665,32 @@ if __name__ == "__main__":
     s = pickle.load(f)
     f.close()
     assert s['hltSteps']['Members'] != '[]', "Empty set of members in hltSteps, Sequences recording order metters"
+
+
+    # test if an algorithm (or sequence) can be controlled by more than one sequence
+    accTop = ComponentAccumulator()
+
+    
+    recoSeq = seqAND("seqReco")
+    recoAlgAcc, recoAlg = AlgsConf2( dummyCfgFlags )
+    recoSeq += recoAlg
+
+    acc1 = ComponentAccumulator()
+    acc1.addSequence( seqAND("seq1") )
+    acc1.addSequence( recoSeq, parentName="seq1" )
+
+    acc2 = ComponentAccumulator()
+    acc2.addSequence( seqAND("seq2") )
+    acc2.addSequence( recoSeq, parentName="seq2" )
     
+
+    accTop.merge( acc1 )
+    accTop.merge( acc2 )
+
+    accTop.merge( recoAlgAcc ) 
+
+    accTop.printConfig()
+    #accTop.store(open("testFileDummy.pkl", "w"))
+
     print( "\nAll OK" )
 
diff --git a/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt b/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt
index b17cbb20365556c81ab0ac2f4093cba0684dacf1..5a5aaf5b61368d67fcb2b1ffbad302508e490ce8 100644
--- a/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt
+++ b/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt
@@ -25,6 +25,7 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_library( AthAsgExUnittestLib
                    MyPackage/*.h src/*.cxx
                    Root/*.cxx
+                   PUBLIC_HEADERS AthAsgExUnittestLib
                    LINK_LIBRARIES GaudiKernel AsgTools AthAnalysisBaseCompsLib )
 atlas_add_component( AthAsgExUnittest
                      src/components/*.cxx
diff --git a/Control/AthenaKernel/AthenaKernel/CondCont.h b/Control/AthenaKernel/AthenaKernel/CondCont.h
index 5ee7ec7fa8adcbc2d1fd717c2d049758e53538dc..fa14547ec2a40e8dde18a16745904f74908afc32 100644
--- a/Control/AthenaKernel/AthenaKernel/CondCont.h
+++ b/Control/AthenaKernel/AthenaKernel/CondCont.h
@@ -13,6 +13,7 @@
 #define ATHENAKERNEL_CONDCONT_H
 
 #include "AthenaKernel/ClassID_traits.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "AthenaKernel/BaseInfo.h"
 #include "AthenaKernel/RCUUpdater.h"
 #include "AthenaKernel/IConditionsCleanerSvc.h"
diff --git a/Control/AthenaMonitoring/src/HistogramFiller.cxx b/Control/AthenaMonitoring/src/HistogramFiller.cxx
index e8a4d087d635ffad98f1d8400860276e0953a431..9a018f332875a9d96730ed710104f4c684ce1849 100644
--- a/Control/AthenaMonitoring/src/HistogramFiller.cxx
+++ b/Control/AthenaMonitoring/src/HistogramFiller.cxx
@@ -120,8 +120,8 @@ HBASE* HistogramFillerFactory::create(const HistogramDef& def, Types&&... hargs)
   // Create the histogram and register it
   H* h = new H(def.alias.c_str(), def.title.c_str(), std::forward<Types>(hargs)...);
   if ( m_histSvc->regHist( fullName, static_cast<TH1*>( h ) ).isFailure() ) {    
-    throw HistogramFillerCreateException("Histogram >"+ fullName + "< can not be registered in THistSvc");
     delete h;
+    throw HistogramFillerCreateException("Histogram >"+ fullName + "< can not be registered in THistSvc");
 
   }
   
diff --git a/Control/AthenaServices/src/CoreDumpSvc.cxx b/Control/AthenaServices/src/CoreDumpSvc.cxx
index cd6d909389b02e61f9ec28cdf512cd253637ead9..febc7929edab395d8e5ae23b1ea62601002ac0fa 100644
--- a/Control/AthenaServices/src/CoreDumpSvc.cxx
+++ b/Control/AthenaServices/src/CoreDumpSvc.cxx
@@ -70,9 +70,11 @@ namespace CoreDumpSvcHandler
   void action( int sig, siginfo_t *info, void* extra )
   {
     // Protect against additional signals while we are handling this one
-    static bool inHandler = false;
-    if ( !inHandler ) inHandler = true;
-    else return;
+    static std::atomic<int> inHandler {0};
+    if (inHandler++ > 0) {
+      if (inHandler > 100) _exit (99);
+      return;
+    }
     
     // setup timeout
     int timeoutMilliseconds = int(coreDumpSvc->m_timeout * 1e-6);
@@ -87,16 +89,22 @@ namespace CoreDumpSvcHandler
       coreDumpSvc->print();
     }
 
-    if (!callOldHandler) return;
+    if (callOldHandler) {
     
-    // Call previous signal handler
-    // Need to distinguish between the two different types
-    if (oldSigHandler[sig].sa_flags & SA_SIGINFO) {
-      if (oldSigHandler[sig].sa_handler) oldSigHandler[sig].sa_sigaction(sig,info,extra);
+      // Call previous signal handler
+      // Need to distinguish between the two different types
+      if (oldSigHandler[sig].sa_flags & SA_SIGINFO) {
+        if (oldSigHandler[sig].sa_handler) oldSigHandler[sig].sa_sigaction(sig,info,extra);
+      }
+      else {
+        if (oldSigHandler[sig].sa_handler) oldSigHandler[sig].sa_handler(sig);
+      }      
+    }
+
+    if (coreDumpSvc && (sig == SIGSEGV || sig == SIGBUS || sig == SIGABRT) ) {
+      // Exit now on a fatal signal; otherwise, we can hang.
+      _exit (99);
     }
-    else {
-      if (oldSigHandler[sig].sa_handler) oldSigHandler[sig].sa_handler(sig);
-    }      
   }
 
 }
diff --git a/Control/AthenaServices/src/MetaDataSvc.cxx b/Control/AthenaServices/src/MetaDataSvc.cxx
index ba864fb22ba8dfd78c010145cf7bf79d7b87ba59..526d97cc4e5dfc208c740934cd4740128dc7656e 100644
--- a/Control/AthenaServices/src/MetaDataSvc.cxx
+++ b/Control/AthenaServices/src/MetaDataSvc.cxx
@@ -242,10 +242,10 @@ StatusCode MetaDataSvc::loadAddresses(StoreID::type storeID, IAddressProvider::t
    if (!sc.isSuccess()) {
       ATH_MSG_WARNING("Could not retrieve all versions for DataHeader, will not read Metadata");
    } else {
-      int verNumber = 0;
-      for (std::list<SG::ObjectWithVersion<DataHeader> >::const_iterator iter = allVersions.begin(),
-	      last = allVersions.end(); iter != last; iter++, verNumber++) {
-         const DataHeader* dataHeader = iter->dataObject;
+      int verNumber = -1;
+      for (SG::ObjectWithVersion<DataHeader>& obj : allVersions) {
+         ++verNumber;
+         const DataHeader* dataHeader = obj.dataObject.cptr();
          if (dataHeader == nullptr) {
             ATH_MSG_ERROR("Could not get DataHeader, will not read Metadata");
             return(StatusCode::FAILURE);
diff --git a/Control/CxxUtils/share/ubsan.supp b/Control/CxxUtils/share/ubsan.supp
index 6f9cbf9f552682eccd60f3f4be7e742dcc02e9cd..77dc9ed56a865116f1d1452d5a39f82ce5267520 100644
--- a/Control/CxxUtils/share/ubsan.supp
+++ b/Control/CxxUtils/share/ubsan.supp
@@ -5,3 +5,7 @@ vptr_check:custom_scheduler
 # Implicit casts from hard symlinking.
 # PixelCluster, SCT_Cluster -> SiCluster
 vptr_check:PrepRawDataCollection
+
+# Suppress false positives caused by ToolHandle calls from code
+# generated by cling.
+vptr_check:ToolHandle
diff --git a/Control/RngComps/test/RNGWrapper_test.cxx b/Control/RngComps/test/RNGWrapper_test.cxx
index 743f5e80822e6d33be5797dd79a8f4ae6eec6b1f..1fe194891100b2a4965a1cd04319d55b1875deba 100644
--- a/Control/RngComps/test/RNGWrapper_test.cxx
+++ b/Control/RngComps/test/RNGWrapper_test.cxx
@@ -122,7 +122,9 @@ int main() {
     tbb::task_scheduler_init init( 10 );
 
     for ( size_t rep = 0; rep < 100; ++rep ) {
-      ParallelCallTest::launchTests( 20, { &dSFMTScenario, &RanluxScenario, &RanecuScenario } );
+      if (! ParallelCallTest::launchTests( 20, { &dSFMTScenario, &RanluxScenario, &RanecuScenario } ) ) {
+        return 1;
+      }
     }
 
 
diff --git a/Control/RootUtils/RootUtils/RootUtilsPyROOTDict.h b/Control/RootUtils/RootUtils/RootUtilsPyROOTDict.h
index a63b63aaf1ea0fcae4e68746adaf6ffba97fc3b7..eb9e8ab1a56e436c4527c7a19e3db75f4f5b6904 100644
--- a/Control/RootUtils/RootUtils/RootUtilsPyROOTDict.h
+++ b/Control/RootUtils/RootUtils/RootUtilsPyROOTDict.h
@@ -20,3 +20,22 @@
 #include "RootUtils/PyROOTPickle.h"
 #include "RootUtils/PyROOTTFilePythonize.h"
 #include "RootUtils/PyROOTInspector.h"
+
+
+// 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
+// dictionary is loaded.
+#include "TInterpreter.h"
+class RootUtilsInit
+{
+public:
+  RootUtilsInit();
+};
+RootUtilsInit::RootUtilsInit()
+{
+  gInterpreter->ProcessLine ("#define _STRUCT_TIMESPEC 1");
+}
+RootUtilsInit rootUtilsInit;
+
diff --git a/Control/StoreGate/StoreGate/ReadHandle.h b/Control/StoreGate/StoreGate/ReadHandle.h
index fc2e4d984021238ffcdefa0bad53dc3e4acffeb1..2e5cc957a7f3d9f8df5990b0edb8e1b3236d7019 100644
--- a/Control/StoreGate/StoreGate/ReadHandle.h
+++ b/Control/StoreGate/StoreGate/ReadHandle.h
@@ -121,6 +121,16 @@ public:
   explicit ReadHandle (const ReadHandleKey<T>& key, const EventContext& ctx);
 
 
+  /**
+   * @brief Constructor from a DataProxy.
+   * @param proxy The proxy to which to bind.
+   * @param mode Mode of this handle (read/write/update).
+   *
+   * This handle will be bound to the given proxy.
+   */
+  explicit ReadHandle (SG::DataProxy* proxy);
+
+
   /**
    * @brief Copy constructor.
    */
diff --git a/Control/StoreGate/StoreGate/ReadHandle.icc b/Control/StoreGate/StoreGate/ReadHandle.icc
index 1dd2d2ad12c5af7a1e3a8250a1b0435678ae01bd..11e4a71c12de951309c6d4991f475fe5bad7445e 100644
--- a/Control/StoreGate/StoreGate/ReadHandle.icc
+++ b/Control/StoreGate/StoreGate/ReadHandle.icc
@@ -90,6 +90,21 @@ ReadHandle<T>::ReadHandle (const ReadHandleKey<T>& key,
 }
 
 
+/**
+ * @brief Constructor from a DataProxy.
+ * @param proxy The proxy to which to bind.
+ * @param mode Mode of this handle (read/write/update).
+ *
+ * This handle will be bound to the given proxy.
+ */
+template <class T>
+inline
+ReadHandle<T>::ReadHandle (SG::DataProxy* proxy)
+  : VarHandleBase (proxy, Gaudi::DataHandle::Reader)
+{
+}
+
+
 /**
  * @brief Copy constructor.
  */
diff --git a/Control/StoreGate/StoreGate/SGIterator.h b/Control/StoreGate/StoreGate/SGIterator.h
index f11fae72606b2eb3bebaa8c6f793d1be5b077142..6359c086deb3ff0a134d07d0ee26f5094f25797f 100644
--- a/Control/StoreGate/StoreGate/SGIterator.h
+++ b/Control/StoreGate/StoreGate/SGIterator.h
@@ -101,12 +101,6 @@ protected:
   bool eql(const IteratorBase& rhs) const;
 
 
-  /**
-   * @brief The proxy pointed at by this iterator.
-   */
-  DataProxy* proxy() const;
-
-
   /**
    * @brief Const check: throw an exception if we're pointing at a const proxy.
    *
@@ -116,6 +110,12 @@ protected:
 
 
 public:
+  /**
+   * @brief The proxy pointed at by this iterator.
+   */
+  DataProxy* proxy() const;
+
+
   /**
    * @brief Get the key string with which the current object was stored.
    */
diff --git a/Control/StoreGate/StoreGate/SGObjectWithVersion.h b/Control/StoreGate/StoreGate/SGObjectWithVersion.h
index 2cad148a14b513c4a60743193ad5236308cca547..db70df614394e259f0ea63285e484a2c9d70a8d1 100644
--- a/Control/StoreGate/StoreGate/SGObjectWithVersion.h
+++ b/Control/StoreGate/StoreGate/SGObjectWithVersion.h
@@ -10,11 +10,11 @@
 #define STOREGATE_SGOBJECTWITHVERSION_H 1
 
 #include "SGTools/SGVersionedKey.h"
-#include "StoreGate/DataHandle.h"
+#include "StoreGate/ReadHandle.h"
 namespace SG {
   /// @class ObjectWithVersion
   /// @brief associate a data object with its VersionedKey
-  /// The object is held by a DataHandle to delay its retrieval
+  /// The object is held by a ReadHandle to delay its retrieval
   /// in case the user is interested only in the versionedKey
   template <typename T>
   class ObjectWithVersion {
@@ -22,8 +22,10 @@ namespace SG {
     ObjectWithVersion(): versionedKey(), dataObject() {}
     ObjectWithVersion(const ObjectWithVersion& rhs):
       versionedKey(rhs.versionedKey), dataObject(rhs.dataObject) {}
-    ObjectWithVersion(const VersionedKey& vk, const DataHandle<T>& dh):
+    ObjectWithVersion(const VersionedKey& vk, const SG::ReadHandle<T>& dh):
       versionedKey(vk), dataObject(dh) {}
+    ObjectWithVersion(const VersionedKey& vk, SG::DataProxy* proxy):
+      versionedKey(vk), dataObject(proxy) {}
     ObjectWithVersion& operator= (const ObjectWithVersion& rhs)
     {
       if (this != &rhs) {
@@ -33,7 +35,7 @@ namespace SG {
       return *this;
     }
     SG::VersionedKey versionedKey;
-    DataHandle<T> dataObject;
+    SG::ReadHandle<T> dataObject;
   };
 }
 /// sort according to highest key version
diff --git a/Control/StoreGate/StoreGate/StoreGateSvc.h b/Control/StoreGate/StoreGate/StoreGateSvc.h
index 90a4aed324375aee91655737d58f777ed6aef421..c34ec8d78db211d1b9d16c6ed9a1d83a9a8d50be 100644
--- a/Control/StoreGate/StoreGate/StoreGateSvc.h
+++ b/Control/StoreGate/StoreGate/StoreGateSvc.h
@@ -965,10 +965,6 @@ private:
   bool m_DumpStore; ///<  property Dump: triggers dump() at EndEvent 
   bool m_ActivateHistory; ///< property: activate the history service
 
-  ///get the IOVSvc "just in time" (breaks recursion at initialize)
-  IIOVSvc* getIIOVSvc();
-  IIOVSvc* m_pIOVSvc;
-
   /// Cache store type in the facade class.
   StoreID::type m_storeID;
 
diff --git a/Control/StoreGate/StoreGate/VarHandleBase.h b/Control/StoreGate/StoreGate/VarHandleBase.h
index f24314c62ebf4adf64825111119142f0fbb1c6c0..8653b3e456a62acfbc6782cc703c4981b2873c71 100644
--- a/Control/StoreGate/StoreGate/VarHandleBase.h
+++ b/Control/StoreGate/StoreGate/VarHandleBase.h
@@ -130,6 +130,17 @@ namespace SG {
     explicit VarHandleBase (const VarHandleKey& key, const EventContext* ctx);
 
 
+    /**
+     * @brief Constructor from a DataProxy.
+     * @param proxy The proxy to which to bind.
+     * @param mode Mode of this handle (read/write/update).
+     *
+     * This handle will be bound to the given proxy.
+     */
+    explicit VarHandleBase (SG::DataProxy* proxy,
+                            Gaudi::DataHandle::Mode mode);
+
+
     /**
      * @brief Copy constructor.
      */
diff --git a/Control/StoreGate/StoreGate/tools/SGImplSvc.icc b/Control/StoreGate/StoreGate/tools/SGImplSvc.icc
index 35860ee54b3888d6240e1eb4dbd43f621a6eb7e6..1ae666e9cef01e146075be332af72929e2834966 100644
--- a/Control/StoreGate/StoreGate/tools/SGImplSvc.icc
+++ b/Control/StoreGate/StoreGate/tools/SGImplSvc.icc
@@ -1202,14 +1202,14 @@ SGImplSvc::retrieveAllVersions(std::list< SG::ObjectWithVersion<T> >& allVersion
                                const TKEY& requestedKey) const {
   lock_t lock (m_mutex);
   StatusCode sc(StatusCode::FAILURE);
-  const DataHandle<T> i,e;
+  SG::ConstIterator<T> i,e;
   if ((this->retrieve<T>(i,e)).isSuccess()){
     SG::VersionedKey reqVK(requestedKey);
     while (i != e) {
       SG::VersionedKey vk(i.key());
       if (reqVK.sameKey(vk)) {
         sc = StatusCode::SUCCESS;
-        SG::ObjectWithVersion<T> okOWV(vk, i);
+        SG::ObjectWithVersion<T> okOWV(vk, i.proxy());
         allVersions.push_back(okOWV);
       }
       ++i;
diff --git a/Control/StoreGate/share/ReadHandle_test.ref b/Control/StoreGate/share/ReadHandle_test.ref
index 396dfffe3dd69738a27e7b059b8e3a39ea2f562b..beafd690cb9e796f9c66509d8445a965a713d670 100644
--- a/Control/StoreGate/share/ReadHandle_test.ref
+++ b/Control/StoreGate/share/ReadHandle_test.ref
@@ -8,17 +8,17 @@ JobOptionsSvc        INFO Job options successfully read in from ../share/VarHand
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
-                                          running on karma on Mon Oct 30 13:29:32 2017
+                                          running on karma on Fri Jul 13 04:56:50 2018
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-ClassIDSvc           INFO  getRegistryEntries: read 311 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 752 CLIDRegistry entries for module ALL
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
 EventLoopMgr      WARNING No events will be processed from external input.
 HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
 test1
-ClassIDSvc           INFO  getRegistryEntries: read 902 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 952 CLIDRegistry entries for module ALL
 ServiceManager      FATAL No Service factory for BazSvc available.
 VarHandleKey.Se...  ERROR ServiceLocatorHelper::service: can not locate service BazSvc
                     ERROR FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: Cannot locate store: BazSvc
@@ -40,3 +40,4 @@ ServiceManager      FATAL No Service factory for BazSvc available.
 VarHandleKey.Se...  ERROR ServiceLocatorHelper::service: can not locate service BazSvc
                     ERROR FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: Cannot locate store: BazSvc
 test5
+test6
diff --git a/Control/StoreGate/share/VarHandleBase_test.ref b/Control/StoreGate/share/VarHandleBase_test.ref
index 46d1224adf36e7f24744d73cfef55d0045b0bdec..37e59a617a3ffcf272186a1d267467ea80f8318d 100644
--- a/Control/StoreGate/share/VarHandleBase_test.ref
+++ b/Control/StoreGate/share/VarHandleBase_test.ref
@@ -8,17 +8,17 @@ JobOptionsSvc        INFO Job options successfully read in from ../share/VarHand
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
-                                          running on karma on Tue Oct 31 00:10:44 2017
+                                          running on karma on Fri Jul 13 04:46:33 2018
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-ClassIDSvc           INFO  getRegistryEntries: read 312 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 753 CLIDRegistry entries for module ALL
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
 EventLoopMgr      WARNING No events will be processed from external input.
 HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
 test1
-ClassIDSvc           INFO  getRegistryEntries: read 902 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 952 CLIDRegistry entries for module ALL
 ServiceManager      FATAL No Service factory for BazSvc available.
 VarHandleKey.Se...  ERROR ServiceLocatorHelper::service: can not locate service BazSvc
                     ERROR FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: Cannot locate store: BazSvc
@@ -56,7 +56,7 @@ VarHandle(FooSv...WARNING FILE:LINE (void*SG::VarHandleBase::typeless_dataPointe
 VarHandle(FooSv...WARNING FILE:LINE (void*SG::VarHandleBase::typeless_dataPointer_fromProxy(SG::DataProxy*, bool) const): Proxy  [293847295/foo] is in an invalid state
 VarHandle(FooSv...WARNING FILE:LINE (void*SG::VarHandleBase::typeless_dataPointer_fromProxy(SG::DataProxy*, bool) const): Request for an invalid object; requested CLID = 293847295, proxy primary ID is 293847296
 test9
-VarHandleBase @0x7ffd401420b0 store=FooSvc, clid=293847295, key=foo----------- ptr@0, proxy@0
+VarHandleBase @0x7ffcdf09c5d0 store=FooSvc, clid=293847295, key=foo----------- ptr@0, proxy@0
 test10
 ServiceManager      FATAL No Service factory for FooSvc available.
 VarHandleKey.Se...  ERROR ServiceLocatorHelper::service: can not locate service FooSvc
@@ -71,3 +71,4 @@ VarHandle(FooSv...  ERROR FILE:LINE (const void*SG::VarHandleBase::get_impl(cons
 test12
 VarHandle(FooSv...  ERROR FILE:LINE (StatusCode SG::VarHandleBase::symLink_impl(unsigned int, const std::string&) const): code 0: symlink: Handle not valid.
 VarHandle(FooSv...  ERROR FILE:LINE (StatusCode SG::VarHandleBase::symLink_impl(unsigned int, const std::string&) const): code 0: symlink: Handle not valid.
+test13
diff --git a/Control/StoreGate/src/StoreGateSvc.cxx b/Control/StoreGate/src/StoreGateSvc.cxx
index b9f8ec155433717c178dd6dd1b7d240a9e6169e4..2ad8e4181e8a72be2423d8cfbec564bfd72cb721 100644
--- a/Control/StoreGate/src/StoreGateSvc.cxx
+++ b/Control/StoreGate/src/StoreGateSvc.cxx
@@ -210,14 +210,6 @@ void StoreGateSvc::handle(const Incident &inc) {
 }
 
 //////////////////////////////////////////////////////////////
-IIOVSvc* StoreGateSvc::getIIOVSvc() {
-  // Get hold of the IOVSvc
-  if (0 == m_pIOVSvc && !(service("IOVSvc", m_pIOVSvc)).isSuccess()) {
-    warning() << "Could not locate IOVSvc "
-              << endmsg;
-  }
-  return m_pIOVSvc;
-}
 
 StatusCode
 StoreGateSvc::finalize() {
diff --git a/Control/StoreGate/src/VarHandleBase.cxx b/Control/StoreGate/src/VarHandleBase.cxx
index 3917c09d020f8c0887626b7f5d84de456ab0e4fa..677dc83ac810d8bf7a6ff92725145f1923e08ccc 100644
--- a/Control/StoreGate/src/VarHandleBase.cxx
+++ b/Control/StoreGate/src/VarHandleBase.cxx
@@ -158,6 +158,31 @@ namespace SG {
   }
 
 
+  /**
+   * @brief Constructor from a DataProxy.
+   * @param proxy The proxy to which to bind.
+   * @param mode Mode of this handle (read/write/update).
+   *
+   * This handle will be bound to the given proxy.
+   */
+  VarHandleBase::VarHandleBase (SG::DataProxy* proxy,
+                                Gaudi::DataHandle::Mode mode)
+    : IResetable(),
+      m_ptr (nullptr),
+      m_proxy (nullptr),
+      m_store (proxy->store()),
+      m_storeWasSet (true),
+      m_ownedKey (std::make_unique<VarHandleKey> (proxy->clID(),
+                                                  proxy->name(),
+                                                  mode,
+                                                  m_store ? m_store->name() : "")),
+      m_key (m_ownedKey.get())
+  {
+    m_ownedKey->setOwningHandle (this);
+    setProxy (proxy);
+  }
+
+
   /**
    * @brief Copy constructor.
    */
diff --git a/Control/StoreGate/src/VarHandleKey.cxx b/Control/StoreGate/src/VarHandleKey.cxx
index bb233900d328c8fc2536a0b2958e37ae9e56b30d..cb725f3af91af21bc40be7f7ca7d271d372d9895 100644
--- a/Control/StoreGate/src/VarHandleKey.cxx
+++ b/Control/StoreGate/src/VarHandleKey.cxx
@@ -228,7 +228,7 @@ void VarHandleKey::parseKey (const std::string& key,
     st = StoreID::findStoreID(sn);
   // }
 
-  if (st != StoreID::CONDITION_STORE) {
+    if (st != StoreID::CONDITION_STORE && st != StoreID::METADATA_STORE) {
     if (m_sgKey.find("/") != std::string::npos) {
       throw SG::ExcBadHandleKey("key \"" + key 
                                 + "\": keys with \"/\" only allowed for "
diff --git a/Control/StoreGate/test/ReadHandle_test.cxx b/Control/StoreGate/test/ReadHandle_test.cxx
index f3240b151d64fb8808cfdde9a35aaf15f5266239..9138d6ddfc0293879e56a641355b6c238f587f22 100644
--- a/Control/StoreGate/test/ReadHandle_test.cxx
+++ b/Control/StoreGate/test/ReadHandle_test.cxx
@@ -304,6 +304,37 @@ void test5()
 }
 
 
+// constructor from proxy.
+void test6()
+{
+  std::cout << "test6\n";
+
+  auto obj = std::make_unique<MyObj>();
+  MyObj* objptr = obj.get();
+  SG::TransientAddress taddr (293847295, "foo13");
+  SG::DataProxy* proxy = new SG::DataProxy (SG::asStorable (std::move(obj)),
+                                            std::move (taddr));
+  proxy->addRef();
+  assert (proxy->refCount() == 1);
+
+  SGTest::TestStore testStore;
+  proxy->setStore (&testStore);
+
+  {
+    SG::ReadHandle<MyObj> h1 (proxy);
+    assert (h1.clid() == 293847295);
+    assert (h1.key() == "foo13");
+    assert (h1.store() == "TestStore");
+    assert (h1.mode() == Gaudi::DataHandle::Reader);
+    assert (h1.cptr() == objptr);
+    assert (proxy->refCount() == 2);
+    assert (testStore.m_boundHandles == std::vector<IResetable*>{&h1});
+  }
+  assert (proxy->refCount() == 1);
+  assert (testStore.m_boundHandles == std::vector<IResetable*>{});
+}
+
+
 int main()
 {
   errorcheck::ReportMessage::hideErrorLocus();
@@ -318,5 +349,6 @@ int main()
   test3();
   test4();
   test5();
+  test6();
   return 0;
 }
diff --git a/Control/StoreGate/test/VarHandleBase_test.cxx b/Control/StoreGate/test/VarHandleBase_test.cxx
index c5434caed7a04cbc14240bcb1fc83311e234d2ef..ef7f27bdb3d2e1c046657f054ae8280edba9f9f5 100644
--- a/Control/StoreGate/test/VarHandleBase_test.cxx
+++ b/Control/StoreGate/test/VarHandleBase_test.cxx
@@ -719,6 +719,39 @@ void test12()
 }
 
 
+// ctor from proxy
+void test13()
+{
+  std::cout << "test13\n";
+
+  auto obj = std::make_unique<MyObj>();
+  MyObj* objptr = obj.get();
+  SG::TransientAddress taddr (293847295, "foo13");
+  SG::DataProxy* proxy = new SG::DataProxy (SG::asStorable (std::move(obj)),
+                                            std::move (taddr));
+  proxy->addRef();
+  assert (proxy->refCount() == 1);
+
+  SGTest::TestStore testStore;
+  proxy->setStore (&testStore);
+
+  {
+    TestHandle h1 (proxy, Gaudi::DataHandle::Reader);
+    assert (h1.clid() == 293847295);
+    assert (h1.key() == "foo13");
+    assert (h1.storeHandle().name() == "TestStore");
+    assert (h1.mode() == Gaudi::DataHandle::Reader);
+    assert (h1.m_store == &testStore);
+    assert (h1.typeless_cptr() == objptr);
+    assert (h1.m_proxy == proxy);
+    assert (proxy->refCount() == 2);
+    assert (testStore.m_boundHandles == std::vector<IResetable*>{&h1});
+  }
+  assert (proxy->refCount() == 1);
+  assert (testStore.m_boundHandles == std::vector<IResetable*>{});
+}
+
+
 int main()
 {
   errorcheck::ReportMessage::hideErrorLocus();
@@ -740,6 +773,7 @@ int main()
   test10();
   test11();
   test12();
+  test13();
   return 0;
 }
 
diff --git a/Control/StoreGate/test/VarHandles_test.cxx b/Control/StoreGate/test/VarHandles_test.cxx
index 48110f1d2b5facb5b255032b1007183740188149..4100d34db9307367b344c882f072f5d59544bd36 100644
--- a/Control/StoreGate/test/VarHandles_test.cxx
+++ b/Control/StoreGate/test/VarHandles_test.cxx
@@ -2,6 +2,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
+#undef NDEBUG
 #include "TestTools/initGaudi.h"
 #include "TestTools/SGassert.h"
 #include "StoreGate/ReadHandle.h"
diff --git a/Control/StoreGateBindings/src/StoreGatePyExt.cxx b/Control/StoreGateBindings/src/StoreGatePyExt.cxx
index ac118718b0458db42ca764c5f7d16a789fe077c2..d324cb17b787bed5ea26715111c9110975cbd7f0 100755
--- a/Control/StoreGateBindings/src/StoreGatePyExt.cxx
+++ b/Control/StoreGateBindings/src/StoreGatePyExt.cxx
@@ -47,6 +47,48 @@ namespace {
   static CLID longlong_clid= ClassID_traits<long long>::ID();
   static CLID float_clid= ClassID_traits<float>::ID();
   static CLID double_clid=ClassID_traits<double>::ID();
+
+
+/// Given a type object TP, return the name of the type as a python string.
+/// TP could also be a string.
+/// Ownership is transferred back to the caller.
+/// On error, returns 0 with PyErr set.
+PyObject* pynameFromType (PyObject* tp)
+{
+  PyObject* pyname = nullptr;
+
+  if ( ! PyType_Check( tp ) ) {
+    if ( ! PyString_Check( tp ) ) {
+      PyErr_SetString( PyExc_TypeError, 
+                       "contains() argument 1 must be type or class name" );
+      return nullptr;
+    }
+    else {
+      Py_INCREF( tp );
+      pyname = tp;
+    }
+  }
+  else {
+    pyname = PyObject_GetAttrString( tp, (char*)"__cppname__" );
+    if (!pyname) {
+      pyname = PyObject_GetAttrString( tp, (char*)"__name__" );
+    }
+    if ( pyname && ! PyString_Check( pyname ) ) {
+      PyObject* pystr = PyObject_Str( pyname );
+      if ( pystr ) {
+        Py_DECREF( pyname );
+        pyname = pystr;
+      }
+    }
+
+    if ( PyErr_Occurred() )
+      return nullptr;
+  }
+
+  return pyname;
+}
+
+
 }
 
 PyObject* 
@@ -75,29 +117,9 @@ AthenaInternal::retrieveObjectFromStore( StoreGateSvc* store,
   }
 
   // expect a type or type name and an optional string key
-  PyObject* pyname = 0;
-
-  if ( ! PyType_Check( tp ) ) {
-    if ( ! PyString_Check( tp ) ) {
-      PyErr_SetString( PyExc_TypeError, 
-                       "retrieve() argument 1 must be type or class name" );
-      return 0;
-    } else {
-      Py_INCREF( tp );
-      pyname = tp;
-    }
-  } else {
-    pyname = PyObject_GetAttrString( tp, (char*)"__name__" );
-    if ( pyname && ! PyString_Check( pyname ) ) {
-      PyObject* pystr = PyObject_Str( pyname );
-      if ( pystr ) {
-        Py_DECREF( pyname );
-        pyname = pystr;
-      }
-    }
-
-    if ( PyErr_Occurred() )
-      return 0;
+  PyObject* pyname = pynameFromType( tp );
+  if (!pyname) {
+    return pyname;
   }
 
   if ( pykey != Py_None && ! PyString_Check( pykey ) ) {
@@ -332,29 +354,9 @@ AthenaInternal::py_sg_contains (StoreGateSvc* store,
   }
 
   // expect a type or type name and an optional string key
-  PyObject* pyname = 0;
-
-  if ( ! PyType_Check( tp ) ) {
-    if ( ! PyString_Check( tp ) ) {
-      PyErr_SetString( PyExc_TypeError, 
-                       "contains() argument 1 must be type or class name" );
-      return 0;
-    } else {
-      Py_INCREF( tp );
-      pyname = tp;
-    }
-  } else {
-    pyname = PyObject_GetAttrString( tp, (char*)"__name__" );
-    if ( pyname && ! PyString_Check( pyname ) ) {
-      PyObject* pystr = PyObject_Str( pyname );
-      if ( pystr ) {
-        Py_DECREF( pyname );
-        pyname = pystr;
-      }
-    }
-
-    if ( PyErr_Occurred() )
-      return 0;
+  PyObject* pyname = pynameFromType( tp );
+  if (!pyname) {
+    return pyname;
   }
 
   if ( pykey != Py_None && ! PyString_Check( pykey ) ) {
@@ -483,14 +485,7 @@ AthenaInternal::recordObjectToStore( StoreGateSvc* store,
   if ( isPlainPyObj ) {
     pyname = PyString_FromString ((char*)"PyObject");
   } else {
-    pyname = PyObject_GetAttrString( tp, (char*)"__name__" );
-    if ( pyname && ! PyString_Check( pyname ) ) {
-      PyObject* pystr = PyObject_Str( pyname );
-      if ( pystr ) {
-        Py_DECREF( pyname );
-        pyname = pystr;
-      }
-    }
+    pyname = pynameFromType( tp );
   }
 
   if ( PyErr_Occurred() )
diff --git a/DataQuality/DataQualityConfigurations/config/HLT/HLTidtrk/collisions_run.config b/DataQuality/DataQualityConfigurations/config/HLT/HLTidtrk/collisions_run.config
index 9fd839e2618394b631bd1bd61d6a04dfa142c93d..8eab98c04504f1789883b455f468967df9a24c58 100644
--- a/DataQuality/DataQualityConfigurations/config/HLT/HLTidtrk/collisions_run.config
+++ b/DataQuality/DataQualityConfigurations/config/HLT/HLTidtrk/collisions_run.config
@@ -25,7 +25,8 @@ reference HLTIDRef {
 algorithm HLTid_Histogram_Not_Empty_with_Ref&GatherData {
   libname = libdqm_algorithms.so
   name = HLT_Histogram_Not_Empty&GatherData
-  reference = stream=express_express:CentrallyManagedReferences_Trigger;stream=physics_Main:CentrallyManagedReferences_TriggerMain
+  reference = stream=physics_Main:CentrallyManagedReferences_TriggerMain;CentrallyManagedReferences_Trigger
+  #reference = stream=express_express:CentrallyManagedReferences_Trigger;stream=physics_Main:CentrallyManagedReferences_TriggerMain
   #  reference = stream=express_express:CentrallyManagedReferences;stream=physics_Main:CentrallyManagedReferences_Main
   #  reference = stream=physics_Main:CentrallyManagedReferences_Main;CentrallyManagedReferences
 }
diff --git a/DataQuality/DataQualityConfigurations/config/HLT/HLTjet/collisions_run.config b/DataQuality/DataQualityConfigurations/config/HLT/HLTjet/collisions_run.config
index a4901ff299d2713ad465450f55843b2fb38957e0..fc3163cfeeb90723aea0f88f3a10b7632f62c0d2 100644
--- a/DataQuality/DataQualityConfigurations/config/HLT/HLTjet/collisions_run.config
+++ b/DataQuality/DataQualityConfigurations/config/HLT/HLTjet/collisions_run.config
@@ -3377,7 +3377,8 @@ algorithm HLTjet_Histogram_Not_Empty_with_Ref&GatherData {
   name = HLTjet_Histogram_Not_Empty&GatherData
   #reference = HLTJetRef
   #reference = CentrallyManagedReferences_Main
-  reference = stream=express_express:CentrallyManagedReferences_Trigger;stream=physics_Main:CentrallyManagedReferences_TriggerMain
+  reference = stream=physics_Main:CentrallyManagedReferences_TriggerMain;CentrallyManagedReferences_Trigger
+  #reference = stream=express_express:CentrallyManagedReferences_Trigger;stream=physics_Main:CentrallyManagedReferences_TriggerMain
 }
 
 algorithm HLTjet_PassInput {
@@ -3391,7 +3392,8 @@ algorithm HLTjet_CheckMean {
   thresholds = HLTjet_CheckMeanThresh
   MinStat = 100
   #reference = CentrallyManagedReferences_Main
-  reference = stream=express_express:CentrallyManagedReferences_Trigger;stream=physics_Main:CentrallyManagedReferences_TriggerMain
+  reference = stream=physics_Main:CentrallyManagedReferences_TriggerMain;CentrallyManagedReferences_Trigger
+  #reference = stream=express_express:CentrallyManagedReferences_Trigger;stream=physics_Main:CentrallyManagedReferences_TriggerMain
 }
 
 algorithm HLTjet_KolmogorovTest_MaxDist {
@@ -3400,7 +3402,8 @@ algorithm HLTjet_KolmogorovTest_MaxDist {
   thresholds = HLTjet_KolmogorovThresh
   MinStat = 100
   #reference = CentrallyManagedReferences_Main
-  reference = stream=express_express:CentrallyManagedReferences_Trigger;stream=physics_Main:CentrallyManagedReferences_TriggerMain
+  reference = stream=physics_Main:CentrallyManagedReferences_TriggerMain;CentrallyManagedReferences_Trigger
+  #reference = stream=express_express:CentrallyManagedReferences_Trigger;stream=physics_Main:CentrallyManagedReferences_TriggerMain
 }
 
 algorithm HLTjet_Bins_Diff_FromAvg {
@@ -3413,7 +3416,8 @@ algorithm HLTjet_Bins_Diff_FromAvg {
   LessThan = 0
   NSigma = 40
   #reference = CentrallyManagedReferences_Main
-  reference = stream=express_express:CentrallyManagedReferences_Trigger;stream=physics_Main:CentrallyManagedReferences_TriggerMain
+  reference = stream=physics_Main:CentrallyManagedReferences_TriggerMain;CentrallyManagedReferences_Trigger
+  #reference = stream=express_express:CentrallyManagedReferences_Trigger;stream=physics_Main:CentrallyManagedReferences_TriggerMain
 }
 
 
diff --git a/DataQuality/DataQualityConfigurations/config/TRT/collisions_run.config b/DataQuality/DataQualityConfigurations/config/TRT/collisions_run.config
index 2a37746fe13892981333ceffe5f2f2305da04a6d..2eecb1d7bb137db4d673142a4a5d3dbd9550d846 100644
--- a/DataQuality/DataQualityConfigurations/config/TRT/collisions_run.config
+++ b/DataQuality/DataQualityConfigurations/config/TRT/collisions_run.config
@@ -55,10 +55,12 @@ dir TRT {
       hist hAvgHLOcc_A {
         algorithm = TRT_OutlierAndFlatnessTest/AvgHLOcc
         output = InnerDetector/TRT/TRTB
+        display = RatioPad
       }
       hist hAvgHLOcc_C {
         algorithm = TRT_OutlierAndFlatnessTest/AvgHLOcc
         output = InnerDetector/TRT/TRTB
+        display = RatioPad
       }
       hist hAvgLLOcc_A {
         algorithm = TRT_OutlierAndFlatnessTest/AvgLLOcc
@@ -104,6 +106,7 @@ dir TRT {
       hist hEvtPhaseDetPhi {
         algorithm = TRT_OutlierAndFlatnessTest/EvtPhaseDetPhi
         output = InnerDetector/TRT/_Expert
+        display = RatioPad
       }
       hist hHitWMap {
         algorithm = TRT_Histogram_Has_NonZero_Entries
@@ -138,6 +141,7 @@ dir TRT {
       hist hNumTrksDetPhi {
         algorithm = TRT_OutlierAndFlatnessTest/NumTrksDetPhi
         output = InnerDetector/TRT/TRTB
+        display = RatioPad
       }
       hist hNumHoTDetPhi {
         algorithm = TRT_OutlierAndFlatnessTest/NumHoTDetPhi
@@ -244,6 +248,7 @@ dir TRT {
       hist hAvgHLOcc_A {
         algorithm = TRT_OutlierAndFlatnessTest/AvgHLOcc
         output = InnerDetector/TRT/TRTEA
+        display = RatioPad
       }
       hist hAvgLLOcc_A {
         algorithm = TRT_OutlierAndFlatnessTest/AvgLLOcc
@@ -279,6 +284,7 @@ dir TRT {
       hist hEvtPhaseDetPhi_A {
         algorithm = TRT_OutlierAndFlatnessTest/EvtPhaseDetPhi
         output = InnerDetector/TRT/_Expert
+        display = RatioPad
       }
       hist hHitWMap_A {
         algorithm = TRT_Histogram_Has_NonZero_Entries
@@ -313,6 +319,7 @@ dir TRT {
       hist hNumTrksDetPhi_A {
         algorithm = TRT_OutlierAndFlatnessTest/NumTrksDetPhi
         output = InnerDetector/TRT/TRTEA
+        display = RatioPad
       }
       hist hNumHoTDetPhi_A {
         algorithm = TRT_OutlierAndFlatnessTest/NumHoTDetPhi
@@ -403,6 +410,7 @@ dir TRT {
       hist hAvgHLOcc_C {
         algorithm = TRT_OutlierAndFlatnessTest/AvgHLOcc
         output = InnerDetector/TRT/TRTEC
+        display = RatioPad
       }
       hist hAvgLLOcc_C {
         algorithm = TRT_OutlierAndFlatnessTest/AvgLLOcc
@@ -432,6 +440,7 @@ dir TRT {
       hist hEvtPhaseDetPhi_C {
         algorithm = TRT_OutlierAndFlatnessTest/EvtPhaseDetPhi
         output = InnerDetector/TRT/_Expert
+        display = RatioPad
       }
       hist hHitWMap_C {
         algorithm = TRT_Histogram_Has_NonZero_Entries
@@ -466,6 +475,7 @@ dir TRT {
       hist hNumTrksDetPhi_C {
         algorithm = TRT_OutlierAndFlatnessTest/NumTrksDetPhi
         output = InnerDetector/TRT/TRTEC
+        display = RatioPad
       }
       hist hNumHoTDetPhi_C {
         algorithm = TRT_OutlierAndFlatnessTest/NumHoTDetPhi
@@ -917,12 +927,12 @@ algorithm TRT_IterativeGaussianFit {
   algorithm Residual_20GeV {
     thresholds = TRT_IterativeGaussianFit/Residual_20GeV
     MeanNominal = 0.0
-    SigmaMax = 1.0
+    #SigmaMax = 1.0
   }
   algorithm Residual {
     thresholds = TRT_IterativeGaussianFit/Residual
     MeanNominal = 0.0
-    SigmaMax = 1.0
+    #SigmaMax = 1.0
   }
   algorithm TimeResidual {
     thresholds = TRT_IterativeGaussianFit/TimeResidual
@@ -940,7 +950,7 @@ algorithm TRT_IterativeGaussianFit {
   algorithm Pull {
     thresholds = TRT_IterativeGaussianFit/Pull
     MeanNominal = 0.0
-    SigmaMax = 1.0
+    #SigmaMax = 1.0
   }
 }
 
diff --git a/DataQuality/dqm_algorithms/src/OutlierAndFlatnessTest.cxx b/DataQuality/dqm_algorithms/src/OutlierAndFlatnessTest.cxx
index f9a85b578a64797ad2383d9dd1596734f4be16b0..13a5eb418be048b036870ec09d06d5b33f21cb1c 100644
--- a/DataQuality/dqm_algorithms/src/OutlierAndFlatnessTest.cxx
+++ b/DataQuality/dqm_algorithms/src/OutlierAndFlatnessTest.cxx
@@ -88,6 +88,9 @@ dqm_core::Result *dqm_algorithms::OutlierAndFlatnessTest::execute(const std::str
     const bool normRef = static_cast<bool>(tools::GetFirstFromMap("DivideByReference", config.getParameters(), 0)); // default: false
     const bool diffRef = static_cast<bool>(tools::GetFirstFromMap("SubtractReference", config.getParameters(), 0)); // default: false
 
+    const bool subtractBinError = static_cast<bool>(tools::GetFirstFromMap("SubtractBinError", config.getParameters(), 0)); // default: false
+
+    const bool storeOutlierBins = static_cast<bool>(tools::GetFirstFromMap("StoreOutlierBins", config.getParameters(), 0)); // default: false
     // if the checks are to be done against a reference take care of this now
 
     TH1 *refhist = 0;
@@ -174,29 +177,30 @@ dqm_core::Result *dqm_algorithms::OutlierAndFlatnessTest::execute(const std::str
                     const bool isOutlier = knownOutliers->GetBinContent(i, j);
                     if (isOutlier) continue; // skip known outliers
                     const double binContent = histogram->GetBinContent(i, j);
+                    const double binError = subtractBinError ? histogram->GetBinError(i, j) : 0.;
                     if ((binContent == 0) && ignore0) continue; // skip zero bins if requested
 
                     bool foundOutlier = false;
                     if (checkAbsLimit && !foundOutlier) {
-                        if (binContent > absLimit) {
+                        if (binContent - binError > absLimit) {
                             ++newBadBins;
                             foundOutlier = true;
                         }
                     }
                     if (checkAbsDev && !foundOutlier) {
-                        if (std::fabs(binContent - mean) > absDev) {
+                        if (std::fabs(binContent - mean) - binError > absDev) {
                             ++newBadBins;
                             foundOutlier = true;
                         }
                     }
                     if (checkRelDev && !foundOutlier) {
-                        if (std::fabs(binContent - mean) > (relDev * mean)) {
+                        if (std::fabs(binContent - mean) - binError > (relDev * mean)) {
                             ++newBadBins;
                             foundOutlier = true;
                         }
                     }
                     if (checkSigmaDev && !foundOutlier) {
-                        if (std::fabs(binContent - mean) > (sigmaDev * stddev)) {
+                        if (std::fabs(binContent - mean) - binError > (sigmaDev * stddev)) {
                             if (dontCountSigmaOutliers) ++newUncountedBadBins;
                             else ++newBadBins;
                             foundOutlier = true;
@@ -228,6 +232,19 @@ dqm_core::Result *dqm_algorithms::OutlierAndFlatnessTest::execute(const std::str
     results["Corrected_standard_deviation"] = stddev;
     results["Number_of_bins_equal_zero"] = zeroBins;
 
+    // store all x values of the outlier bins
+    if (storeOutlierBins) {
+        int outlierIndex = 0;
+        for (int i = xminBin; i <= xmaxBin; ++i) {
+            for (int j = yminBin; j <= ymaxBin; ++j) {
+                if (knownOutliers->GetBinContent(i, j)) {
+                    outlierIndex++;
+                    results[std::string("Outlier_bin_")+std::to_string(outlierIndex)] = knownOutliers->GetXaxis()->GetBinCenter(i);
+                }
+            }
+        }
+    }
+
     if (checkFlatness) {
         if (!isOneDimensional) {
             throw dqm_core::BadConfig(ERS_HERE, name, "cannot check 2D histograms for flatness, please set CheckFlatness = 0");
@@ -341,6 +358,8 @@ void dqm_algorithms::OutlierAndFlatnessTest::printDescription(std::ostream& out)
         "\tAbsLimit:\tAbsolute limit a single bin has to exceed to be classified as outlier.  Has to be given if \"CheckAbsLimit\" is set to 1.\n"
         "\tDivideByReference:\tDivide test histogram by reference histogram and perform checks on the resulting ratio. (default 0)\n"
         "\tSubtractReference:\tSubtract reference histogram from test histogram and perform checks on the resulting difference. Carefull! This yields pretty unstable results for the flatness tests! (default 0)\n"
+        "\tSubtractBinError:\tSubtract the absolute bin error from the difference between bin content and mean when checking for outliers. (default 0)\n"
+        "\tStoreOutlierBins:\tStore information on outlier bins in the output. (default 0)\n"
         "Thresholds:\n"
         "\tNumber_of_outlier_bins:\tNumber of bins classified as outliers using the given thresholds.\n"
         "\tCorrected_mean:\tMean of distribution ignoring outliers.\n"
diff --git a/Database/APR/RootStorageSvc/src/RootDomain.cpp b/Database/APR/RootStorageSvc/src/RootDomain.cpp
index 6fe0734c1fc289974efa61a475bda6817709463a..36c4e427d6c2211f6cf4bb381693fa8b975b69dc 100755
--- a/Database/APR/RootStorageSvc/src/RootDomain.cpp
+++ b/Database/APR/RootStorageSvc/src/RootDomain.cpp
@@ -98,10 +98,14 @@ DbStatus RootDomain::setOption(const DbOption& opt)  {
         return sc;
       }
       else if ( !strcasecmp(n, "ENABLE_IMPLICITMT") )  {
-        bool implicitMT = false;
+        int implicitMT = -1;
         DbStatus sc = opt._getValue(implicitMT);
-        if ( sc.isSuccess() && implicitMT )  {
-           ROOT::EnableImplicitMT();
+        if ( sc.isSuccess() )  {
+           if ( implicitMT == 0 )  {
+              ROOT::EnableImplicitMT();
+           } else if ( implicitMT > 0 )  {
+              ROOT::EnableImplicitMT(implicitMT);
+           }
         }
         return sc;
       }
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadMeta.cxx b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadMeta.cxx
index 871fe8a4aa0d536088fddf4a05f68bc087483d17..193c5acd9ebee81b763ffa8b75de900ce6af6795 100755
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadMeta.cxx
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadMeta.cxx
@@ -82,8 +82,8 @@ StatusCode ReadMeta::beginInputFile()
       }
       //const ExampleHitContainer* ep;
       ExampleHitContainer* ep_out = 0;
-      for (std::list<SG::ObjectWithVersion<ExampleHitContainer> >::const_iterator iter = allVersions.begin(); iter != allVersions.end(); iter++) {
-         const ExampleHitContainer* ep = iter->dataObject;
+      for (SG::ObjectWithVersion<ExampleHitContainer>& obj : allVersions) {
+         const ExampleHitContainer* ep = obj.dataObject.cptr();
          if (!m_pMetaDataStore->contains<ExampleHitContainer>("PedestalWriteData")) {
             ep_out = new ExampleHitContainer();
             const ExampleHit* entry = *ep->begin();
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx
index 5ab686bddb95fd5d7198af5ea91a99a217c6d333..c4ff3c32725f7855ff4b651cbd963bc6d040ea78 100644
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx
@@ -76,9 +76,8 @@ StatusCode CopyEventStreamInfo::beginInputFile(const SG::SourceID&)
          return StatusCode::FAILURE;
       }
       EventStreamInfo* evtStrInfo_out = 0;
-      for (std::list<SG::ObjectWithVersion<EventStreamInfo> >::const_iterator iter = allVersions.begin(),
-		      iterEnd = allVersions.end(); iter != iterEnd; iter++) {
-         const EventStreamInfo* evtStrInfo_in = iter->dataObject;
+      for (SG::ObjectWithVersion<EventStreamInfo>& obj : allVersions) {
+         const EventStreamInfo* evtStrInfo_in = obj.dataObject.cptr();
          if (!m_metaDataStore->contains<EventStreamInfo>(m_key)) {
             evtStrInfo_out = new EventStreamInfo(*evtStrInfo_in);
             if (!m_metaDataStore->record(evtStrInfo_out, m_key).isSuccess()) {
diff --git a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx
index f2a7ed230244d8fe9d428e705e7eb259f517b62e..1ffbeabd6a609ad92272ed1bd79889ee5ca8bcb7 100644
--- a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx
+++ b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx
@@ -203,14 +203,6 @@ StatusCode PoolSvc::setupPersistencySvc() {
       ATH_MSG_FATAL("Failed to enable thread safety in ROOT via PersistencySvc.");
       return(StatusCode::FAILURE);
    }
-   // Switiching on ROOT implicit multi threading for AthenaMT
-   if (Gaudi::Concurrency::ConcurrencyFlags::numThreads() > 1) {
-
-      if (!m_persistencySvcVec[IPoolSvc::kInputStream]->session().technologySpecificAttributes(pool::ROOT_StorageType.type()).setAttribute<bool>("ENABLE_IMPLICITMT", true)) {
-         ATH_MSG_FATAL("Failed to enable implicit multithreading in ROOT via PersistencySvc.");
-         return(StatusCode::FAILURE);
-      }
-   }
    m_contextMaxFile.insert(std::pair<unsigned int, int>(IPoolSvc::kInputStream, m_dbAgeLimit));
    if (!connect(pool::ITransaction::READ).isSuccess()) {
       ATH_MSG_FATAL("Failed to connect Input PersistencySvc.");
@@ -228,6 +220,19 @@ StatusCode PoolSvc::setupPersistencySvc() {
    return(StatusCode::SUCCESS);
 }
 //__________________________________________________________________________
+StatusCode PoolSvc::start() {
+   // Switiching on ROOT implicit multi threading for AthenaMT
+   if (Gaudi::Concurrency::ConcurrencyFlags::numThreads() > 1) {
+
+      if (!m_persistencySvcVec[IPoolSvc::kInputStream]->session().technologySpecificAttributes(pool::ROOT_StorageType.type()).setAttribute<int>("ENABLE_IMPLICITMT", Gaudi::Concurrency::ConcurrencyFlags::numThreads() - 1)) {
+         ATH_MSG_FATAL("Failed to enable implicit multithreading in ROOT via PersistencySvc.");
+         return(StatusCode::FAILURE);
+      }
+      ATH_MSG_INFO("Enabled implicit multithreading in ROOT via PersistencySvc to: " << Gaudi::Concurrency::ConcurrencyFlags::numThreads() - 1);
+   }
+   return(StatusCode::SUCCESS);
+}
+//__________________________________________________________________________
 StatusCode PoolSvc::stop() {
    bool retError = false;
    for (unsigned int contextId = 0, imax = m_persistencySvcVec.size(); contextId < imax; contextId++) {
diff --git a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h
index da58694eb3c3ad112e4118d71fa5e0f9ef71b258..f3e51efd7b6cc9552d27daffc9f9f8d199c1ec79 100644
--- a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h
+++ b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h
@@ -41,6 +41,7 @@ public: // Non-static members
    StatusCode initialize();
    StatusCode io_reinit();
    /// Required of all Gaudi services:
+   StatusCode start();
    StatusCode stop();
    /// Required of all Gaudi services:
    StatusCode finalize();
diff --git a/Database/AthenaRoot/AthenaRootComps/share/test_athena_ntuple_dumper_varhandles.ref b/Database/AthenaRoot/AthenaRootComps/share/test_athena_ntuple_dumper_varhandles.ref
old mode 100755
new mode 100644
diff --git a/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx b/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
index b2aba401d1538d0fc27525c1d7957b9b1f791251..3c718240c87773566e88f19c4b82a0ea5a2e6873 100755
--- a/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
+++ b/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
@@ -513,13 +513,10 @@ IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileName)
             return sc;
         }
 
-        std::list<SG::ObjectWithVersion<IOVMetaDataContainer> >::const_iterator versIt  = allVersions.begin(); 
-        std::list<SG::ObjectWithVersion<IOVMetaDataContainer> >::const_iterator versEnd = allVersions.end(); 
-        for (; versIt != versEnd; ++versIt) {
+        for (SG::ObjectWithVersion<IOVMetaDataContainer>& obj : allVersions) {
+            const IOVPayloadContainer*  payload = obj.dataObject->payloadContainer();
 
-            const IOVPayloadContainer*  payload = versIt->dataObject->payloadContainer();
-
-            ATH_MSG_DEBUG("New container: payload size " << payload->size() << " version key " << versIt->versionedKey);
+            ATH_MSG_DEBUG("New container: payload size " << payload->size() << " version key " << obj.versionedKey);
 
             // detailed printout before merge
             if (msgLvl(MSG::VERBOSE)) {
@@ -551,10 +548,8 @@ IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileName)
         //
         // Loop over CondAttrListCollections and do merge
         //
-        versIt  = allVersions.begin(); 
-        versEnd = allVersions.end(); 
-        for (; versIt != versEnd; ++versIt) {
-            const IOVPayloadContainer*  payload = versIt->dataObject->payloadContainer();
+        for (SG::ObjectWithVersion<IOVMetaDataContainer>& obj : allVersions) {
+            const IOVPayloadContainer*  payload = obj.dataObject->payloadContainer();
             IOVPayloadContainer::const_iterator itColl    = payload->begin();
             IOVPayloadContainer::const_iterator itCollEnd = payload->end();
             for (; itColl != itCollEnd; ++itColl) {
diff --git a/Database/TPTools/TPTools/TopLevelTPCnvBaseP.h b/Database/TPTools/TPTools/TopLevelTPCnvBaseP.h
index 7e6c8dea252af7c9bbce80bb1b95370f4151ffd9..73a69e224650ef9bd9060ca05d029021e4133e5b 100644
--- a/Database/TPTools/TPTools/TopLevelTPCnvBaseP.h
+++ b/Database/TPTools/TPTools/TopLevelTPCnvBaseP.h
@@ -42,6 +42,9 @@ public:
 
   virtual ~TopLevelTPCnvBaseP()  { deleteTLPersObject(); }
 
+  TopLevelTPCnvBaseP (const TopLevelTPCnvBaseP&) = delete;
+  TopLevelTPCnvBaseP& operator= (const TopLevelTPCnvBaseP&) = delete;
+
  
   // ---------------  internals - "non-public" use
 
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.cxx
index 06ce5cf7e2a7821d80112924429d8860df645f18..3f58c4f1680648fb5fcaa3e6bce2b982e3ee1f18 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.cxx
@@ -87,9 +87,8 @@ StatusCode ByteStreamMetadataTool::beginInputFile()
          } else {
             ATH_MSG_DEBUG("Found Input ByteStreamMetadata");
          }
-         for (std::list<SG::ObjectWithVersion<ByteStreamMetadata> >::const_iterator versIter =
-		            allVersions.begin(), versEnd = allVersions.end(); versIter != versEnd; versIter++) {
-            copy.push_back(new ByteStreamMetadata(*versIter->dataObject));
+         for (SG::ObjectWithVersion<ByteStreamMetadata>& obj : allVersions) {
+            copy.push_back(new ByteStreamMetadata(*obj.dataObject));
          }
       }
       if (m_pInputStore->contains<ByteStreamMetadataContainer>(*keyIter)) {
@@ -101,12 +100,10 @@ StatusCode ByteStreamMetadataTool::beginInputFile()
          } else {
             ATH_MSG_DEBUG("Found Input ByteStreamMetadataContainer");
          }
-         for (std::list<SG::ObjectWithVersion<ByteStreamMetadataContainer> >::const_iterator versIter =
-		            allVersions.begin(), versEnd = allVersions.end(); versIter != versEnd; versIter++) {
-            const ByteStreamMetadataContainer* bsmdc = versIter->dataObject;
-            for (ByteStreamMetadataContainer::const_iterator elemIter = bsmdc->begin(), elemEnd = bsmdc->end();
-	               elemIter != elemEnd; elemIter++) {
-               copy.push_back(new ByteStreamMetadata(**elemIter));
+         for (SG::ObjectWithVersion<ByteStreamMetadataContainer>& obj : allVersions) {
+            const ByteStreamMetadataContainer& bsmdc = *obj.dataObject;
+            for (const ByteStreamMetadata* md : bsmdc) {
+              copy.push_back(new ByteStreamMetadata(*md));
             }
          }
       }
diff --git a/Event/EventContainers/EventContainers/IdentifiableCache.h b/Event/EventContainers/EventContainers/IdentifiableCache.h
index 6e0ec231c6ef56a9716f1ee6560ecca4158918ca..693776411d695592d96dbad66c5ae2ece805f076 100644
--- a/Event/EventContainers/EventContainers/IdentifiableCache.h
+++ b/Event/EventContainers/EventContainers/IdentifiableCache.h
@@ -45,7 +45,7 @@ public:
   {
   }
 
-  IdentifiableCache (IdentifierHash maxHash, const Maker* maker, size_t lockBucketSize)
+  IdentifiableCache (IdentifierHash maxHash, const Maker* maker, size_t /*lockBucketSize*/)
     : IdentifiableCacheBase (maxHash, maker)
   {
   }
diff --git a/Event/EventContainers/test/IDMT_ContainerTest.cxx b/Event/EventContainers/test/IDMT_ContainerTest.cxx
index d285956bad4af1a424f995fda25ec5d27182f6ca..c7e1837e637f5d3b327d44d9686f95343619efa3 100644
--- a/Event/EventContainers/test/IDMT_ContainerTest.cxx
+++ b/Event/EventContainers/test/IDMT_ContainerTest.cxx
@@ -602,9 +602,9 @@ int ID_ContainerTest::execute(){
     }
     {
     MyCollectionContainer::IDC_WriteHandle lock;
-    lock = std::move(containerOnline->getWriteHandle(IdentifierHash(50)));
-    lock = std::move(containerOnline->getWriteHandle(IdentifierHash(50)));//Try to break the locks
-    lock = std::move(containerOnline->getWriteHandle(IdentifierHash(60)));
+    lock = containerOnline->getWriteHandle(IdentifierHash(50));
+    lock = containerOnline->getWriteHandle(IdentifierHash(50));//Try to break the locks
+    lock = containerOnline->getWriteHandle(IdentifierHash(60));
     lock = containerOnline->getWriteHandle(IdentifierHash(70));
     }
 
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/L1Signal_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/L1Signal_jobOptions.py
index 67f500b3342308b724f7333707cb346122b283c0..fb708138273fe9bb762a94feaddc881b1a688407 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/L1Signal_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/L1Signal_jobOptions.py
@@ -72,9 +72,9 @@ if DetFlags.overlay.LVL1_on():
           newTrigT1TGC.EventStore = "BkgEvent_0_SG"
           job += newTrigT1TGC
           job.newTrigT1TGC.InputData_perEvent = "TGC_DIGITS"
-          job.newTrigT1TGC.ASDOutDataLocation = "/Event/ASDOutDataLocation" 
+          job.newTrigT1TGC.ASDOutDataLocation = "ASDOutDataLocation"
           #job.newTrigT1TGC.MuonTrigConfig = "/Run/MuonTrigConfig"
-          job.newTrigT1TGC.MuCTPIInput_TGC = "/Event/L1MuctpiStoreTGC"
+          job.newTrigT1TGC.MuCTPIInput_TGC = "L1MuctpiStoreTGC"
           job.newTrigT1TGC.MaskFileName = "TrigT1TGCMaskedChannel.db"
           job.newTrigT1TGC.MaskFileName12 = "TrigT1TGCMaskedChannel._12.db"
 
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py
index 616a525fa7bebd8fbb6053800982b0b1e209d081..4c7d2ee35964e0471ccb05f101fedc338bcb0d48 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py
@@ -1,6 +1,7 @@
 
 include.block ( "EventOverlayJobTransforms/Level1Overlay_jobOptions.py" )
 
+from AthenaCommon import CfgGetter
 from AthenaCommon.DetFlags import DetFlags
 from Digitization.DigitizationFlags import digitizationFlags
 from OverlayCommonAlgs.OverlayFlags import overlayFlags
@@ -33,11 +34,18 @@ if DetFlags.overlay.LVL1_on():
             job.LArTTL1Maker.NoiseOnOff= False #(default:True) 
         # PileUp
         job.LArTTL1Maker.PileUp = True
+        # If we are doing MC overlay
+        if not overlayFlags.isDataOverlay():
+            job.LArTTL1Maker.EvtStore = overlayFlags.evtStore()
     
     if DetFlags.simulateLVL1.Tile_on():
         include( "TileSimAlgs/TileTTL1_jobOptions.py" )
         include( "TileSimAlgs/TileMuonReceiver_jobOptions.py" )
 
+    # Add special TTL1 overlay algorithm only for MC+MC overlay
+    if not overlayFlags.isDataOverlay() and DetFlags.simulateLVL1.LAr_on() and DetFlags.simulateLVL1.Tile_on():
+        job += CfgGetter.getAlgorithm("OverlayTTL1")
+
     if DetFlags.digitize.LVL1_on():
        #--------------------------------------------------------------
        # set up TrigConfigSvc for LVL1 simulation
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py
index 9d999f7abf749df07bef22e7b7da2133b09395f4..30c6e302a2f3bf652561124e98a9dfd17c10384b 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py
@@ -42,49 +42,48 @@ if DetFlags.overlay.MDT_on() or DetFlags.overlay.CSC_on() or DetFlags.overlay.RP
         if overlayFlags.isDataOverlay():
             ToolSvc.CscRawDataProviderTool.RdoLocation = overlayFlags.dataStore()+"+CSCRDO"
         job += getAlgorithm("CscOverlay")
-
         #job.CscOverlay.OutputLevel=VERBOSE
         #svcMgr.MessageSvc.defaultLimit=100000
         #print job.CscOverlay
-
         #print "ACH123: Setting DEBUG v99"
         #job.CscOverlay.MakeRDOTool.OutputLevel=DEBUG
         #job.CscOverlay.MakeRDOTool.cscCalibTool.OutputLevel=DEBUG
         #job.CscOverlay.OutputLevel=DEBUG
         #MessageSvc.debugLimit = 100000
-
         #print "ACH123: NumSamples = 2 for MakeRDOTool"
         #job.CscOverlay.MakeRDOTool.NumSamples=2
 
     if DetFlags.overlay.MDT_on():
+        job += CfgGetter.getAlgorithm("MdtRdoToMdtDigitOverlayAlg")
+        job += CfgGetter.getAlgorithm("MDT_OverlayDigitizer")
         job += CfgGetter.getAlgorithm("MdtOverlay")
         job += CfgGetter.getAlgorithm("OverlayMdtDigitToMdtRDO")
         if overlayFlags.isDataOverlay():
             ToolSvc.MdtRawDataProviderTool.RdoLocation = overlayFlags.dataStore()+"+MDTCSM"
-            job.MdtOverlay.ConvertRDOToDigitTool.RetrievePrivateCopy = False
         #job.MdtOverlay.OutputLevel = VERBOSE
         #job.OverlayMdtDigitToMdtRDO.OutputLevel = VERBOSE
 
     if DetFlags.overlay.RPC_on():
+        job += CfgGetter.getAlgorithm("RpcRdoToRpcDigitOverlayAlg")
+        job += CfgGetter.getAlgorithm("RPC_OverlayDigitizer")
         job += CfgGetter.getAlgorithm("RpcOverlay")
         job += CfgGetter.getAlgorithm("OverlayRpcDigitToRpcRDO")
         if overlayFlags.isDataOverlay():
             ToolSvc.RpcRawDataProviderTool.RdoLocation = overlayFlags.dataStore()+"+RPCPAD"
-            job.RpcOverlay.ConvertRDOToDigitTool.RetrievePrivateCopy = False
         #job.RpcOverlay.OutputLevel = VERBOSE
         #job.OverlayRpcDigitToRpcRDO.OutputLevel = VERBOSE
 
     if DetFlags.overlay.TGC_on():
+        job += CfgGetter.getAlgorithm("TgcRdoToTgcDigitOverlayAlg")
+        job += CfgGetter.getAlgorithm("TGC_OverlayDigitizer")
         job += CfgGetter.getAlgorithm("TgcOverlay")
         job += CfgGetter.getAlgorithm("OverlayTgcDigitToTgcRDO")
         if overlayFlags.isDataOverlay():
             ToolSvc.TgcRawDataProviderTool.RdoLocation = overlayFlags.dataStore()+"+TGCRDO"
-            job.TgcOverlay.ConvertRDOToDigitTool.RetrievePrivateCopy = False
         #job.TgcOverlay.OutputLevel = VERBOSE
-        #job.OverlayTgcDigitToRpcRDO.OutputLevel = VERBOSE
-
-        # storegate dump
-        # StoreGateSvc = Service( "StoreGateSvc" )
-        # StoreGateSvc.Dump = True  #true will dump data store contents
+        #job.OverlayTgcDigitToTgcRDO.OutputLevel = VERBOSE
 
-        # StoreGateSvc.OutputLevel=DEBUG
+    # storegate dump
+    #StoreGateSvc = Service( "StoreGateSvc" )
+    #StoreGateSvc.Dump = True  #true will dump data store contents
+    #StoreGateSvc.OutputLevel=DEBUG
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.OverlayPool_tf.py b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.OverlayPool_tf.py
index c859ae6ac90626a02468e8c97a243117802895fc..0791ca31d52eb760c81acdea7ee0132ad5e3a8df 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.OverlayPool_tf.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.OverlayPool_tf.py
@@ -105,21 +105,17 @@ else:
     DetFlags.Muon_setOn()
     DetFlags.LAr_setOn()
     DetFlags.Tile_setOn()
+    DetFlags.BCM_setOn()
+    DetFlags.Lucid_setOn()
+    DetFlags.Truth_setOn()
 
-    if not hasattr(runArgs, "triggerConfig") or runArgs.triggerConfig=="NONE":
+    if hasattr(runArgs, "triggerConfig") and runArgs.triggerConfig == "NONE":
         DetFlags.LVL1_setOff()
     else:
         DetFlags.LVL1_setOn()
 
     DetFlags.digitize.LVL1_setOff()
 
-    DetFlags.BCM_setOn()
-    DetFlags.Lucid_setOn()
-    DetFlags.Truth_setOn()
-    DetFlags.simulateLVL1.Lucid_setOn()
-    DetFlags.simulateLVL1.LAr_setOn()
-    DetFlags.simulateLVL1.Tile_setOn()
-
 DetFlags.Print()
 
 globalflags.DataSource.set_Value_and_Lock('geant4')
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.combinedinput.py b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.combinedinput.py
index 230785022c1b01ec210eac42de1ab5c6fe3a787d..fd4bca4e8261883342d9ba544270e3c1f56f85ef 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.combinedinput.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.combinedinput.py
@@ -152,10 +152,9 @@ if jobproperties.Beam.beamType.get_Value() != 'cosmics':
     else:
         simFlags.EventFilter.set_On()
 
-## Always enable the looper killer, unless it's been disabled
-if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
-    simFlags.OptionalUserActionList.addAction('G4UA::LooperKillerTool')
-else:
+## The looper killer is on by default. Disable it if this is requested.
+if hasattr(runArgs, "enableLooperKiller") and not runArgs.enableLooperKiller:
+    simFlags.OptionalUserActionList.removeAction('G4UA::LooperKillerTool')
     atlasG4log.warning("The looper killer will NOT be run in this job.")
 
 include("G4AtlasApps/G4Atlas.flat.configuration.py")
diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh b/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh
index a9608c6e476d1671cee8bec53bfd299c47442213..657894e6f3239b1112d8f0de3efb4127fef9e727 100755
--- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh
+++ b/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh
@@ -11,6 +11,9 @@
 # art-output: mem.summary.*
 # art-output: mem.full.*
 
+#creating empty PoolFileCatalog.xml required by ART
+art.py createpoolfile
+
 BSOverlayFilter_tf.py \
 --jobNumber 23 \
 --inputBSCONFIGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/test23.tar \
diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh b/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh
index 9ecb5877a7a89804e3c3ac06e7e3549eb3cb3663..ca67374f567063db1a790517189cc88de5e274ed 100755
--- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh
+++ b/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh
@@ -37,7 +37,7 @@ Reco_tf.py \
 --outputAODFile testRTT.AOD.pool.root \
 --preInclude 'EventOverlayJobTransforms/custom.py,EventOverlayJobTransforms/recotrfpre.py' \
 --postInclude 'r2e:EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py,EventOverlayJobTransforms/muAlign_reco.py' \
---preExec 'from LArConditionsCommon.LArCondFlags import larCondFlags;larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase");rec.doTrigger=False;' \
+--preExec 'from LArConditionsCommon.LArCondFlags import larCondFlags;larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase");rec.doTrigger=False;from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArThinnedDigits.set_Value_and_Lock(False)' \
 --ignorePatterns "L1TopoMenuLoader.+ERROR." \
 --postExec 'r2e:from LArCellRec.LArCellRecConf import LArCellBuilderFromLArRawChannelTool;LArCellBuilderFromLArRawChannelTool.RawChannelsName="LArRawChannels_FromDigits"' \
 --imf False
diff --git a/Event/EventOverlay/RDO_OverlayBase/CMakeLists.txt b/Event/EventOverlay/RDO_OverlayBase/CMakeLists.txt
deleted file mode 100644
index 972dfd2a1a98161eb1e83afcde22a3757228d172..0000000000000000000000000000000000000000
--- a/Event/EventOverlay/RDO_OverlayBase/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-################################################################################
-# Package: RDO_OverlayBase
-################################################################################
-
-# Declare the package name:
-atlas_subdir( RDO_OverlayBase )
-
-# Install files from the package:
-atlas_install_headers( RDO_OverlayBase )
-
diff --git a/Event/EventOverlay/RDO_OverlayBase/RDO_OverlayBase/RDO_OverlayBase.h b/Event/EventOverlay/RDO_OverlayBase/RDO_OverlayBase/RDO_OverlayBase.h
deleted file mode 100644
index d2328351a48c425390bdddf1639ab413a94d48d2..0000000000000000000000000000000000000000
--- a/Event/EventOverlay/RDO_OverlayBase/RDO_OverlayBase/RDO_OverlayBase.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#error "Error: obsolete include file.  The RDO_OverlayBase package has been renamed into IDC_OverlayBase."
diff --git a/Generators/Sherpa_i/CMakeLists.txt b/Generators/Sherpa_i/CMakeLists.txt
index a237c46ea1b309496a3cbbfcf88e06d5dad2f65f..cb25a0e43d52120239e9ad80a17af98011211690 100644
--- a/Generators/Sherpa_i/CMakeLists.txt
+++ b/Generators/Sherpa_i/CMakeLists.txt
@@ -6,27 +6,34 @@
 atlas_subdir( Sherpa_i )
 
 # Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   GaudiKernel
-   Generators/GeneratorModules
-   Generators/TruthUtils
-   PRIVATE
-   Control/AthenaBaseComps
-   Control/AthenaKernel )
+atlas_depends_on_subdirs( PUBLIC
+                          GaudiKernel
+                          Generators/GeneratorModules
+                          Generators/TruthUtils
+                          PRIVATE
+                          Control/AthenaBaseComps
+                          Control/AthenaKernel )
+
+# Set the version of Sherpa to use:
+#set( SHERPA_VERSION 2.2.2 )
+#set( SHERPA_ROOT
+#   ${LCG_RELEASE_DIR}/MCGenerators/sherpa/${SHERPA_VERSION}/${ATLAS_PLATFORM} )
 
 # External dependencies:
 find_package( CLHEP )
 find_package( HepMC )
-find_package( Sherpa COMPONENTS SherpaTools SherpaInitialization )
+find_package( Sherpa COMPONENTS SherpaTools )
 
 # Remove the --as-needed linker flags:
 atlas_disable_as_needed()
 
 # Component(s) in the package:
 atlas_add_component( Sherpa_i
-   Sherpa_i/*.h src/*.cxx src/components/*.cxx
-   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
-   ${SHERPA_INCLUDE_DIRS}
-   LINK_LIBRARIES ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${SHERPA_LIBRARIES}
-   GaudiKernel GeneratorModulesLib TruthUtils AthenaBaseComps AthenaKernel )
+                     src/*.cxx
+                     src/components/*.cxx
+                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${SHERPA_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${SHERPA_LIBRARIES} GaudiKernel GeneratorModulesLib TruthUtils AthenaBaseComps AthenaKernel )
+
+# Install files from the package:
+atlas_install_headers( Sherpa_i )
+
diff --git a/Generators/Sherpa_i/Sherpa_i/Sherpa_i.h b/Generators/Sherpa_i/Sherpa_i/Sherpa_i.h
index 27be67d95ef9ed5552a34eba57183d44a0442a2e..395903d6ac27c45c79581c18ca9b5c0cca457b93 100644
--- a/Generators/Sherpa_i/Sherpa_i/Sherpa_i.h
+++ b/Generators/Sherpa_i/Sherpa_i/Sherpa_i.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SHERPA_I_SHERPA_I_H
@@ -31,10 +31,26 @@ protected:
   
   SHERPA::Sherpa * p_sherpa;
 
-  std::string m_path;
+  /// Sherpa run card snippet (from JO file)
+  std::string m_runcard;
+
+  /// List of additional Sherpa parameters beyond run card snippet (from JO file)
   std::vector<std::string> m_params;
+
+  /// List of needed OpenLoops process libraries (from JO file)
+  std::vector<std::string> m_openloopslibs;
+
+  /// List of any additional needed files, e.g. custom libraries, PDF sets (from JO file)
+  std::vector<std::string> m_extrafiles;
+
+  /// Number of cores recommended for multi-core integration file
+  int m_ncores;
+
+  /// Memory required for integration/evgen
+  double m_memorymb;
+
   double m_xsscale;
-  std::string m_scalevarref;
+  bool m_cleanup;
 };
 
 
diff --git a/Generators/Sherpa_i/src/Sherpa_i.cxx b/Generators/Sherpa_i/src/Sherpa_i.cxx
index 4cbc17298018177c5f773d2cd54123059df65b3f..22fb0b6642fc6cea69e69565fb5beaab56ff67ff 100644
--- a/Generators/Sherpa_i/src/Sherpa_i.cxx
+++ b/Generators/Sherpa_i/src/Sherpa_i.cxx
@@ -1,7 +1,6 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
-
 #include "HepMC/GenEvent.h"
 #include "GaudiKernel/MsgStream.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
@@ -17,6 +16,7 @@
 
 #include <cstdio>
 #include <cstring>
+#include <signal.h>
 #include "CLHEP/Random/RandFlat.h"
 #include "AthenaKernel/IAtRndmGenSvc.h"
 
@@ -25,10 +25,15 @@ CLHEP::HepRandomEngine* p_rndEngine;
 Sherpa_i::Sherpa_i(const std::string& name, ISvcLocator* pSvcLocator) 
   : GenModule(name, pSvcLocator), p_sherpa(NULL)
 {
-  declareProperty("RunPath", m_path = ".");
+  declareProperty("RunCard", m_runcard = "");
   declareProperty("Parameters", m_params);
+  declareProperty("OpenLoopsLibs", m_openloopslibs);
+  declareProperty("ExtraFiles", m_extrafiles);
+  declareProperty("NCores", m_ncores=1);
+  declareProperty("MemoryMB", m_memorymb=2500.);
+
   declareProperty("CrossSectionScaleFactor", m_xsscale=1.0);
-  declareProperty("ScaleVariationReference", m_scalevarref="MUR1_MUF1_PDF261000");
+  declareProperty("CleanupGeneratedFiles", m_cleanup=false);
 }
 
 
@@ -64,40 +69,24 @@ StatusCode Sherpa_i::genInitialize(){
     getParameters(argc, argv);
     p_sherpa->InitializeTheRun(argc,(char **)argv);
     delete [] argv;
+
+    p_sherpa->InitializeTheEventHandler();
   }
   catch (ATOOLS::Exception exception) {
     if (exception.Class()=="Matrix_Element_Handler" && exception.Type()==ATOOLS::ex::normal_exit) {
-      delete p_sherpa;
-
-      ATH_MSG_INFO("Have to compile Amegic libraries");
-      std::string tmp="cd "+m_path+"; ./makelibs && cd -;";
-      int stat = system(tmp.c_str());
-      if (stat==0) {
-	ATH_MSG_INFO("Finished compiling Amegic libraries");
-      }
-      else {
-	ATH_MSG_ERROR("Error while compiling Amegic libraries.");
-	return StatusCode::FAILURE;
-      }
-
-      int argc;
-      char** argv;
-      getParameters(argc, argv);
-      p_sherpa = new SHERPA::Sherpa();
-      p_sherpa->InitializeTheRun(argc,(char **)argv);
-      delete [] argv;
+      ATH_MSG_ERROR("Have to compile Amegic libraries");
+      ATH_MSG_ERROR("You probably want to run ./makelibs");
     }
     else {
       ATH_MSG_ERROR("Unwanted ATOOLS::exception caught.");
       ATH_MSG_ERROR(exception);
-      return StatusCode::FAILURE;
     }
+    return StatusCode::FAILURE;
   }
   catch (std::exception exception) {
     ATH_MSG_ERROR("std::exception caught.");
     return StatusCode::FAILURE;
   }
-  p_sherpa->InitializeTheEventHandler();
 
   return StatusCode::SUCCESS;
 }
@@ -127,21 +116,6 @@ StatusCode Sherpa_i::fillEvt(HepMC::GenEvent* event) {
       if (i==0 || i>3) event->weights()[i] /= weight_normalisation;
       ATH_MSG_DEBUG("Sherpa WEIGHT " << i << " value="<< event->weights()[i]);
     }
-
-    // workaround according to https://sherpa.hepforge.org/trac/ticket/365
-    if (event->weights().has_key(m_scalevarref)) {
-      double correction_factor = event->weights()[0] / event->weights()[m_scalevarref];
-      if (correction_factor != 1.0) {
-        ATH_MSG_DEBUG("correction_factor = " << correction_factor);
-        for (size_t i=4; i<event->weights().size(); ++i) {
-          event->weights()[i] *= correction_factor;
-        }
-      }
-    }
-    else {
-      ATH_MSG_DEBUG("No weight with key " << m_scalevarref);
-    }
-
   }
 
   GeVToMeV(event); //unit check
@@ -164,10 +138,15 @@ StatusCode Sherpa_i::genFinalize() {
   std::cout << "MetaData: PDF = " << p_sherpa->PDFInfo() << std::endl;
 
   std::cout << "Named variations initialised by Sherpa:" << std::endl;
-  std::cout << *p_sherpa->GetInitHandler()->GetVariations() << std::endl;
+  std::cout << "MN: disabled output because of CI link failure. REVERT once fixed. *p_sherpa->GetInitHandler()->GetVariations()" << std::endl;
 
   p_sherpa->SummarizeRun();
   delete p_sherpa;
+
+  if (m_cleanup) {
+    ATH_MSG_INFO("Deleting left-over files from working directory.");
+    system("rm -rf Results.db Process MIG_*.db MPI_*.dat libSherpa*.so libProc*.so");
+  }
   
   return StatusCode::SUCCESS;
 }
@@ -177,11 +156,7 @@ void Sherpa_i::getParameters(int &argc, char** &argv) {
   std::vector<std::string> params;
 
   // set some ATLAS specific default values as a starting point
-  params.push_back("PATH="+m_path);
   params.push_back("EXTERNAL_RNG=Atlas_RNG");
-  params.push_back("MAX_PROPER_LIFETIME=10.0");
-  params.push_back("BEAM_1=2212");
-  params.push_back("BEAM_2=2212");
 
   /***
       Adopt Atlas Debug Level Scheme
@@ -214,6 +189,7 @@ void Sherpa_i::getParameters(int &argc, char** &argv) {
   strcpy(argv[0], "Sherpa");
 
   ATH_MSG_INFO("Sherpa_i using the following Arguments");
+  ATH_MSG_INFO(m_runcard);
   for(size_t i=0; i<params.size(); i++) {
     ATH_MSG_INFO(" [ " << params[i] << " ] ");
     argv[i+1] = new char[params[i].size()+1];
diff --git a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.cxx b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.cxx
index 1c04d4081401182779cb4ecbdf5bc9476f0e76d2..e85f242bdaccfce5a573d3ee6bee5cbe756e5344 100755
--- a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.cxx
+++ b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.cxx
@@ -38,8 +38,6 @@
 #include <TH2F.h>
 #include <TProfile2D.h>
 
-#include "boost/foreach.hpp"
-
 
 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0)
 #   define CAN_REBIN(hist)  hist->SetCanExtend(TH1::kAllAxes)
@@ -235,6 +233,28 @@ StatusCode TrigALFAROBMonitor::initialize(){
     m_ALFARobIds.push_back(m_lvl1ALFA2ROBid.value());
   }
 
+  const TrigConf::HLTChainList *chainlist = m_configSvc->chainList();
+  if (chainlist) {
+         for (auto *chain: *chainlist) {
+            if (chain->chain_name() == "HLT_costmonitor") {
+               m_HLTcostMon_chain = chain;               
+               ATH_MSG_INFO ("found HLT_costmonitor chain with prescale " << m_HLTcostMon_chain->prescale()
+                                << " and the SB flag set to: "<<m_SBflag);
+               if (m_HLTcostMon_chain->prescale() >=1 ) {
+                      m_SBflag = true;
+               } else {
+                      m_SBflag = false;
+               }
+            } else {
+                      //ATH_MSG_INFO ("HLT prescale key evaluation - " << chain->chain_name());
+            }  
+         }
+  } else {
+       ATH_MSG_WARNING ("HLT prescale key evaluation  - failed");
+  }
+
+
+
   ATH_MSG_INFO("Initialize completed");
   return StatusCode::SUCCESS;
 }
@@ -289,51 +309,27 @@ StatusCode TrigALFAROBMonitor::execute() {
   const EventID* p_EventID = p_EventInfo->event_ID();
   m_LB = p_EventID->lumi_block();
 
-  // check if we have new LB and any histograms need reset
-  // if we have new LB and StableBeams start filling and resetting SB histograms
-             //ATH_MSG_INFO ("HLT prescale key evaluation ");
-             const TrigConf::HLTChainList *chainlist = m_configSvc->chainList();
-             if (chainlist) {
-                 BOOST_FOREACH(TrigConf::HLTChain* chain, *chainlist) {
-                   if (chain->chain_name() == "HLT_costmonitor") {
-                        if (chain->prescale() >=1 ) {
-                               m_SBflag = true;
-                        } else {
-                               m_SBflag = false;
-                        }
-                        //ATH_MSG_INFO ("HLT_costmonitor chain with prescale " << chain->prescale()<< " and the SB flag set to: "<<m_SBflag);
-                   } else {
-                      //ATH_MSG_INFO ("HLT prescale key evaluation - " << chain->chain_name());
-                   }
-                 }
-             } else {
-             ATH_MSG_WARNING ("HLT prescale key evaluation  - failed");
-             }
-
   if (m_previousEventLB < 0) {
     m_previousEventLB = m_LB;  // first event
+    m_prevLB10reset = m_LB;
+    m_prevLB60reset = m_LB;
   } else {
      if (m_LB > m_previousEventLB){ // new LB
         reset1LBhistos(m_previousEventLB);
-        if (m_LB % 10 == 0) reset10LBhistos(m_previousEventLB);
-        if (m_LB % 60 == 0) reset60LBhistos(m_previousEventLB);
+        if ((m_LB - m_prevLB10reset) > 10 ) {reset10LBhistos(m_previousEventLB); m_prevLB10reset = m_LB;};
+        if ((m_LB - m_prevLB10reset) > 60 ) {reset60LBhistos(m_previousEventLB); m_prevLB60reset = m_LB;};
         uint32_t newPrescKey = m_configSvc->hltPrescaleKey();
         if (newPrescKey != m_prescKey) {
-             // check with cont monitor if the SB fla has been set
              ATH_MSG_INFO ("HLT prescale key changed to "<<newPrescKey );
-             const TrigConf::HLTChainList *chainlist = m_configSvc->chainList();
-             if (chainlist) {
-                 BOOST_FOREACH(TrigConf::HLTChain* chain, *chainlist) {
-                   if (chain->chain_name() == "HLT_costmonitor") {
-                        if (chain->prescale() >=1 ) {
-                               m_SBflag = true;
-                        } else {
-                               m_SBflag = false;
-                        }
-                        ATH_MSG_INFO ("found HLT_costmonitor chain with prescale " << chain->prescale()<< " and the SB flag set to: "<<m_SBflag);
-                   }
-                 }
+             
+             // check with cont monitor if the SB fla has been set
+             if (m_HLTcostMon_chain->prescale() >=1 ) {
+                        m_SBflag = true;
+             } else {
+                        m_SBflag = false;
              }
+             ATH_MSG_INFO ("found HLT_costmonitor chain with prescale " << m_HLTcostMon_chain->prescale()
+                                << " and the SB flag set to: "<<m_SBflag);
              m_prescKey = newPrescKey;
         }
         m_previousEventLB = m_LB;
@@ -421,24 +417,10 @@ StatusCode TrigALFAROBMonitor::execute() {
 
     // decode ALFA ROBs
     if (! event_with_checksum_failure) {
-       decodeALFA(**it );
-
-       //LVL1CTP::Lvl1Result resultL1(true);
-       //if (getLvl1Result(resultL1)) {
-       		std::vector<uint32_t> itemsBP = resultL1.itemsBeforePrescale();
-                for (std::map<int, int>::iterator it = m_map_TrgItemNumbersToHistGroups.begin(); it != m_map_TrgItemNumbersToHistGroups.end(); ++it) {
-                    int word = it->first>>5;
-                    int offset = (it->first)%32;
-                    if (itemsBP.at(word) & 1<<offset) {
-                       //ATH_MSG_INFO ("found item: "<<it->first<<" in word: "<<word<<" offset: "<<offset);
-                    }
-                }
-       		for(std::vector<uint32_t>::iterator it = itemsBP.begin(); it != itemsBP.end(); ++it) {
-          		//ATH_MSG_INFO ("triggerWord: "<<*it);
-       		}
-       findALFATracks(resultL1);
-       //}
-       findODTracks ();
+       if (decodeALFA(**it ) == 0) {
+          findALFATracks(resultL1);
+          findODTracks ();
+      }
     }
   }
 
@@ -572,6 +554,11 @@ StatusCode TrigALFAROBMonitor::start() {
     if( m_rootHistSvc->regHist(m_pathHisto + "common/" + m_hist_goodDataLB18->GetName(), m_hist_goodDataLB18).isFailure() ) {
 	ATH_MSG_WARNING("Can not register ALFA ROB good data elastic LB 18 monitoring histogram: " << m_hist_goodDataLB18->GetName());
     }
+    histTitle = "corruptedROD";
+    m_hist_corruptedROD_LB = new TH2F (histTitle.c_str(), (histTitle + " perLB").c_str(), 1000, -0.5, 999.5, 2, -0.5, 1.5);
+    if( m_rootHistSvc->regHist(m_pathHisto + "common/" + m_hist_corruptedROD_LB->GetName(), m_hist_corruptedROD_LB).isFailure() ) {
+	ATH_MSG_WARNING("Can not register ALFA ROB good data elastic LB 18 monitoring histogram: " << m_hist_corruptedROD_LB->GetName());
+    }
   }
 
 
@@ -773,7 +760,7 @@ StatusCode TrigALFAROBMonitor::stop() {
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-bool TrigALFAROBMonitor::verifyALFAROBChecksum(OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment robFrag) {
+bool TrigALFAROBMonitor::verifyALFAROBChecksum(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& robFrag) {
 
   bool failed_checksum(false);
   OFFLINE_FRAGMENTS_NAMESPACE::PointerType it(0); 
@@ -825,7 +812,7 @@ bool TrigALFAROBMonitor::verifyALFAROBChecksum(OFFLINE_FRAGMENTS_NAMESPACE::ROBF
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-void TrigALFAROBMonitor::verifyROBStatusBits(OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment robFrag) {
+void TrigALFAROBMonitor::verifyROBStatusBits(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& robFrag) {
 
   // print check for received ROB
 	ATH_MSG_VERBOSE(" verifyROBStatusBits: ROB id = 0x" << std::setw(6)  << MSG::hex << robFrag.source_id() << MSG::dec);
@@ -853,7 +840,7 @@ void TrigALFAROBMonitor::verifyROBStatusBits(OFFLINE_FRAGMENTS_NAMESPACE::ROBFra
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-void TrigALFAROBMonitor::decodeALFA(OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment robFrag) {
+uint32_t TrigALFAROBMonitor::decodeALFA(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& robFrag) {
 
   ATH_MSG_DEBUG(" decodeALFA: ROB id = 0x" << std::setw(6)  << MSG::hex << robFrag.source_id() << MSG::dec);
 
@@ -877,7 +864,7 @@ void TrigALFAROBMonitor::decodeALFA(OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment rob
 				     << robFragSize << " ROD fragment size " << rodFragSize << " evtNum " <<evtNum );
 
   // check if we have real data in the ROB - ALFA has fixed fragment size of 0x1e1 - skip such event and return if not real
-  if (robFragSize != 0x1e1) return;
+  if (robFragSize != 0x1e1) return (1);
 
   if ((rodId == (uint32_t)m_lvl1ALFA1ROBid.value()) || (rodId == (uint32_t)m_lvl1ALFA2ROBid.value())) {
     ATH_MSG_DEBUG( "   Found ALFA ROB " << std::to_string(rodId) );
@@ -894,7 +881,7 @@ void TrigALFAROBMonitor::decodeALFA(OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment rob
      
     uint32_t ndata = robFrag.rod_ndata();
     for( uint32_t i = 0; i < ndata; ++i, ++data ) {
-      ATH_MSG_DEBUG( "       0x" << MSG::hex << std::setw( 8 )
+      ATH_MSG_DEBUG( MSG::dec<< " i: "<<i<<"       0x" << MSG::hex << std::setw( 8 )
 	    << static_cast< uint32_t >( *data ) );
     } 
     /* Create trailer */
@@ -925,41 +912,38 @@ void TrigALFAROBMonitor::decodeALFA(OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment rob
 
     
     while ( 1 ) {
+	uint32_t mbNb = 0; // from 20.07.2010 MB numbers are as PMF0 15-0 bits - counting from 1 and coded as 1 from N 
+        
         // check consistency of the ROD data - if data from LWC point to TWC
         if ((*lwcPtr & 0xff000000) != 0x81000000) {
 	    //AlfaEventObj->framingStatus |= 0x4;
 	    //char hex_display[100];
 	    //sprintf(hex_display, "0x%x", *lwcPtr);
-    	    ATH_MSG_DEBUG("ROD skipped - LWC(-1): "<< *(lwcPtr-1) <<" LWC: "<<*lwcPtr << " LWC+1: "<< *(lwcPtr+1) );
-            continue;
+            m_hist_corruptedROD_LB->Fill(m_LB, rodId&0x1);
+    	    ATH_MSG_DEBUG("ROD "<< MSG::hex<<rodId<<" skipped - LWC(-1): "<< *(lwcPtr-1) <<" LWC: "<<*lwcPtr << " LWC+1: "<< *(lwcPtr+1) );
+    	    ATH_MSG_INFO("ROD "<< MSG::hex<<rodId<<"skipped - LWC(-1): "<< *(lwcPtr-1) <<" LWC: "<<*lwcPtr << " LWC+1: "<< *(lwcPtr+1) );
+            return (1); //continue;
         }
         if ((*twcPtr & 0xff000000) != 0x8a000000) {
 	    //AlfaEventObj->framingStatus |= 0x8;
 	    //char hex_display[100];
 	    //sprintf(hex_display, "0x%x", *twcPtr);
-    	    ATH_MSG_DEBUG( "ROD skipped - TWC: "<< *twcPtr );
-            continue;
+            m_hist_corruptedROD_LB->Fill(m_LB, rodId&0x1);
+    	    ATH_MSG_DEBUG( "ROD "<< MSG::hex<<rodId<<" skipped - TWC: "<< *twcPtr );
+    	    ATH_MSG_INFO( "ROD "<< MSG::hex<<rodId<<" skipped - TWC(-1): "<< *(twcPtr-1)<< " TWC: "<< *twcPtr <<" TWC+1: " << *(twcPtr+1) 
+                           <<" LWC: " << *lwcPtr << " mbNb: "<< mbNb);
+            return (1); //continue;
         }
 
 
         const uint32_t* dataPtr = lwcPtr;
         dataPtr++; // bol
 
-	//uint32_t mrodInputNb =  (*dataPtr) & 0xf; 
-	uint32_t mbNb = 0; // from 20.07.2010 MB numbers are as PMF0 15-0 bits - counting from 1 and coded as 1 from N 
-	//uint32_t mrodNb = ((*dataPtr)>>4) & 0xfff;
-
 	dataPtr++; // tlp - always 5 TDCs (5 captons) - use it as mask for scanning TDC data
         uint32_t tlp = (*dataPtr) & 0xffff; 
         dataPtr++; // bot
 
         for ( ; tlp; tlp>>=1 ) {
-            //uint32_t bot = *dataPtr;  // event number and bcx numbers 
-
-            //if ((bob&0xFFF) != ((bot>>12)&0xFFF)) // synch check: TTC at MB against TTC at ROD 
-            //{
-              // AlfaEventObj->synchRODvsMB[0] |= (0x1)<<mrodInputNb; // offest zero in synchRODvsMB should be replaced by the ROD number
-            //}
 
             dataPtr++; // TDC data
 	    uint32_t data16channels = *dataPtr;
@@ -1010,8 +994,6 @@ void TrigALFAROBMonitor::decodeALFA(OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment rob
                 data16channels = *dataPtr;
             }
 
-	    //AlfaEventObj->bcxAtALFA_M[mbNb-1] = bot & 0xFFF;
-
             // TDC trailer EOT ?
             if (( *dataPtr & 0xF0000000) != 0xC0000000) {
                 break;
@@ -1026,14 +1008,11 @@ void TrigALFAROBMonitor::decodeALFA(OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment rob
             continue;
         }
         
-        //if ((*dataPtr & 0xff000000) == 0xf0000000)  { //EOB
-            //break; 
-        //}
-
-        return; //break;  // end of data or data corrupted - break decoding
+        return (0); //break;  // end of data or data corrupted - break decoding
     } //ERS_INFO ("gnamDecode - end of decoding MROD:" << MrodId);
   }
  }
+ return (0);
 }
 
 void TrigALFAROBMonitor::decodeRealPMT (uint32_t dataWord, uint32_t quarter, uint32_t mbNb, uint32_t pmf) {
@@ -1222,7 +1201,7 @@ void TrigALFAROBMonitor::reset60LBhistos(int lbNumber) {
 
 
 
-void TrigALFAROBMonitor::findALFATracks( LVL1CTP::Lvl1Result &resultL1 ) {
+void TrigALFAROBMonitor::findALFATracks( const LVL1CTP::Lvl1Result &resultL1 ) {
 	float x_Rec[8];
 	float y_Rec[8];
 	
@@ -1359,7 +1338,7 @@ void TrigALFAROBMonitor::findALFATracks( LVL1CTP::Lvl1Result &resultL1 ) {
                                 x_Rec[iDet] = (RecPos_U-RecPos_V)/2.;
                                 y_Rec[iDet] = sign*(-(RecPos_V+RecPos_U)/2.-115.);
 
-       		                std::vector<uint32_t> itemsBP = resultL1.itemsBeforePrescale();
+       		                const std::vector<uint32_t>& itemsBP = resultL1.itemsBeforePrescale();
                                 for (std::map<int, int>::iterator it = m_map_TrgItemNumbersToHistGroups.begin(); it != m_map_TrgItemNumbersToHistGroups.end(); ++it) {
                                        int word = it->first>>5;
                                        int offset = (it->first)%32;
@@ -1389,7 +1368,7 @@ void TrigALFAROBMonitor::findALFATracks( LVL1CTP::Lvl1Result &resultL1 ) {
 
         }
 
-        std::vector<uint32_t> itemsBP = resultL1.itemsBeforePrescale();
+        const std::vector<uint32_t>& itemsBP = resultL1.itemsBeforePrescale();
         if (itemsBP.at(m_elast15>>5) & (1 <<(m_elast15%32))) {
            m_hist_goodData->Fill(1.);
            m_hist_goodDataLB15->Fill(m_LB, 1.);
diff --git a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.h b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.h
index d666ec58b1ab133949128896abeefd27e3e4dfdc..bbe9b6f3becb4485ad8f61b8bdf663098b5ae788 100755
--- a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.h
+++ b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.h
@@ -18,6 +18,10 @@
 #include "TrigSteeringEvent/Lvl1Result.h"
 #include "TrigSteeringEvent/HLTResult.h"
 
+#include "TrigConfHLTData/HLTChain.h"
+#include "TrigConfHLTData/HLTChainList.h"
+
+
 /////////////////////////////////////////////////////////////////////////////
 
 namespace ROIB {
@@ -100,6 +104,7 @@ private:
   TH1F*                            m_hist_goodData;
   TH2F*                            m_hist_goodDataLB15;
   TH2F*                            m_hist_goodDataLB18;
+  TH2F*                            m_hist_corruptedROD_LB;
   BooleanProperty                  m_doODDistance;
   TH1F*                            m_hist_PosDetector[8][2];
   TH1F*                            m_hist_DistStation[8][2];
@@ -118,6 +123,8 @@ private:
 
   int m_LB; // luminosity block number
   int m_previousEventLB; // luminosity block number of the previous events
+  int m_prevLB10reset;   // LB at which previous reset of 10LB histograms happened
+  int m_prevLB60reset;   // LB  -- 60LB histograms were reset
   uint32_t m_prescKey; // current hlt prescale key
 
   BooleanProperty                  m_doTiming;
@@ -151,7 +158,8 @@ private:
 
   std::string m_pathHisto;
 
-  bool m_SBflag;
+  bool                m_SBflag;
+  TrigConf::HLTChain* m_HLTcostMon_chain;
 
   int m_elast15, m_elast18;     // ctp-items id numbers to select golden alfa trigger for data quality assesment
   int m_nbOfTracksInDetectors[8]; // counters for track candidates - needed in data quality assesment
@@ -194,20 +202,20 @@ bool m_sFiberHitsODPos[8][3][30],  m_sFiberHitsODNeg[8][3][30];
 
   /// Helper for checksum test
   /// returns true if a ROB checksum failed
-  bool verifyROBChecksum(OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment robFrag);
+  bool verifyROBChecksum(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& robFrag);
 
-  bool verifyALFAROBChecksum(OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment robFrag);
+  bool verifyALFAROBChecksum(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& robFrag);
 
   /// Helper for status bits test
-  void verifyROBStatusBits(OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment robFrag);
+  void verifyROBStatusBits(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& robFrag);
 
   /// Helper for decoding the ALFA ROB 
-  void decodeALFA(OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment robFrag);
+  uint32_t  decodeALFA(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& robFrag);
   void decodeRealPMT (uint32_t dataWord, uint32_t quarter, uint32_t mbNb, uint32_t pmf);
   uint32_t  decodePMT0 (uint32_t dataWord);
 
   /// find tacks in ALFA detectors
-  void findALFATracks(LVL1CTP::Lvl1Result &resultL1);
+  void findALFATracks(const LVL1CTP::Lvl1Result &resultL1);
 
   // find OD tracks and calculate distance
   void findODTracks ();
diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/InDetAlignGenAlgs/CreateMisalignAlg.h b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/InDetAlignGenAlgs/CreateMisalignAlg.h
index ace9ebda780e856e1ec41d261a8386a46faa17f0..4d8b8e42205590e91a46664421728eee0b1e6533 100644
--- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/InDetAlignGenAlgs/CreateMisalignAlg.h
+++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/InDetAlignGenAlgs/CreateMisalignAlg.h
@@ -26,9 +26,14 @@
 // Write output into ROOT Trees
 #include "TTree.h"
 
+#include "Identifier/Identifier.h"
+#include "InDetAlignGenTools/IInDetAlignDBTool.h"
+#include "TRT_ConditionsServices/ITRT_AlignDbSvc.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
+
 //Forward declaration
 class IdentifierHash;
-#include "Identifier/Identifier.h"
 class TTree;
 
 class AtlasDetectorID;
@@ -36,11 +41,7 @@ class PixelID;
 class SCT_ID;
 class TRT_ID;
 
-#include "InDetAlignGenTools/IInDetAlignDBTool.h"
-#include "TRT_ConditionsServices/ITRT_AlignDbSvc.h"
-
 namespace InDetDD {
-class SCT_DetectorManager;
 class PixelDetectorManager;
 class TRT_DetectorManager;
 }
@@ -71,12 +72,13 @@ private:
     const TRT_ID                          *m_trtIdHelper;
 
     const InDetDD::PixelDetectorManager   *m_pixelManager;
-    const InDetDD::SCT_DetectorManager    *m_SCT_Manager;
     const InDetDD::TRT_DetectorManager    *m_TRT_Manager;
 
     ToolHandle< IInDetAlignDBTool >        m_IDAlignDBTool;
     ServiceHandle<ITRT_AlignDbSvc>          m_trtaligndbservice;
 
+    SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+
     // algorithm parameters, possible to declare at runtime
     std::string                            m_asciiFileNameBase;  ///< filename basis for ASCII files with alignment constants
     std::string                            m_SQLiteTag;          ///< tag name for the ConditionsDB
diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/InDetAlignGenAlgs/InDetAlignCog.h b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/InDetAlignGenAlgs/InDetAlignCog.h
index d6f7849df22980d6118c730d92e3ad008f0afbcd..33252d90a5d0ee8f273cea3648618e3a483dc7aa 100644
--- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/InDetAlignGenAlgs/InDetAlignCog.h
+++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/InDetAlignGenAlgs/InDetAlignCog.h
@@ -23,15 +23,16 @@
 #include <GeoPrimitives/GeoPrimitives.h>
 #include <EventPrimitives/EventPrimitives.h>
 
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
+
 class PixelID;
 class SCT_ID;
 class TRT_ID;
 class ITRT_AlignDbSvc;
 
 namespace InDetDD {
-  class SiDetectorManager;
   class PixelDetectorManager;
-  class SCT_DetectorManager;
   class TRT_DetectorManager;
   class SiDetectorElement;
 }
@@ -65,7 +66,7 @@ class InDetAlignCog : public AthAlgorithm {
   };
 
 
-  StatusCode getSiElements(const InDetDD::SiDetectorManager*,const bool, InDetAlignCog::Params_t &params);  
+  StatusCode getSiElements(const InDetDD::SiDetectorElementCollection*,const bool, InDetAlignCog::Params_t &params);
   StatusCode getTRT_Elements(const bool, InDetAlignCog::Params_t &params);  
   StatusCode shiftIDbyCog();
   StatusCode addL1();
@@ -90,7 +91,6 @@ class InDetAlignCog : public AthAlgorithm {
 
   // managers
   const InDetDD::PixelDetectorManager *m_Pixel_Manager;
-  const InDetDD::SCT_DetectorManager *m_SCT_Manager;
   const InDetDD::TRT_DetectorManager *m_TRT_Manager;
   
   // helpers
@@ -104,6 +104,8 @@ class InDetAlignCog : public AthAlgorithm {
   // TRTAlignDbTool
   // ToolHandle<ITRTAlignDbTool> m_TRTAlignDbTool; 
   ServiceHandle<ITRT_AlignDbSvc> m_TRTAlignDbTool; 
+
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
   
   // Select which detectors will be considered for cog calculation 
   int m_det;       //!< Pixel=1, SCT=2, Pixel+SCT=12, TRT=3, all (silicon and TRT)=99
diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/CreateMisalignAlg.cxx b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/CreateMisalignAlg.cxx
index c913f0da6c31cd89ed83e793ce011e8d1bdfd699..1bafa0aacb6d9d2f32a15c929484bea14e52948d 100644
--- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/CreateMisalignAlg.cxx
+++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/CreateMisalignAlg.cxx
@@ -27,12 +27,11 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/TRT_ID.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/TRT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "InDetReadoutGeometry/TRT_DetElementCollection.h"
 #include "DetDescrConditions/AlignableTransform.h"
+#include "StoreGate/ReadCondHandleKey.h"
 
 // Alignment DB Stuff
 #include "InDetAlignGenTools/IInDetAlignDBTool.h"
@@ -54,7 +53,6 @@ namespace InDetAlignment
         m_sctIdHelper(nullptr),
         m_trtIdHelper(nullptr),
         m_pixelManager(nullptr),
-        m_SCT_Manager(nullptr),
         m_TRT_Manager(nullptr),
 	m_IDAlignDBTool("InDetAlignDBTool"),
 	m_trtaligndbservice("TRT_AlignDbSvc",name),
@@ -133,8 +131,9 @@ namespace InDetAlignment
 		ATH_CHECK(detStore()->retrieve(m_idHelper, "AtlasID"));
 		//pixel and SCT  TRT manager
 		ATH_CHECK(detStore()->retrieve(m_pixelManager, "Pixel"));
-		ATH_CHECK(detStore()->retrieve(m_SCT_Manager, "SCT"));
 		ATH_CHECK(detStore()->retrieve(m_TRT_Manager, "TRT"));
+                // ReadCondHandleKey
+                ATH_CHECK(m_SCTDetEleCollKey.initialize());
 		// Retrieve the Histo Service
 		ITHistSvc* hist_svc;
 		ATH_CHECK(service("THistSvc",hist_svc));
@@ -242,14 +241,20 @@ namespace InDetAlignment
 	//__________________________________________________________________________
 	void CreateMisalignAlg::setupSCT_AlignModule(int& nSCT)
 	{
-		InDetDD::SiDetectorElementCollection::const_iterator iter;
-		
-		for (iter = m_SCT_Manager->getDetectorElementBegin(); iter != m_SCT_Manager->getDetectorElementEnd(); ++iter) {
-			const Identifier SCT_ModuleID = m_sctIdHelper->module_id((*iter)->identify()); //from wafer id to module id
+                // SiDetectorElementCollection for SCT
+                SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
+                const InDetDD::SiDetectorElementCollection* elements(*sctDetEleHandle);
+                if (not sctDetEleHandle.isValid() or elements==nullptr) {
+                        ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available.");
+                        return;
+                }
+		for (const InDetDD::SiDetectorElement *element: *elements) {
+			const Identifier SCT_ModuleID = m_sctIdHelper->module_id(element->identify()); //from wafer id to module id
+                        const IdentifierHash SCT_ModuleHash = m_sctIdHelper->wafer_hash(SCT_ModuleID);
 			
 			if (m_ModuleList.find(SCT_ModuleID) == m_ModuleList.end())
 			{
-				const InDetDD::SiDetectorElement *module = m_SCT_Manager->getDetectorElement(SCT_ModuleID);
+				const InDetDD::SiDetectorElement *module = elements->getDetectorElement(SCT_ModuleHash);
 				m_ModuleList[SCT_ModuleID][0] = module->center()[0];
 				m_ModuleList[SCT_ModuleID][1] = module->center()[1];
 				m_ModuleList[SCT_ModuleID][2] = module->center()[2];
@@ -257,7 +262,7 @@ namespace InDetAlignment
 				ATH_MSG_INFO( "SCT module " << nSCT );
 			}
 			
-			if (m_sctIdHelper->side((*iter)->identify()) == 0) { // inner side case
+			if (m_sctIdHelper->side(element->identify()) == 0) { // inner side case
 				// Write out Visualization Lookup Tree
 				m_AthenaHashedID = SCT_ModuleID.get_identifier32().get_compact();
 				m_HumanReadableID = 1000000*2 /*2 = SCT*/
@@ -477,7 +482,14 @@ namespace InDetAlignment
 		const double maxDeltaZ = m_Misalign_maxShift;
 		ATH_MSG_DEBUG( "maximum deltaPhi              = " << maxAngle/CLHEP::mrad << " mrad" );
 		ATH_MSG_DEBUG( "maximum deltaPhi for 1/r term = " << maxAngleInner/CLHEP::mrad << " mrad" );
-		
+
+                // SiDetectorElementCollection for SCT
+                SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
+                const InDetDD::SiDetectorElementCollection* sctElements(*sctDetEleHandle);
+                if (not sctDetEleHandle.isValid() or sctElements==nullptr) {
+                  ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available.");
+                  return StatusCode::FAILURE;
+                }
 		
 		for (std::map<Identifier, HepGeom::Point3D<double> >::const_iterator iter = m_ModuleList.begin(); iter != m_ModuleList.end(); ++iter) {
 			++i;
@@ -490,7 +502,8 @@ namespace InDetAlignment
 				SiModule = m_pixelManager->getDetectorElement(ModuleID);
 				//module = SiModule;
 			} else if (m_idHelper->is_sct(ModuleID)) {
-				SiModule = m_SCT_Manager->getDetectorElement(ModuleID);
+                                const IdentifierHash SCT_ModuleHash = m_sctIdHelper->wafer_hash(ModuleID);
+				SiModule = sctElements->getDetectorElement(SCT_ModuleHash);
 				//module = SiModule;
 			} else if (m_idHelper->is_trt(ModuleID)) {
 				//module = m_TRT_Manager->getElement(ModuleID);
diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/InDetAlignCog.cxx b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/InDetAlignCog.cxx
index cc71c1046812b9a11fab18db4eed90f963d1e864..b756a435613f86559a1c9a1fb0c1160d7def486e 100644
--- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/InDetAlignCog.cxx
+++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/InDetAlignCog.cxx
@@ -11,11 +11,8 @@
 
 
 #include "InDetAlignGenAlgs/InDetAlignCog.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/TRT_DetectorManager.h"
-#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "Identifier/Identifier.h"
 #include "Identifier/IdentifierHash.h"
@@ -27,6 +24,9 @@
 #include "AthenaBaseComps/AthCheckMacros.h"
 
 #include "GeoPrimitives/CLHEPtoEigenConverter.h"
+
+#include "StoreGate/ReadCondHandleKey.h"
+
 #include <limits>
 
 namespace {
@@ -84,7 +84,6 @@ static const double onemrad  = 0.001;
 InDetAlignCog::InDetAlignCog(const std::string& name, ISvcLocator* pSvcLocator) 
   : AthAlgorithm(name, pSvcLocator), 
     m_Pixel_Manager(0),
-    m_SCT_Manager(0),
     m_TRT_Manager(0),
     m_pixid(0),
     m_sctid(0),
@@ -203,9 +202,7 @@ StatusCode InDetAlignCog::initialize(){
 
   ATH_CHECK(  detStore()->retrieve(m_pixid));
   
-  // get SCT manager and helper
-  ATH_CHECK( detStore()->retrieve(m_SCT_Manager, "SCT"));
-
+  // get SCT helper
   ATH_CHECK( detStore()->retrieve(m_sctid));
   
   // get TRT manager and helper
@@ -220,6 +217,9 @@ StatusCode InDetAlignCog::initialize(){
   // Get TRTAlignDBTool
   ATH_CHECK( m_TRTAlignDbTool.retrieve() );
 
+  // ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
   ATH_MSG_DEBUG ( "Retrieved tool " << m_TRTAlignDbTool );
   
   return StatusCode::SUCCESS;
@@ -231,6 +231,17 @@ StatusCode InDetAlignCog::initialize(){
 //===================================================
 StatusCode InDetAlignCog::execute() {
   ATH_MSG_DEBUG( "execute()" );
+
+  const InDetDD::SiDetectorElementCollection* sctElements(nullptr);
+  if (m_det==2) {
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
+    sctElements = *sctDetEleHandle;
+    if (not sctDetEleHandle.isValid() or sctElements==nullptr) {
+      ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available.");
+      return StatusCode::FAILURE;
+    }
+  }
+
   if (m_firstEvent) {
     m_firstEvent = false;
     m_counter = 0;
@@ -251,8 +262,8 @@ StatusCode InDetAlignCog::execute() {
     
     // first loop to calculate cog
     //StatusCode sc;
-    if(m_det==99 || m_det==1 || m_det==12) ATH_CHECK( getSiElements(m_Pixel_Manager,false,params) );
-    if(m_det==99 || m_det==2 || m_det==12) ATH_CHECK( getSiElements(m_SCT_Manager,false,params) );
+    if(m_det==99 || m_det==1 || m_det==12) ATH_CHECK( getSiElements(m_Pixel_Manager->getDetectorElementCollection(),false,params) );
+    if(m_det==99 || m_det==2 || m_det==12) ATH_CHECK( getSiElements(sctElements,false,params) );
     if(m_det==99 || m_det==3) ATH_CHECK( getTRT_Elements(false, params) );
     //if(sc.isFailure())
     //  ATH_MSG_ERROR( "Problem getting elements from managers" );
@@ -313,8 +324,8 @@ StatusCode InDetAlignCog::execute() {
     m_counter=0;
 
     // second loop to compute residual transform after substracting cog
-    if(m_det==99 || m_det==1 || m_det==12) ATH_CHECK( getSiElements(m_Pixel_Manager,true, params) );
-    if(m_det==99 || m_det==2 || m_det==12) ATH_CHECK( getSiElements(m_SCT_Manager,true, params) );
+    if(m_det==99 || m_det==1 || m_det==12) ATH_CHECK( getSiElements(m_Pixel_Manager->getDetectorElementCollection(),true, params) );
+    if(m_det==99 || m_det==2 || m_det==12) ATH_CHECK( getSiElements(sctElements,true, params) );
     if(m_det==99 || m_det==3) ATH_CHECK( getTRT_Elements(true, params) );
     // if(sc.isFailure())
     //          ATH_MSG_ERROR( "Problem getting elements from managers" );
@@ -431,15 +442,12 @@ StatusCode InDetAlignCog::finalize() {
 //===================================================
 // getSiElements
 //===================================================
-StatusCode InDetAlignCog::getSiElements(const InDetDD::SiDetectorManager *manager,
+StatusCode InDetAlignCog::getSiElements(const InDetDD::SiDetectorElementCollection *elements,
 					bool cog_already_calculated,
                                         InDetAlignCog::Params_t &params
                                         ){
  
-  InDetDD::SiDetectorElementCollection::const_iterator iter;  
-  for(iter=manager->getDetectorElementBegin(); iter!=manager->getDetectorElementEnd(); ++iter){
-
-    const InDetDD::SiDetectorElement *element = *iter; 
+  for (const InDetDD::SiDetectorElement *element: *elements) {
     // @TODO can element be null ?
     if (element) {
       Identifier id = element->identify();
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignDBTool.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignDBTool.cxx
index 3b0baf68d5c3d788f68611701ab49b6b06cd3e9f..f2d6b29996697f3dec90d49ac17cde53af1c0e83 100755
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignDBTool.cxx
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignDBTool.cxx
@@ -25,12 +25,10 @@
 #include "GeoPrimitives/CLHEPtoEigenConverter.h"
 
 #include "AthenaKernel/IAthenaOutputStreamTool.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/InDetDetectorManager.h"
 #include "InDetReadoutGeometry/InDetDD_Defs.h"
 
 #include "InDetIdentifier/PixelID.h"
@@ -166,17 +164,8 @@ StatusCode InDetAlignDBTool::initialize()
 
     for (int i=0;i<3;++i) chan[i]=100*i;
     std::string man_name;
-    InDetDD::SiDetectorElementCollection::const_iterator iter,itermin,itermax;
     for (int idet=1;idet<3;++idet) {
-      if (idet==1) {
-	itermin=m_pixman->getDetectorElementBegin();
-	itermax=m_pixman->getDetectorElementEnd();
-      } else {
-	itermin=m_sctman->getDetectorElementBegin();
-	itermax=m_sctman->getDetectorElementEnd();
-      }
-      for (iter=itermin;iter!=itermax;++iter) {
-        const InDetDD::SiDetectorElement* element=*iter;
+      for (const InDetDD::SiDetectorElement* element: *(idet==1 ? m_pixman->getDetectorElementCollection() : m_sctman->getDetectorElementCollection())) {
         if (element!=0) {
           const Identifier ident=element->identify();
           int det,bec,layer,ring,sector,side;
@@ -317,17 +306,8 @@ void InDetAlignDBTool::createDB() const
 
   // now loop over all detector modules and add null level 3 transforms
   std::vector<std::string> level2;
-  InDetDD::SiDetectorElementCollection::const_iterator iter,itermin,itermax;
   for (int idet=1;idet<3;++idet) {
-    if (idet==1) {
-      itermin=m_pixman->getDetectorElementBegin();
-      itermax=m_pixman->getDetectorElementEnd();
-    } else {
-      itermin=m_sctman->getDetectorElementBegin();
-      itermax=m_sctman->getDetectorElementEnd();
-    }
-    for (iter=itermin;iter!=itermax;++iter) {
-      const InDetDD::SiDetectorElement* element=*iter;
+    for (const InDetDD::SiDetectorElement* element: *(idet==1 ? m_pixman->getDetectorElementCollection() : m_sctman->getDetectorElementCollection())) {
       if (element!=0) {
         const Identifier ident=element->identify();
         std::string key=dirkey(ident,3);
@@ -545,17 +525,8 @@ void InDetAlignDBTool::dispGroup(const int dettype, const int bec,
   std::vector<Identifier> lvl12id;
   // loop over all pixel and SCT modules
   AlignableTransform* pat;
-  InDetDD::SiDetectorElementCollection::const_iterator iter,itermin,itermax;
   for (int idet=1;idet<3;++idet) {
-    if (idet==1) {
-      itermin=m_pixman->getDetectorElementBegin();
-      itermax=m_pixman->getDetectorElementEnd();
-    } else {
-      itermin=m_sctman->getDetectorElementBegin();
-      itermax=m_sctman->getDetectorElementEnd();
-    }
-    for (iter=itermin;iter!=itermax;++iter) {
-      const InDetDD::SiDetectorElement* element=*iter;
+    for (const InDetDD::SiDetectorElement* element: *(idet==1 ? m_pixman->getDetectorElementCollection() : m_sctman->getDetectorElementCollection())) {
       if (element!=0) {
         const Identifier ident=element->identify();
         int mdet,mbec,mlayer,mring,msector,mside;
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillSiCluster.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillSiCluster.cxx
index 58ffa50312f3f60b3e4709f128984221bcd7568e..9971e926e6b81a434a7e65057e0e4cd0167f4887 100755
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillSiCluster.cxx
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillSiCluster.cxx
@@ -24,7 +24,6 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetPrepRawData/PixelClusterContainer.h"
 #include "InDetPrepRawData/SCT_ClusterContainer.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
 
 #include "InDetAlignGenTools/InDetAlignFillSiCluster.h"
@@ -83,15 +82,6 @@ StatusCode InDetAlignFillSiCluster::initialize() {
   }
   else if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Pixel ID is : " << m_pixelid << endmsg;
   
-  // get SCTDetectorManager
-  const InDetDD::SCT_DetectorManager* mgr;
-  if (detStore()->retrieve(mgr, "SCT").isFailure()) {
-    ATH_MSG_FATAL("Could not get SCT_DetectorManager!");
-    return StatusCode::FAILURE;
-  }
-  else ATH_MSG_DEBUG ("Manager found!");
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) <<"SCT ID is : "<< m_sctID << endmsg;
-  
   // get PixelDetectorManager
   const InDetDD::PixelDetectorManager* pixelmgr;
   if (detStore()->retrieve(pixelmgr, "Pixel").isFailure()) {
diff --git a/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/InDetSurveyConstraintTool/SurveyConstraint.h b/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/InDetSurveyConstraintTool/SurveyConstraint.h
index ac267cdbff6d7a5a919097b1075727baa9018588..6cf6328491ac8e8a57b9a5d3c2dfd9ced10de565 100755
--- a/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/InDetSurveyConstraintTool/SurveyConstraint.h
+++ b/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/InDetSurveyConstraintTool/SurveyConstraint.h
@@ -6,8 +6,9 @@
 #define SURVEYCONSTRAINTTOOLS_SURVEYCONSTRAINT_H
 
 #include "AthenaBaseComps/AthAlgTool.h"
-//#include "StoreGate/DataHandle.h"
 #include "InDetSurveyConstraintTool/ISurveyConstraint.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
 #include "GaudiKernel/IRndmGenSvc.h"
 #include "GaudiKernel/RndmGenerators.h"
 
@@ -19,7 +20,6 @@ class PixelID;
 class SCT_ID;
 
 namespace InDetDD{
-  class SCT_DetectorManager;
   class PixelDetectorManager;
 }
 
@@ -67,7 +67,6 @@ class SurveyConstraint : virtual public ISurveyConstraint, public AthAlgTool{
   
  private :
   const InDetDD::PixelDetectorManager*   m_pixelManager;
-  const InDetDD::SCT_DetectorManager*    m_SCT_Manager;
   const AtlasDetectorID*                 m_idHelper;
   const PixelID*                         m_pixid;
   const SCT_ID*                          m_sctid;
@@ -79,6 +78,8 @@ class SurveyConstraint : virtual public ISurveyConstraint, public AthAlgTool{
   IRndmGenSvc*                           m_randsvc;
   //ServiceHandle<IRndmGenSvc>             randsvc;
 
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+
   // dictionary of module constrain objects, indexed by moduleID
   std::map<Identifier, SurveyConstraintModule*, std::less<Identifier> >  m_ModuleMap;        //!< Map of Wafer objects
 
diff --git a/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/InDetSurveyConstraintTool/SurveyConstraintTestAlg.h b/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/InDetSurveyConstraintTool/SurveyConstraintTestAlg.h
index 33e33e7ff1d5a3568bf6dab8b83d45fc90db9036..09031459ed91a32c516653adefa86ec9a76c908f 100755
--- a/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/InDetSurveyConstraintTool/SurveyConstraintTestAlg.h
+++ b/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/InDetSurveyConstraintTool/SurveyConstraintTestAlg.h
@@ -14,7 +14,6 @@ namespace  AIDA{
 }
 
 namespace InDetDD{
-  class SCT_DetectorManager;
   class PixelDetectorManager;
 }
 
@@ -33,7 +32,6 @@ class SurveyConstraintTestAlg:public AthAlgorithm {
   IToolSvc*                              m_toolsvc;            //!< Pointer to tool service
   ISurveyConstraint*                     m_SurvConstr;
   const InDetDD::PixelDetectorManager*   m_pixelManager;
-  const InDetDD::SCT_DetectorManager*    m_SCT_Manager;
   const PixelID*                         m_pixid;
   const SCT_ID*                          m_sctid;
   AIDA::IHistogram1D*                    m_h_PixEC_Align_Disk[6];
diff --git a/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/src/SurveyConstraint.cxx b/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/src/SurveyConstraint.cxx
index da0a9834b6a07fa8cf9a3e002466d4836459a0a7..c7f571a50b8500d27ffaacb00f344db3521c618e 100755
--- a/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/src/SurveyConstraint.cxx
+++ b/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/src/SurveyConstraint.cxx
@@ -8,6 +8,7 @@
 // Gaudi & StoreGate
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/SmartDataPtr.h"
+#include "StoreGate/ReadCondHandle.h"
 
 #include "AthenaKernel/IAthenaOutputStreamTool.h"
 
@@ -18,11 +19,8 @@
 #include "AtlasDetDescr/AtlasDetectorID.h"
 #include "InDetIdentifier/PixelID.h"
 #include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h" 
 #include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "DetDescrConditions/AlignableTransformContainer.h"
 #include "RegistrationServices/IIOVRegistrationSvc.h" 
 
@@ -41,7 +39,6 @@ SurveyConstraint::SurveyConstraint(const std::string& type,
 				   const std::string& name, const IInterface* parent)
   : AthAlgTool(type,name,parent),
     m_pixelManager(0),
-    m_SCT_Manager(0),
     m_idHelper{},
     m_pixid(0),
     m_sctid(0),
@@ -225,13 +222,8 @@ StatusCode SurveyConstraint::initialize(){
   }
   msg(MSG::INFO) << "got m_pixelManager" << endmsg;
   
-  // get SCTManager
-  sc = detStore()->retrieve(m_SCT_Manager, "SCT");
-  if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Could not get SCT_Manager !" << endmsg;
-    return sc;
-  }
-  msg(MSG::INFO) << "got m_SCT_Manager" << endmsg; 
+  // ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
 
   // random number service
   if (StatusCode::SUCCESS!=service("RndmGenSvc",m_randsvc,true))
@@ -478,15 +470,22 @@ void SurveyConstraint::setup_SurveyConstraintModules()
   SurveyTransRandSect.setIdentity();
 
   unsigned int nSCTMod = 0,nSCTModInMap = 0,nSCTModEC = 0,nSCTModPointsEC = 0;
-  for (iter = m_SCT_Manager->getDetectorElementBegin(); iter != m_SCT_Manager->getDetectorElementEnd(); ++iter) {
-    const Identifier SCT_ModuleID = (*iter)->identify(); 
+  // Get SiDetectorElementCollection from ConditionStore for SCT
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* sctElements(*sctDetEleHandle);
+  if (not sctDetEleHandle.isValid() or sctElements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available.");
+    return;
+  }
+  for (const InDetDD::SiDetectorElement* element: *sctElements) {
+    const Identifier SCT_ModuleID = element->identify(); 
     if(m_sctid->side(SCT_ModuleID) != 0) continue;
     ++nSCTMod;
 
     if (m_ModuleMap.find(SCT_ModuleID) == m_ModuleMap.end()) {
       ++nSCTModInMap;
       SurveyConstraintModule* newSCT_Module = new SurveyConstraintModule(SCT_ModuleID,false);
-      Amg::Transform3D globaltolocal = (*iter)->transform().inverse();
+      Amg::Transform3D globaltolocal = element->transform().inverse();
       newSCT_Module->set_globaltolocal(globaltolocal);
       m_ModuleMap[SCT_ModuleID] = newSCT_Module;
       ++nSCT;
@@ -826,14 +825,14 @@ void SurveyConstraint::setup_SurveyConstraintModules()
 
   // SCT EC
   nPixModEC2 = 0;nPixModPixModEC = 0;nPixModECPixModEC = 0;nSameLayer = 0;nNotIdentical = 0;
-  for (iter = m_SCT_Manager->getDetectorElementBegin(); iter != m_SCT_Manager->getDetectorElementEnd(); ++iter) {
-    const Identifier SCT_ModuleID = (*iter)->identify(); 
+  for (SCT_ID::const_id_iterator wafer_it=m_sctid->wafer_begin(); wafer_it!=m_sctid->wafer_end(); ++wafer_it) {
+    const Identifier SCT_ModuleID = *wafer_it;
     if(m_sctid->side(SCT_ModuleID) != 0) continue;
     if(abs(m_sctid->barrel_ec(SCT_ModuleID)) != 2) continue;
     ++nPixModEC2;
-    for (iter2 = m_SCT_Manager->getDetectorElementBegin(); iter2 != m_SCT_Manager->getDetectorElementEnd(); ++iter2) {
+    for (SCT_ID::const_id_iterator wafer_it2=m_sctid->wafer_begin(); wafer_it2!=m_sctid->wafer_end(); ++wafer_it2) {
       ++nPixModPixModEC;
-      const Identifier SCT_ModuleID2 = (*iter2)->identify(); 
+      const Identifier SCT_ModuleID2 = *wafer_it2;
       if(m_sctid->side(SCT_ModuleID2) != 0)continue;
       if(m_sctid->barrel_ec(SCT_ModuleID2) != m_sctid->barrel_ec(SCT_ModuleID))continue;
       ++nPixModECPixModEC;
@@ -872,14 +871,14 @@ void SurveyConstraint::setup_SurveyConstraintModules()
 
   // SCT B
   nPixModEC2 = 0;nPixModPixModEC = 0;nPixModECPixModEC = 0;nSameLayer = 0;nNotIdentical = 0;
-  for (iter = m_SCT_Manager->getDetectorElementBegin(); iter != m_SCT_Manager->getDetectorElementEnd(); ++iter) {
-    const Identifier SCT_ModuleID = (*iter)->identify(); 
+  for (SCT_ID::const_id_iterator wafer_it=m_sctid->wafer_begin(); wafer_it!=m_sctid->wafer_end(); ++wafer_it) {
+    const Identifier SCT_ModuleID = *wafer_it;
     if(m_sctid->side(SCT_ModuleID) != 0) continue;
     if(m_sctid->barrel_ec(SCT_ModuleID) != 0) continue;
     ++nPixModEC2;
-    for (iter2 = m_SCT_Manager->getDetectorElementBegin(); iter2 != m_SCT_Manager->getDetectorElementEnd(); ++iter2) {
+    for (SCT_ID::const_id_iterator wafer_it2=m_sctid->wafer_begin(); wafer_it2!=m_sctid->wafer_end(); ++wafer_it2) {
       ++nPixModPixModEC;
-      const Identifier SCT_ModuleID2 = (*iter2)->identify(); 
+      const Identifier SCT_ModuleID2 = *wafer_it2;
       if(m_sctid->side(SCT_ModuleID2) != 0)continue;
       if(m_sctid->barrel_ec(SCT_ModuleID2) != m_sctid->barrel_ec(SCT_ModuleID))continue;
       ++nPixModECPixModEC;
diff --git a/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/src/SurveyConstraintTestAlg.cxx b/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/src/SurveyConstraintTestAlg.cxx
index c1111d595bba94f8d1c8e673fbc4c8f7c3d23812..164155b1087c5007ec29b453e494ebbc27bb6bdf 100755
--- a/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/src/SurveyConstraintTestAlg.cxx
+++ b/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/src/SurveyConstraintTestAlg.cxx
@@ -6,10 +6,8 @@
 #include "InDetSurveyConstraintTool/ISurveyConstraint.h"
 #include "GaudiKernel/MsgStream.h"
 
-#include "InDetReadoutGeometry/SiDetectorManager.h"
+#include "InDetIdentifier/SCT_ID.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h" 
-
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "GaudiKernel/IHistogramSvc.h" 
@@ -28,7 +26,6 @@ AthAlgorithm(name, pSvcLocator),
   m_toolsvc{},            //!< Pointer to tool service
   m_SurvConstr{},
   m_pixelManager{},
-  m_SCT_Manager{},
   m_pixid{},
   m_sctid{},
   m_h_PixEC_Align_Disk{},
@@ -61,10 +58,6 @@ StatusCode SurveyConstraintTestAlg::initialize(){
   ATH_CHECK(detStore()->retrieve(m_pixelManager, "Pixel"));
   
   
-  // get SCTManager
-  ATH_CHECK(detStore()->retrieve(m_SCT_Manager, "SCT"));
- 
-
   // get ID helpers from detector store (relying on GeoModel to put them)
   ATH_CHECK(detStore()->retrieve(m_pixid));
   ATH_CHECK(detStore()->retrieve(m_sctid));
@@ -230,8 +223,9 @@ ATH_MSG_INFO( "execute()" );
  }
 
  // SCT EC
- for (iter = m_SCT_Manager->getDetectorElementBegin(); iter != m_SCT_Manager->getDetectorElementEnd(); ++iter) {
-   const Identifier SCT_ModuleID = (*iter)->identify(); 
+ 
+ for (SCT_ID::const_id_iterator wafer_it=m_sctid->wafer_begin(); wafer_it!=m_sctid->wafer_end(); ++wafer_it) {
+   const Identifier SCT_ModuleID = *wafer_it; 
    if(std::abs(m_sctid->barrel_ec(SCT_ModuleID)) == 2){
      m_SurvConstr -> computeConstraint(SCT_ModuleID,
              dparams,        
@@ -251,8 +245,8 @@ ATH_MSG_INFO( "execute()" );
 
 
  // SCT B
- for (iter = m_SCT_Manager->getDetectorElementBegin(); iter != m_SCT_Manager->getDetectorElementEnd(); ++iter) {
-   const Identifier SCT_ModuleID = (*iter)->identify(); 
+ for (SCT_ID::const_id_iterator wafer_it=m_sctid->wafer_begin(); wafer_it!=m_sctid->wafer_end(); ++wafer_it) {
+   const Identifier SCT_ModuleID = *wafer_it;
    if(m_sctid->barrel_ec(SCT_ModuleID) == 0){
      m_SurvConstr -> computeConstraint(SCT_ModuleID,
              dparams,        
diff --git a/InnerDetector/InDetAlignment/InDetAlignGeomTools/InDetAlignGeomTools/InDetGeometryManagerTool.h b/InnerDetector/InDetAlignment/InDetAlignGeomTools/InDetAlignGeomTools/InDetGeometryManagerTool.h
index f1f955023abc7b36c3a44d931991db037a20b21d..cefa605cd51ad2e819997107abe17b8dafd49454 100644
--- a/InnerDetector/InDetAlignment/InDetAlignGeomTools/InDetAlignGeomTools/InDetGeometryManagerTool.h
+++ b/InnerDetector/InDetAlignment/InDetAlignGeomTools/InDetAlignGeomTools/InDetGeometryManagerTool.h
@@ -101,7 +101,6 @@ namespace InDet
 
     const InDetDD::PixelDetectorManager * m_pixelDetManager; //!< pointer to PIX detector manager
     const InDetDD::SCT_DetectorManager  * m_sctDetManager;   //!< pointer to SCT detector manager
-    const InDetDD::SCT_DetectorManager  * m_siDetManager;   //!< pointer to SCT detector manager
     const InDetDD::TRT_DetectorManager  * m_trtDetManager;   //!< pointer to TRT detector manager
 
     const PixelID   * m_pixHelper; //!< pointer to PIX detector manager
diff --git a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/InDetGeometryManagerTool.cxx b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/InDetGeometryManagerTool.cxx
index 8bbf563b0ea0fc89bc509f403af3fe600a95fcff..d7cf8a777e96473b0c94ccab873e5f8151c178d5 100644
--- a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/InDetGeometryManagerTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/InDetGeometryManagerTool.cxx
@@ -37,7 +37,6 @@ namespace InDet {
     : AthAlgTool(type,name,parent)
     , m_pixelDetManager(0)
     , m_sctDetManager(0)
-    , m_siDetManager{}
     , m_trtDetManager(0)
     , m_pixHelper()
     , m_sctHelper()
diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotFinder.cxx b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotFinder.cxx
index 59811515d8928c3efc47be4ae8028d38e469e79a..bceb21714d8d9a5f4f9573ea029c2067ec0e8046 100644
--- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotFinder.cxx
+++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotFinder.cxx
@@ -64,7 +64,7 @@ StatusCode InDet::InDetBeamSpotFinder::initialize() {
 
   ATH_CHECK( service("THistSvc",m_thistSvc) );
   ATH_CHECK( m_toolSvc.retrieve() );
-  ATH_CHECK( m_bcTool.retrieve() );
+  if( m_useFilledBCIDsOnly ) ATH_CHECK( m_bcTool.retrieve() );
   ATH_CHECK( m_eventInfo.initialize() );
   ATH_CHECK( m_vertexContainer.initialize() );
 
@@ -205,7 +205,10 @@ void InDet::InDetBeamSpotFinder::convertVtxTypeNames(){
 bool InDet::InDetBeamSpotFinder::passEventSelection(const xAOD::EventInfo & eventInfo){
   int bcid = eventInfo.bcid();
   if (m_useFilledBCIDsOnly && !m_bcTool->isFilled(bcid)) { return false; }
-  return ( std::find(m_BCIDsToAccept.begin(), m_BCIDsToAccept.end(), bcid) != m_BCIDsToAccept.end());
+  if( m_BCIDsToAccept.begin() !=  m_BCIDsToAccept.end() )
+    return ( std::find(m_BCIDsToAccept.begin(), m_BCIDsToAccept.end(), bcid) != m_BCIDsToAccept.end());
+  else 
+    return true;
 }
 
 bool InDet::InDetBeamSpotFinder::passVertexSelection(const xAOD::Vertex * vtx ) {
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h
index 8cf6ab52da032934c322c376fbee568a6fe83fb6..29c2261c6a385ab33fca2bad370f283d3f159176 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h
@@ -39,11 +39,12 @@
 #include "GaudiKernel/ToolHandle.h" //member
 #include "GaudiKernel/IIncidentSvc.h" //template parameter, so not fwd declared
 #include "GaudiKernel/IIncidentListener.h" //baseclass
-#include "StoreGate/StoreGateSvc.h"
 
 //Athena
 #include "AthenaBaseComps/AthAlgorithm.h"  //baseclass
 #include "AthenaKernel/IOVTime.h" //member
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/StoreGateSvc.h"
 
 // Include Event Info
 #include "EventInfo/EventID.h"
@@ -56,6 +57,7 @@
 #include "Identifier/IdentifierHash.h"
 #include "Identifier/Identifier.h"
 #include "InDetIdentifier/SCT_ID.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 
 // SCT Conditions
 #include "SCT_ConditionsTools/ISCT_ConfigurationConditionsTool.h" //template parameter
@@ -86,9 +88,6 @@ class EventInfo;
 class SCT_PlanePosition;
 class Identifier;
 class Incident;
-namespace InDetDD {
-class  SCT_DetectorManager;
-}
 
 
 class SCTCalib : public AthAlgorithm {
@@ -107,7 +106,7 @@ class SCTCalib : public AthAlgorithm {
         ServiceHandle<StoreGateSvc>                     p_sgSvc;
         ITHistSvc *                                     m_thistSvc;
         const SCT_ID*                                   m_pSCTHelper;
-        const InDetDD::SCT_DetectorManager*             m_pManager;
+        SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
         ServiceHandle<SCTCalibWriteSvc>                 m_pCalibWriteSvc;
         ToolHandle<ISCT_ConfigurationConditionsTool>    m_ConfigurationConditionsTool{this, "SCT_ConfigurationConditionsTool", "SCT_ConfigurationConditionsTool/InDetSCT_ConfigurationConditionsTool", "Tool to retrieve SCT Configuration"};
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/skeleton.sct_calib.py b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/skeleton.sct_calib.py
index 49fd279dd114cf2ca8caf621d1c376a6a9b3ec09..a7d6442e6d54d0a72f943d8ecf0a632642543d32 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/skeleton.sct_calib.py
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/skeleton.sct_calib.py
@@ -375,15 +375,12 @@ rec.__dict__.get('projectName').set_Value(projectName)
 #-------------------------------------------------------------
 from IOVDbSvc.CondDB import conddb
 conddb.dbdata = 'CONDBR2'
-conddb.addFolder("SCT_OFL","<db>COOLOFL_SCT/CONDBR2</db> /SCT/Derived/Monitoring<tag>SctDerivedMonitoring-RUN2-UPD4-005</tag>", className="CondAttrListCollection") 
-#conddb.addFolder("SCT_OFL","<db>COOLOFL_SCT/CONDBR2</db> /SCT/Derived/Monitoring<tag>SctDerivedMonitoring-RUN2-UPD4-005</tag><forceRunNumber>259237</forceRunNumber>", className="CondAttrListCollection") 
-
-sctDerivedMonitoringFolder = '/SCT/Derived/Monitoring'
-from AthenaCommon.AlgSequence import AthSequencer
-condSeq = AthSequencer("AthCondSeq")
-from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_MonitorConditionsCondAlg
-condSeq += SCT_MonitorConditionsCondAlg(name = "SCT_MonitorConditionsCondAlg", ReadKey = sctDerivedMonitoringFolder)
 
+from SCT_ConditionsTools.SCT_MonitorConditionsToolSetup import SCT_MonitorConditionsToolSetup
+sct_MonitorConditionsToolSetup = SCT_MonitorConditionsToolSetup()
+sct_MonitorConditionsToolSetup.setFolderDb("<db>COOLOFL_SCT/CONDBR2</db> /SCT/Derived/Monitoring<tag>SctDerivedMonitoring-RUN2-UPD4-005</tag>")
+# sct_MonitorConditionsToolSetup.setFolderDb("<db>COOLOFL_SCT/CONDBR2</db> /SCT/Derived/Monitoring<tag>SctDerivedMonitoring-RUN2-UPD4-005</tag><forceRunNumber>259237</forceRunNumber>")
+sct_MonitorConditionsToolSetup.setup()
 
 # GeoModel & MagneticFieldSvc
 #--------------------------------------------------------------
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
index 85d2fc7d28a5f3fbc706f77271f3fd94824aa54a..76353dafbd5215244f3ee0ee2b67c29d803f4a90 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
@@ -58,7 +58,6 @@
 
 //InnerDetector
 #include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 
 using namespace SCT_CalibAlgs;
 using namespace std;
@@ -161,7 +160,6 @@ SCTCalib::SCTCalib( const std::string& name, ISvcLocator* pSvcLocator ) :
     p_sgSvc                     ("StoreGateSvc",name),
     m_thistSvc(0),
     m_pSCTHelper(0),
-    m_pManager(0),
     m_pCalibWriteSvc            ("SCTCalibWriteSvc",name),
     m_CablingSvc                ("SCT_CablingSvc",name),
     m_calibHitmapSvc            ("SCT_CalibHitmapSvc",name),
@@ -318,7 +316,6 @@ StatusCode SCTCalib::initialize() {
     m_waferItrBegin  = m_pSCTHelper->wafer_begin();
     m_waferItrEnd  = m_pSCTHelper->wafer_end();
     //
-    if ( detStore()->retrieve( m_pManager, "SCT").isFailure() ) return msg( MSG::ERROR) << "Unable to retrieve SCTManager" << endmsg,StatusCode::FAILURE;
     if ( not retrievedService(m_pCalibWriteSvc)) return StatusCode::FAILURE;
     if ( m_doHV) msg( MSG::FATAL ) << "Not yet properly implemented and tested!" << endmsg;
 
@@ -846,6 +843,14 @@ StatusCode SCTCalib::getDeadStrip() {
         }
     }
 
+    // Get SCT_DetectorElementCollection
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+    const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+    if (elements==nullptr) {
+      ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+      return StatusCode::FAILURE;
+    }
+
     //Dead identification
     bool hasDeadStrip=false;
     bool hasDeadChip=false;
@@ -958,7 +963,7 @@ StatusCode SCTCalib::getDeadStrip() {
 
         //retrieving #hits in each strip
         for(int j=0; j<n_stripPerChip*n_chipPerSide; j++) {
-            const InDetDD::SiDetectorElement* pElement = m_pManager->getDetectorElement(waferHash);
+            const InDetDD::SiDetectorElement* pElement = elements->getDetectorElement(waferHash);
             bool swap=(pElement->swapPhiReadoutDirection()) ? true : false;
             int chipNum=0;
             if(side==0) chipNum = swap ? 5-j/n_stripPerChip : j/n_stripPerChip;
@@ -3312,6 +3317,15 @@ std::set<int>
 SCTCalib::getNoisyChips( const std::set<Identifier>& stripIdList ) const {
     std::set<int> chipIdList;
     chipIdList.clear();
+
+    // Get SCT_DetectorElementCollection
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+    const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+    if (elements==nullptr) {
+        ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+        return chipIdList;
+    }
+
     //--- Minimum number of noisy strips for a noisy chip
     unsigned int noisyChipThr = m_noisyChipFraction*n_stripPerChip;
     if ( stripIdList.size() > noisyChipThr ) {
@@ -3324,7 +3338,7 @@ SCTCalib::getNoisyChips( const std::set<Identifier>& stripIdList ) const {
             int stripOffline = m_pSCTHelper->strip( stripId );
             //--- Chip number : taken from SCT_ConfigurationConditionsSvc::getChip
             IdentifierHash waferHash = m_pSCTHelper->wafer_hash( m_pSCTHelper->wafer_id( stripId ) );
-            const InDetDD::SiDetectorElement* pElement = m_pManager->getDetectorElement( waferHash );
+            const InDetDD::SiDetectorElement* pElement = elements->getDetectorElement( waferHash );
             if ( !pElement ) {
                 msg( MSG::FATAL ) << "Element pointer is NULL" << endmsg;
                 continue;
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListSvc.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListSvc.cxx
index 043275ce8484014c37f27eaf12f4950c50e165e7..78db75b9d06e12e2b0cb25556a8883e082ec3c7e 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListSvc.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListSvc.cxx
@@ -3,7 +3,6 @@
 */
 
 #include "SCT_CalibModuleListSvc.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 
 SCT_CalibModuleListSvc::SCT_CalibModuleListSvc(const std::string& name, ISvcLocator* pSvcLocator ) :
     AthService(name, pSvcLocator),
diff --git a/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py b/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py
index dfaae9f11ce376d5852c90cd83ff7aae7fafe70f..eb3e78d13fd8bfe6afd004a6c6125c5afbd0eaad 100644
--- a/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py
+++ b/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py
@@ -29,7 +29,7 @@ else:
 # Pixel module distortions
 conddb.addFolderSplitOnline("INDET","/Indet/Onl/PixelDist","/Indet/PixelDist")
 # IBL stave distortions 
-conddb.addFolderSplitOnline("INDET","/Indet/Onl/IBLDist","/Indet/IBLDist")
+conddb.addFolderSplitOnline("INDET","/Indet/Onl/IBLDist","/Indet/IBLDist",className="CondAttrListCollection")
 
 # Control loading of the dynamic folder scheme;
 # In future we might want to add also to MC DB
@@ -37,28 +37,35 @@ conddb.addFolderSplitOnline("INDET","/Indet/Onl/IBLDist","/Indet/IBLDist")
 
 from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags
 if InDetGeometryFlags.useDynamicAlignFolders():
-    conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID")
-    conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL2/PIX","/Indet/AlignL2/PIX")
+    conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection")
+    conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL2/PIX","/Indet/AlignL2/PIX",className="CondAttrListCollection")
     conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL2/SCT","/Indet/AlignL2/SCT",className="CondAttrListCollection")
     conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer")
     conddb.addFolderSplitOnline("TRT","/TRT/Onl/AlignL1/TRT","/TRT/AlignL1/TRT")
     conddb.addFolderSplitOnline("TRT","/TRT/Onl/AlignL2","/TRT/AlignL2")
 else:
-    if (not DetFlags.simulate.SCT_on()) or (not DetFlags.simulate.pixel_on()):
+    if ((not DetFlags.simulate.SCT_on()) or (not DetFlags.simulate.pixel_on())) or (DetFlags.overlay.SCT_on() or DetFlags.overlay.pixel_on()):
         conddb.addFolderSplitOnline("INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer")
     else:
         conddb.addFolderSplitOnline("INDET","/Indet/Onl/Align","/Indet/Align")
     conddb.addFolderSplitOnline("TRT","/TRT/Onl/Align","/TRT/Align")
 
 # Condition algorithms for ID alignment
-if not DetFlags.simulate.SCT_on():
+if (not DetFlags.simulate.SCT_on()) or DetFlags.overlay.SCT_on():
     from AthenaCommon.AlgSequence import AthSequencer
     condSeq = AthSequencer("AthCondSeq")
     if not hasattr(condSeq, "SCT_AlignCondAlg"):
         from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_AlignCondAlg
-        condSeq += SCT_AlignCondAlg(name = "SCT_AlignCondAlg",
-                                    UseDynamicAlignFolders = InDetGeometryFlags.useDynamicAlignFolders())
-    if not hasattr(condSeq, "SCT_DetectorElementCondAlg"):
-        from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_DetectorElementCondAlg
-        condSeq += SCT_DetectorElementCondAlg(name = "SCT_DetectorElementCondAlg")
-
+        if athenaCommonFlags.isOnline():
+            condSeq += SCT_AlignCondAlg(name = "SCT_AlignCondAlg",
+                                        UseDynamicAlignFolders =  InDetGeometryFlags.useDynamicAlignFolders(),
+                                        ReadKeyStatic = "/Indet/Onl/Align",
+                                        ReadKeyDynamicL1 = "/Indet/Onl/AlignL1/ID",
+                                        ReadKeyDynamicL2 = "/Indet/Onl/AlignL2/SCT",
+                                        ReadKeyDynamicL3 = "/Indet/Onl/AlignL3")
+        else:
+            condSeq += SCT_AlignCondAlg(name = "SCT_AlignCondAlg",
+                                        UseDynamicAlignFolders =  InDetGeometryFlags.useDynamicAlignFolders())
+            if not hasattr(condSeq, "SCT_DetectorElementCondAlg"):
+                from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_DetectorElementCondAlg
+                condSeq += SCT_DetectorElementCondAlg(name = "SCT_DetectorElementCondAlg")
diff --git a/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelCalibSvc.cxx b/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelCalibSvc.cxx
index 44f1c3b387de5966a8c6b069f1dafe5f4da0ebb8..223782d7ddfbdea4b47c05ad260ea85c391979af 100755
--- a/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelCalibSvc.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelCalibSvc.cxx
@@ -9,6 +9,7 @@
 #include "PixelCalibSvc.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetReadoutGeometry/PixelModuleDesign.h"
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
 
 PixelCalibSvc::PixelCalibSvc(const std::string& name, ISvcLocator* sl):AthService(name, sl),
   m_detStore("DetectorStore",name),
diff --git a/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelCalibSvc.h b/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelCalibSvc.h
index f7a14941b5ee933c8b64d001c13f22116da63c75..57c3b941b26e90dd94e21dff84db0eb3e1ccd3fc 100755
--- a/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelCalibSvc.h
+++ b/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelCalibSvc.h
@@ -16,10 +16,9 @@
 #include "PixelConditionsTools/IPixelCalibDbTool.h"
 #include "PixelCabling/IPixelCablingSvc.h"
 #include "InDetIdentifier/PixelID.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 
 namespace InDetDD {
-  class SiDetectorManager;
+  class PixelDetectorManager;
 }  
 
 class PixelCalibSvc : public AthService, virtual public IPixelCalibSvc {
@@ -53,7 +52,7 @@ class PixelCalibSvc : public AthService, virtual public IPixelCalibSvc {
     const PixelID*                   m_pixid;
     mutable Identifier                   m_wafer_id; //<! wafer_id  
 
-    const InDetDD::SiDetectorManager * m_detManager;
+    const InDetDD::PixelDetectorManager * m_detManager;
 
     double m_totparA;
     double m_totparE;
diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/test/PixelDistortionsTestReadWrite.cxx b/InnerDetector/InDetConditions/PixelConditionsTools/test/PixelDistortionsTestReadWrite.cxx
index 1a45b17093fa8eb61ad2718415914bebfef607ec..a384698225ddd58b43a1da2f897703eb7c1f05da 100644
--- a/InnerDetector/InDetConditions/PixelConditionsTools/test/PixelDistortionsTestReadWrite.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsTools/test/PixelDistortionsTestReadWrite.cxx
@@ -10,7 +10,7 @@
 
 // Gaudi includes
 
-#include "InDetReadoutGeometry/SiDetectorManager.h"
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 
 #include "Identifier/Identifier.h"
diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/test/PixelDistortionsTestReadWrite.h b/InnerDetector/InDetConditions/PixelConditionsTools/test/PixelDistortionsTestReadWrite.h
index 5d46f432730a011e3aa6a0d7b322d338d66d4bf2..241038e8790c8549c92e0b939cc790799a051cf4 100644
--- a/InnerDetector/InDetConditions/PixelConditionsTools/test/PixelDistortionsTestReadWrite.h
+++ b/InnerDetector/InDetConditions/PixelConditionsTools/test/PixelDistortionsTestReadWrite.h
@@ -23,7 +23,7 @@
 
 namespace InDetDD
 {
-  class SiDetectorManager;
+  class PixelDetectorManager;
 }
 
 
@@ -42,7 +42,7 @@ class PixelDistortionsTestReadWrite: public AthAlgorithm{
  private:
 
   //mutable MsgStream m_log;
-  const InDetDD::SiDetectorManager * m_detManager;
+  const InDetDD::PixelDetectorManager * m_detManager;
 
   PublicToolHandle<IModuleDistortionsTool >  m_pixelDistoTool
      {this,"PixelDistortionsTool","PixelDistortionsTool",""};
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt
index 5b54b12a75c895c8b6e2ee76ff7b70acf5c8109a..0f54ba381fea3ec32039513ddbd46774f36322a9 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt
@@ -23,7 +23,8 @@ atlas_depends_on_subdirs( PUBLIC
                           Event/xAOD/xAODEventInfo
                           PRIVATE
                           InnerDetector/InDetDetDescr/InDetIdentifier
-                          InnerDetector/InDetDetDescr/InDetReadoutGeometry )
+                          InnerDetector/InDetDetDescr/InDetReadoutGeometry
+                          Tracking/TrkDetDescr/TrkGeometry )
 
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
@@ -33,6 +34,6 @@ atlas_add_component( SCT_ConditionsAlgorithms
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier DetDescrConditions GeoModelUtilities GaudiKernel SCT_ConditionsData SCT_CablingLib EventInfo xAODEventInfo AthenaPoolUtilities InDetIdentifier InDetReadoutGeometry SCT_ConditionsToolsLib )
+                     LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier DetDescrConditions GeoModelUtilities GaudiKernel SCT_ConditionsData SCT_CablingLib EventInfo xAODEventInfo AthenaPoolUtilities InDetIdentifier InDetReadoutGeometry TrkGeometry SCT_ConditionsToolsLib )
 
 # Install files from the package:
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testLinkMasking.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testLinkMasking.py
index 68f78f1138c7e0a8a0e654d4905b529bc6bf4392..a2da263a2a5de21626b85379a12f2fc4b416d24c 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testLinkMasking.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testLinkMasking.py
@@ -43,6 +43,7 @@ DetFlags.Calo_setOff()
 DetFlags.Muon_setOff()
 DetFlags.Truth_setOff()
 DetFlags.LVL1_setOff()
+DetFlags.pixel_setOff()
 DetFlags.SCT_setOn()
 DetFlags.TRT_setOff()
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py
index f5b8129e9ef0eb1030a1ad65a44b0d75c71eec48..6f8f347ba68c5e1aaf6e1aae566886148d1936b1 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py
@@ -69,11 +69,6 @@ from AthenaCommon.AlgSequence import AlgSequence
 
 job = AlgSequence()
 
-
-from SCT_Cabling.SCT_CablingConf import SCT_CablingSvc
-ToolSvc = ServiceMgr.ToolSvc
-ServiceMgr+=SCT_CablingSvc()
-
 #--------------------------------------------------------------
 # Load IOVDbSvc
 #--------------------------------------------------------------
@@ -97,7 +92,6 @@ job+= SCT_RODVetoTestAlg()
 
 
 import AthenaCommon.AtlasUnixGeneratorJob
-ServiceMgr.SCT_CablingSvc.OutputLevel = INFO
 ToolSvc.SCT_RODVetoTool.OutputLevel=VERBOSE
 ServiceMgr.EventSelector.InitialTimeStamp = 1500000000
 ServiceMgr.EventSelector.RunNumber = 300000 # MC16c 2017 run number
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.cxx
index c06d6dde35a822ec3f4adf64f86820bda209cbf3..d7229b79ab69fa5ca899e2e5098ba06b12a6c59f 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.cxx
@@ -60,7 +60,7 @@ StatusCode SCT_ConfigurationCondAlg::initialize() {
   ATH_CHECK(m_readKeyChannel.initialize());
   ATH_CHECK(m_readKeyModule.initialize());
   ATH_CHECK(m_readKeyMur.initialize());
-  ATH_CHECK(m_sctDetEleCollKey.initialize());
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
 
   // Write Cond Handle
   ATH_CHECK(m_writeKey.initialize());
@@ -177,10 +177,10 @@ StatusCode SCT_ConfigurationCondAlg::fillChannelData(SCT_ConfigurationCondData*
   }
 
   // Get SCT_DetectorElementCollection
-  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_sctDetEleCollKey);
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
   const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
   if (elements==nullptr) {
-    ATH_MSG_FATAL(m_sctDetEleCollKey.fullKey() << " could not be retrieved");
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
     return StatusCode::FAILURE;
   }
   // Get EventIDRange
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.h
index 0da2f69370b8145fdaea127b81b5f2eb2177984b..1375595ab1dfa577c1023905745f6e3157250597 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.h
@@ -60,7 +60,7 @@ class SCT_ConfigurationCondAlg : public AthAlgorithm
   SG::ReadCondHandleKey<CondAttrListVec> m_readKeyChannel{this, "ReadKeyChannel", "/SCT/DAQ/Configuration/Chip", "Key of input (raw) conditions folder of chips"};
   SG::ReadCondHandleKey<CondAttrListVec> m_readKeyModule{this, "ReadKeyModule", "/SCT/DAQ/Config/Module", "Key of input (raw) conditions folder of modules"};
   SG::ReadCondHandleKey<CondAttrListVec> m_readKeyMur{this, "ReadKeyMur", "/SCT/DAQ/Config/MUR", "Key of input (raw) conditions folder of Murs"};
-  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_sctDetEleCollKey{this, "SctDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
   SG::WriteCondHandleKey<SCT_ConfigurationCondData> m_writeKey{this, "WriteKey", "SCT_ConfigurationCondData", "Key of output (derived) conditions data"};
   ServiceHandle<ICondSvc> m_condSvc;
   ServiceHandle<ISCT_CablingSvc> m_cablingSvc; //!< Handle on SCT cabling service
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx
index 7d57a8a915b2367ab0ae8277311292ddf5b6ca31..51bacc1dbe0d2a9cd6d28bbafe7187eedf4aaf28 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx
@@ -10,6 +10,8 @@
 #include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiCommonItems.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "TrkSurfaces/Surface.h"
+#include "TrkGeometry/Layer.h"
 
 SCT_DetectorElementCondAlg::SCT_DetectorElementCondAlg(const std::string& name, ISvcLocator* pSvcLocator)
   : ::AthAlgorithm(name, pSvcLocator)
@@ -103,6 +105,7 @@ StatusCode SCT_DetectorElementCondAlg::execute()
   }
 
   // Set neighbours and other side
+  // Set layer to surface
   InDetDD::SiDetectorElementCollection::const_iterator oldIt{oldColl->begin()};
   for (InDetDD::SiDetectorElement* newEl: *writeCdo) {
     if (oldToNewMap[(*oldIt)]!=newEl) {
@@ -113,6 +116,11 @@ StatusCode SCT_DetectorElementCondAlg::execute()
     newEl->setNextInPhi(oldToNewMap[(*oldIt)->nextInPhi()]);
     newEl->setPrevInPhi(oldToNewMap[(*oldIt)->prevInPhi()]);
     newEl->setOtherSide(oldToNewMap[(*oldIt)->otherSide()]);
+    // Layer of old element is set by InDet::SiLayerBuilder::registerSurfacesToLayer.
+    const Trk::Layer* layer{(*oldIt)->surface().associatedLayer()};
+    if (layer) {
+      newEl->surface().associateLayer(*layer);
+    }
     oldIt++;
   }
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorCondAlg.cxx
similarity index 82%
rename from InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsCondAlg.cxx
rename to InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorCondAlg.cxx
index f1f6ed56a0c9903e5252d513ea7c0bd1943ebc95..90c069b9dbebc4e4d47042cdf393e4f83cc98621 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorCondAlg.cxx
@@ -2,19 +2,19 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "SCT_MonitorConditionsCondAlg.h"
+#include "SCT_MonitorCondAlg.h"
 
 #include <memory>
 
 #include "GaudiKernel/EventIDRange.h"
 
-SCT_MonitorConditionsCondAlg::SCT_MonitorConditionsCondAlg(const std::string& name, ISvcLocator* pSvcLocator)
+SCT_MonitorCondAlg::SCT_MonitorCondAlg(const std::string& name, ISvcLocator* pSvcLocator)
   : ::AthAlgorithm(name, pSvcLocator)
   , m_condSvc{"CondSvc", name}
 {
 }
 
-StatusCode SCT_MonitorConditionsCondAlg::initialize()
+StatusCode SCT_MonitorCondAlg::initialize()
 {
   ATH_MSG_DEBUG("initialize " << name());
 
@@ -35,12 +35,12 @@ StatusCode SCT_MonitorConditionsCondAlg::initialize()
   return StatusCode::SUCCESS;
 }
 
-StatusCode SCT_MonitorConditionsCondAlg::execute()
+StatusCode SCT_MonitorCondAlg::execute()
 {
   ATH_MSG_DEBUG("execute " << name());
 
   // Write Cond Handle
-  SG::WriteCondHandle<SCT_MonitorConditionsCondData> writeHandle{m_writeKey};
+  SG::WriteCondHandle<SCT_MonitorCondData> writeHandle{m_writeKey};
 
   // Do we have a valid Write Cond Handle for current time?
   if(writeHandle.isValid()) {
@@ -67,7 +67,7 @@ StatusCode SCT_MonitorConditionsCondAlg::execute()
   }
 
   // Construct the output Cond Object and fill it in
-  std::unique_ptr<SCT_MonitorConditionsCondData> writeCdo{std::make_unique<SCT_MonitorConditionsCondData>()};
+  std::unique_ptr<SCT_MonitorCondData> writeCdo{std::make_unique<SCT_MonitorCondData>()};
 
   // Fill Write Cond Handle
   static const unsigned int defectListIndex{7};
@@ -82,7 +82,7 @@ StatusCode SCT_MonitorConditionsCondAlg::execute()
 
   // Record validity of the output cond obbject
   if(writeHandle.record(rangeW, std::move(writeCdo)).isFailure()) {
-    ATH_MSG_ERROR("Could not record SCT_TdaqEnabledCondData " << writeHandle.key()
+    ATH_MSG_ERROR("Could not record SCT_MonitorCondData " << writeHandle.key()
                   << " with EventRange " << rangeW
                   << " into Conditions Store");
     return StatusCode::FAILURE;
@@ -92,7 +92,7 @@ StatusCode SCT_MonitorConditionsCondAlg::execute()
   return StatusCode::SUCCESS;
 }
 
-StatusCode SCT_MonitorConditionsCondAlg::finalize()
+StatusCode SCT_MonitorCondAlg::finalize()
 {
   ATH_MSG_DEBUG("finalize " << name());
   return StatusCode::SUCCESS;
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorCondAlg.h
similarity index 53%
rename from InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsCondAlg.h
rename to InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorCondAlg.h
index d13efa2e08c5bc1bd5149af430bf782a780ace58..d61ddc5039e67b7978cabde1396503e9b5773a9e 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsCondAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorCondAlg.h
@@ -2,29 +2,29 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */ 
 
-#ifndef SCT_MONITORCONDITIONSCONDALG
-#define SCT_MONITORCONDITIONSCONDALG
+#ifndef SCT_MONITORCONDALG
+#define SCT_MONITORCONDALG
 
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "StoreGate/ReadCondHandleKey.h"
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
 #include "StoreGate/WriteCondHandleKey.h"
-#include "SCT_ConditionsData/SCT_MonitorConditionsCondData.h"
+#include "SCT_ConditionsData/SCT_MonitorCondData.h"
 #include "GaudiKernel/ICondSvc.h"
 
-class SCT_MonitorConditionsCondAlg : public AthAlgorithm 
+class SCT_MonitorCondAlg : public AthAlgorithm 
 {  
  public:
-  SCT_MonitorConditionsCondAlg(const std::string& name, ISvcLocator* pSvcLocator);
-  virtual ~SCT_MonitorConditionsCondAlg() = default;
+  SCT_MonitorCondAlg(const std::string& name, ISvcLocator* pSvcLocator);
+  virtual ~SCT_MonitorCondAlg() = default;
   StatusCode initialize() override;
   StatusCode execute() override;
   StatusCode finalize() override;
 
  private:
   SG::ReadCondHandleKey<CondAttrListCollection> m_readKey{this, "ReadKey", "/SCT/Derived/Monitoring", "Key of input (raw) noisy strip conditions folder"};
-  SG::WriteCondHandleKey<SCT_MonitorConditionsCondData> m_writeKey{this, "WriteKey", "SCT_MonitorConditionsCondData", "Key of output (derived) noisy strip conditions data"};
+  SG::WriteCondHandleKey<SCT_MonitorCondData> m_writeKey{this, "WriteKey", "SCT_MonitorCondData", "Key of output (derived) noisy strip conditions data"};
   ServiceHandle<ICondSvc> m_condSvc; 
 };
 
-#endif // SCT_MONITORCONDITIONSCONDALG
+#endif // SCT_MONITORCONDALG
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/components/SCT_ConditionsAlgorithms_entries.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/components/SCT_ConditionsAlgorithms_entries.cxx
index 842b5421258342bfb78ce7ff2c62d075d17dadd2..ec0fbc62f1f067c0b7a83be817df8c941ab3f4eb 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/components/SCT_ConditionsAlgorithms_entries.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/components/SCT_ConditionsAlgorithms_entries.cxx
@@ -15,7 +15,7 @@
 #include "../SCT_MajorityConditionsTestAlg.h"
 #include "../SCT_ModuleVetoCondAlg.h"
 #include "../SCT_ModuleVetoTestAlg.h"
-#include "../SCT_MonitorConditionsCondAlg.h"
+#include "../SCT_MonitorCondAlg.h"
 #include "../SCT_MonitorConditionsTestAlg.h"
 #include "../SCT_ReadCalibChipDataTestAlg.h"
 #include "../SCT_ReadCalibChipGainCondAlg.h"
@@ -51,7 +51,7 @@ DECLARE_COMPONENT( SCT_MajorityCondAlg )
 DECLARE_COMPONENT( SCT_MajorityConditionsTestAlg )
 DECLARE_COMPONENT( SCT_ModuleVetoCondAlg )
 DECLARE_COMPONENT( SCT_ModuleVetoTestAlg )
-DECLARE_COMPONENT( SCT_MonitorConditionsCondAlg )
+DECLARE_COMPONENT( SCT_MonitorCondAlg )
 DECLARE_COMPONENT( SCT_MonitorConditionsTestAlg )
 DECLARE_COMPONENT( SCT_ReadCalibChipDataTestAlg )
 DECLARE_COMPONENT( SCT_ReadCalibChipGainCondAlg )
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MonitorConditionsCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MonitorCondData.h
similarity index 67%
rename from InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MonitorConditionsCondData.h
rename to InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MonitorCondData.h
index 55067fefadbaa2bb0171a13b3ecfa773c5a7bd28..80f67f758f481e3f9c69c4cbc4eb36e4b0da5405 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MonitorConditionsCondData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MonitorCondData.h
@@ -3,13 +3,13 @@
 */
 
 /**
- * @file SCT_MonitorConditionsCondData.h
+ * @file SCT_MonitorCondData.h
  * header file for data object
  * @author Susumu Oda - 2017-07-26
  **/
 
-#ifndef SCT_MONITORCONDITIONSCONDDATA_H
-#define SCT_MONITORCONDITIONSCONDDATA_H
+#ifndef SCT_MONITORCONDDATA_H
+#define SCT_MONITORCONDDATA_H
 
 #include <map>
 #include <string>
@@ -17,14 +17,14 @@
 // Include Athena stuff
 #include "AthenaKernel/CLASS_DEF.h"
 
-class SCT_MonitorConditionsCondData {
+class SCT_MonitorCondData {
 public:
 
   // Constructor
-  SCT_MonitorConditionsCondData();
+  SCT_MonitorCondData();
 
   // Destructor
-  virtual ~SCT_MonitorConditionsCondData();
+  virtual ~SCT_MonitorCondData();
 
   // Check if a module has a defect (a list of bad strips). If it does not have defect return false.
   bool find(const int& channelNumber, std::string& defectList) const;
@@ -41,10 +41,10 @@ private:
 
 };
 
-CLASS_DEF( SCT_MonitorConditionsCondData , 153824898 , 1 )
+CLASS_DEF( SCT_MonitorCondData , 190515334 , 1 )
 
 #include "AthenaKernel/CondCont.h"
-CONDCONT_DEF( SCT_MonitorConditionsCondData, 30296880 );
+CONDCONT_DEF( SCT_MonitorCondData, 164599336 );
 
 
-#endif // SCT_MONITORCONDITIONSCONDDATA_H
+#endif // SCT_MONITORCONDDATA_H
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_MonitorConditionsCondData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_MonitorCondData.cxx
similarity index 75%
rename from InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_MonitorConditionsCondData.cxx
rename to InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_MonitorCondData.cxx
index 364c07b2a0e018efad8f7ef2f6cc206864eac9f4..3f8d5f769deda5d3ffe7fb9abf72f4748c3620a0 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_MonitorConditionsCondData.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_MonitorCondData.cxx
@@ -6,24 +6,24 @@
 // Implementation file for the data object class for SCT_MonitorConditionsSvc
 //----------------------------------------------------------------------
 
-#include "SCT_ConditionsData/SCT_MonitorConditionsCondData.h"
+#include "SCT_ConditionsData/SCT_MonitorCondData.h"
 
 #include <utility>
 
 //----------------------------------------------------------------------
 // Constructor
-SCT_MonitorConditionsCondData::SCT_MonitorConditionsCondData():
+SCT_MonitorCondData::SCT_MonitorCondData():
   m_defectListMap{}
 {}
 
 //----------------------------------------------------------------------
 // Destructor
-SCT_MonitorConditionsCondData::~SCT_MonitorConditionsCondData()
+SCT_MonitorCondData::~SCT_MonitorCondData()
 {}
 
 //----------------------------------------------------------------------
 // Check if a module has a defect (a list of bad strips). If it does not have defect return false.
-bool SCT_MonitorConditionsCondData::find(const int& channelNumber, std::string& defectList) const
+bool SCT_MonitorCondData::find(const int& channelNumber, std::string& defectList) const
 {
   std::map<const int, const std::string>::const_iterator it{m_defectListMap.find(channelNumber)};
   if(it!=m_defectListMap.end()) {
@@ -37,14 +37,14 @@ bool SCT_MonitorConditionsCondData::find(const int& channelNumber, std::string&
 
 //----------------------------------------------------------------------
 // Insert a new defect (a list of bad strips) for a module
-void SCT_MonitorConditionsCondData::insert(const int& channelNumber, const std::string& defectList)
+void SCT_MonitorCondData::insert(const int& channelNumber, const std::string& defectList)
 {
   m_defectListMap.insert(std::make_pair(channelNumber, defectList));
 }
 
 //----------------------------------------------------------------------
 // Clear m_defectListMap
-void SCT_MonitorConditionsCondData::clear()
+void SCT_MonitorCondData::clear()
 {
   m_defectListMap.clear();
 }
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_MonitorConditionsToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_MonitorConditionsToolSetup.py
index 41217645e17721129daac70e79d0022837de32c1..7e5ed1a218be92430e8f5c12e1e094e5f0c567ea 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_MonitorConditionsToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_MonitorConditionsToolSetup.py
@@ -7,7 +7,7 @@ class SCT_MonitorConditionsToolSetup:
         self.folder = "/SCT/Derived/Monitoring"
         self.folderDb = None
         self.dbInstance = "SCT_OFL"
-        self.algName = "SCT_MonitorConditionsCondAlg"
+        self.algName = "SCT_MonitorCondAlg"
         self.alg = None
         self.toolName = "InDetSCT_MonitorConditionsTool"
         self.tool = None
@@ -34,20 +34,20 @@ class SCT_MonitorConditionsToolSetup:
     def getAlg(self):
         return self.alg
 
-    def setFolders(self):
+    def setFolder(self):
         from IOVDbSvc.CondDB import conddb
         if not conddb.folderRequested(self.folder):
             if self.folderDb is None:
                 self.folderDb = self.folder
             conddb.addFolder(self.dbInstance, self.folderDb, className="CondAttrListCollection")
 
-    def setAlgs(self):
+    def setAlg(self):
         from AthenaCommon.AlgSequence import AthSequencer
         condSeq = AthSequencer("AthCondSeq")
         if not hasattr(condSeq, self.algName):
-            from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_MonitorConditionsCondAlg
-            condSeq += SCT_MonitorConditionsCondAlg(name = self.algName,
-                                              ReadKey = self.folder)
+            from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_MonitorCondAlg
+            condSeq += SCT_MonitorCondAlg(name = self.algName,
+                                          ReadKey = self.folder)
         self.alg = getattr(condSeq, self.algName)
 
     def setTool(self):
@@ -74,6 +74,6 @@ class SCT_MonitorConditionsToolSetup:
         self.outputLevel = outputLevel
 
     def setup(self):
-        self.setFolders()
-        self.setAlgs()
+        self.setFolder()
+        self.setAlg()
         self.setTool()
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ConfigurationConditionsTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ConfigurationConditionsTool.h
index db7c3c09e5aac96df0250ee8581ffed6fff94039..be19953bfdeeb9480e582a97ce82e76c258a1e59 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ConfigurationConditionsTool.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ConfigurationConditionsTool.h
@@ -80,7 +80,7 @@ private:
   // Cache to store events for slots
   mutable std::vector<EventContext::ContextEvt_t> m_cache;
   mutable std::vector<EventContext::ContextEvt_t> m_cacheElements;
-  // Pointer of SCT_MonitorConditionsCondData
+  // Pointer of SCT_ConfigurationCondData
   mutable Gaudi::Hive::ContextSpecificPtr<const SCT_ConfigurationCondData> m_condData;
   // Pointer of InDetDD::SiDetectorElementCollection
   mutable Gaudi::Hive::ContextSpecificPtr<const InDetDD::SiDetectorElementCollection> m_detectorElements;
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.cxx
index 682c4583d22351ecaae883e6cedf2fc75bece7db..1b8c31d73cef0fe5d66d9b43cb4ed27698cd133e 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.cxx
@@ -175,7 +175,7 @@ SCT_MonitorConditionsTool::getList(const Identifier& imodule) const {
   string currentDefectList = "";
   int channelNumber{static_cast<int>(imodule.get_identifier32().get_compact())};
   const EventContext& ctx{Gaudi::Hive::currentContext()};
-  const SCT_MonitorConditionsCondData* condData{getCondData(ctx)};
+  const SCT_MonitorCondData* condData{getCondData(ctx)};
   if (condData) {
     condData->find(channelNumber, currentDefectList);
   } else {
@@ -369,7 +369,7 @@ SCT_MonitorConditionsTool::computeIstrip4moncond(const Identifier& elementId) co
 
 ///////////////////////////////////////////////////////////////////////////////////
 
-const SCT_MonitorConditionsCondData*
+const SCT_MonitorCondData*
 SCT_MonitorConditionsTool::getCondData(const EventContext& ctx) const {
   static const EventContext::ContextEvt_t invalidValue{EventContext::INVALID_CONTEXT_EVT};
   EventContext::ContextID_t slot{ctx.slot()};
@@ -379,7 +379,7 @@ SCT_MonitorConditionsTool::getCondData(const EventContext& ctx) const {
     m_cache.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement.
   }
   if (m_cache[slot]!=evt) {
-    SG::ReadCondHandle<SCT_MonitorConditionsCondData> condData{m_condKey};
+    SG::ReadCondHandle<SCT_MonitorCondData> condData{m_condKey};
     if (not condData.isValid()) {
       ATH_MSG_ERROR("Failed to get " << m_condKey.key());
     }
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.h
index e73da8985bb140c839cb4b59e9870aade4ea7925..c821150c5aafee7ec51d19a6f8f34d769cfee687 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.h
@@ -18,7 +18,7 @@
 // Athena includes
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "SCT_ConditionsTools/ISCT_MonitorConditionsTool.h"
-#include "SCT_ConditionsData/SCT_MonitorConditionsCondData.h"
+#include "SCT_ConditionsData/SCT_MonitorCondData.h"
 
 // Read Handle Key
 #include "StoreGate/ReadHandleKey.h"
@@ -107,11 +107,11 @@ private:
   mutable std::mutex m_mutex;
   // Cache to store events for slots
   mutable std::vector<EventContext::ContextEvt_t> m_cache;
-  // Pointer of SCT_MonitorConditionsCondData
-  mutable Gaudi::Hive::ContextSpecificPtr<const SCT_MonitorConditionsCondData> m_condData;
+  // Pointer of SCT_MonitorCondData
+  mutable Gaudi::Hive::ContextSpecificPtr<const SCT_MonitorCondData> m_condData;
 
-  SG::ReadCondHandleKey<SCT_MonitorConditionsCondData> m_condKey{this, "CondKey", "SCT_MonitorConditionsCondData", "SCT noisy strips"};
-  const SCT_MonitorConditionsCondData* getCondData(const EventContext& ctx) const;
+  SG::ReadCondHandleKey<SCT_MonitorCondData> m_condKey{this, "CondKey", "SCT_MonitorCondData", "SCT noisy strips"};
+  const SCT_MonitorCondData* getCondData(const EventContext& ctx) const;
 };
 
 #endif // SCT_MONITORCONDITIONSTOOL_SCT_MONITORCONDITIONSTOOL_H
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_SensorsTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_SensorsTool.h
index 24ead3423c3d55ceabe104f3a93924a6052077d3..764e3ae33282df106d81caec0820519f3017bf3b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_SensorsTool.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_SensorsTool.h
@@ -54,7 +54,7 @@ class SCT_SensorsTool: public extends<AthAlgTool, ISCT_SensorsTool> {
   mutable std::mutex m_mutex;
   // Cache to store events for slots
   mutable std::vector<EventContext::ContextEvt_t> m_cache;
-  // Pointer of SCT_TdaqEnabledCondData
+  // Pointer of SCT_SensorsCondData
   mutable Gaudi::Hive::ContextSpecificPtr<const SCT_SensorsCondData> m_condData;
   // ReadCondHandleKey
   SG::ReadCondHandleKey<SCT_SensorsCondData> m_condKey{this, "CondKey", "SCT_SensorsCondData", "SCT sensor conditions"};
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SiLorentzAngleSvcConfig.py b/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SiLorentzAngleSvcConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..901cf8b9aa427b41372b6e2388b4bf95833a59e6
--- /dev/null
+++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SiLorentzAngleSvcConfig.py
@@ -0,0 +1,10 @@
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+
+# https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/ConfiguredFactory
+
+from AthenaCommon import CfgMgr
+
+def getSCTLorentzAngleTool(name="SCTLorentzAngleTool", **kwargs):
+    kwargs.setdefault("DetectorName", "SCT")
+    from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SiLorentzAngleTool
+    return CfgMgr.SiLorentzAngleTool(name, **kwargs)
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SiLorentzAngleSvcConfigDb.py b/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SiLorentzAngleSvcConfigDb.py
new file mode 100644
index 0000000000000000000000000000000000000000..289c4d7135ad79345aee080e0bcbfefc76d67794
--- /dev/null
+++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SiLorentzAngleSvcConfigDb.py
@@ -0,0 +1,7 @@
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+
+# https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/ConfiguredFactory
+
+from AthenaCommon.CfgGetter import addTool
+
+addTool("SiLorentzAngleSvc.SiLorentzAngleSvcConfig.getSCTLorentzAngleTool", "SCTLorentzAngleTool")
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx
index 75ea5fa055dc0b4eb61e926ad3aaac933cd1553a..ac0a2dddb7c450d308ad751da383291616a59566 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx
@@ -10,35 +10,24 @@
 // Local include
 #include "SCTSiLorentzAngleCondAlg.h"
 
-// STL include
+// Athena includes
+#include "InDetIdentifier/SCT_ID.h"
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "MagFieldInterfaces/IMagFieldSvc.h"
+#include "SiPropertiesSvc/SiliconProperties.h"
 
 // Gaudi include
-#include "GaudiKernel/SystemOfUnits.h"
 #include "GaudiKernel/PhysicalConstants.h"
+#include "GaudiKernel/SystemOfUnits.h"
 
-// Athena includes
-#include "MagFieldInterfaces/IMagFieldSvc.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetIdentifier/SCT_ID.h"
-#include "SiPropertiesSvc/SiliconProperties.h"
+// STL include
 
 SCTSiLorentzAngleCondAlg::SCTSiLorentzAngleCondAlg(const std::string& name, ISvcLocator* pSvcLocator):
   ::AthAlgorithm(name, pSvcLocator),
-  m_readKeyTemp{"SCT_SiliconTempCondData"},
-  m_readKeyHV{"SCT_SiliconBiasVoltCondData"},
-  m_readKeyBFieldSensor{"/EXT/DCS/MAGNETS/SENSORDATA"}, 
-  // The /GLOBAL/BField/Maps folder is run-lumi folder and has just one IOV. The folder is not used for IOV determination.
-  m_writeKey{"SCTSiLorentzAngleCondData"},
   m_condSvc{"CondSvc", name},
   m_magFieldSvc{"AtlasFieldSvc", name},
-  m_detManager{nullptr},
   m_maxHash{0}
 {
-  declareProperty("ReadKeyTemp", m_readKeyTemp, "Key of input SCT temperature");
-  declareProperty("ReadKeyHV", m_readKeyHV, "Key of input SCT HV");
-  declareProperty("ReadKeyBFieldSensor", m_readKeyBFieldSensor, "Key of input B-field sensor");
-  declareProperty("WriteKey", m_writeKey, "Key of output SiLorentzAngleCondData");
   // YOU NEED TO USE THE SAME PROPERTIES AS USED IN SCTLorentzAngleTool!!!
   declareProperty("MagFieldSvc", m_magFieldSvc);
   declareProperty("Temperature", m_temperature = -7., "Default temperature in Celcius.");
@@ -58,7 +47,7 @@ StatusCode SCTSiLorentzAngleCondAlg::initialize()
   if (m_siConditionsTool.empty()) m_sctDefaults = true;
 
   if (not m_sctDefaults) {
-    // SCTSiliconConditionsSvc
+    // SCTSiliconConditionsTool
     ATH_CHECK(m_siConditionsTool.retrieve());
     // Read Cond handle
     if (not m_useGeoModel) {
@@ -78,6 +67,8 @@ StatusCode SCTSiLorentzAngleCondAlg::initialize()
     }
   }
 
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
   // Write Cond Handle
   ATH_CHECK(m_condSvc.retrieve());
   ATH_CHECK(m_writeKey.initialize());
@@ -86,9 +77,6 @@ StatusCode SCTSiLorentzAngleCondAlg::initialize()
     return StatusCode::FAILURE;
   }
 
-  // SiDetectorManager
-  ATH_CHECK(detStore()->retrieve(m_detManager, "SCT"));
-  
   // Get maximum hash for vector sizes. We need the idhelper for this.
   const SCT_ID* idHelper{nullptr};
   ATH_CHECK(detStore()->retrieve(idHelper, "SCT_ID"));
@@ -118,6 +106,19 @@ StatusCode SCTSiLorentzAngleCondAlg::execute()
   EventIDRange rangeSCT{eidStart, eidStop};
   EventIDRange rangeBField{eidStart, eidStop};
 
+  // Get SCT_DetectorElementCollection
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+  if (elements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+    return StatusCode::FAILURE;
+  }
+  EventIDRange rangeDetEle; // Run-LB IOV
+  if (not sctDetEle.range(rangeDetEle)) {
+    ATH_MSG_FATAL("Failed to retrieve validity range for " << m_SCTDetEleCollKey.key());
+    return StatusCode::FAILURE;
+  }
+
   if ((not m_sctDefaults) and (not m_useGeoModel)) {
     // Read Cond Handle (temperature)
     SG::ReadCondHandle<SCT_DCSFloatCondData> readHandleTemp{m_readKeyTemp};
@@ -220,7 +221,7 @@ StatusCode SCTSiLorentzAngleCondAlg::execute()
     // Calculate depletion depth. If biasVoltage is less than depletionVoltage
     // the detector is not fully depleted and we need to take this into account.
     // We take absolute values just in case voltages are signed.
-    const InDetDD::SiDetectorElement* element{m_detManager->getDetectorElement(elementHash)};
+    const InDetDD::SiDetectorElement* element{elements->getDetectorElement(elementHash)};
     double depletionDepth{element->thickness()};
     if (deplVoltage==0.0) {
       ATH_MSG_WARNING("Depletion voltage in "<<__FILE__<<" is zero, which might be a bug.");
@@ -238,7 +239,7 @@ StatusCode SCTSiLorentzAngleCondAlg::execute()
     double mobility{siProperties.signedHallMobility(element->carrierType())};
 
     // Get magnetic field. This first checks that field cache is valid.
-    Amg::Vector3D magneticField{getMagneticField(elementHash)};
+    Amg::Vector3D magneticField{getMagneticField(element)};
 
     // The angles are in the hit frame. This is because that is what is needed by the digization and also
     // gives a more physical sign of the angle (ie dosen't flip sign when the detector is flipped).
@@ -291,9 +292,8 @@ StatusCode SCTSiLorentzAngleCondAlg::finalize()
   return StatusCode::SUCCESS;
 }
 
-Amg::Vector3D SCTSiLorentzAngleCondAlg::getMagneticField(const IdentifierHash& elementHash) const {
+Amg::Vector3D SCTSiLorentzAngleCondAlg::getMagneticField(const InDetDD::SiDetectorElement* element) const {
   if (m_useMagFieldSvc) {
-    const InDetDD::SiDetectorElement* element{m_detManager->getDetectorElement(elementHash)};
     Amg::Vector3D pointvec{element->center()};
     ATH_MSG_VERBOSE("Getting magnetic field from magnetic field service.");
     double point[3];
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.h b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.h
index 7e99bbb76d85b7b9027ee2ed92ccb6b9a390994f..490819f057e518425cd7b070440292ab9af5ffdb 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.h
+++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.h
@@ -9,25 +9,24 @@
 #ifndef SCTSiLorentzAngleCondAlg_h
 #define SCTSiLorentzAngleCondAlg_h
 
-// Gaudi includes
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/ICondSvc.h"
-
 // Athena includes
 #include "AthenaBaseComps/AthAlgorithm.h"
-#include "StoreGate/ReadCondHandleKey.h"
-#include "SCT_ConditionsData/SCT_DCSFloatCondData.h"
+
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
-#include "StoreGate/WriteCondHandleKey.h"
-#include "SiLorentzAngleSvc/SiLorentzAngleCondData.h"
 #include "GeoPrimitives/GeoPrimitives.h"
 #include "InDetConditionsSummaryService/ISiliconConditionsTool.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "SCT_ConditionsData/SCT_DCSFloatCondData.h"
+#include "SiLorentzAngleSvc/SiLorentzAngleCondData.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/WriteCondHandleKey.h"
 
-// forward declarations
-namespace InDetDD {
-  class SiDetectorManager;
-}  
+// Gaudi includes
+#include "GaudiKernel/ICondSvc.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
 
+// forward declarations
 namespace MagField {
   class IMagFieldSvc;
 }
@@ -47,10 +46,12 @@ class SCTSiLorentzAngleCondAlg: public AthAlgorithm
   virtual StatusCode finalize() override;
 
  private:
-  SG::ReadCondHandleKey<SCT_DCSFloatCondData> m_readKeyTemp;
-  SG::ReadCondHandleKey<SCT_DCSFloatCondData> m_readKeyHV;
-  SG::ReadCondHandleKey<CondAttrListCollection> m_readKeyBFieldSensor;
-  SG::WriteCondHandleKey<SiLorentzAngleCondData> m_writeKey;
+  SG::ReadCondHandleKey<SCT_DCSFloatCondData> m_readKeyTemp{this, "ReadKeyTemp", "SCT_SiliconTempCondData", "Key of input SCT temperature"};
+  SG::ReadCondHandleKey<SCT_DCSFloatCondData> m_readKeyHV{this, "ReadKeyHV", "SCT_SiliconBiasVoltCondData", "Key of input SCT HV"};
+  SG::ReadCondHandleKey<CondAttrListCollection> m_readKeyBFieldSensor{this, "ReadKeyBFieldSensor", "/EXT/DCS/MAGNETS/SENSORDATA",  "Key of input B-field sensor"};
+  // The /GLOBAL/BField/Maps folder is run-lumi folder and has just one IOV. The folder is not used for IOV determination.
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+  SG::WriteCondHandleKey<SiLorentzAngleCondData> m_writeKey{this, "WriteKey", "SCTSiLorentzAngleCondData", "Key of output SiLorentzAngleCondData"};
 
   // needed services
   ServiceHandle<ICondSvc> m_condSvc;
@@ -58,8 +59,6 @@ class SCTSiLorentzAngleCondAlg: public AthAlgorithm
 
   ToolHandle<ISiliconConditionsTool> m_siConditionsTool{this, "SiConditionsTool", "SCT_SiliconConditionsTool", "Tool to retrieve SCT silicon information"};
 
-  const InDetDD::SiDetectorManager* m_detManager;
-
   // Properties
   double                   m_temperature;
   double                   m_deplVoltage;
@@ -73,7 +72,7 @@ class SCTSiLorentzAngleCondAlg: public AthAlgorithm
   double                   m_temperatureMin;
   double                   m_temperatureMax;
 
-  Amg::Vector3D getMagneticField(const IdentifierHash& elementHash) const;
+  Amg::Vector3D getMagneticField(const InDetDD::SiDetectorElement* element) const;
 };
 
 #endif // SCTSiLorentzAngleCondAlg_h
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.cxx b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.cxx
index e6c0e5cff1c16c55bff1d65f10efdebfc8ece5a4..44f610836af2f305c773d0d67e2ec4651698f58c 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.cxx
+++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.cxx
@@ -10,16 +10,15 @@
 #include "GaudiKernel/SystemOfUnits.h"
 
 #include "AthenaPoolUtilities/AthenaAttributeList.h"
+#include "Identifier/IdentifierHash.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "SiPropertiesSvc/SiliconProperties.h"
 
 SiLorentzAngleTool::SiLorentzAngleTool(const std::string& type, const std::string& name, const IInterface* parent):
   base_class(type, name, parent),
   m_isPixel{true},
   m_condData{"SCTSiLorentzAngleCondData"},
-  m_magFieldSvc{"AtlasFieldSvc", name},
-  m_detManager{nullptr}
+  m_magFieldSvc{"AtlasFieldSvc", name}
 {
   declareProperty("IgnoreLocalPos", m_ignoreLocalPos = false, 
                   "Treat methods that take a local position as if one called the methods without a local position");
@@ -48,9 +47,7 @@ StatusCode SiLorentzAngleTool::initialize() {
 
   // Read Cond Handle
   ATH_CHECK(m_condData.initialize());
-
-  // Get the detector manager
-  ATH_CHECK(detStore()->retrieve(m_detManager, m_detectorName));
+  ATH_CHECK(m_detEleCollKey.initialize());
 
   // MagneticFieldSvc handles updates itself
   if (not m_useMagFieldSvc) {
@@ -160,7 +157,7 @@ double SiLorentzAngleTool::getValue(const IdentifierHash& elementHash, const Amg
   // Calculate depletion depth. If biasVoltage is less than depletionVoltage
   // the detector is not fully depleted and we need to take this into account.
   // We take absolute values just in case voltages are signed.
-  const InDetDD::SiDetectorElement* element{m_detManager->getDetectorElement(elementHash)};
+  const InDetDD::SiDetectorElement* element{getDetectorElement(elementHash)};
   double depletionDepth{element->thickness()};
   if (deplVoltage==0.0) ATH_MSG_WARNING("Depletion voltage in "<<__FILE__<<" is zero, which might be a bug.");
   if (std::abs(biasVoltage) < std::abs(deplVoltage)) {
@@ -175,7 +172,8 @@ double SiLorentzAngleTool::getValue(const IdentifierHash& elementHash, const Amg
   siProperties.setConditions(temperature, meanElectricField);
   mobility = siProperties.signedHallMobility(element->carrierType());
   // Get magnetic field.
-  Amg::Vector3D magneticField{getMagneticField(elementHash, locPos)};
+  Amg::Vector3D pointvec{element->globalPosition(locPos)};
+  Amg::Vector3D magneticField{getMagneticField(pointvec)};
 
   double correctionFactor{getCorrectionFactor()};
 
@@ -219,11 +217,8 @@ double SiLorentzAngleTool::getCorrectionFactor() const
   return s_invalidValue;
 }
 
-Amg::Vector3D SiLorentzAngleTool::getMagneticField(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const {
+Amg::Vector3D SiLorentzAngleTool::getMagneticField(const Amg::Vector3D& pointvec) const {
   // Get the magnetic field.
-  const InDetDD::SiDetectorElement* element{m_detManager->getDetectorElement(elementHash)};
-  Amg::Vector3D pointvec{element->globalPosition(locPos)};
-
   if (m_useMagFieldSvc) {
     ATH_MSG_VERBOSE("Getting magnetic field from magnetic field service.");
     double field[3];
@@ -249,4 +244,14 @@ const SiLorentzAngleCondData* SiLorentzAngleTool::getCondData() const {
   return nullptr;
 }
 
+const InDetDD::SiDetectorElement* SiLorentzAngleTool::getDetectorElement(const IdentifierHash& waferHash) const {
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> handle{m_detEleCollKey};
+  const InDetDD::SiDetectorElementCollection* elements{nullptr};
+  if (handle.isValid()) elements = *handle;
+  if (elements!=nullptr) return elements->getDetectorElement(waferHash);
+
+  ATH_MSG_WARNING(m_detEleCollKey.key() << " cannot be retrieved.");
+  return nullptr;
+}
+
 const double SiLorentzAngleTool::s_invalidValue{std::numeric_limits<double>::quiet_NaN()};
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.h b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.h
index 088f02e163b5095720cfffe677b1d364f0cf0cf0..ad1002715337809a6b5acc84f250cca5c44a5782 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.h
+++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.h
@@ -10,21 +10,21 @@
 #define SiLorentzAngleTool_h
 
 #include "InDetCondServices/ISiLorentzAngleTool.h"
-
-//Gaudi Includes
-#include "GaudiKernel/ServiceHandle.h"
-
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "Identifier/IdentifierHash.h"
+
+#include "GeoPrimitives/GeoPrimitives.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "MagFieldInterfaces/IMagFieldSvc.h"
-#include "StoreGate/ReadCondHandleKey.h"
 #include "SiLorentzAngleSvc/SiLorentzAngleCondData.h"
-// Amg
-#include "GeoPrimitives/GeoPrimitives.h"
+#include "StoreGate/ReadCondHandleKey.h"
 
+//Gaudi Includes
+#include "GaudiKernel/ServiceHandle.h"
+
+class IdentifierHash;
 namespace InDetDD {
-  class SiDetectorManager;
-}  
+  class SiDetectorElement;
+}
 
 /**
  * @class SiLorentzAngleTool
@@ -88,9 +88,10 @@ private:
 
   double getValue(const IdentifierHash& elementHash, const Amg::Vector2D& locPos, Variable variable) const;
   double getCorrectionFactor() const;
-  Amg::Vector3D getMagneticField(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) const;
+  Amg::Vector3D getMagneticField(const Amg::Vector3D& pointvec) const;
   const SiLorentzAngleCondData* getCondData() const;
- 
+  const InDetDD::SiDetectorElement* getDetectorElement(const IdentifierHash& waferHash) const;
+
   // Properties
   std::string              m_detectorName;
   bool                     m_isPixel;  
@@ -98,12 +99,11 @@ private:
   bool                     m_useMagFieldSvc;
   bool                     m_ignoreLocalPos;   // Makes methods using localPosition behave as method without passing localPosition.
   SG::ReadCondHandleKey<SiLorentzAngleCondData> m_condData;
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_detEleCollKey{this, "DetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT or Pixel"};
 
   // needed services
   ServiceHandle<MagField::IMagFieldSvc> m_magFieldSvc;
 
-  const InDetDD::SiDetectorManager* m_detManager;
-
   static const double s_invalidValue;
 };
 
diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.h b/InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.h
index 6efbbcf2c1db16d5849dc9d8b5f27226d870a0ea..f5e5a8c561b080634fc92a8ca09d87117de167dd 100644
--- a/InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.h
+++ b/InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.h
@@ -27,7 +27,7 @@ class PixelSiPropertiesCondAlg : public AthAlgorithm {
 
   private:
     const PixelID* m_pixid;
-    const InDetDD::SiDetectorManager * m_detManager;
+    const InDetDD::PixelDetectorManager * m_detManager;
     
     ServiceHandle<ICondSvc> m_condSvc;
     SG::ReadCondHandleKey<PixelDCSConditionsData> m_readKeyTemp      {this, "ReadKeyeTemp", "PixelDCSTempCondData",         "Key of input sensor temperature conditions folder"};
diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesCondAlg.cxx b/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesCondAlg.cxx
index cad91729c63186b06975035765bcf2576a94e708..1da3a335235d30fdcb58e1ce89c19718852057c4 100644
--- a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesCondAlg.cxx
@@ -4,32 +4,20 @@
 
 #include "SCTSiPropertiesCondAlg.h"
 
-#include <cmath>
-#include <memory>
-
 #include "Identifier/IdentifierHash.h"
 #include "InDetIdentifier/SCT_ID.h"
+#include "InDetReadoutGeometry/SiDetectorElement.h"
 
 #include "GaudiKernel/EventIDRange.h"
 
-#include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
+#include <cmath>
+#include <memory>
 
 SCTSiPropertiesCondAlg::SCTSiPropertiesCondAlg(const std::string& name, ISvcLocator* pSvcLocator)
   : ::AthAlgorithm(name, pSvcLocator)
-  , m_readKeyTemp{"SCT_SiliconTempCondData"}
-  , m_readKeyHV{"SCT_SiliconBiasVoltCondData"}
-  , m_writeKey{"SCTSiliconPropertiesVector"}
   , m_condSvc{"CondSvc", name}
   , m_pHelper{nullptr}
-  , m_detManager{nullptr}
 {
-  declareProperty("TemperatureMin", m_temperatureMin = -80., "Minimum temperature allowed in Celcius.");
-  declareProperty("TemperatureMax", m_temperatureMax = 100., "Maximum temperature allowed in Celcius.");
-  declareProperty("TemperatureDefault", m_temperatureDefault = -7., "Default temperature in Celcius.");
-  declareProperty("ReadKeyeTemp", m_readKeyTemp, "Key of input sensor temperature conditions folder");
-  declareProperty("ReadKeyHV", m_readKeyHV, "Key of input bias voltage conditions folder");
-  declareProperty("WriteKey", m_writeKey, "Key of output silicon properties conditions folder");
 }
 
 StatusCode SCTSiPropertiesCondAlg::initialize() {
@@ -41,14 +29,12 @@ StatusCode SCTSiPropertiesCondAlg::initialize() {
   // SCT ID helper
   ATH_CHECK(detStore()->retrieve(m_pHelper, "SCT_ID"));
 
-  // Detector manager
-  ATH_CHECK(detStore()->retrieve(m_detManager, "SCT"));
-
   // CondSvc
   ATH_CHECK(m_condSvc.retrieve());
   // Read Cond Handles
   ATH_CHECK(m_readKeyTemp.initialize());
   ATH_CHECK(m_readKeyHV.initialize());
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
   // Write Cond Handle
   ATH_CHECK(m_writeKey.initialize());
   if(m_condSvc->regHandle(this, m_writeKey).isFailure()) {
@@ -100,12 +86,25 @@ StatusCode SCTSiPropertiesCondAlg::execute() {
   }
   ATH_MSG_INFO("Input is " << readHandleHV.fullKey() << " with the range of " << rangeHV);
 
-  // Combined the validity ranges of temp and HV
+  // Combined the validity ranges of temp and HV (timestamp IOV)
   EventIDRange rangeW{EventIDRange::intersect(rangeTemp, rangeHV)};
   if(rangeW.start()>rangeW.stop()) {
     ATH_MSG_FATAL("Invalid intersection range: " << rangeW);
     return StatusCode::FAILURE;
   }
+
+  // Get SCT_DetectorElementCollection
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+  if (elements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+    return StatusCode::FAILURE;
+  }
+  EventIDRange rangeDetEle; // Run-LB IOV
+  if (not sctDetEle.range(rangeDetEle)) {
+    ATH_MSG_FATAL("Failed to retrieve validity range for " << m_SCTDetEleCollKey.key());
+    return StatusCode::FAILURE;
+  }
   
   // Construct the output Cond Object and fill it in
   std::unique_ptr<InDet::SiliconPropertiesVector> writeCdo{std::make_unique<InDet::SiliconPropertiesVector>()};
@@ -128,7 +127,7 @@ StatusCode SCTSiPropertiesCondAlg::execute() {
     double deplVoltage{m_siCondTool->depletionVoltage(elementHash) * CLHEP::volt};
     double biasVoltage{m_siCondTool->biasVoltage(elementHash) * CLHEP::volt};
 
-    const InDetDD::SiDetectorElement* element{m_detManager->getDetectorElement(elementHash)};
+    const InDetDD::SiDetectorElement* element{elements->getDetectorElement(elementHash)};
     double depletionDepth{element->thickness()};
     if (std::abs(biasVoltage)<std::abs(deplVoltage)) {
       depletionDepth *= sqrt(std::abs(biasVoltage/deplVoltage));
diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesCondAlg.h b/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesCondAlg.h
index 7a99910e3b4f7c269e44b30198a497efc0aa86ce..bcd7e57c3a4afd86ddbdba70a99fd250d64da973 100644
--- a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesCondAlg.h
+++ b/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesCondAlg.h
@@ -7,18 +7,16 @@
 
 #include "AthenaBaseComps/AthAlgorithm.h"
 
-#include "StoreGate/ReadCondHandleKey.h"
+#include "InDetConditionsSummaryService/ISiliconConditionsTool.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "SCT_ConditionsData/SCT_DCSFloatCondData.h"
-#include "StoreGate/WriteCondHandleKey.h"
 #include "SiPropertiesSvc/SiliconPropertiesVector.h"
-#include "InDetConditionsSummaryService/ISiliconConditionsTool.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/WriteCondHandleKey.h"
 
 #include "GaudiKernel/ICondSvc.h"
 
 class SCT_ID;
-namespace InDetDD {
-  class SiDetectorManager;
-}
 
 class SCTSiPropertiesCondAlg : public AthAlgorithm 
 {  
@@ -30,16 +28,16 @@ class SCTSiPropertiesCondAlg : public AthAlgorithm
   virtual StatusCode finalize() override;
 
  private:
-  double m_temperatureMin;
-  double m_temperatureMax;
-  double m_temperatureDefault;
-  SG::ReadCondHandleKey<SCT_DCSFloatCondData> m_readKeyTemp;
-  SG::ReadCondHandleKey<SCT_DCSFloatCondData> m_readKeyHV;
-  SG::WriteCondHandleKey<InDet::SiliconPropertiesVector> m_writeKey;
+  DoubleProperty m_temperatureMin{this, "TemperatureMin", -80., "Minimum temperature allowed in Celcius."};
+  DoubleProperty m_temperatureMax{this, "TemperatureMax", 100., "Maximum temperature allowed in Celcius."};
+  DoubleProperty m_temperatureDefault{this, "TemperatureDefault", -7., "Default temperature in Celcius."};
+  SG::ReadCondHandleKey<SCT_DCSFloatCondData> m_readKeyTemp{this, "ReadKeyeTemp", "SCT_SiliconTempCondData", "Key of input sensor temperature conditions folder"};
+  SG::ReadCondHandleKey<SCT_DCSFloatCondData> m_readKeyHV{this, "ReadKeyHV", "SCT_SiliconBiasVoltCondData", "Key of input bias voltage conditions folder"};
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+  SG::WriteCondHandleKey<InDet::SiliconPropertiesVector> m_writeKey{this, "WriteKey", "SCTSiliconPropertiesVector", "Key of output silicon properties conditions folder"};
   ServiceHandle<ICondSvc> m_condSvc;
   ToolHandle<ISiliconConditionsTool> m_siCondTool{this, "SiConditionsTool", "SCT_SiliconConditionsTool", "SiConditionsTool to be used"};
   const SCT_ID* m_pHelper; //!< ID helper for SCT
-  const InDetDD::SiDetectorManager* m_detManager;
 };
 
 #endif // SCTSIPROPERTIESCONDALG
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_AlignDbSvc.cxx b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_AlignDbSvc.cxx
index 8e116c54d972746a5210d0c048c84aa9ee4cc576..cf6cf5ca2d55192b122f42b332f2c80ce6d830fa 100755
--- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_AlignDbSvc.cxx
+++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_AlignDbSvc.cxx
@@ -19,7 +19,6 @@
 
 #include "InDetReadoutGeometry/TRT_DetElementCollection.h"
 #include "InDetReadoutGeometry/TRT_BaseElement.h"
-#include "InDetReadoutGeometry/InDetDetectorManager.h"
 #include "InDetReadoutGeometry/InDetDD_Defs.h"
 #include "InDetReadoutGeometry/TRT_DetectorManager.h"
 
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx
index 8cc33a73c7bc93244a97ca90759ce3968df164f8..090b5e9d86c01629875544c017ec98726eb23702 100755
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx
@@ -12,6 +12,8 @@
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
+#include <map>
+
 namespace InDetDD 
 {
 
@@ -319,15 +321,15 @@ namespace InDetDD
             throw std::runtime_error("Unable to apply Inner Detector alignments.");
         }
         // loop over all the AlignableTransform objects in the collection
-        bool isFirstL3SCTECA9 = true;
+        // use only the last ones.
+        // /Indet/AlignL3/SCTEA9 appear repeatedly in tags of the /Indet/AlignL3 folder
+        std::map<const std::string, const AlignableTransform*> stringToTransform;
         for (DataVector<AlignableTransform>::const_iterator pat=container->begin();
              pat!=container->end();++pat) {
-            // /Indet/AlignL3/SCTEA9 appear repeatedly in tags of the /Indet/AlignL3 folder
-            if ((*pat)->tag()=="/Indet/AlignL3/SCTEA9") {
-                if (not isFirstL3SCTECA9) continue;
-                else isFirstL3SCTECA9 = false;
-            }
-            bool status = processKey((*pat)->tag(),*pat,alignStore);
+            stringToTransform[(*pat)->tag()] = *pat;
+        }
+        for (std::pair<const std::string, const AlignableTransform*> value: stringToTransform) {
+            bool status = processKey(value.first, value.second, alignStore);
             alignmentChange = (alignmentChange || status);
         }
         return alignmentChange;
diff --git a/InnerDetector/InDetDetDescr/PixelCabling/src/PixelCablingSvc.cxx b/InnerDetector/InDetDetDescr/PixelCabling/src/PixelCablingSvc.cxx
index ad69c6a243f0aca9505068be8eb37c59ee7f3e24..9e917f293ee556a63469fbbc4adbc38e95e209d1 100644
--- a/InnerDetector/InDetDetDescr/PixelCabling/src/PixelCablingSvc.cxx
+++ b/InnerDetector/InDetDetDescr/PixelCabling/src/PixelCablingSvc.cxx
@@ -31,7 +31,7 @@
 
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetReadoutGeometry/PixelModuleDesign.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
 
 //#define PIXEL_DEBUG
 
diff --git a/InnerDetector/InDetDetDescr/PixelCabling/src/PixelCablingSvc.h b/InnerDetector/InDetDetDescr/PixelCabling/src/PixelCablingSvc.h
index 9895f8965b602502c0168714609d2fe802904437..b4d1bb789b63fe36d0c4d5791e670be15eddcf37 100644
--- a/InnerDetector/InDetDetDescr/PixelCabling/src/PixelCablingSvc.h
+++ b/InnerDetector/InDetDetDescr/PixelCabling/src/PixelCablingSvc.h
@@ -84,7 +84,7 @@ class PixelFillCablingData;
  */
 
 namespace InDetDD {
-  class SiDetectorManager;
+  class PixelDetectorManager;
 }  
 
 class PixelCablingSvc: virtual public IPixelCablingSvc, public AthService {
@@ -201,7 +201,7 @@ public:
 private:
   ToolHandle<PixelFillCablingData> m_cablingTool;
   ServiceHandle< StoreGateSvc > m_detStore;
-  const InDetDD::SiDetectorManager *m_detManager;
+  const InDetDD::PixelDetectorManager *m_detManager;
   const PixelID* m_idHelper;
   std::unique_ptr<PixelCablingData> m_cabling;
 
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h
index 5de28ae223136434d4b4710e6e7f1699a6ec8c45..a9f435e680c9778e6f3f4afec2c58c31de280df0 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h
@@ -117,7 +117,6 @@ private:
 
   std::string m_inputObjectName;     //! name of the sub event  hit collections.
 
-  std::vector<std::pair<unsigned int, int> > m_seen;
   std::list<SiHitCollection*> m_siHitCollList;
 
   double                                m_pixTanLorentzAngleScalor; //!< scale the lorentz angle effect
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h
index 7d9be53b5977abd7442580d1bf2f4bf5ad9fd1bc..7ea9aed0642a44a1941fb2b82abbba7f834eb686 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h
@@ -17,16 +17,8 @@
 
 #include "PileUpTools/PileUpToolBase.h"
 
-// Gaudi
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/AlgTool.h"
-
 #include "AthenaKernel/IAtRndmGenSvc.h"
 
-#include "boost/shared_ptr.hpp"
-#include <string>
-
 #include "HitManagement/TimedHitCollection.h"
 #include "InDetSimEvent/SiHit.h"
 #include "InDetSimEvent/SiHitCollection.h"
@@ -34,19 +26,30 @@
 #include "InDetPrepRawData/SCT_ClusterContainer.h"  // typedef
 #include "InDetPrepRawData/SiClusterContainer.h"
 
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+
 #include "TrkEventTPCnv/TrkEventPrimitives/HepSymMatrix_p1.h"
 
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
 
 #include "EventPrimitives/EventPrimitives.h"
 #include "StoreGate/WriteHandle.h"
+#include "StoreGate/ReadCondHandleKey.h"
 
 #include "InDetCondServices/ISiLorentzAngleTool.h"
 
+// Gaudi
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/AlgTool.h"
+
+#include "boost/shared_ptr.hpp"
+
 #include <vector>
 #include <list>
 #include <utility> /* pair */
 #include <map>
+#include <string>
 
 //FIXME - not used anywhere?
 // #ifndef MAXSTEPS
@@ -65,11 +68,6 @@ class SCT_ID;
 class SiChargedDiodeCollection;
 class StoreGateService;
 
-namespace InDetDD
-{
-  class SCT_DetectorManager;
-}
-
 namespace InDet {
   class ClusterMakerTool;
   class SCT_Cluster;
@@ -118,11 +116,9 @@ private:
 
   std::string m_inputObjectName;     //! name of the sub event  hit collections.
 
-  std::vector<std::pair<unsigned int, int> > m_seen;
   std::list<SiHitCollection*> m_siHitCollList;
 
   const SCT_ID* m_sct_ID;                              //!< Handle to the ID helper
-  const InDetDD::SCT_DetectorManager* m_manager;
   ServiceHandle<PileUpMergeSvc> m_mergeSvc;            //!< PileUp Merge service
   int                       m_HardScatterSplittingMode; /**< Process all SiHit or just those from signal or background events */
   bool                      m_HardScatterSplittingSkipper;
@@ -143,6 +139,7 @@ private:
 
   SG::WriteHandle<InDet::SCT_ClusterContainer>  m_sctClusterContainer; //!< the SCT_ClusterContainer
   SG::WriteHandle<PRD_MultiTruthCollection>     m_sctPrdTruth;         //!< the PRD truth map for SCT measurements
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
   double m_sctSmearPathLength;       //!< the 2. model parameter: smear the path
   bool m_sctSmearLandau;           //!< if true : landau else: gauss
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h
index 3630ef980b3384c0aa4b9af3987319f483dbb636..9a0b5e8aea881aaa699f3e0d0098ba452dbfb2fa 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h
@@ -44,6 +44,9 @@
 #include "GaudiKernel/ITHistSvc.h"
 #include "EventPrimitives/EventPrimitives.h"
 
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
+
 #include <tuple>
 typedef std::tuple< Amg::Vector2D, InDet::SiWidth, Amg::MatrixX * > ClusterInfo;
 
@@ -66,7 +69,6 @@ namespace InDet {
 
 namespace InDetDD
 {
-  class SCT_DetectorManager;
   class PixelDetectorManager;
 }
 
@@ -128,7 +130,7 @@ public:
   ServiceHandle <IAtRndmGenSvc> m_rndmSvc;             //!< Random number service
 
   const InDetDD::PixelDetectorManager* m_manager_pix;
-  const InDetDD::SCT_DetectorManager* m_manager_sct;
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
   const PixelID* m_pixel_ID;                             //!< Handle to the ID helper
   const SCT_ID* m_sct_ID;                             //!< Handle to the ID helper
@@ -151,6 +153,9 @@ public:
   iFatras::PlanarClusterContainer*  m_planarClusterContainer;               //!< the SCT_ClusterContainer
 
   ServiceHandle<PileUpMergeSvc> m_mergeSvc;      /**< PileUp Merge service */
+  int                       m_HardScatterSplittingMode; /**< Process all SiHit or just those from signal or background events */
+  bool                      m_HardScatterSplittingSkipper;
+  IntegerProperty  m_vetoThisBarcode;
 
   PRD_MultiTruthCollection* m_pixelPrdTruth{};
   std::string               m_prdTruthNamePixel;
@@ -164,7 +169,6 @@ public:
   SiHitCollection* m_simHitColl{};
   std::string      m_inputObjectName;     //! name of the sub event  hit collections.
 
-  std::vector<std::pair<unsigned int, int> > m_seen;
   std::list<SiHitCollection*> m_siHitCollList;
 
   Pixel_detElement_RIO_map* m_pixelClusterMap{};
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/python/FastSiDigitizationConfig.py b/InnerDetector/InDetDigitization/FastSiDigitization/python/FastSiDigitizationConfig.py
index 7cfceb8b29653de0618d3b88894d4180102ace87..c8645c3ea4818ddb86965e142654442bd7b770fb 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/python/FastSiDigitizationConfig.py
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/python/FastSiDigitizationConfig.py
@@ -114,6 +114,17 @@ def commonSCT_FastDigitizationConfig(name,**kwargs):
         kwargs.setdefault("FirstXing", FastSCT_FirstXing())
         kwargs.setdefault("LastXing",  FastSCT_LastXing() )
 
+    # Set up SCT_SiliconConditionsTool
+    from SCT_ConditionsTools.SCT_SiliconConditionsToolSetup import SCT_SiliconConditionsToolSetup
+    sct_SiliconConditionsToolSetup = SCT_SiliconConditionsToolSetup()
+    sct_SiliconConditionsToolSetup.setDcsTool(sct_DCSConditionsToolSetup.getTool())
+    sct_SiliconConditionsToolSetup.setup()
+    # Set up SCT_SiPropertiesTool
+    from SiPropertiesSvc.SCT_SiPropertiesToolSetup import SCT_SiPropertiesToolSetup
+    sct_SiPropertiesToolSetup = SCT_SiPropertiesToolSetup()
+    sct_SiPropertiesToolSetup.setSiliconTool(sct_SiliconConditionsToolSetup.getTool())
+    sct_SiPropertiesToolSetup.setup()
+
     # SiLorentzAngleTool for SCT_FastDigitizationTool
     from AthenaCommon.AppMgr import ToolSvc
     if not hasattr(ToolSvc, "SCTLorentzAngleTool"):
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx
index d6c0c203027e894f34d9296f81e3a04340ec1afa..b872a2bdec21a5429fbfd969bb52982c9352a96c 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx
@@ -256,45 +256,42 @@ StatusCode PixelFastDigitizationTool::prepareEvent(unsigned int)
 }
 
 
-StatusCode PixelFastDigitizationTool::processBunchXing(int /*bunchXing*/,
+StatusCode PixelFastDigitizationTool::processBunchXing(int bunchXing,
                                                        SubEventIterator bSubEvents,
                                                        SubEventIterator eSubEvents)
 {
-
   //decide if this event will be processed depending on HardScatterSplittingMode & bunchXing
   if (m_HardScatterSplittingMode == 2 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; return StatusCode::SUCCESS; }
   if (m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper )  { return StatusCode::SUCCESS; }
   if (m_HardScatterSplittingMode == 1 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; }
-  SubEventIterator iEvt(bSubEvents);
-  while (iEvt != eSubEvents) {
-    StoreGateSvc& seStore(*iEvt->ptr()->evtStore());
-    PileUpTimeEventIndex thisEventIndex(static_cast<int>(iEvt->time()), iEvt->index());
-    const SiHitCollection* seHitColl(nullptr);
-    if (!seStore.retrieve(seHitColl,m_inputObjectName).isSuccess()) {
-      ATH_MSG_ERROR ( "SubEvent SiHitCollection not found in StoreGate " << seStore.name() );
-      return StatusCode::FAILURE;
-    }
-
-
-    ATH_MSG_DEBUG ( "SiHitCollection found with " << seHitColl->size() << " hits" );
-    //Copy Hit Collection
-    SiHitCollection* siHitColl(new SiHitCollection("PixelHits"));
-    SiHitCollection::const_iterator i(seHitColl->begin());
-    SiHitCollection::const_iterator e(seHitColl->end());
-    // Read hits from this collection
-    for (; i!=e; ++i) {
-      const SiHit sihit(*i);
-      siHitColl->Insert(sihit);
-    }
-    m_thpcsi->insert(thisEventIndex, siHitColl);
-    //store these for deletion at the end of mergeEvent
-    m_siHitCollList.push_back(siHitColl);
-
-    ++iEvt;
 
+  typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+  TimedHitCollList hitCollList;
 
+  if (!(m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing,
+                                          bSubEvents, eSubEvents).isSuccess()) &&
+      hitCollList.size() == 0) {
+    ATH_MSG_ERROR("Could not fill TimedHitCollList");
+    return StatusCode::FAILURE;
+  } else {
+    ATH_MSG_VERBOSE(hitCollList.size() << " SiHitCollections with key " <<
+                    m_inputObjectName << " found");
   }
 
+  TimedHitCollList::iterator iColl(hitCollList.begin());
+  TimedHitCollList::iterator endColl(hitCollList.end());
+
+  for( ; iColl != endColl; iColl++) {
+    SiHitCollection *siHitColl = new SiHitCollection(*iColl->second);
+    PileUpTimeEventIndex timeIndex(iColl->first);
+    ATH_MSG_DEBUG("SiHitCollection found with " << siHitColl->size() <<
+                  " hits");
+    ATH_MSG_VERBOSE("time index info. time: " << timeIndex.time()
+                    << " index: " << timeIndex.index()
+                    << " type: " << timeIndex.type());
+    m_thpcsi->insert(timeIndex, siHitColl);
+    m_siHitCollList.push_back(siHitColl);
+  }
 
   return StatusCode::SUCCESS;
 }
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx
index 68dd944c84d722d144280bf7e8134265fa426862..5cdfb2add49479d827074d5228ef7e78934d6036 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx
@@ -2,31 +2,19 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include <algorithm>
 #include "FastSiDigitization/SCT_FastDigitizationTool.h"
 
 // Pile-up
 #include "PileUpTools/PileUpMergeSvc.h"
 
-// Gaudi
-#include "GaudiKernel/SystemOfUnits.h"
-
 // Hit class includes
 #include "InDetSimData/InDetSimDataCollection.h"
 #include "Identifier/Identifier.h"
 #include "CxxUtils/make_unique.h"
 
 // Det Descr includes
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 
-// CLHEP
-#include "CLHEP/Random/RandomEngine.h"
-#include "CLHEP/Random/RandGaussZiggurat.h"
-#include "CLHEP/Random/RandLandau.h"
-
-
 #include "InDetReadoutGeometry/SiDetectorDesign.h"
 #include "InDetReadoutGeometry/SCT_ModuleSideDesign.h"
 #include "InDetReadoutGeometry/SCT_BarrelModuleSideDesign.h"
@@ -43,9 +31,20 @@
 #include "InDetSimEvent/SiHitCollection.h"
 #include "InDetPrepRawData/SiClusterContainer.h"
 
+#include "StoreGate/ReadCondHandle.h"
+
+// Gaudi
+#include "GaudiKernel/SystemOfUnits.h"
+
 #include "GeneratorObjects/HepMcParticleLink.h"
 #include "HepMC/GenParticle.h"
 
+// CLHEP
+#include "CLHEP/Random/RandomEngine.h"
+#include "CLHEP/Random/RandGaussZiggurat.h"
+#include "CLHEP/Random/RandLandau.h"
+
+#include <algorithm>
 #include <sstream>
 #include <string>
 
@@ -59,7 +58,6 @@ SCT_FastDigitizationTool::SCT_FastDigitizationTool(const std::string& type,
   PileUpToolBase(type, name, parent),
   m_inputObjectName("SCT_Hits"),
   m_sct_ID(nullptr),
-  m_manager(nullptr),
   m_mergeSvc("PileUpMergeSvc",name),
   m_HardScatterSplittingMode(0),
   m_HardScatterSplittingSkipper(false),
@@ -126,10 +124,6 @@ StatusCode SCT_FastDigitizationTool::initialize()
       return StatusCode::FAILURE;
     }
 
-  // Get the SCT Detector Manager
-  CHECK(detStore()->retrieve(m_manager,"SCT"));
-  ATH_MSG_DEBUG ( "Retrieved SCT_DetectorManager with version "  << m_manager->getVersion().majorNum() );
-
   CHECK(detStore()->retrieve(m_sct_ID, "SCT_ID"));
 
   if (m_inputObjectName=="")
@@ -155,6 +149,9 @@ StatusCode SCT_FastDigitizationTool::initialize()
   //Initialize threshold
   m_sctMinimalPathCut = m_sctMinimalPathCut * Gaudi::Units::micrometer;
 
+  // Initialize ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
   return StatusCode::SUCCESS ;
 }
 
@@ -172,35 +169,39 @@ StatusCode SCT_FastDigitizationTool::processBunchXing(int bunchXing,
                                                       SubEventIterator bSubEvents,
                                                       SubEventIterator eSubEvents)
 {
-  m_seen.push_back(std::make_pair(std::distance(bSubEvents,eSubEvents), bunchXing));
   //decide if this event will be processed depending on HardScatterSplittingMode & bunchXing
   if (m_HardScatterSplittingMode == 2 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; return StatusCode::SUCCESS; }
   if (m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper )  { return StatusCode::SUCCESS; }
   if (m_HardScatterSplittingMode == 1 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; }
-  SubEventIterator iEvt(bSubEvents);
-  while (iEvt != eSubEvents)
-    {
-      StoreGateSvc& seStore(*iEvt->ptr()->evtStore());
-      PileUpTimeEventIndex thisEventIndex(PileUpTimeEventIndex(static_cast<int>(iEvt->time()),iEvt->index()));
-      const SiHitCollection* seHitColl(nullptr);
-      CHECK(seStore.retrieve(seHitColl,m_inputObjectName));
-
-      //Copy Hit Collection
-      SiHitCollection* siHitColl(new SiHitCollection("SCT_Hits"));
-      SiHitCollection::const_iterator i(seHitColl->begin());
-      SiHitCollection::const_iterator e(seHitColl->end());
-      // Read hits from this collection
-      for (; i!=e; ++i)
-        {
-          const SiHit sihit(*i);
-          siHitColl->Insert(sihit);
-        }
-      m_thpcsi->insert(thisEventIndex, siHitColl);
-      //store these for deletion at the end of mergeEvent
-      m_siHitCollList.push_back(siHitColl);
 
-      ++iEvt;
-    }
+  typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+  TimedHitCollList hitCollList;
+
+  if (!(m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing,
+                                          bSubEvents, eSubEvents).isSuccess()) &&
+      hitCollList.size() == 0) {
+    ATH_MSG_ERROR("Could not fill TimedHitCollList");
+    return StatusCode::FAILURE;
+  } else {
+    ATH_MSG_VERBOSE(hitCollList.size() << " SiHitCollections with key " <<
+                    m_inputObjectName << " found");
+  }
+
+  TimedHitCollList::iterator iColl(hitCollList.begin());
+  TimedHitCollList::iterator endColl(hitCollList.end());
+
+  for( ; iColl != endColl; iColl++) {
+    SiHitCollection *siHitColl = new SiHitCollection(*iColl->second);
+    PileUpTimeEventIndex timeIndex(iColl->first);
+    ATH_MSG_DEBUG("SiHitCollection found with " << siHitColl->size() <<
+                  " hits");
+    ATH_MSG_VERBOSE("time index info. time: " << timeIndex.time()
+                    << " index: " << timeIndex.index()
+                    << " type: " << timeIndex.type());
+    m_thpcsi->insert(timeIndex, siHitColl);
+    m_siHitCollList.push_back(siHitColl);
+  }
+
   return StatusCode::SUCCESS;
 }
 
@@ -323,6 +324,14 @@ StatusCode SCT_FastDigitizationTool::mergeEvent()
 
 StatusCode SCT_FastDigitizationTool::digitize()
 {
+  // Get SCT_DetectorElementCollection
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+  if (elements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+    return StatusCode::FAILURE;
+  }
+
   TimedHitCollection<SiHit>::const_iterator i, e;
   if(!m_sctClusterMap) { m_sctClusterMap = new SCT_detElement_RIO_map; }
   else { m_sctClusterMap->clear(); }
@@ -335,7 +344,9 @@ StatusCode SCT_FastDigitizationTool::digitize()
         {
           TimedHitPtr<SiHit> currentSiHit(*i++);
 
-          const InDetDD::SiDetectorElement *hitSiDetElement = m_manager->getDetectorElement(currentSiHit->getBarrelEndcap(), currentSiHit->getLayerDisk(), currentSiHit->getPhiModule(), currentSiHit->getEtaModule(), currentSiHit->getSide());
+          const Identifier waferId = m_sct_ID->wafer_id(currentSiHit->getBarrelEndcap(), currentSiHit->getLayerDisk(), currentSiHit->getPhiModule(), currentSiHit->getEtaModule(), currentSiHit->getSide());
+          const IdentifierHash waferHash = m_sct_ID->wafer_hash(waferId);
+          const InDetDD::SiDetectorElement *hitSiDetElement = elements->getDetectorElement(waferHash);
           if (!hitSiDetElement)
             {
               ATH_MSG_ERROR( "Could not get detector element.");
@@ -954,6 +965,14 @@ StatusCode SCT_FastDigitizationTool::digitize()
 
 StatusCode SCT_FastDigitizationTool::createAndStoreRIOs()
 {
+  // Get SCT_DetectorElementCollection
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+  if (elements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+    return StatusCode::FAILURE;
+  }
+
   SCT_detElement_RIO_map::iterator clusterMapGlobalIter = m_sctClusterMap->begin();
   SCT_detElement_RIO_map::iterator endOfClusterMap = m_sctClusterMap->end();
   for (; clusterMapGlobalIter != endOfClusterMap; clusterMapGlobalIter = m_sctClusterMap->upper_bound(clusterMapGlobalIter->first))
@@ -962,7 +981,7 @@ StatusCode SCT_FastDigitizationTool::createAndStoreRIOs()
       range = m_sctClusterMap->equal_range(clusterMapGlobalIter->first);
       SCT_detElement_RIO_map::iterator firstDetElem = range.first;
       const IdentifierHash waferID = firstDetElem->first;
-      const InDetDD::SiDetectorElement *detElement = m_manager->getDetectorElement(waferID);
+      const InDetDD::SiDetectorElement *detElement = elements->getDetectorElement(waferID);
       InDet::SCT_ClusterCollection *clusterCollection = new InDet::SCT_ClusterCollection(waferID);
       if (clusterCollection)
         {
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx
index 4f19c9e6ecbb2ce48cfef6a58e49dd9b0f35006e..bddc4382ac14bede06d3cadcbee28fb22feb8e6f 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx
@@ -14,7 +14,6 @@
 // Det Descr
 #include "Identifier/Identifier.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "ISF_FatrasDetDescrModel/PlanarDetElement.h"
 
@@ -67,15 +66,16 @@
 
 using namespace InDetDD;
 
+static constexpr unsigned int crazyParticleBarcode(std::numeric_limits<int32_t>::max());
+//Barcodes at the HepMC level are int
+
 // Constructor with parameters:
 SiSmearedDigitizationTool::SiSmearedDigitizationTool(const std::string &type, const std::string &name,
                                                      const IInterface* parent):
-
   PileUpToolBase(type, name, parent),
   m_thpcsi(NULL),
   m_rndmSvc("AtRndmGenSvc",name),
   m_manager_pix(NULL),
-  m_manager_sct(NULL),
   m_pixel_ID(0),
   m_sct_ID(0),
   m_randomEngine(0),
@@ -89,6 +89,9 @@ SiSmearedDigitizationTool::SiSmearedDigitizationTool(const std::string &type, co
   m_sctClusterContainer(0),
   m_planarClusterContainer(0),
   m_mergeSvc("PileUpMergeSvc",name),
+  m_HardScatterSplittingMode(0),
+  m_HardScatterSplittingSkipper(false),
+  m_vetoThisBarcode(crazyParticleBarcode),
   m_prdTruthNamePixel("PRD_MultiTruthPixel"),
   m_prdTruthNameSCT("PRD_MultiTruthSCT"),
   m_prdTruthNamePlanar("PRD_MultiTruthPlanar"),
@@ -151,6 +154,8 @@ SiSmearedDigitizationTool::SiSmearedDigitizationTool(const std::string &type, co
   // get the service handle for the TrackingGeometry
   declareProperty("TrackingGeometrySvc"          , m_trackingGeometrySvc);
   declareProperty("UseCustomGeometry", m_useCustomGeometry);
+  declareProperty("HardScatterSplittingMode"     , m_HardScatterSplittingMode, "Control pileup & signal splitting" );
+  declareProperty("ParticleBarcodeVeto"          , m_vetoThisBarcode, "Barcode of particle to ignore");
 
 }
 
@@ -183,14 +188,6 @@ StatusCode SiSmearedDigitizationTool::initialize()
     }
 
   }else{ // Smear SCT
-    // Get the SCT Detector Manager
-    if (StatusCode::SUCCESS != detStore()->retrieve(m_manager_sct,"SCT") ) {
-      ATH_MSG_ERROR ( "Can't get SCT_DetectorManager " );
-      return StatusCode::FAILURE;
-    } else {
-      ATH_MSG_DEBUG ( "Retrieved SCT_DetectorManager with version "  << m_manager_sct->getVersion().majorNum() );
-    }
-
     if (detStore()->retrieve(m_sct_ID, "SCT_ID").isFailure()) {
       ATH_MSG_ERROR ( "Could not get SCT ID helper" );
       return StatusCode::FAILURE;
@@ -203,6 +200,10 @@ StatusCode SiSmearedDigitizationTool::initialize()
 
     m_inputObjectName="SCT_Hits"; // Set the input object name
 
+    if (not m_useCustomGeometry) {
+      // Initialize ReadCondHandleKey
+      ATH_CHECK(m_SCTDetEleCollKey.initialize());
+    }
   }
 
   //Get own engine with own seeds:
@@ -329,6 +330,7 @@ StatusCode SiSmearedDigitizationTool::prepareEvent(unsigned int)
 
   m_siHitCollList.clear();
   m_thpcsi = new TimedHitCollection<SiHit>();
+  m_HardScatterSplittingSkipper = false;
 
   return StatusCode::SUCCESS;
 }
@@ -338,36 +340,40 @@ StatusCode SiSmearedDigitizationTool::processBunchXing(int bunchXing,
                                                        SubEventIterator bSubEvents,
                                                        SubEventIterator eSubEvents)
 {
-
   ATH_MSG_DEBUG( "--- SiSmearedDigitizationTool: in pixel processBunchXing() ---" );
+  //decide if this event will be processed depending on HardScatterSplittingMode & bunchXing
+  if (m_HardScatterSplittingMode == 2 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; return StatusCode::SUCCESS; }
+  if (m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper )  { return StatusCode::SUCCESS; }
+  if (m_HardScatterSplittingMode == 1 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; }
 
-  m_seen.push_back(std::make_pair(std::distance(bSubEvents,eSubEvents), bunchXing));
-  SubEventIterator iEvt(bSubEvents);
-  while (iEvt != eSubEvents) {
-    StoreGateSvc& seStore(*iEvt->ptr()->evtStore());
-    PileUpTimeEventIndex thisEventIndex(PileUpTimeEventIndex(static_cast<int>(iEvt->time()),iEvt->index()));
-    const SiHitCollection* seHitColl(NULL);
-    if (!seStore.retrieve(seHitColl,m_inputObjectName).isSuccess()) {
-      ATH_MSG_ERROR ( "SubEvent SiHitCollection not found in StoreGate " << seStore.name() );
-      return StatusCode::FAILURE;
-    }
-
-    //Copy Hit Collection
-    SiHitCollection* siHitColl(new SiHitCollection("PixelHits"));
-    SiHitCollection::const_iterator i(seHitColl->begin());
-    SiHitCollection::const_iterator e(seHitColl->end());
-    // Read hits from this collection
-    for (; i!=e; ++i) {
-      const SiHit sihit(*i);
-      siHitColl->Insert(sihit);
-    }
-    m_thpcsi->insert(thisEventIndex, siHitColl);
-    //store these for deletion at the end of mergeEvent
-    m_siHitCollList.push_back(siHitColl);
-    ++iEvt;
+  typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+  TimedHitCollList hitCollList;
 
+  if (!(m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing,
+                                          bSubEvents, eSubEvents).isSuccess()) &&
+      hitCollList.size() == 0) {
+    ATH_MSG_ERROR("Could not fill TimedHitCollList");
+    return StatusCode::FAILURE;
+  } else {
+    ATH_MSG_VERBOSE(hitCollList.size() << " SiHitCollections with key " <<
+                    m_inputObjectName << " found");
+  }
 
+  TimedHitCollList::iterator iColl(hitCollList.begin());
+  TimedHitCollList::iterator endColl(hitCollList.end());
+
+  for( ; iColl != endColl; iColl++) {
+    SiHitCollection *siHitColl = new SiHitCollection(*iColl->second);
+    PileUpTimeEventIndex timeIndex(iColl->first);
+    ATH_MSG_DEBUG("SiHitCollection found with " << siHitColl->size() <<
+                  " hits");
+    ATH_MSG_VERBOSE("time index info. time: " << timeIndex.time()
+                    << " index: " << timeIndex.index()
+                    << " type: " << timeIndex.type());
+    m_thpcsi->insert(timeIndex, siHitColl);
+    m_siHitCollList.push_back(siHitColl);
   }
+
   return StatusCode::SUCCESS;
 }
 
@@ -495,8 +501,12 @@ StatusCode SiSmearedDigitizationTool::processAllSubEvents() {
   TimedHitCollList::iterator   iColl(hitCollList.begin());
   TimedHitCollList::iterator endColl(hitCollList.end()  );
 
+  m_HardScatterSplittingSkipper = false;
   // loop on the hit collections
   while ( iColl != endColl ) {
+    if (m_HardScatterSplittingMode == 2 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; ++iColl; continue; }
+    if (m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper )  { ++iColl; continue; }
+    if (m_HardScatterSplittingMode == 1 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; }
     const SiHitCollection* p_collection(iColl->second);
     thpcsi.insert(iColl->first, p_collection);
     ATH_MSG_DEBUG ( "SiHitCollection found with " << p_collection->size() << " hits" );
@@ -588,8 +598,11 @@ StatusCode SiSmearedDigitizationTool::FillTruthMap(PRD_MultiTruthCollection * ma
 
   ATH_MSG_DEBUG("Truth map filling with cluster " << *cluster << " and link = " << hit->particleLink());
   if (hit->particleLink().isValid()){
-    map->insert(std::make_pair(cluster->identify(), hit->particleLink()));
-    ATH_MSG_DEBUG("Truth map filled with cluster " << *cluster << " and link = " << hit->particleLink());
+    const int barcode( hit->particleLink().barcode());
+    if ( barcode !=0 && barcode != m_vetoThisBarcode ) {
+      map->insert(std::make_pair(cluster->identify(), hit->particleLink()));
+      ATH_MSG_DEBUG("Truth map filled with cluster " << *cluster << " and link = " << hit->particleLink());
+    }
   }else{
     ATH_MSG_DEBUG("Particle link NOT valid!! Truth map NOT filled with cluster" << cluster << " and link = " << hit->particleLink());
   }
@@ -964,6 +977,16 @@ StatusCode SiSmearedDigitizationTool::digitize()
     } else ATH_MSG_DEBUG("Found and Retrieved collection " << m_detElementMapName);
   } else ATH_MSG_DEBUG("Collection " << m_detElementMapName  << " not found!");
 
+  // Get SCT_DetectorElementCollection
+  const InDetDD::SiDetectorElementCollection* elementsSCT = nullptr;
+  if ((not m_useCustomGeometry) and (not m_SmearPixel)) {
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+    elementsSCT = sctDetEle.retrieve();
+    if (elementsSCT==nullptr) {
+      ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+      return StatusCode::FAILURE;
+    }
+  }
 
   TimedHitCollection<SiHit>::const_iterator i, e;
 
@@ -1019,13 +1042,13 @@ StatusCode SiSmearedDigitizationTool::digitize()
         }
       } else { // Smear SCT
         side = hit->getSide();
+        Identifier idwafer = m_sct_ID->wafer_id(barrelEC,layerDisk,phiModule,etaModule,side);
+        IdentifierHash idhash = m_sct_ID->wafer_hash(m_sct_ID->wafer_id(idwafer));
         if (!m_useCustomGeometry) {// Not custom SCT
-          const InDetDD::SiDetectorElement* hitSiDetElement_temp = m_manager_sct->getDetectorElement(barrelEC,layerDisk,phiModule,etaModule,side);
+          const InDetDD::SiDetectorElement* hitSiDetElement_temp = elementsSCT->getDetectorElement(idhash);
           ATH_MSG_DEBUG("SCT SiDetectorElement --> barrel_ec " << barrelEC << ", layer_disk " << layerDisk << ", phi_module " << phiModule << ", eta_module " << etaModule << ", side " << side);
           hitSiDetElement = hitSiDetElement_temp;
         } else { // Custom SCT
-          Identifier idwafer = m_sct_ID->wafer_id(barrelEC,layerDisk,phiModule,etaModule,side);
-          IdentifierHash idhash = m_sct_ID->wafer_hash(m_sct_ID->wafer_id(idwafer));
           iFatras::IdHashDetElementCollection::iterator it_map = m_detElementMap->find(idhash);
           if (it_map == m_detElementMap->end())
             ATH_MSG_WARNING("Id hash " << idhash << " not found in the map from id hash to planar detector element.");
@@ -1656,6 +1679,17 @@ StatusCode SiSmearedDigitizationTool::digitize()
 
 StatusCode SiSmearedDigitizationTool::createAndStoreRIOs()
 {
+  // Get SCT_DetectorElementCollection
+  const InDetDD::SiDetectorElementCollection* elementsSCT = nullptr;
+  if ((not m_useCustomGeometry) and (not m_SmearPixel)) {
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+    elementsSCT = sctDetEle.retrieve();
+    if (elementsSCT==nullptr) {
+      ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+      return StatusCode::FAILURE;
+    }
+  }
+
   if ( m_useCustomGeometry ) { // store Planar RIOs
 
     ATH_MSG_DEBUG( "--- SiSmearedDigitizationTool: in planar createAndStoreRIOs() ---" );
@@ -1768,7 +1802,7 @@ StatusCode SiSmearedDigitizationTool::createAndStoreRIOs()
 
       IdentifierHash waferID;
       waferID = firstDetElem->first;
-      const InDetDD::SiDetectorElement* detElement = m_manager_sct->getDetectorElement(waferID);
+      const InDetDD::SiDetectorElement* detElement = elementsSCT->getDetectorElement(waferID);
 
       InDet::SCT_ClusterCollection *clusterCollection = new InDet::SCT_ClusterCollection(waferID);
       clusterCollection->setIdentifier(detElement->identify());
diff --git a/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx
index 2eabbbcde22ccf1a29cf4f8a11d2de8fc88aba8d..3b773999111b4906e858c7e779a747f54de8bbf5 100644
--- a/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx
@@ -148,7 +148,7 @@ StatusCode TRTFastDigitizationTool::prepareEvent( unsigned int )
 }
 
 
-StatusCode TRTFastDigitizationTool::processBunchXing( int /*bunchXing*/,
+StatusCode TRTFastDigitizationTool::processBunchXing( int bunchXing,
                                                       SubEventIterator bSubEvents,
                                                       SubEventIterator eSubEvents ) {
 
@@ -157,24 +157,32 @@ StatusCode TRTFastDigitizationTool::processBunchXing( int /*bunchXing*/,
   if ( m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper )  { return StatusCode::SUCCESS; }
   if ( m_HardScatterSplittingMode == 1 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; }
 
-  SubEventIterator iEvt( bSubEvents );
-  while ( iEvt != eSubEvents ) {
-    StoreGateSvc& seStore( *iEvt->ptr()->evtStore() );
-    PileUpTimeEventIndex thisEventIndex( PileUpTimeEventIndex( static_cast< int >( iEvt->time() ),iEvt->index() ) );
-    const TRTUncompressedHitCollection* seHitColl( nullptr );
-    CHECK( seStore.retrieve( seHitColl, m_trtHitCollectionKey ) );
-    // copy Hit Collection
-    TRTUncompressedHitCollection* trtHitColl( new TRTUncompressedHitCollection( "TRTUncompressedHits") );
-    // read hits from this collection
-    for ( TRTUncompressedHitCollection::const_iterator itr = seHitColl->begin(); itr != seHitColl->end(); ++itr ) {
-      const TRTUncompressedHit trthit( *itr );
-      trtHitColl->Insert( trthit );
-    }
-    m_thpctrt->insert( thisEventIndex, trtHitColl );
-    // store these for deletion at the end of mergeEvent
-    m_trtHitCollList.push_back( trtHitColl );
+  typedef PileUpMergeSvc::TimedList<TRTUncompressedHitCollection>::type TimedHitCollList;
+  TimedHitCollList hitCollList;
+
+  if (!(m_mergeSvc->retrieveSubSetEvtData(m_trtHitCollectionKey, hitCollList, bunchXing,
+                                          bSubEvents, eSubEvents).isSuccess()) &&
+      hitCollList.size() == 0) {
+    ATH_MSG_ERROR("Could not fill TimedHitCollList");
+    return StatusCode::FAILURE;
+  } else {
+    ATH_MSG_VERBOSE(hitCollList.size() << " TRTUncompressedHitCollections with key " <<
+                    m_trtHitCollectionKey << " found");
+  }
 
-    ++iEvt;
+  TimedHitCollList::iterator iColl(hitCollList.begin());
+  TimedHitCollList::iterator endColl(hitCollList.end());
+
+  for( ; iColl != endColl; iColl++) {
+    TRTUncompressedHitCollection *hitCollPtr = new TRTUncompressedHitCollection(*iColl->second);
+    PileUpTimeEventIndex timeIndex(iColl->first);
+    ATH_MSG_DEBUG("TRTUncompressedHitCollection found with " << hitCollPtr->size() <<
+                  " hits");
+    ATH_MSG_VERBOSE("time index info. time: " << timeIndex.time()
+                    << " index: " << timeIndex.index()
+                    << " type: " << timeIndex.type());
+    m_thpctrt->insert(timeIndex, hitCollPtr);
+    m_trtHitCollList.push_back(hitCollPtr);
   }
 
   return StatusCode::SUCCESS;
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h
index c70dfa7e2e625f146c11b7fba83cd446b75fbfa0..45a617528360988e0c04e5288d8e19186abe7eab 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h
+++ b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h
@@ -83,7 +83,7 @@ class PixelDigitizationTool : public PileUpToolBase {
     ServiceHandle <PileUpMergeSvc> m_mergeSvc;
 
     CLHEP::HepRandomEngine *m_rndmEngine;
-    const InDetDD::SiDetectorManager *m_detManager;
+    const InDetDD::PixelDetectorManager *m_detManager;
 
     std::string   m_inputObjectName;
     bool          m_createNoiseSDO;
diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.cxx
index 3693f9ed296be4ea20f70f5e9937df800e3a7380..69bfd6bcdddd7c5b83d9d6436844c95efb5088ea 100644
--- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.cxx
@@ -16,7 +16,7 @@
 #include "SiDigitization/SiChargedDiodeCollection.h"
 #include "Identifier/Identifier.h"
 #include "InDetIdentifier/PixelID.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
 
 #include "AthenaKernel/errorcheck.h"
 #include "StoreGate/DataHandle.h"
diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.h
index ab227043484bfc8de1b671396df97ab4ff3cd931..137e6df3b30b8d06760e33508336b0bb41e89d2a 100644
--- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.h
+++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.h
@@ -29,7 +29,7 @@
 #include "EnergyDepositionTool.h"
 
 namespace InDetDD{
-  class SiDetectorManager;
+  class PixelDetectorManager;
 }
 
 namespace RadDam{
@@ -85,7 +85,7 @@ class PixelDigitizationTool : public PileUpToolBase {
     ServiceHandle <PileUpMergeSvc> m_mergeSvc;
 
     CLHEP::HepRandomEngine *m_rndmEngine;
-    const InDetDD::SiDetectorManager *m_detManager;
+    const InDetDD::PixelDetectorManager *m_detManager;
 
     std::string   m_inputObjectName;
     bool          m_createNoiseSDO;
diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx
index 7e210990019b0d33c3dfa8e747c8f7b118b8b515..6a9565cb5bd190a31b7cefc103f2d8623d906f22 100644
--- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx
+++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx
@@ -155,11 +155,11 @@ StatusCode SensorSimPlanarTool::initialize() {
 
   }else if(m_fluence==6){
 
-    mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_IBL_400V_fl8_7e14.root", "DATAPATH") );
-    mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_PIX_400V_fl4_6e14.root", "DATAPATH") );
+    mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_IBL_400V_fl8_7e14.root") );
+    mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_400V_fl4_6e14.root") );
     
-    mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_PIX_250V_fl2_1e14.root", "DATAPATH") );
-    mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_PIX_150V_fl1_3e14.root", "DATAPATH") );
+    mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_250V_fl2_1e14.root") );
+    mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl1_3e14.root") );
 
     m_fluence_layers.push_back(8.7e14);
     m_fluence_layers.push_back(4.6e14);
@@ -168,11 +168,11 @@ StatusCode SensorSimPlanarTool::initialize() {
 
   }else if(m_fluence==7){
 
-    mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_IBL_endLHC.root", "DATAPATH") );
-    mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_PIX_blayer_endLHC.root", "DATAPATH") );
+    mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_IBL_endLHC.root") );
+    mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_blayer_endLHC.root") );
 
-    mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_PIX_L1_endLHC.root", "DATAPATH") );
-    mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_PIX_L2_endLHC.root", "DATAPATH") );
+    mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_L1_endLHC.root") );
+    mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_L2_endLHC.root") );
 
     m_fluence_layers.push_back(2*8.7e14);
     m_fluence_layers.push_back(2*4.6e14);
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h
index 9a20ee8cd62181ee0e493b765f519b601eed0989..52dcbbe35bf136a3f5674eaf7198c121f54a90e0 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h
@@ -21,17 +21,19 @@
 #include "HitManagement/TimedHitCollection.h"
 #include "InDetRawData/SCT_RDO_Container.h"
 #include "InDetRawData/InDetRawDataCollection.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "InDetSimData/InDetSimDataCollection.h"
 #include "InDetSimEvent/SiHitCollection.h"
+#include "PileUpTools/PileUpMergeSvc.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandle.h"
+#include "StoreGate/WriteHandleKey.h"
 #include "xAODEventInfo/EventInfo.h"
 #include "xAODEventInfo/EventAuxInfo.h"
-#include "PileUpTools/PileUpMergeSvc.h"
 
 // Gaudi headers
 #include "GaudiKernel/ToolHandle.h"
-#include "StoreGate/WriteHandleKey.h"
-#include "StoreGate/WriteHandle.h"
-#include "StoreGate/ReadHandleKey.h"
 
 // STL headers
 #include "boost/shared_ptr.hpp"
@@ -55,7 +57,6 @@ class StoreGateService;
 
 namespace InDetDD
 {
-  class SCT_DetectorManager;
   class SiDetectorElement;
 }
 
@@ -160,7 +161,6 @@ private:
   SG::ReadHandleKey<ComTime>        m_ComTimeKey ; //!< Handle to retrieve commissioning timing info from SG
 
   const SCT_ID*                                      m_detID;                             //!< Handle to the ID helper
-  const InDetDD::SCT_DetectorManager*                m_detMgr;                            //!< Handle to Si detector manager
   ToolHandle<ISCT_FrontEnd>                          m_sct_FrontEnd;                      //!< Handle the Front End Electronic tool
   ToolHandle<ISCT_SurfaceChargesGenerator>           m_sct_SurfaceChargesGenerator;       //!< Handle the surface chage generator tool
   ToolHandle<ISCT_RandomDisabledCellGenerator>       m_sct_RandomDisabledCellGenerator;   //!< Handle the Ampilifier tool for the Front End
@@ -171,6 +171,7 @@ private:
   SG::WriteHandle<SCT_RDO_Container>                 m_rdoContainer; //!< RDO container handle
   SG::WriteHandleKey<InDetSimDataCollection>         m_simDataCollMapKey; //!< SDO Map key
   SG::WriteHandle<InDetSimDataCollection>            m_simDataCollMap; //!< SDO Map handle
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
   std::string                                        m_inputObjectName;     //! name of the sub event  hit collections.
   ServiceHandle <IAtRndmGenSvc>                      m_rndmSvc;             //!< Random number service
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
index 61196d7313a0de40afcae7de4da84eea893eb3c4..bc0678b87247810d3f04732a20e50ea86db091fb 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
@@ -20,7 +20,6 @@
 #include "Identifier/Identifier.h"
 
 // Det Descr includes
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetReadoutGeometry/SCT_ModuleSideDesign.h"
 
@@ -30,6 +29,7 @@
 #include "SCT_Digitization/ISCT_RandomDisabledCellGenerator.h"
 
 // Data Handle
+#include "StoreGate/ReadCondHandle.h"
 #include "StoreGate/ReadHandle.h"
 
 // C++ Standard Library
@@ -54,7 +54,6 @@ SCT_DigitizationTool::SCT_DigitizationTool(const std::string& type,
   m_HardScatterSplittingSkipper{false},
   m_ComTimeKey{"ComTime"},
   m_detID{nullptr},
-  m_detMgr{nullptr},
   m_sct_FrontEnd{"SCT_FrontEnd", this},
   m_sct_SurfaceChargesGenerator{"SCT_SurfaceChargesGenerator", this},
   m_sct_RandomDisabledCellGenerator{"SCT_RandomDisabledCellGenerator", this},
@@ -127,6 +126,9 @@ StatusCode SCT_DigitizationTool::initialize() {
   ATH_CHECK(m_simDataCollMapKey.initialize());
   ATH_CHECK(m_ComTimeKey.initialize(m_useComTime));
 
+  // Initialize ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
   ATH_MSG_DEBUG("SiDigitizationTool::initialize() complete");
 
   return StatusCode::SUCCESS;
@@ -217,19 +219,9 @@ StatusCode SCT_DigitizationTool::initRandomEngine() {
 // Initialize the different services
 // ----------------------------------------------------------------------
 StatusCode SCT_DigitizationTool::initServices() {
-  // +++ Get SCT detector manager
-  std::string managerName{"SCT"};
-  StatusCode sc{detStore()->retrieve(m_detMgr, managerName)};
-
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR("Failed to retrieve the SCT detector manager:" << managerName);
-    return sc;
-  }
-  ATH_MSG_DEBUG("Retrieved the SCT detector manager " << managerName);
-
   // Get SCT ID helper for hash function and Store them using methods from the
   // SiDigitization.
-  sc = detStore()->retrieve(m_detID, "SCT_ID");
+  StatusCode sc = detStore()->retrieve(m_detID, "SCT_ID");
   if (sc.isFailure()) {
     ATH_MSG_ERROR("Failed to get SCT ID helper");
     return sc;
@@ -412,6 +404,14 @@ void SCT_DigitizationTool::digitizeNonHits() {
   ATH_MSG_DEBUG("processing elements without hits");
   m_chargedDiodes = new SiChargedDiodeCollection;
 
+  // Get SCT_DetectorElementCollection
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+  if (elements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+    return;
+  }
+
   for (unsigned int i{0}; i < m_processedElements.size(); i++) {
     if (!m_processedElements[i]) {
       IdentifierHash idHash{i};
@@ -419,7 +419,7 @@ void SCT_DigitizationTool::digitizeNonHits() {
         ATH_MSG_ERROR("SCT Detector element id hash is invalid = " << i);
       }
 
-      const InDetDD::SiDetectorElement* element{m_detMgr->getDetectorElement(idHash)};
+      const InDetDD::SiDetectorElement* element{elements->getDetectorElement(idHash)};
       if (element) {
         ATH_MSG_DEBUG("In digitize of untouched elements: layer - phi - eta  "
                       << m_detID->layer_disk(element->identify()) << " - "
@@ -470,6 +470,7 @@ bool SCT_DigitizationTool::digitizeElement(SiChargedDiodeCollection* chargedDiod
   // create the identifier for the collection:
   ATH_MSG_DEBUG("create ID for the hit collection");
   Identifier id;
+  IdentifierHash waferHash;
   const TimedHitPtr<SiHit>& firstHit{*i};
 
   int Barrel{firstHit->getBarrelEndcap()};
@@ -489,11 +490,19 @@ bool SCT_DigitizationTool::digitizeElement(SiChargedDiodeCollection* chargedDiod
                          firstHit->getPhiModule(),
                          firstHit->getEtaModule(),
                          firstHit->getSide());
+    waferHash = sctID->wafer_hash(id);
   }
 
+  // Get SCT_DetectorElementCollection
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+  if (elements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+    return false;
+  }
 
   // get the det element from the manager
-  InDetDD::SiDetectorElement* sielement{m_detMgr->getDetectorElement(id)};
+  const InDetDD::SiDetectorElement* sielement{elements->getDetectorElement(waferHash)};
 
   if (sielement == nullptr) {
     ATH_MSG_DEBUG("Barrel=" << Barrel << " layer=" << firstHit->getLayerDisk() << " Eta=" << firstHit->getEtaModule() << " Phi=" << firstHit->getPhiModule() << " Side=" << firstHit->getSide());
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SiChargedDiodeCollectionFiller.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SiChargedDiodeCollectionFiller.h
deleted file mode 100644
index 988db8220f7e7d13362d1e5127a417f5b91993ee..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SiChargedDiodeCollectionFiller.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef SCT_DIGITIZATION_SICHARGEDDIODECOLLECTIONFILLER_H
-#define SCT_DIGITIZATION_SICHARGEDDIODECOLLECTIONFILLER_H
-
-#include "HitToDiodeConverter.h"  // src dir
-#include "boost/shared_ptr.hpp"
-#include <vector>
-#include <utility> //std::pair
-
-class SCT_ID;
-class ISCT_SurfaceChargesGenerator;
-class Identifier;
-class IdentifierHash;
-class SiChargedDiodeCollection;
-class HitIndexAndTime;
-template<class T> class ToolHandle;
-
-namespace InDetDD
-{
-  class SiDetectorManager;
-}
-
-class SiChargedDiodeCollectionFiller {
- public:
-  SiChargedDiodeCollectionFiller(const SCT_ID*, 
-                                 const InDetDD::SiDetectorManager*,
-                                 ToolHandle<ISCT_SurfaceChargesGenerator>&);
-  
-  void operator() (const std::pair<const IdentifierHash, std::vector<HitIndexAndTime>>&);
-
-  boost::shared_ptr<SiChargedDiodeCollection> chargedDiodes() const;
-  bool errorCondition()                                       const;
-  std::string errMsg()                                        const;
-  
- private:
-  HitToDiodeConverter m_hitToDiodeConverter;
-};
-#endif // SCT_DIGITIZATION_SICHARGEDDIODECOLLECTIONFILLER_H
diff --git a/InnerDetector/InDetEventCnv/InDetEventCnvTools/InDetEventCnvTools/InDetEventCnvTool.h b/InnerDetector/InDetEventCnv/InDetEventCnvTools/InDetEventCnvTools/InDetEventCnvTool.h
index 2e98e84ae043ec2bae0cc20e4cb6c4596853be8d..7d9b10b17bce1c032e527e407def953f7790d75a 100755
--- a/InnerDetector/InDetEventCnv/InDetEventCnvTools/InDetEventCnvTools/InDetEventCnvTool.h
+++ b/InnerDetector/InDetEventCnv/InDetEventCnvTools/InDetEventCnvTools/InDetEventCnvTool.h
@@ -7,20 +7,28 @@
 
 #include "TrkEventCnvTools/ITrkEventCnvTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "StoreGate/ReadHandleKey.h"
-#include <utility>
+
 #include "InDetPrepRawData/SCT_ClusterContainer.h"
 #include "InDetPrepRawData/PixelClusterContainer.h"
 #include "InDetPrepRawData/TRT_DriftCircleContainer.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/ReadHandleKey.h"
+
+#include "GaudiKernel/EventContext.h"
+#include "GaudiKernel/ContextSpecificPtr.h"
+
+#include <mutex>
+#include <utility>
 
 class AtlasDetectorID;
 class Identifier;
 class IdentifierHash;
 class IdDictManager;
+class SCT_ID;
 
 namespace InDetDD {
   class PixelDetectorManager;
-  class SCT_DetectorManager;
   class TRT_DetectorManager;
 }
 
@@ -31,7 +39,6 @@ namespace Trk {
 
 
 //class PixelClusterContainer 	;
-//class SCT_ClusterContainer	;
 //class TRT_DriftCircleContainer	;
 
 namespace InDet {
@@ -81,28 +88,36 @@ class InDetEventCnvTool :  virtual public Trk::ITrkEventCnvTool, public AthAlgTo
   
   /** use the passed identifier to recreate the TRT Drift circle link on the passed RIO_OnTrack*/
   virtual const Trk::PrepRawData* trtDriftCircleLink( const Identifier& id,  const IdentifierHash& idHash );
+
+  /** use the passed IdentifierHash to get SiDetectorElement*/
+  const InDetDD::SiDetectorElement* getSCTDetectorElement(const IdentifierHash& waferHash) const;
   
   std::string  m_pixMgrLocation;                    //!< Location of sct Manager
   const InDetDD::PixelDetectorManager*  m_pixMgr;   //!< SCT   Detector Manager
-  std::string  m_sctMgrLocation;                    //!< Location of sct Manager
-  const InDetDD::SCT_DetectorManager*   m_sctMgr;   //!< SCT   Detector Manager
   std::string  m_trtMgrLocation;                    //!< Location of sct Manager
   const InDetDD::TRT_DetectorManager*   m_trtMgr;   //!< TRT   Detector Manager
   bool m_setPrepRawDataLink;                        //!< if true, attempt to recreate link to PRD
 
 
-//various id helpers
+  //various id helpers
   const AtlasDetectorID     * m_IDHelper; 
-
+  const SCT_ID * m_SCTHelper;
   
   // added to check TRT existence (SLHC geo check) 
   const IdDictManager * m_idDictMgr;
 
+  // Mutex to protect the contents.
+  mutable std::mutex m_mutex;
+  // Cache to store events for slots
+  mutable std::vector<EventContext::ContextEvt_t> m_cacheSCTElements;
+  // Pointer of InDetDD::SiDetectorElementCollection
+  mutable Gaudi::Hive::ContextSpecificPtr<const InDetDD::SiDetectorElementCollection> m_sctDetectorElements;
 
   SG::ReadHandleKey<PixelClusterContainer>	m_pixClusContName	{this, "PixelClusterContainer"		,"PixelClusters"		, "Pixel Cluster container name"};		//!< location of container of pixel clusters
   SG::ReadHandleKey<SCT_ClusterContainer> 	m_sctClusContName	{this, "SCT_ClusterContainer"		,"SCT_Clusters"			, "SCT Cluster container name"}	;		//!< location of container of sct clusters
   SG::ReadHandleKey<TRT_DriftCircleContainer> 	m_trtDriftCircleContName{this, "TRT_DriftCircleContainer"	,"TRT_DriftCircleContainer"	, "TRT DriftCircle Container"};	//!< location of container of TRT drift circles
 
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 };
 
 
diff --git a/InnerDetector/InDetEventCnv/InDetEventCnvTools/src/InDetEventCnvTool.cxx b/InnerDetector/InDetEventCnv/InDetEventCnvTools/src/InDetEventCnvTool.cxx
index 558aaea5f18613455edd0977432fc22940bc245c..68025136046bdfd4611c6ff5264287d59afc9d10 100755
--- a/InnerDetector/InDetEventCnv/InDetEventCnvTools/src/InDetEventCnvTool.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventCnvTools/src/InDetEventCnvTool.cxx
@@ -9,12 +9,12 @@
 #include "Identifier/Identifier.h"
 #include "Identifier/IdentifierHash.h"
 #include "AtlasDetDescr/AtlasDetectorID.h"
+#include "InDetIdentifier/SCT_ID.h"
 
 #include "TrkRIO_OnTrack/RIO_OnTrack.h"
 #include "TrkPrepRawData/PrepRawData.h"
 
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/TRT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "IdDictDetDescr/IdDictManager.h"
@@ -38,15 +38,17 @@ InDet::InDetEventCnvTool::InDetEventCnvTool(
   AthAlgTool(t,n,p),
   m_pixMgrLocation("Pixel"),
   m_pixMgr(0),
-  m_sctMgrLocation("SCT"),
-  m_sctMgr(0),
   m_trtMgrLocation("TRT"),
   m_trtMgr(0),
-  m_setPrepRawDataLink(false)
+  m_setPrepRawDataLink(false),
+  m_IDHelper(nullptr),
+  m_SCTHelper(nullptr),
+  m_idDictMgr(nullptr),
+  m_mutex{},
+  m_cacheSCTElements{}
 {
   declareInterface<ITrkEventCnvTool>(this);
   declareProperty("PixelMgrLocation", m_pixMgrLocation);
-  declareProperty("SCT_MgrLocation", m_sctMgrLocation);
   declareProperty("TRT_MgrLocation", m_trtMgrLocation);
   declareProperty("RecreatePRDLinks", m_setPrepRawDataLink);
   
@@ -73,16 +75,6 @@ StatusCode InDet::InDetEventCnvTool::initialize()
     ATH_MSG_INFO("No Pixels? Could not get PixelDetectorDescription"); 
   }
         
-  // Get SCT Detector Description Manager
-  if(detStore()->contains<InDetDD::SCT_DetectorManager>(m_sctMgrLocation)){
-    sc = detStore()->retrieve(m_sctMgr, m_sctMgrLocation);
-    if (sc.isFailure()) {
-        ATH_MSG_FATAL("Could not get SCT_DetectorDescription");
-        return sc;
-    }
-  } else {
-    ATH_MSG_INFO("No SCT? Could not get SCT_DetectorDescription"); 
-  }
   // check if SLHC geo is used (TRT not implemented) 
   // if not SLHC, get the TRT Det Descr manager
   sc = detStore()->retrieve(m_idDictMgr, "IdDict");
@@ -122,10 +114,14 @@ StatusCode InDet::InDetEventCnvTool::initialize()
     return StatusCode::FAILURE;
   }
 
+  ATH_CHECK( detStore()->retrieve(m_SCTHelper, "SCT_ID") );
+
   ATH_CHECK( m_pixClusContName.initialize() );
   ATH_CHECK( m_sctClusContName.initialize() );
   ATH_CHECK( m_trtDriftCircleContName.initialize() );
 
+  ATH_CHECK( m_SCTDetEleCollKey.initialize() );
+
   return sc;
      
 }
@@ -168,7 +164,7 @@ std::pair<const Trk::TrkDetElementBase*, const Trk::PrepRawData*>
   {
     ATH_MSG_DEBUG("Set SCT detector element" ); 
     // use IdentifierHash for speed
-    detEl = m_sctMgr->getDetectorElement( rioOnTrack.idDE() ) ;
+    detEl = getSCTDetectorElement( rioOnTrack.idDE() ) ;
     if (m_setPrepRawDataLink) prd = sctClusterLink( id, rioOnTrack.idDE() );
   }
   else if (m_IDHelper->is_trt(id)) 
@@ -231,7 +227,7 @@ InDet::InDetEventCnvTool::getDetectorElement(const Identifier& id, const Identif
 
     ATH_MSG_DEBUG("Set SCT detector element" ); 
     // use IdentifierHash for speed
-    detEl = m_sctMgr->getDetectorElement( idHash ) ;
+    detEl = getSCTDetectorElement( idHash ) ;
   }
   else if (m_IDHelper->is_trt(id) ) 
   {
@@ -265,8 +261,9 @@ InDet::InDetEventCnvTool::getDetectorElement(const Identifier& id)
   {
 
     ATH_MSG_DEBUG("Set SCT detector element" ); 
-    // use IdentifierHash for speed
-    detEl = m_sctMgr->getDetectorElement( id ) ;
+    const Identifier wafer_id = m_SCTHelper->wafer_id(id);
+    const IdentifierHash wafer_hash = m_SCTHelper->wafer_hash(wafer_id);
+    detEl = getSCTDetectorElement( wafer_hash ) ;
   }
   else if (m_IDHelper->is_trt(id) ) 
   {
@@ -382,3 +379,22 @@ const Trk::PrepRawData*
   return 0;
 }
 
+const InDetDD::SiDetectorElement* InDet::InDetEventCnvTool::getSCTDetectorElement(const IdentifierHash& waferHash) const {
+  const EventContext& ctx{Gaudi::Hive::currentContext()};
+  static const EventContext::ContextEvt_t invalidValue{EventContext::INVALID_CONTEXT_EVT};
+  EventContext::ContextID_t slot{ctx.slot()};
+  EventContext::ContextEvt_t evt{ctx.evt()};
+  std::lock_guard<std::mutex> lock{m_mutex};
+  if (slot>=m_cacheSCTElements.size()) {
+    m_cacheSCTElements.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement.
+  }
+  if (m_cacheSCTElements[slot]!=evt) {
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle{m_SCTDetEleCollKey};
+    if (not sctDetEle.isValid()) {
+      ATH_MSG_ERROR("Failed to get " << m_SCTDetEleCollKey.key());
+    }
+    m_sctDetectorElements.set(*sctDetEle);
+    m_cacheSCTElements[slot] = evt;
+  }
+  return (m_sctDetectorElements.isValid() ? m_sctDetectorElements->getDetectorElement(waferHash) : nullptr);
+}
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/IInDetGeoModelTool.h b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/IInDetGeoModelTool.h
index 49e1c1d7622c7307bed07a5ba4081f0337aca3ee..74f8b6bda813e5fddd2b5ebad70cc2f7d7466b62 100644
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/IInDetGeoModelTool.h
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/IInDetGeoModelTool.h
@@ -9,7 +9,6 @@
 
 namespace InDetDD{
   class PixelDetectorManager;
-  class SCT_DetectorManager;
   class TRT_DetectorManager;
 }
 class PixelID;
@@ -33,8 +32,6 @@ namespace JiveXML{
 
     /// Provide the Pixel geometry manager
     virtual const InDetDD::PixelDetectorManager* PixelGeoManager() const = 0 ;
-    /// Provide the SCT geometry manager
-    virtual const InDetDD::SCT_DetectorManager* SCTGeoManager() const = 0 ;
     /// Provide the TRT geometry manager
     virtual const InDetDD::TRT_DetectorManager* TRTGeoManager() const = 0 ;
 
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/InDetGeoModelTool.h b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/InDetGeoModelTool.h
index 760525aadd0cbf63c23cb3b24ed3f1b2dddf3080..f12956254b6f313712102a18f53fe97d587fd612 100644
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/InDetGeoModelTool.h
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/InDetGeoModelTool.h
@@ -30,8 +30,6 @@ namespace JiveXML{
 
       /// Provide the Pixel geometry manager
       const InDetDD::PixelDetectorManager* PixelGeoManager() const { return m_PixelGeoManager; }
-      /// Provide the SCT geometry manager
-      const InDetDD::SCT_DetectorManager* SCTGeoManager() const { return m_SCTGeoManager; }
       /// Provide the TRT geometry manager
       const InDetDD::TRT_DetectorManager* TRTGeoManager() const { return m_TRTGeoManager; }
 
@@ -47,7 +45,6 @@ namespace JiveXML{
       const InDetDD::PixelDetectorManager* m_PixelGeoManager{};
       const PixelID* m_PixelIDHelper{};
       
-      const InDetDD::SCT_DetectorManager* m_SCTGeoManager{};
       const SCT_ID* m_SCTIDHelper{};
 
       const InDetDD::TRT_DetectorManager* m_TRTGeoManager{};
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SCTRDORetriever.h b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SCTRDORetriever.h
index 56025f9bfeafd720bd18b1b061ffb37dd17a78b4..66d08f65e5c9a875f91bb8a6f0e3f9f42ab5b8b4 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SCTRDORetriever.h
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SCTRDORetriever.h
@@ -7,9 +7,12 @@
 
 #include "JiveXML/IDataRetriever.h"
 #include "AthenaBaseComps/AthAlgTool.h"
+
 #include "InDetJiveXML/IInDetGeoModelTool.h"
-#include "StoreGate/ReadHandleKey.h"
 #include "InDetRawData/SCT_RDO_Container.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/ReadHandleKey.h"
 
 namespace JiveXML {
 
@@ -56,6 +59,9 @@ namespace JiveXML {
 
     /// The StoreGate key for the SCTRDO container
     SG::ReadHandleKey<SCT_RDO_Container> m_SCTRDOContainerName;
+
+    /// Condition object key of SiDetectorElementCollection for SCT
+    SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
   };
 }
 #endif
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SiClusterRetriever.h b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SiClusterRetriever.h
index 12b96bd70199d311d8e9e056dd2fa0cb0b797b53..d99377f3cf22872ac0373e74dc3210091314a73c 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SiClusterRetriever.h
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SiClusterRetriever.h
@@ -7,7 +7,10 @@
 
 #include "JiveXML/IDataRetriever.h"
 #include "AthenaBaseComps/AthAlgTool.h"
+
 #include "InDetJiveXML/IInDetGeoModelTool.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
 
 namespace JiveXML
 {
@@ -47,8 +50,8 @@ namespace JiveXML
       /// Return the name of the data type
       virtual std::string dataTypeName() const { return m_typeName; }
 
-      /// initialize only geo model tool
-      virtual StatusCode initialize() { return m_geo.retrieve(); }
+      /// initialize
+      virtual StatusCode initialize();
 
     private:
       
@@ -63,7 +66,8 @@ namespace JiveXML
       /// The StoreGate key for the PRD MultiTruthMap with the track associations
       std::string m_SiTruthMapName;
      
-
+      /// Condition object key of SiDetectorElementCollection for SCT
+      SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
     };
 }
 #endif
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/InDetGeoModelTool.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/InDetGeoModelTool.cxx
index 9b72774ea1d1691a258402da4362c05ccd5770b5..e6001df7fc296af55d1e4ddd165d4a093e357bae 100644
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/InDetGeoModelTool.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/InDetGeoModelTool.cxx
@@ -7,7 +7,6 @@
 #include "InDetReadoutGeometry/TRT_DetectorManager.h"
 #include "InDetIdentifier/TRT_ID.h"
 
-#include "InDetReadoutGeometry/SCT_DetectorManager.h" 
 #include "InDetIdentifier/SCT_ID.h"
 
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
@@ -52,15 +51,9 @@ namespace JiveXML {
     }
   
     /**
-     * Check for SCT geo model manager and ID helper
+     * Check for SCT ID helper
      */
 
-    // Get geo model manager
-    if ( detStore()->retrieve(m_SCTGeoManager, "SCT").isFailure()) {
-      if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Could not get SCT GeoModel Manager!" << endmsg;
-      return StatusCode::RECOVERABLE;
-    }
-
     // Get identifier helper
     if (detStore()->retrieve(m_SCTIDHelper, "SCT_ID").isFailure()) {
         if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Could not get SCT ID helper" << endmsg;
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SCTRDORetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SCTRDORetriever.cxx
index 24f0a899004959833fdb22449597ee6b101ee6e3..0db28677a6d538b14fc54174e4ac0fa0b873bc3c 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SCTRDORetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SCTRDORetriever.cxx
@@ -6,10 +6,10 @@
 #include "InDetRawData/SCT_RDO_Collection.h"
 #include "InDetRawData/SCT_RDORawData.h"
 #include "InDetRawData/SCT3_RawData.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h" 
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetIdentifier/SCT_ID.h"
 //#include "TrkEventPrimitives/LocalPosition.h"
+#include "StoreGate/ReadCondHandle.h"
 #include "StoreGate/ReadHandle.h"
 
 #include "JiveXML/DataType.h"
@@ -52,6 +52,14 @@ namespace JiveXML {
       return StatusCode::RECOVERABLE;
     }
 
+    // Get SCT_DetectorElementCollection
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+    const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+    if (elements==nullptr) {
+      ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+      return StatusCode::FAILURE;
+    }
+
     // Now find out how much space we need in total
     unsigned long NSCTRDO = 0;
     //Loop over SCTRDO containers 
@@ -85,6 +93,7 @@ namespace JiveXML {
 
       //Get the collection of SCT raw hits
       const SCT_RDO_Collection* SCTRDORawCollection = (*SCTRDOContItr);
+      const IdentifierHash waferHash = SCTRDORawCollection->identifyHash();
       
       //Loop over raw hit collection
       SCT_RDO_Collection::const_iterator SCTRDORawCollItr = SCTRDORawCollection->begin();
@@ -97,7 +106,7 @@ namespace JiveXML {
         Identifier id = rdoData->identify();
 
         //Get the hit detector element
-        const InDetDD::SiDetectorElement *element = m_geo->SCTGeoManager()->getDetectorElement(id);
+        const InDetDD::SiDetectorElement *element = elements->getDetectorElement(waferHash);
         //Make sure we got the detector element
         if (element == NULL){
           msg(MSG::WARNING) << "Unable to obtain detector element for SCT_RDO hit with id " << id << endmsg;
@@ -169,6 +178,8 @@ namespace JiveXML {
   StatusCode SCTRDORetriever::initialize() {
     // Read Handle Key
     ATH_CHECK( m_SCTRDOContainerName.initialize() );
+    // Read Cond Handle Key
+    ATH_CHECK( m_SCTDetEleCollKey.initialize() );
 
     return m_geo.retrieve();
   }
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx
index c86a5498e6af1fdd1b1ba0346a6332d033e7262e..e955be0264c2e7e3d95c8c3a75a74caece8cb1b8 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx
@@ -5,6 +5,7 @@
 #include "InDetJiveXML/SiClusterRetriever.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/DataHandle.h"
+#include "StoreGate/ReadCondHandle.h"
 #include "JiveXML/DataType.h"
 
 #include "CLHEP/Geometry/Point3D.h"
@@ -13,7 +14,6 @@
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
 
 #include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiLocalPosition.h"
 
 #include "InDetIdentifier/SCT_ID.h"
@@ -50,7 +50,14 @@ namespace JiveXML {
 
     //be verbose
     if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieving " << dataTypeName() <<endmsg; 
-    
+
+    // Get SCT_DetectorElementCollection
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+    const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+    if (elements==nullptr) {
+      ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+      return StatusCode::FAILURE;
+    }
 
     //Retrieve the cluster container
     const InDet::SiClusterContainer* SiClusterCont;
@@ -100,6 +107,8 @@ namespace JiveXML {
       //Only run on silicon (SCT) clusters
       if ( ! m_geo->SCTIDHelper()->is_sct(SiClusterColl->identify())) continue ;
 
+      const IdentifierHash waferHash = SiClusterColl->identifyHash();
+
       //Now loop over all clusters in that collection 
       InDet::SiClusterCollection::const_iterator SiClusterItr = SiClusterColl->begin();
       for (; SiClusterItr!=SiClusterColl->end(); SiClusterItr++){ 
@@ -109,7 +118,7 @@ namespace JiveXML {
         
         //and the detector element for that cluster via the id
         Identifier id = m_geo->SCTIDHelper()->wafer_id(cluster->identify());
-        InDetDD::SiDetectorElement* element = m_geo->SCTGeoManager()->getDetectorElement(id);
+        const InDetDD::SiDetectorElement* element = elements->getDetectorElement(waferHash);
         if (!element){
           if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Could not obtain Detector Element with ID " << id << endmsg;
           continue ;
@@ -185,6 +194,11 @@ namespace JiveXML {
     return FormatTool->AddToEvent(dataTypeName(), "", &dataMap);
   }
 
+  StatusCode SiClusterRetriever::initialize() {
+    ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
+    return m_geo.retrieve();
+  }
 }
  
      
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiSpacePointRetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiSpacePointRetriever.cxx
index a2f6cf8847edbb4032119c33d2af90a7a81afd79..e9a60532277d528b976548fa8d8ba2b5952c4d8f 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiSpacePointRetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiSpacePointRetriever.cxx
@@ -10,7 +10,7 @@
 #include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/ReadHandle.h"
 
-#include "InDetReadoutGeometry/SCT_DetectorManager.h" 
+#include "InDetIdentifier/SCT_ID.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "TrkSpacePoint/SpacePoint.h"
 #include "TrkSpacePoint/SpacePointCollection.h"
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.cxx
index 98ec5ae1f4619ea24eee8cf76ffa73cf0d672385..56e08ef9e0da9945e9cb948795142fde56941121 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.cxx
@@ -5,16 +5,14 @@
 /** header file */
 #include "SCTRawContByteStreamTool.h"
 
-#include "eformat/SourceIdentifier.h"
-
 #include "ByteStreamData/RawEvent.h" 
 #include "ByteStreamCnvSvcBase/SrcIdMap.h" 
-
-///InDet
-#include "SCT_RawDataByteStreamCnv/ISCT_RodEncoder.h"
-#include "SCT_Cabling/ISCT_CablingSvc.h"
+#include "eformat/SourceIdentifier.h"
+#include "InDetIdentifier/SCT_ID.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
+#include "SCT_Cabling/ISCT_CablingSvc.h"
+#include "SCT_RawDataByteStreamCnv/ISCT_RodEncoder.h"
+#include "StoreGate/ReadCondHandle.h"
 
 /// ------------------------------------------------------------------------
 /// contructor 
@@ -23,7 +21,6 @@ SCTRawContByteStreamTool::SCTRawContByteStreamTool
 (const std::string& type, const std::string& name,const IInterface* parent):
   base_class(type, name, parent),
   m_cabling{"SCT_CablingSvc", name},
-  m_sct_mgr{nullptr},
   m_sct_idHelper{nullptr}
 {
   declareProperty("RodBlockVersion", m_RodBlockVersion=0);
@@ -40,11 +37,11 @@ SCTRawContByteStreamTool::initialize() {
   ATH_CHECK(m_cabling.retrieve());
   ATH_MSG_INFO("Retrieved service " << m_cabling);
 
-  /** Retrieve detector manager */
-  ATH_CHECK(detStore()->retrieve(m_sct_mgr, "SCT"));
-
   /** Get the SCT Helper */
   ATH_CHECK(detStore()->retrieve(m_sct_idHelper, "SCT_ID"));
+
+  // Initialize ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
   
   return StatusCode::SUCCESS;
 }
@@ -64,6 +61,14 @@ SCTRawContByteStreamTool::finalize() {
 
 StatusCode
 SCTRawContByteStreamTool::convert(SCT_RDO_Container* cont, RawEventWrite* re, MsgStream& log) {
+  // Get SCT_DetectorElementCollection
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+  if (elements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+    return StatusCode::FAILURE;
+  }
+
   m_fea.clear();   
   FullEventAssembler<SrcIdMap>::RODDATA* theROD; 
   
@@ -107,8 +112,7 @@ SCTRawContByteStreamTool::convert(SCT_RDO_Container* cont, RawEventWrite* re, Ms
       eformat::helper::SourceIdentifier sid_rod{sid_rob.subdetector_id(), sid_rob.module_id()};
       uint32_t rodid{sid_rod.code()};
       /** see if strip numbers go from 0 to 767 or vice versa for this wafer */
-      InDetDD::SiDetectorElement* siDetElement{m_sct_mgr->getDetectorElement(idColl)};
-      siDetElement->updateCache();
+      const InDetDD::SiDetectorElement* siDetElement{elements->getDetectorElement(idCollHash)};
       bool swapPhiReadoutDirection{siDetElement->swapPhiReadoutDirection()};
       
       /** loop over RDOs in the collection;  */
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.h
index 8035d7cb7bd040aa2e273ac62f21b82ce12830d7..6c03e268fdcb015390d2352890a49c788b936ce8 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.h
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.h
@@ -8,22 +8,24 @@
 ///Base classes 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "SCT_RawDataByteStreamCnv/ISCTRawContByteStreamTool.h"
-///STL
-#include <cstdint>
-#include <string>
+
+///other athena
+#include "ByteStreamCnvSvcBase/FullEventAssembler.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
+
 ///Gaudi
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
-///other athena
-#include "ByteStreamCnvSvcBase/FullEventAssembler.h" 
+
+///STL
+#include <cstdint>
+#include <string>
 
 class SrcIdMap;
 class ISCT_RodEncoder;
 class ISCT_CablingSvc;
 class SCT_ID;
-namespace InDetDD {
-  class SCT_DetectorManager;
-}
 
 /** An AthAlgTool class to provide conversion from SCT RDO container
  *  to ByteStream, and fill it in RawEvent
@@ -58,7 +60,7 @@ class SCTRawContByteStreamTool: public extends<AthAlgTool, ISCTRawContByteStream
   
   ToolHandle<ISCT_RodEncoder> m_encoder{this, "Encoder", "SCT_RodEncoder", "SCT ROD Encoder for RDO to BS conversion"};
   ServiceHandle<ISCT_CablingSvc> m_cabling;
-  const InDetDD::SCT_DetectorManager* m_sct_mgr;
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
   const SCT_ID* m_sct_idHelper;
   unsigned short m_RodBlockVersion;
   FullEventAssembler<SrcIdMap> m_fea; 
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx
index db33bb90d4d10211fa63ed4909765c0f913433c7..56e41a556ef954284697a0fb0f49904b8dd817c7 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx
@@ -3,20 +3,22 @@
 */
 
 #include "SCT_RodDecoder.h"
+
+//Athena
+#include "ByteStreamData/RawEvent.h"
+#include "InDetIdentifier/SCT_ID.h"
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "SCT_Cabling/ISCT_CablingSvc.h"
+#include "StoreGate/ReadCondHandle.h"
+
+//Gaudi
+#include "GaudiKernel/IIncidentSvc.h"
+
 //STL
 #include <deque>
 #include <vector>
 #include <utility>
 #include <algorithm>
-//Gaudi
-#include "GaudiKernel/IIncidentSvc.h"
-//Athena
-#include "ByteStreamData/RawEvent.h"
-//Inner detector
-#include "SCT_Cabling/ISCT_CablingSvc.h"
-#include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 
 union RawWord {
   uint32_t word32;
@@ -28,7 +30,6 @@ SCT_RodDecoder::SCT_RodDecoder
 (const std::string& type, const std::string& name,const IInterface* parent) :
   base_class(type, name, parent),
   m_sct_id{nullptr},
-  m_indet_mgr{nullptr},
   m_cabling{"SCT_CablingSvc", name},
   m_condensedMode{false},
   m_superCondensedMode{false},
@@ -76,13 +77,14 @@ StatusCode SCT_RodDecoder::initialize() {
   ATH_CHECK(m_cabling.retrieve());
   ATH_MSG_DEBUG("Retrieved service " << m_cabling);
 
-  ATH_CHECK(detStore()->retrieve(m_indet_mgr,"SCT"));
-  
   ATH_CHECK(detStore()->retrieve(m_sct_id,"SCT_ID"));
   m_cntx_sct = m_sct_id->wafer_context();
 
   ATH_CHECK(m_configTool.retrieve());
 
+  // Initialize ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
   return StatusCode::SUCCESS;
 }
 
@@ -181,6 +183,14 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
 
   StatusCode sc{StatusCode::SUCCESS};
 
+  // Get SCT_DetectorElementCollection
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+  if (elements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+    return StatusCode::FAILURE;
+  }
+
   /// look at ROB status word ////////////////////////
 
   if (robFrag.nstatus()!=0) {
@@ -286,7 +296,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
           if ((side == 1) and ((linkNb%2)==0)) {
             if (((strip != oldstrip) or (side!=oldside)) and (groupSize>0)) { /** if it is a new cluster,
                                                                                * make RDO with the previous cluster */
-              int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+              int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -302,7 +312,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
           if ((side == 0) and ((linkNb%2)!=0)) {
             if (((strip != oldstrip) or (side!=oldside)) and (groupSize>0)) { /** if it is a new cluster,
                                                                                * make RDO with the previous cluster */
-              int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+              int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -325,7 +335,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
           if ((strip != oldstrip) or (side!=oldside)) {
             /** if it is a new cluster,
              * make RDO with the previous cluster */
-            int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+            int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
             if (rdoMade == -1) {
               sc=StatusCode::RECOVERABLE;
               addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -361,7 +371,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
           if ((side == 1) and ((linkNb%2)==0)) {
             if (((strip != oldstrip) or (side!=oldside)) and (groupSize>0)) { /** if it is a new cluster,
                                                                                * make RDO with the previous cluster */
-              int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+              int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -377,7 +387,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
           if ((side == 0) and ((linkNb%2)!=0)) {
             if (((strip != oldstrip) or (side!=oldside)) and (groupSize>0)) { /** if it is a new cluster,
                                                                                * make RDO with the previous cluster */
-              int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+              int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -400,7 +410,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
             if ((strip != oldstrip) or (side!=oldside)) {
               /** if it is a new cluster,
                * make RDO with the previous cluster */
-              int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+              int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -433,7 +443,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
             if ((strip != oldstrip) or (side!=oldside)) { /** if it is a new cluster,
                                                            * make RDO with the previous cluster 
                                                            */
-              int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+              int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -491,7 +501,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
             }
             onlineId = ((robid & 0xFFFFFF)|(linkNb << 24)); 
             groupSize =  1;
-            int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+            int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
             if (rdoMade == -1) {
               sc=StatusCode::RECOVERABLE;
               addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -518,7 +528,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
               strip++;
               tbin = d[n]&0x7;
               groupSize = 1;
-              int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+              int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -528,7 +538,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
               /** second hit from the pair */
               strip++;
               tbin = (d[n] >> 4) & 0x7;
-              rdoMade = this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit);
+              rdoMade = this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements);
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -547,7 +557,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
               strip++;
               tbin = d[n]&0x7;
               groupSize = 1;
-              int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+              int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -569,7 +579,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
   
         m_headnumber++;
         if (saved[side*768+strip]==false and oldstrip>=0) {
-          int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+          int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
           if (rdoMade == -1) {
             sc=StatusCode::RECOVERABLE;
             addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -797,7 +807,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
 
   /** create RDO of the last ink or stream of the event */
   if (saved[side*768+strip]==false and oldstrip>=0) {
-    int rdoMade{makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+    int rdoMade{makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
     if (rdoMade == -1) {
       sc=StatusCode::RECOVERABLE;
       addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -820,7 +830,8 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
 
 int SCT_RodDecoder::makeRDO(int strip, int groupSize, int tbin, uint32_t onlineId, int ERRORS, ISCT_RDO_Container& rdoIdc,
                             CacheHelper& cache,
-                            const std::vector<int>& errorHit)
+                            const std::vector<int>& errorHit,
+                            const InDetDD::SiDetectorElementCollection* elements)
 {
 
   if (onlineId == 0x0) {
@@ -873,7 +884,7 @@ int SCT_RodDecoder::makeRDO(int strip, int groupSize, int tbin, uint32_t onlineI
 
 
   /** see if strips go from 0 to 767 or vice versa */
-  const InDetDD::SiDetectorElement* p_element{m_indet_mgr->getDetectorElement(idCollHash)};
+  const InDetDD::SiDetectorElement* p_element{elements->getDetectorElement(idCollHash)};
   if (p_element->swapPhiReadoutDirection()) {
     strip = 767 - strip;
     strip = strip-(groupSize-1);
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.h
index dc25fd2158a3da8b1fb1905a3cdd5adc664566bc..534f8e9d4db5141be82cd675ceae87dda39b1c4f 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.h
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.h
@@ -11,27 +11,26 @@
 
 #ifndef INDETRAWDATABYTESTREAM_SCT_RODDECODER_H 
 #define INDETRAWDATABYTESTREAM_SCT_RODDECODER_H
-//STL
-#include <string>
-#include <cstdint>
 
 #include "SCT_RawDataByteStreamCnv/ISCT_RodDecoder.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 
-#include "GaudiKernel/ServiceHandle.h"
-
 #include "Identifier/IdContext.h"
 #include "InDetByteStreamErrors/InDetBSErrContainer.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "SCT_ConditionsData/SCT_ByteStreamErrors.h"
 #include "SCT_ConditionsTools/ISCT_ConfigurationConditionsTool.h"
+#include "StoreGate/ReadCondHandleKey.h"
+
+#include "GaudiKernel/ServiceHandle.h"
+
+//STL
+#include <string>
+#include <cstdint>
 
 class ISCT_CablingSvc;
 class SCT_ID;
 
-namespace InDetDD {
-  class SCT_DetectorManager; 
-}
-
 //using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
 /** @class SCT_RodDecoder
  *  @brief AlgTool which decodes the SCT binary format to create RDOs
@@ -76,7 +75,8 @@ class SCT_RodDecoder : public extends<AthAlgTool, ISCT_RodDecoder>
               uint32_t onlineId, int ERRORS,
               ISCT_RDO_Container& rdoIdc,
               CacheHelper&,
-              const std::vector<int>& errorHit);
+              const std::vector<int>& errorHit,
+              const InDetDD::SiDetectorElementCollection* elements);
 
   /// add an error for each wafer in a problematic ROD.
   void addRODError(uint32_t rodid, int errorType,
@@ -89,10 +89,10 @@ class SCT_RodDecoder : public extends<AthAlgTool, ISCT_RodDecoder>
   void setFirstTempMaskedChip(const IdentifierHash& hashId, const unsigned int firstTempMaskedChip, InDetBSErrContainer* errs);
   const SCT_ID* m_sct_id;
   IdContext m_cntx_sct;
-  const InDetDD::SCT_DetectorManager *m_indet_mgr;
   ServiceHandle<ISCT_CablingSvc> m_cabling;
   ToolHandle<ISCT_ConfigurationConditionsTool> m_configTool{this, "ConfigTool",
       "SCT_ConfigurationConditionsTool/InDetSCT_ConfigurationConditionsTool", "Tool to retrieve SCT Configuration Tool"};
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
   bool m_condensedMode ;
   bool m_superCondensedMode ;
   /** Summary of the decoding process */
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/share/VxSplitValTemplate.py b/InnerDetector/InDetExample/InDetBeamSpotExample/share/VxSplitValTemplate.py
index 1ac0097ee2e77683726d0aff515039804ae77bc0..98eaceacf27e70ab4b9404bc4f47e2306ce74845 100644
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/share/VxSplitValTemplate.py
+++ b/InnerDetector/InDetExample/InDetBeamSpotExample/share/VxSplitValTemplate.py
@@ -229,7 +229,7 @@ InDetHoleSearchTool = InDet__InDetTrackHoleSearchTool(name = "InDetHoleSearchToo
                                                       Extrapolator = InDetExtrapolator,
                                                       usePixel      = DetFlags.haveRIO.pixel_on(),
                                                       useSCT        = DetFlags.haveRIO.SCT_on())
-InDetHoleSearchTool.SctSummarySvc = None
+InDetHoleSearchTool.SctSummaryTool = None
   
 ToolSvc += InDetHoleSearchTool
 if InDetFlags.doPrintConfigurables: print      InDetHoleSearchTool
diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/PrintSiElements.h b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/PrintSiElements.h
index 08cca7a7ca9631918bdac8755b912b5ba8e69745..22d6ad5c90dc9f7b1ab53d7ca56b743ba499b2d6 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/PrintSiElements.h
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/PrintSiElements.h
@@ -6,10 +6,13 @@
 #define InDetDetDescrExample_PrintSiElements_h
 
 #include "AthenaBaseComps/AthAlgorithm.h"
-#include "GaudiKernel/ServiceHandle.h"
-//#include "CLHEP/Geometry/Transform3D.h"
+
 #include "GeoPrimitives/GeoPrimitives.h"
 #include "GeoModelInterfaces/IGeoModelSvc.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
+
+#include "GaudiKernel/ServiceHandle.h"
 
 #include <fstream>
 
@@ -38,6 +41,7 @@ private:
   bool m_fullRotationMatrix;
   std::string m_outputFileName;
   ServiceHandle<IGeoModelSvc> m_geoModelSvc;
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 };
 
 #endif // InDetDetDescrExample_PrintSiElements_h
diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/TestSiAlignment.h b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/TestSiAlignment.h
index dda2a08ca1e1d4452d8f06d1668319ce193be985..0ee092e2726439888b3a11ad76ed10d83a6faa62 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/TestSiAlignment.h
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/TestSiAlignment.h
@@ -9,14 +9,14 @@
 #include "GaudiKernel/ServiceHandle.h"
 #include "AthenaKernel/IOVSvcDefs.h"
 #include "InDetReadoutGeometry/SiCellId.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "InDetReadoutGeometry/SiLocalPosition.h"
 #include "GeoPrimitives/GeoPrimitives.h"
-//#include "CLHEP/Geometry/Transform3D.h"
+#include "StoreGate/ReadCondHandleKey.h"
 
 #include <vector>
 
 class Identifier;
-//class HepGeom::Transform3D;
 
 namespace InDetDD{
   class SiDetectorManager;
@@ -33,7 +33,7 @@ public:
   StatusCode finalize();
 
 private:
-  void printAlignmentShifts();
+  void printAlignmentShifts(const bool accessDuringInitialization);
   bool testIdentity(const Amg::Transform3D & transform, double errRot=0, double errTrans=0);
   void extractAlphaBetaGamma(const Amg::Transform3D & trans, double& alpha, double& beta, double &gamma) const; 
   const InDetDD::SiDetectorManager * m_manager;
@@ -41,6 +41,7 @@ private:
   bool m_longPrintOut;
   double m_errRot;
   double m_errTrans;
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_detEleCollKey{this, "DetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection"};
 };
 
 #endif // InDetDetDescrExample_TestSiAlignment_h
diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/PrintSiElements.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/PrintSiElements.cxx
index e4d58db6bb47c404c379f48afcc07374fa432f8d..a7d59c451ddc9355f573ab486ad7f30c59990c44 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/src/PrintSiElements.cxx
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/PrintSiElements.cxx
@@ -5,12 +5,12 @@
 #include "InDetDetDescrExample/PrintSiElements.h"
 
 #include "StoreGate/StoreGateSvc.h"
+#include "StoreGate/ReadCondHandle.h"
 
 #include "CLHEP/Units/SystemOfUnits.h"
 
-#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "InDetIdentifier/PixelID.h"
 #include "InDetIdentifier/SCT_ID.h"
 #include "Identifier/Identifier.h"
@@ -64,18 +64,33 @@ StatusCode PrintSiElements::initialize(){
   m_fileout << "# Pixel tag: " << geoModel->pixelVersionOverride() << std::endl;
   m_fileout << "# SCT   tag: " << geoModel->SCT_VersionOverride() << std::endl;
   m_fileout << "# TRT   tag: " << geoModel->TRT_VersionOverride() << std::endl;
+  // ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
   return StatusCode::SUCCESS;
 }
 
 
 StatusCode 
 PrintSiElements::printElements(const std::string & managerName){
-  const InDetDD::SiDetectorManager * manager;
-  ATH_CHECK(detStore()->retrieve(manager,managerName));
+  const InDetDD::SiDetectorElementCollection * elements = nullptr;
+  if (managerName=="Pixel") {
+    const InDetDD::PixelDetectorManager * manager;
+    ATH_CHECK(detStore()->retrieve(manager,managerName));
+    elements = manager->getDetectorElementCollection();
+  } else if (managerName=="SCT") {
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
+    elements = *sctDetEleHandle;
+    if (not sctDetEleHandle.isValid() or elements==nullptr) {
+      ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available.");
+      return StatusCode::FAILURE;
+    }
+  }
+  if (elements==nullptr) {
+    ATH_MSG_FATAL("SiDetectorElementCollection elements is nullptr");
+    return StatusCode::FAILURE;
+  }
 
-  InDetDD::SiDetectorElementCollection::const_iterator iter;  
-  for (iter = manager->getDetectorElementBegin(); iter != manager->getDetectorElementEnd(); ++iter){
-    const InDetDD::SiDetectorElement * element = *iter; 
+  for (const InDetDD::SiDetectorElement * element: *elements) {
     if (element) {
       Identifier id = element->identify();
       int det = 0;
diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/TestSiAlignment.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/TestSiAlignment.cxx
index a7679e798cc76f16d886c3a20c9fc5288a33d009..f86488e5ad9709793cc139aace04203cc40b50d4 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/src/TestSiAlignment.cxx
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/TestSiAlignment.cxx
@@ -8,7 +8,6 @@
 
 #include "CLHEP/Units/SystemOfUnits.h"
 
-#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetReadoutGeometry/SiCellId.h"
@@ -18,7 +17,7 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "Identifier/Identifier.h"
 #include "GeoPrimitives/CLHEPtoEigenConverter.h"
-
+#include "StoreGate/ReadCondHandle.h"
 
 #include <iostream>
 #include <vector>
@@ -65,21 +64,38 @@ StatusCode TestSiAlignment::initialize(){
   ATH_MSG_INFO( " ErrorTranslation: " << m_errTrans );  
   // Retrieve Detector Manager
   ATH_CHECK(detStore()->retrieve(m_manager, m_managerName));
-  printAlignmentShifts();
+  if (m_managerName=="Pixel") {
+    // do nothing
+  } else if (m_managerName=="SCT") {
+    ATH_CHECK(m_detEleCollKey.initialize());
+  } else {
+    ATH_MSG_FATAL("m_managerName " << m_managerName << " is not appropriate name");
+  }
+  printAlignmentShifts(true);
   return StatusCode::SUCCESS;
 }
 
 
 void
-TestSiAlignment::printAlignmentShifts() {
+TestSiAlignment::printAlignmentShifts(const bool accessDuringInitialization) {
+  const bool useConditionStore = (m_managerName == "SCT" and (not accessDuringInitialization));
   static const Amg::Vector3D zeroPoint(0., 0., 0.); 
   static const Amg::Vector3D phiAxis(1, 0, 0);
   static const Amg::Vector3D etaAxis(0, 1, 0);
   static const Amg::Vector3D depAxis(0, 0, 1);
-  SiDetectorElementCollection::const_iterator iter(m_manager->getDetectorElementBegin());
-  const SiDetectorElementCollection::const_iterator elementEnd(m_manager->getDetectorElementEnd());
-  for (;iter != elementEnd; ++iter){
-    const SiDetectorElement * element = *iter; 
+  const SiDetectorElementCollection* elements = nullptr;
+  if (useConditionStore) {
+    // Get SiDetectorElementCollection from ConditionStore
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> detEle(m_detEleCollKey);
+    elements = detEle.retrieve();
+    if (elements==nullptr) {
+      ATH_MSG_FATAL(m_detEleCollKey.fullKey() << " could not be retrieved");
+      return;
+    }
+  } else {
+    elements = m_manager->getDetectorElementCollection();
+  }
+  for (const SiDetectorElement * element: *elements) {
     if (element) {
       // The id helper is available either through the manager or the elements
       cout << element->getIdHelper()->show_to_string(element->identify());
@@ -166,7 +182,7 @@ void  TestSiAlignment::extractAlphaBetaGamma(const Amg::Transform3D & trans, dou
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 StatusCode TestSiAlignment::execute() {
-  printAlignmentShifts();
+  printAlignmentShifts(false);
   return StatusCode::SUCCESS;
 }
 
diff --git a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
index d9af6ad10621ffd46be32dcab6833a2d78fe555a..f8a140e8866821eaf95517aef05cabec5986f1a7 100644
--- a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
+++ b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
@@ -91,6 +91,8 @@ def getRIO_OnTrackErrorScalingCondAlg( **kwargs) :
 
 def getEventInfoKey() :
     from AthenaCommon.GlobalFlags  import globalflags
+    from AthenaCommon.DetFlags import DetFlags
+
     isData = (globalflags.DataSource == 'data')
 
     eventInfoKey = "ByteStreamEventInfo"
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredBackTracking.py b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredBackTracking.py
index 97181fbd11b88e8aa0dcdca4d10be23a8d77da1f..daef063256ffec0d366fa8653db20c22c8d45297 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredBackTracking.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredBackTracking.py
@@ -103,6 +103,29 @@ class ConfiguredBackTracking:
          #InDetTRT_SeededSiRoadMaker.OutputLevel = VERBOSE
          if InDetFlags.doCosmics():
             InDetTRT_SeededSiRoadMaker.RoadWidth = 50
+         # Condition algorithm for InDet__SiDetElementsRoadMaker_xk
+         if NewTrackingCuts.useSCT():
+            from AthenaCommon.AlgSequence import AthSequencer
+            condSeq = AthSequencer("AthCondSeq")
+            if not hasattr(condSeq, "InDet__SiDetElementsRoadCondAlg_xk"):
+               from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadCondAlg_xk
+               # Copied from InDetAlignFolders.py
+               useDynamicAlignFolders = False
+               try:
+                  from InDetRecExample.InDetJobProperties import InDetFlags
+                  if InDetFlags.useDynamicAlignFolders and conddb.dbdata == "CONDBR2":
+                     useDynamicAlignFolders = True
+               except ImportError:
+                  pass
+               from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+               if athenaCommonFlags.isOnline():
+                  condSeq += InDet__SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk",
+                                                                UseDynamicAlignFolders = useDynamicAlignFolders,
+                                                                IBLDistFolderKey = "/Indet/Onl/IBLDist",
+                                                                PixelL2FolderKey = "/Indet/Onl/AlignL2/PIX")
+               else:
+                  condSeq += InDet__SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk",
+                                                                UseDynamicAlignFolders = useDynamicAlignFolders)
       
          ToolSvc += InDetTRT_SeededSiRoadMaker
          if (InDetFlags.doPrintConfigurables()):
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
index 7114c7ea7be2e93605fe746111e1f84e5f2a4b8e..69fb1d738fe42abb9215325dc3895e884680bf72 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
@@ -160,6 +160,29 @@ class  ConfiguredNewTrackingSiPattern:
          ToolSvc += InDetSiDetElementsRoadMaker
          if (InDetFlags.doPrintConfigurables()):
             print      InDetSiDetElementsRoadMaker
+         # Condition algorithm for InDet__SiDetElementsRoadMaker_xk
+         if NewTrackingCuts.useSCT():
+            from AthenaCommon.AlgSequence import AthSequencer
+            condSeq = AthSequencer("AthCondSeq")
+            if not hasattr(condSeq, "InDet__SiDetElementsRoadCondAlg_xk"):
+               from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadCondAlg_xk
+               # Copied from InDetAlignFolders.py
+               useDynamicAlignFolders = False
+               try:
+                  from InDetRecExample.InDetJobProperties import InDetFlags
+                  if InDetFlags.useDynamicAlignFolders and conddb.dbdata == "CONDBR2":
+                     useDynamicAlignFolders = True
+               except ImportError:
+                  pass
+               from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+               if athenaCommonFlags.isOnline():
+                  condSeq += InDet__SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk",
+                                                                UseDynamicAlignFolders = useDynamicAlignFolders,
+                                                                IBLDistFolderKey = "/Indet/Onl/IBLDist",
+                                                                PixelL2FolderKey = "/Indet/Onl/AlignL2/PIX")
+               else:
+                  condSeq += InDet__SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk",
+                                                                UseDynamicAlignFolders = useDynamicAlignFolders)
 
          #
          # --- Local track finding using sdCaloSeededSSSpace point seed
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py
index cfd7f4546a2b99196f3c38c81b9b06a24e14c6bd..60768ed2123aaf4568335863c106e8277f6d3608 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py
@@ -3,6 +3,8 @@
 include.block ("InDetRecExample/InDetRecConditionsAccess.py")
 
 from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+from AthenaCommon.DetFlags import DetFlags
+
 isData = (globalflags.DataSource == 'data')
 
 eventInfoKey = "ByteStreamEventInfo"
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py
index 3839e4aec8e5e1b02f723ba38b2d614806127cf6..b67e078bb7bb2a27b1c50dfdb2c16de65a0ad240 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py
@@ -211,7 +211,6 @@ if InDetFlags.doPRDFormation():
       InDetSCT_Clusterization = InDet__SCT_Clusterization(name                    = "InDetSCT_Clusterization",
                                                           clusteringTool          = InDetSCT_ClusteringTool,
                                                           # ChannelStatus         = InDetSCT_ChannelStatusAlg,
-                                                          DetectorManagerName     = InDetKeys.SCT_Manager(), 
                                                           DataObjectName          = InDetKeys.SCT_RDOs(),
                                                           ClustersName            = InDetKeys.SCT_Clusters(),
                                                           conditionsTool          = InDetSCT_ConditionsSummaryToolWithoutFlagged)
@@ -227,7 +226,6 @@ if InDetFlags.doPRDFormation():
         InDetSCT_ClusterizationPU = InDet__SCT_Clusterization(name                    = "InDetSCT_ClusterizationPU",
                                                               clusteringTool          = InDetSCT_ClusteringTool,
                                                               # ChannelStatus         = InDetSCT_ChannelStatusAlg,
-                                                              DetectorManagerName     = InDetKeys.SCT_Manager(),
                                                               DataObjectName          = InDetKeys.SCT_PU_RDOs(),
                                                               ClustersName            = InDetKeys.SCT_PU_Clusters(),
                                                               conditionsTool          = InDetSCT_ConditionsSummaryToolWithoutFlagged)
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetWriteBS_jobOptions.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetWriteBS_jobOptions.py
index bf071827f6cfd73e5b4415d2a80223a793fc75dd..0e45083cc3dbbf17561529ec79d74f27bd9b0d44 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetWriteBS_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetWriteBS_jobOptions.py
@@ -22,19 +22,7 @@ ByteStreamCnvSvc = svcMgr.ByteStreamCnvSvc
 ByteStreamCnvSvc.IsSimulation = True
 ByteStreamCnvSvc.ByteStreamOutputSvc ="ByteStreamEventStorageOutputSvc"
 
-# SCT cabling
-from SCT_Cabling.SCT_CablingConf import SCT_CablingSvc
-ServiceMgr+=SCT_CablingSvc()
-IOVDbSvc = Service("IOVDbSvc")
-from IOVDbSvc.CondDB import conddb
-conddb.addFolderSplitMC("SCT","/SCT/DAQ/Configuration/ROD","/SCT/DAQ/Configuration/ROD")
-conddb.addFolderSplitMC("SCT","/SCT/DAQ/Configuration/MUR","/SCT/DAQ/Configuration/MUR")
-conddb.addFolderSplitMC("SCT","/SCT/DAQ/Configuration/RODMUR","/SCT/DAQ/Configuration/RODMUR")
-conddb.addFolderSplitMC("SCT","/SCT/DAQ/Configuration/Geog","/SCT/DAQ/Configuration/Geog")
-ServiceMgr.SCT_CablingSvc.DataSource = "CORACOOL"
-# hack to force MC calbing loading for FDR2
-#if svcMgr.ByteStreamCnvSvc.IsSimulation:
-#  ServiceMgr.SCT_CablingSvc.DataSource = "SCT_MC_FullCabling_svc.dat"
+include("InDetRecExample/InDetRecCabling.py")
 
 if DetFlags.haveRIO.pixel_on():
   ByteStreamCnvSvc.InitCnvs += ["PixelRDO_Container"]
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py
index a5a3e55fe73905bfad84312c8b0ece8013f25636..af58280867ed2277079286168fe9cea8dfcdcd40 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py
@@ -154,7 +154,7 @@ class TRT_TrigSeededTrackFinder_EF( InDet__TRT_TrigSeededTrackFinder ):
       from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import EFIDTrackingCuts
       InDetTrigCutValues = EFIDTrackingCuts
       from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
-      from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPrdAssociationTool, InDetTrigPatternPropagator, InDetTrigPatternUpdator, InDetTrigRotCreator, InDetTrigExtrapolator, InDetTrigTrackFitter, InDetTrigSCTConditionsSummarySvc
+      from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPrdAssociationTool, InDetTrigPatternPropagator, InDetTrigPatternUpdator, InDetTrigRotCreator, InDetTrigExtrapolator, InDetTrigTrackFitter, InDetTrigSCTConditionsSummaryTool
 
 
       if InDetTrigFlags.loadTRTSeededSPFinder():
@@ -214,6 +214,17 @@ class TRT_TrigSeededTrackFinder_EF( InDet__TRT_TrigSeededTrackFinder ):
       ToolSvc += InDetTrigTRT_SeededSiRoadMaker
       if (InDetTrigFlags.doPrintConfigurables()):
         print      InDetTrigTRT_SeededSiRoadMaker
+      # Condition algorithm for InDet__SiDetElementsRoadMaker_xk
+      from AthenaCommon.AlgSequence import AthSequencer
+      condSeq = AthSequencer("AthCondSeq")
+      if not hasattr(condSeq, "InDet__SiDetElementsRoadCondAlg_xk"):
+        IBLDistFolderKey = "/Indet/IBLDist"
+        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+        if athenaCommonFlags.isOnline():
+          IBLDistFolderKey = "/Indet/Onl/IBLDist"
+        from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadCondAlg_xk
+        condSeq += InDet__SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk",
+                                                      IBLDistFolderKey = IBLDistFolderKey)
 
       # Local combinatorial track finding using space point seed and detector element road
       from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSiComTrackFinder
@@ -237,9 +248,9 @@ class TRT_TrigSeededTrackFinder_EF( InDet__TRT_TrigSeededTrackFinder ):
       #                                                                  SCT_ClusterContainer   = 'SCT_TrigClusters')
 
       # if (DetFlags.haveRIO.SCT_on()):
-      #    InDetTrigSiComTrackFinder.SctSummarySvc = InDetTrigSCTConditionsSummarySvc
+      #    InDetTrigSiComTrackFinder.SctSummaryTool = InDetTrigSCTConditionsSummaryTool
       # else:
-      #    InDetTrigSiComTrackFinder.SctSummarySvc = None
+      #    InDetTrigSiComTrackFinder.SctSummaryTool = None
 
       # ToolSvc += InDetTrigSiComTrackFinder
       # if (InDetTrigFlags.doPrintConfigurables()):
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py
index 12744e54384da75aaa6f77a150f3932cec6f6f3f..27bc735867cfe79449befa7a64af6f1ce2dfe28b 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py
@@ -874,7 +874,18 @@ if InDetTrigFlags.doNewTracking():
                                                                    RoadWidth    = InDetTrigCutValues.RoadWidth()
                                                                    )
   ToolSvc += InDetTrigSiDetElementsRoadMaker
-
+  # Condition algorithm for InDet__SiDetElementsRoadMaker_xk
+  if DetFlags.haveRIO.SCT_on():
+    from AthenaCommon.AlgSequence import AthSequencer
+    condSeq = AthSequencer("AthCondSeq")
+    if not hasattr(condSeq, "InDet__SiDetElementsRoadCondAlg_xk"):
+      IBLDistFolderKey = "/Indet/IBLDist"
+      from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+      if athenaCommonFlags.isOnline():
+        IBLDistFolderKey = "/Indet/Onl/IBLDist"
+      from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadCondAlg_xk
+      condSeq += InDet__SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk",
+                                                    IBLDistFolderKey = IBLDistFolderKey)
 
   # Local combinatorial track finding using space point seed and detector element road
   #
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsCosmics.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsCosmics.py
index 0b43d0fcfc1e83b9d457a2651a33f49912e0574e..87cb8087e893a955aaeccc2f0cb64471be60e996 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsCosmics.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsCosmics.py
@@ -84,6 +84,18 @@ InDetTrigSiDetElementsRoadMakerCosmics = \
                                       RoadWidth          = 75.     #wider for cosmics
                                       )
 ToolSvc += InDetTrigSiDetElementsRoadMakerCosmics
+# Condition algorithm for InDet__SiDetElementsRoadMaker_xk
+if DetFlags.haveRIO.SCT_on():
+  from AthenaCommon.AlgSequence import AthSequencer
+  condSeq = AthSequencer("AthCondSeq")
+  if not hasattr(condSeq, "InDet__SiDetElementsRoadCondAlg_xk"):
+    IBLDistFolderKey = "/Indet/IBLDist"
+    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+    if athenaCommonFlags.isOnline():
+      IBLDistFolderKey = "/Indet/Onl/IBLDist"
+    from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadCondAlg_xk
+    condSeq += InDet__SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk",
+                                                  IBLDistFolderKey = IBLDistFolderKey)
 
 #SP formation
 from SiSpacePointTool.SiSpacePointToolConf import InDet__SiSpacePointMakerTool
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py
index e0d31ea6b5a929136f50b05a43995065214f8fb5..e4e5444b76cc589ac159736b4ad7aef6e48eb621 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py
@@ -63,7 +63,18 @@ InDetTrigSiDetElementsRoadMakerLowPt = \
                                      RoadWidth    = EFIDTrackingCutsLowPt.RoadWidth()
                                      )
 ToolSvc += InDetTrigSiDetElementsRoadMakerLowPt
-
+# Condition algorithm for InDet__SiDetElementsRoadMaker_xk
+if DetFlags.haveRIO.SCT_on():
+  from AthenaCommon.AlgSequence import AthSequencer
+  condSeq = AthSequencer("AthCondSeq")
+  if not hasattr(condSeq, "InDet__SiDetElementsRoadCondAlg_xk"):
+    IBLDistFolderKey = "/Indet/IBLDist"
+    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+    if athenaCommonFlags.isOnline():
+      IBLDistFolderKey = "/Indet/Onl/IBLDist"
+    from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadCondAlg_xk
+    condSeq += InDet__SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk",
+                                                  IBLDistFolderKey = IBLDistFolderKey)
 
 # Local combinatorial track finding using space point seed and detector element road
 #
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/testEFID_basic.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/testEFID_basic.py
index dba3518807b77b1d815b543655da5cd21706e838..92345115e9dafe47fd6d1492f619dd096ea1c92f 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/testEFID_basic.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/share/testEFID_basic.py
@@ -225,12 +225,3 @@ steeringEF = job.TrigSteer_EF
 #
 if 0 and doReadBS:
     ServiceMgr.ByteStreamCnvSvc.IsSimulation = True
-
-    # hack to force MC calbing loading for FDR2
-    if ServiceMgr.ByteStreamCnvSvc.IsSimulation:
-        from InDetCabling.InDetCablingConf import SCT_CablingSelector
-        SCT_CablingSelector = SCT_CablingSelector(Method = "MANUAL", Layout ="FromTextFile", Filename = "SCT_MC_FullCabling.dat")
-        ToolSvc            += SCT_CablingSelector
-        
-
-
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h
index 949d6b88957e20ce06a1106cca4db99341d6d7de..7a0f8e6042cdfa757c289294612b30490d6ddd09 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h
@@ -13,24 +13,24 @@
 */
 
 #include "AthenaBaseComps/AthAlgorithm.h"
-#include <string>
-#include <iostream>
-#include <fstream>
-#include "CLHEP/Geometry/Transform3D.h"
-//#include "CLHEP/Matrix/Vector.h"
 
 #include "EventPrimitives/EventPrimitives.h"
 #include "GeoPrimitives/GeoPrimitives.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
+
+#include "CLHEP/Geometry/Transform3D.h"
 
+#include <string>
+#include <iostream>
+#include <fstream>
 
 namespace InDetDD {
   class TRT_DetectorManager; 
-  class SCT_DetectorManager; 
   class PixelDetectorManager; 
 }
 
 class TRT_ID;
-class SCT_ID;
 class PixelID;
 class Identifier;
 
@@ -59,6 +59,7 @@ class GetDetectorLocalFrames:public AthAlgorithm {
     /** Pixel Data */
     
     /** SCT Data */
+    SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
     
     /** TRT Data */
     int m_trt_barrel_ec;
@@ -71,9 +72,6 @@ class GetDetectorLocalFrames:public AthAlgorithm {
     const PixelID *m_PixelHelper;
     const InDetDD::PixelDetectorManager *m_pixelDetectorManager;
     
-    const SCT_ID *m_SCTHelper;
-    const InDetDD::SCT_DetectorManager *m_SCTDetectorManager;
-
     const TRT_ID *m_TRTHelper;
     const InDetDD::TRT_DetectorManager *m_TRTDetectorManager;
     
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorPositions.h b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorPositions.h
index 8dafb7be08269590eaa7fccfb3a595775d4f5ad3..f6adbd9fbd06b111a3cd46a1d3c5d2bb4e5f13ad 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorPositions.h
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorPositions.h
@@ -13,13 +13,16 @@
 */
 
 #include "AthenaBaseComps/AthAlgorithm.h"
+
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
+
 #include <string>
 #include <iostream>
 #include <fstream>
 
 namespace InDetDD {
   class TRT_DetectorManager; 
-  class SCT_DetectorManager; 
   class PixelDetectorManager; 
 }
 
@@ -55,12 +58,14 @@ class GetDetectorPositions:public AthAlgorithm {
     std::string m_outputFileName;
     std::ofstream m_outputFile;
     
+    /** SCT Data */
+    SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+
     /** Tools */
     const PixelID *m_PixelHelper;
     const InDetDD::PixelDetectorManager *m_pixelDetectorManager;
     
     const SCT_ID *m_SCTHelper;
-    const InDetDD::SCT_DetectorManager *m_SCTDetectorManager;
 
     const TRT_ID *m_TRTHelper;
     const InDetDD::TRT_DetectorManager *m_TRTDetectorManager;
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx
index 4d6ae45b7563fadec5fd92d6d8ad93c43b29dad6..fd088493f62f438014e935e75e6865443bbb6d12 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx
@@ -24,14 +24,13 @@
 #include "InDetIdentifier/TRT_ID.h"
 #include "InDetReadoutGeometry/TRT_DetectorManager.h"
 
-#include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
-
 #include "InDetIdentifier/PixelID.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
 
 #include "EventPrimitives/EventPrimitives.h"
 
+#include "StoreGate/ReadCondHandle.h"
+
 #include <stdlib.h>
 #include <string.h>
 #include <vector>
@@ -56,8 +55,6 @@ GetDetectorLocalFrames::GetDetectorLocalFrames(std::string const&  name, ISvcLoc
   /** ID Tools */
   m_PixelHelper(0),
   m_pixelDetectorManager(0),
-  m_SCTHelper(0),
-  m_SCTDetectorManager(0),
   m_TRTHelper(0),
   m_TRTDetectorManager(0)
 
@@ -82,16 +79,7 @@ StatusCode GetDetectorLocalFrames::initialize(){
   }
   
   /** Retrive SCT info */
-  if (detStore()->retrieve(m_SCTHelper, "SCT_ID").isFailure()) {
-    msg(MSG::FATAL) << "Could not get SCT ID helper" << endmsg;
-    return StatusCode::FAILURE;
-  }
-  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "got the SCT ID" << endmsg;
-
-  if ((detStore()->retrieve(m_SCTDetectorManager)).isFailure()) {
-    if(msgLvl(MSG::FATAL)) msg(MSG::FATAL) << "Problem retrieving SCT_DetectorManager" << endmsg;
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
   
   /** Retrive Pixel info */
   if (detStore()->retrieve(m_PixelHelper, "PixelID").isFailure()) {
@@ -170,15 +158,17 @@ void GetDetectorLocalFrames::writePixelFames(){
 /** Writing the SCT Positions */
 void GetDetectorLocalFrames::writeSCTFrames(){
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "In writeSCTFrames()" << endmsg;
-  
+
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* elements{*sctDetEleHandle};
+  if (not sctDetEleHandle.isValid() or elements==nullptr) {
+    ATH_MSG_ERROR(m_SCTDetEleCollKey.fullKey() << " is not available.");
+    return;
+  }
   //Loop over SCT elements
-  std::vector<Identifier>::const_iterator sctIt = m_SCTHelper->wafer_begin();
-  std::vector<Identifier>::const_iterator sctItE = m_SCTHelper->wafer_end();
-  for(; sctIt != sctItE; sctIt++  ) {
-    
-    //InDetDD::SiDetectorElement* si_hit = m_SCTDetectorManager->getDetectorElement( *sctIt );
+  //  for (const InDetDD::SiDetectorElement* element: *elements) {
     // Get local Frame
-  }
+  //  }
   
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Leaving writeSCTFrames()" << endmsg;
   return;
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx
index 6923686f736878323b1143b559f23e87c8d4095e..ac3baca27b1ae2989b2a3f72a126e6ba7d567dca 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx
@@ -25,12 +25,13 @@
 #include "InDetReadoutGeometry/TRT_DetectorManager.h"
 
 #include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 
 #include "InDetIdentifier/PixelID.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "EventPrimitives/EventPrimitives.h"
 
+#include "StoreGate/ReadCondHandle.h"
+
 #include <stdlib.h>
 #include <string.h>
 #include <vector>
@@ -46,7 +47,6 @@ GetDetectorPositions::GetDetectorPositions(std::string const&  name, ISvcLocator
   m_PixelHelper(0),
   m_pixelDetectorManager(0),
   m_SCTHelper(0),
-  m_SCTDetectorManager(0),
   m_TRTHelper(0),
   m_TRTDetectorManager(0)
 
@@ -80,12 +80,8 @@ StatusCode GetDetectorPositions::initialize(){
     return StatusCode::FAILURE;
   }
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "got the SCT ID" << endmsg;
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
 
-  if ((detStore()->retrieve(m_SCTDetectorManager)).isFailure()) {
-    if(msgLvl(MSG::FATAL)) msg(MSG::FATAL) << "Problem retrieving SCT_DetectorManager" << endmsg;
-    return StatusCode::FAILURE;
-  }
-  
   /** Retrive Pixel info */
   if (detStore()->retrieve(m_PixelHelper, "PixelID").isFailure()) {
     msg(MSG::FATAL) << "Could not get Pixel ID helper" << endmsg;
@@ -186,19 +182,24 @@ void GetDetectorPositions::writePixelPositions(){
 void GetDetectorPositions::writeSCTPositions(){
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "In writeSCTPositions()" << endmsg;
   
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* elements{*sctDetEleHandle};
+  if (not sctDetEleHandle.isValid() or elements==nullptr) {
+    ATH_MSG_ERROR(m_SCTDetEleCollKey.fullKey() << " is not available.");
+    return;
+  }
   //Loop over SCT elements
-  std::vector<Identifier>::const_iterator sctIt = m_SCTHelper->wafer_begin();
-  std::vector<Identifier>::const_iterator sctItE = m_SCTHelper->wafer_end();
-  for(; sctIt != sctItE; sctIt++  ) {
-    
-    InDetDD::SiDetectorElement* si_hit = m_SCTDetectorManager->getDetectorElement( *sctIt );
+  for (const InDetDD::SiDetectorElement* si_hit: *elements) {
     Amg::Vector3D p3d = si_hit->center();
+
+    const IdentifierHash wafer_hash = si_hit->identifyHash();
+    const Identifier wafer_id = m_SCTHelper->wafer_id(wafer_hash);
     
-    int sct_barrel_ec = m_SCTHelper->barrel_ec(*sctIt);
-    int sct_layer_disk= m_SCTHelper->layer_disk(*sctIt);
-    int sct_phi_module= m_SCTHelper->phi_module(*sctIt);
-    int sct_eta_module = m_SCTHelper->eta_module(*sctIt);
-    int nStrips      = m_SCTHelper->strip_max(*sctIt)+1;
+    int sct_barrel_ec = m_SCTHelper->barrel_ec(wafer_id);
+    int sct_layer_disk= m_SCTHelper->layer_disk(wafer_id);
+    int sct_phi_module= m_SCTHelper->phi_module(wafer_id);
+    int sct_eta_module = m_SCTHelper->eta_module(wafer_id);
+    int nStrips      = m_SCTHelper->strip_max(wafer_id)+1;
     float sct_x = p3d.x();
     float sct_y = p3d.y();
     float sct_z = p3d.z();
diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.cxx
index bb6dbde236c3dbd36b1a37b7999483e6fcce082c..460e75282b1f8e6533d1dedc0caa9897858d31d2 100644
--- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.cxx
+++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.cxx
@@ -20,7 +20,6 @@
 #include "InDetIdentifier/PixelID.h"
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/TRT_ID.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 
 
 #include "TrkTrack/TrackCollection.h"
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.cxx
index 4605b78ab73d317b7877a4c803e3ef15edfd2056..9ae2d546ce4bd83ed3c65577030a1aec057c34bd 100755
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.cxx
@@ -12,7 +12,6 @@
 #include "PixelConditionsServices/IPixelByteStreamErrorsSvc.h"
 
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "StoreGate/ReadCondHandle.h"
 
@@ -68,7 +67,7 @@ StatusCode InDetGlobalErrorMonTool::initialize() {
   ATH_CHECK(m_ConfigurationTool.retrieve());
   ATH_CHECK(m_byteStreamErrTool.retrieve());
 
-  ATH_CHECK(m_sctDetEleCollKey.initialize());
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
   
   return ManagedMonitorToolBase::initialize();
 }
@@ -260,10 +259,10 @@ bool InDetGlobalErrorMonTool::SyncErrorSCT()
   
   m_errorGeoSCT.clear();
 
-  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_sctDetEleCollKey);
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
   const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
   if (elements==nullptr) {
-    ATH_MSG_ERROR(m_sctDetEleCollKey.fullKey() << " could not be retrieved in SyncErrorSCT()");
+    ATH_MSG_ERROR(m_SCTDetEleCollKey.fullKey() << " could not be retrieved in SyncErrorSCT()");
     return false;
   }
   
@@ -351,10 +350,10 @@ bool InDetGlobalErrorMonTool::SyncDisabledSCT()
   
   m_disabledGeoSCT.clear();
 
-  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_sctDetEleCollKey);
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
   const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
   if (elements==nullptr) {
-    ATH_MSG_ERROR(m_sctDetEleCollKey.fullKey() << " could not be retrieved in SyncDisabledSCT()");
+    ATH_MSG_ERROR(m_SCTDetEleCollKey.fullKey() << " could not be retrieved in SyncDisabledSCT()");
     return false;
   }
 
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.h
index a994193c8f2e9ef90fbc8e14613f4fe441a909c5..d84cb9638b8ce91bac5cad1dd960cb62f692f357 100755
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.h
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.h
@@ -66,7 +66,7 @@ private:
     ToolHandle<ISCT_ByteStreamErrorsTool> m_byteStreamErrTool{this, "SCT_ByteStreamErrorsTool", "SCT_ByteStreamErrorsTool", "Tool to retrieve SCT ByteStream Errors"};
     ServiceHandle<IPixelByteStreamErrorsSvc> m_ErrorSvc;
 
-    SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_sctDetEleCollKey{this, "SctDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+    SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
     geoContainer_t m_errorGeoPixel;
     geoContainer_t m_disabledGeoPixel;
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/ElectronEoverPTracking.py b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/ElectronEoverPTracking.py
index 1f0bbb6f0db6ec7d84704bb4b7684d7fa9b68d83..185ccb2ab821dae8cff73a54623fa5e5ecfdc552 100755
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/ElectronEoverPTracking.py
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/ElectronEoverPTracking.py
@@ -30,7 +30,7 @@ from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__SCT_ClusterOnTr
 SCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool ("SCT_ClusterOnTrackTool",
                                                         CorrectionStrategy = 0,  # do correct position bias
                                                         ErrorStrategy      = 2,  # do use phi dependent errors
-                                                        orentzAngleTool   = ToolSvc.SCTLorentzAngleTool)
+                                                        LorentzAngleTool   = ToolSvc.SCTLorentzAngleTool)
 ToolSvc += SCT_ClusterOnTrackTool
 #
 # default ROT creator, not smart !
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonWenu.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonWenu.cxx
index 04bc2f010d935ca1eb5c43d6158ac81e63576417..4c43b8d5420aa59869eb0e80d669a8c958609db5 100755
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonWenu.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonWenu.cxx
@@ -24,11 +24,8 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/TRT_ID.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/TRT_DetectorManager.h"
 
-#include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "TrkTrack/TrackCollection.h"
 #include "InDetRIO_OnTrack/SiClusterOnTrack.h"
 #include "InDetPrepRawData/SiCluster.h"
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZee.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZee.cxx
index d1b047acdecf1616d37a1ece3ee7b38004df1a4a..b5316fdd5faa641933eb64d3173ea8df0e6b41f1 100755
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZee.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZee.cxx
@@ -25,11 +25,8 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/TRT_ID.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/TRT_DetectorManager.h"
 
-#include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "TrkTrack/TrackCollection.h"
 #include "InDetRIO_OnTrack/SiClusterOnTrack.h"
 #include "InDetPrepRawData/SiCluster.h"
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTErrMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTErrMonTool.h
index f5d8007cbc25fc2d78bd1e0c2a236cdeba487386..73b3773a50361d9830c00b400f8437879c193386 100755
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTErrMonTool.h
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTErrMonTool.h
@@ -293,7 +293,7 @@ class SCTErrMonTool : public ManagedMonitorToolBase
   TProfile * m_TotalDetectorCoverageVsLB;
 
   SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey;
-  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_sctDetEleCollKey{this, "SctDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 };
 
 #endif
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h
index 8ff34341ad9588e567f415f4c7fddd1b9a3a0594..699558123745c0c1ebb4f46c86717c1c19725c2a 100755
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h
@@ -287,7 +287,7 @@ private:
 
   SG::ReadHandleKey<ComTime> m_comTimeName;
   SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey;
-  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_sctDetEleCollKey{this, "SctDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
   /**Convert a layer/disk number (0-21) to a bec index (0,1,2) according to position of that layer
    * Numbering is counter-intuitive, would expect C then B then A; in fact the original ordering was A, C, B
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTLorentzMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTLorentzMonTool.h
index abd965bdfa8786d359a3765b9ff4586e5898a8b4..5a46dbb622d46817a26761fbe15b62e2480eb0c7 100755
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTLorentzMonTool.h
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTLorentzMonTool.h
@@ -102,7 +102,7 @@ private:
   //@}
   /// Name of the Track collection to use
   SG::ReadHandleKey<TrackCollection> m_tracksName;
-  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_sctDetEleCollKey{this, "SctDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
   //@name Service members
   //@{
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h
index 7b36072e9bb1325d4b107ed3c2ad03fd6a37f424..602e0701b0f1977a73963f3c15c9d72e31821e48 100755
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h
@@ -28,7 +28,6 @@
 
 #include "SCT_Monitoring/SCTMotherTrigMonTool.h"
 #include "SCT_Monitoring/SCT_MonitoringNumbers.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "InDetConditionsSummaryService/IInDetConditionsTool.h"
 
@@ -240,8 +239,6 @@ private:
   SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey;
   ///SCT Helper class
   const SCT_ID* m_pSCTHelper;
-  //SCT Detector Manager
-  const InDetDD::SCT_DetectorManager* m_sctmgr;
   ToolHandle<IInDetConditionsTool> m_pSummaryTool{this, "conditionsTol",
       "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT Conditions Summary"};
   bool                                     m_checkBadModules;
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/strippedDown.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/strippedDown.py
index b03a7aed3f2d1db343d64098f290fae8e91b7489..eb853c6edce61e60b1af01b562b179b4aa8425bb 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/strippedDown.py
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/strippedDown.py
@@ -81,7 +81,6 @@ from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__SCT_C
 InDetSCT_Clusterization = InDet__SCT_Clusterization(name                = "InDetSCT_Clusterization",
                                                           clusteringTool      = InDetSCT_ClusteringTool,
                                                           #ChannelStatus       = InDetSCT_ChannelStatusAlg,
-                                                          DetectorManagerName = "SCT_Manager", 
                                                           DataObjectName      = "SCT_RDOs",
                                                           ClustersName        = "SCT_Clusters")
 topSequence += InDetSCT_Clusterization
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx
index 6db79ff59dc38ba5a50f746c6f02bf5d446e940e..3345d950b992dd99a0f5660e93db88da401113e0 100755
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx
@@ -34,7 +34,6 @@
 #include "AthContainers/DataVector.h"
 #include "Identifier/Identifier.h"
 #include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "cArrayUtilities.h"
 #include "StoreGate/ReadCondHandle.h"
@@ -266,7 +265,7 @@ StatusCode SCTErrMonTool::initialize() {
   ATH_CHECK( m_dataObjectName.initialize() );
   ATH_CHECK( m_eventInfoKey.initialize() );
 
-  ATH_CHECK(m_sctDetEleCollKey.initialize());
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
 
   return ManagedMonitorToolBase::initialize();
 }
@@ -2694,10 +2693,10 @@ bool SCTErrMonTool::SyncErrorSCT()
 
   m_errorGeoSCT.clear();
 
-  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_sctDetEleCollKey);
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
   const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
   if (elements==nullptr) {
-    ATH_MSG_ERROR(m_sctDetEleCollKey.fullKey() << " could not be retrieved in SyncDisabledSCT()");
+    ATH_MSG_ERROR(m_SCTDetEleCollKey.fullKey() << " could not be retrieved in SyncErrorSCT()");
     return false;
   }
 
@@ -2737,10 +2736,10 @@ bool SCTErrMonTool::SyncDisabledSCT()
 
   m_disabledGeoSCT.clear();
 
-  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_sctDetEleCollKey);
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
   const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
   if (elements==nullptr) {
-    ATH_MSG_ERROR(m_sctDetEleCollKey.fullKey() << " could not be retrieved in SyncDisabledSCT()");
+    ATH_MSG_ERROR(m_SCTDetEleCollKey.fullKey() << " could not be retrieved in SyncDisabledSCT()");
     return false;
   }
 
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx
index bb6ff06f04459b5e3145f17f078eb69c4008a5b1..eef5476ec55f092d1da1d4fa3103560a5ecb0166 100755
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx
@@ -36,7 +36,6 @@
 #include "InDetIdentifier/PixelID.h"
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/TRT_ID.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 // Conditions
 #include "InDetConditionsSummaryService/InDetHierarchy.h"
@@ -366,7 +365,7 @@ SCTHitEffMonTool::initialize() {
   ATH_CHECK( m_TrackName.initialize() );
   ATH_CHECK( m_sctContainerName.initialize() );
 
-  ATH_CHECK(m_sctDetEleCollKey.initialize());
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
 
   return StatusCode::SUCCESS;
 }
@@ -1137,10 +1136,10 @@ SCTHitEffMonTool::fillHistograms() {
     }
   }
 
-  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_sctDetEleCollKey);
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
   const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
   if (elements==nullptr) {
-    ATH_MSG_FATAL(m_sctDetEleCollKey.fullKey() << " could not be retrieved in SyncDisabledSCT()");
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved in fillHistograms()");
     return StatusCode::FAILURE;
   }
 
@@ -1811,10 +1810,10 @@ StatusCode
 SCTHitEffMonTool::procHistograms() {                                                                             // hidetoshi
                                                                                                                  // 14.01.22
   if (m_superDetailed) {
-    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_sctDetEleCollKey);
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
     const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
     if (elements==nullptr) {
-      ATH_MSG_FATAL(m_sctDetEleCollKey.fullKey() << " could not be retrieved in SyncDisabledSCT()");
+      ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved in SyncDisabledSCT()");
       return StatusCode::FAILURE;
     }
 
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTLorentzMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTLorentzMonTool.cxx
index 2d56ba68e1374e6683f6b30668fb583ffc484ff3..89c736c16e8045022801c632ec6b4d0a0f2102e3 100755
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTLorentzMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTLorentzMonTool.cxx
@@ -26,7 +26,6 @@
 #include "AthContainers/DataVector.h"
 #include "Identifier/Identifier.h"
 #include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetRIO_OnTrack/SiClusterOnTrack.h"
 #include "InDetPrepRawData/SiCluster.h"
 #include "TrkParameters/TrackParameters.h"
@@ -82,7 +81,7 @@ StatusCode SCTLorentzMonTool::initialize() {
   ATH_CHECK(detStore()->retrieve(m_pSCTHelper, "SCT_ID"));
 
   ATH_CHECK( m_tracksName.initialize() );
-  ATH_CHECK(m_sctDetEleCollKey.initialize());
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
 
   ATH_CHECK(m_trackToVertexTool.retrieve());
 
@@ -165,10 +164,10 @@ SCTLorentzMonTool::fillHistograms() {
 
   ATH_MSG_DEBUG("enters fillHistograms");
 
-  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_sctDetEleCollKey);
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
   const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
   if (elements==nullptr) {
-    ATH_MSG_WARNING(m_sctDetEleCollKey.fullKey() << " could not be retrieved");
+    ATH_MSG_WARNING(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
     return StatusCode::SUCCESS;
   }
 
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx
index 0c0129d1da445df0cd245f0e4988891536416a2a..3824956f2ec8d999d047c29cbd3041933605ddf3 100755
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx
@@ -228,7 +228,6 @@ SCTRatioNoiseMonTool::SCTRatioNoiseMonTool(const string &type,
   m_dataObjectName(std::string("SCT_RDOs")),
   m_eventInfoKey(std::string("EventInfo")),
   m_pSCTHelper(nullptr),
-  m_sctmgr(nullptr),
   m_checkBadModules(true),
   m_ignore_RDO_cut_online(true) {
   /** sroe 3 Sept 2015:
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h
index fecf2dd78f7368913b79db39d28f425bb2619723..b68889d2b6c1b8cfe90e1e91a7de68d6a1a48850 100644
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h
@@ -40,15 +40,9 @@
 
 class SCT_ID;
 class SCT_ChannelStatusAlg;
-class SiDetectorManager;
 class ISvcLocator;
 class StatusCode;
 
-namespace InDetDD{
-  class SiDetectorManager;
-}
-
-
 namespace InDet {
 /**
  *    @class SCT_Clusterization
@@ -81,7 +75,6 @@ private:
   //@}
 
   ToolHandle< ISCT_ClusteringTool >        m_clusteringTool;       //!< Clustering algorithm
-  std::string                              m_managerName;   //REMOVE LATER       //!< Detector manager name in StoreGate
   const SCT_ID*                            m_idHelper;
 
   SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey;
@@ -94,7 +87,6 @@ private:
   SG::WriteHandleKey<SCT_ClusterContainer> m_clusterContainerKey;
   SG::WriteHandleKey<SiClusterContainer> m_clusterContainerLinkKey;
   SG::WriteHandleKey<SCT_FlaggedCondData> m_flaggedCondDataKey;
-  const InDetDD::SiDetectorManager*        m_manager;
   unsigned int                             m_maxRDOs;
   ToolHandle<IInDetConditionsTool>         m_pSummaryTool{this, "conditionsTool",
       "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT conditions summary"};
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx
index 5761c69ab62026705a4714d482ff72a6f5f4be7c..a410c252c69f565401653d310d854d21e4674d7a 100644
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx
@@ -13,7 +13,6 @@
 #include "InDetPrepRawData/SCT_ClusterCollection.h"
 #include "InDetRawData/SCT_RDORawData.h"
 #include "InDetRawData/SCT_RDO_Container.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "AtlasDetDescr/AtlasDetectorID.h"    
 #include "InDetIdentifier/SCT_ID.h"
 #include "SiClusterizationTool/ISCT_ClusteringTool.h"
@@ -37,7 +36,6 @@ namespace InDet{
     m_clusterContainerKey("SCT_Clusters"),
     m_clusterContainerLinkKey("SCT_Clusters"),
     m_flaggedCondDataKey("SCT_FlaggedCondData"),
-    m_manager(nullptr),
     m_maxRDOs(384), //(77),
     m_checkBadModules(true),
     m_flaggedModules(),
@@ -46,7 +44,6 @@ namespace InDet{
   {  
   // Get parameter values from jobOptions file    
     declareProperty("DataObjectName", m_rdoContainerKey, "SCT RDOs" );
-    declareProperty("DetectorManagerName",m_managerName);
     declareProperty("clusteringTool",m_clusteringTool);    //inconsistent nomenclature!
     declareProperty("RoIs", m_roiCollectionKey, "RoIs to read in");
     declareProperty("isRoI_Seeded", m_roiSeeded, "Use RoI");
@@ -84,9 +81,6 @@ namespace InDet{
     // Get the clustering tool
     ATH_CHECK (m_clusteringTool.retrieve());
 
-    // Get the SCT manager
-    ATH_CHECK (detStore()->retrieve(m_manager,"SCT"));
-
     // Get the SCT ID helper
     ATH_CHECK (detStore()->retrieve(m_idHelper,"SCT_ID"));
 
@@ -169,7 +163,7 @@ namespace InDet{
               continue;
             }
             // Use one of the specific clustering AlgTools to make clusters    
-            std::unique_ptr<SCT_ClusterCollection> clusterCollection ( m_clusteringTool->clusterize(*rd,*m_manager,*m_idHelper));
+            std::unique_ptr<SCT_ClusterCollection> clusterCollection ( m_clusteringTool->clusterize(*rd,*m_idHelper));
             if (clusterCollection) { 
               if (not clusterCollection->empty()) {
                 const IdentifierHash hash(clusterCollection->identifyHash());
@@ -207,7 +201,7 @@ namespace InDet{
               continue;
             }
           // Use one of the specific clustering AlgTools to make clusters
-            std::unique_ptr<SCT_ClusterCollection> clusterCollection (m_clusteringTool->clusterize(*RDO_Collection, *m_manager, *m_idHelper));
+            std::unique_ptr<SCT_ClusterCollection> clusterCollection (m_clusteringTool->clusterize(*RDO_Collection, *m_idHelper));
             if (clusterCollection && !clusterCollection->empty()){
               ATH_MSG_VERBOSE( "REGTEST: SCT : clusterCollection contains " 
                 << clusterCollection->size() << " clusters" );
diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h
index 0232444ed295235f90fdbbd77106f46a66435dfa..823c20ef610514c6b4b7d3f6a748d5a96285c3f2 100755
--- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h
+++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h
@@ -47,24 +47,26 @@
 #define SiSpacePointFormation_SI_POINT_FINDER_H
 
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
+
 #include "AthContainers/DataVector.h"
+#include "GeoPrimitives/GeoPrimitives.h"
 #include "Identifier/Identifier.h"
-
-#include "SiSpacePointTool/SiSpacePointMakerTool.h"
 #include "InDetPrepRawData/PixelClusterCollection.h"
 #include "InDetPrepRawData/SCT_ClusterCollection.h"
-#include "TrkSpacePoint/SpacePoint.h" 
-#include <string>
+#include "InDetPrepRawData/SCT_ClusterContainer.h"
 #include "InDetPrepRawData/SiClusterContainer.h"
 #include "InDetPrepRawData/PixelClusterContainer.h"
-#include "InDetPrepRawData/SCT_ClusterContainer.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "SiSpacePointFormation/SiElementPropertiesTable.h"
+#include "SiSpacePointTool/SiSpacePointMakerTool.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "TrkSpacePoint/SpacePoint.h"
 #include "TrkSpacePoint/SpacePointContainer.h"
-#include "GeoPrimitives/GeoPrimitives.h"
 
-#include "StoreGate/ReadCondHandleKey.h"
-#include "SiSpacePointFormation/SiElementPropertiesTable.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
+#include <string>
 
 class Event;
 class SpacePointCollection; 
@@ -76,11 +78,6 @@ class SCT_ID;
 class PixelID;
 class IBeamCondSvc;
 
-namespace InDetDD {
-  class SCT_DetectorManager;
-  class PixelDetectorManager;
-}
-
 namespace InDet {
 
   class SiTrackerSpacePointFinder:public AthReentrantAlgorithm {
@@ -116,17 +113,22 @@ namespace InDet {
     void addSCT_SpacePoints
       (const SCT_ClusterCollection* next,
        const SiElementPropertiesTable* properties,
+       const InDetDD::SiDetectorElementCollection* elements,
        SpacePointCollection* spacepointCollection, SpacePointOverlapCollection* spacepointOverlapCollection, SPFCache&) const; 
 
     void checkForSCT_Points
       (const SCT_ClusterCollection* clusters1,
-       const IdentifierHash id2, double minDiff, double maxDiff,
+       const IdentifierHash id2,
+       const InDetDD::SiDetectorElementCollection* elements,
+       double minDiff, double maxDiff,
        SpacePointCollection* spacepointCollection, bool overlapColl, SpacePointOverlapCollection* spacepointOverlapCollection, SPFCache&) const; 
 
     void checkForSCT_Points
       (const SCT_ClusterCollection* clusters1, 
-     const IdentifierHash id2, double min1, double max1,
-     double min2, double max2, SpacePointOverlapCollection* spacepointOverlapCollection, SPFCache&) const;
+       const IdentifierHash id2,
+       const InDetDD::SiDetectorElementCollection* elements,
+       double min1, double max1,
+       double min2, double max2, SpacePointOverlapCollection* spacepointOverlapCollection, SPFCache&) const;
     
 
     // data members
@@ -159,8 +161,6 @@ namespace InDet {
     mutable std::atomic<int> m_sctCacheHits;
     mutable std::atomic<int> m_pixCacheHits;
     bool m_cachemode; //used for online MT counters
-    const InDetDD::SCT_DetectorManager* m_manager; 
-    // const InDetDD::PixelDetectorManager* m_managerPixel;     // unused
     const SCT_ID* m_idHelper;
     const PixelID* m_idHelperPixel;
     
@@ -171,6 +171,7 @@ namespace InDet {
     SG::UpdateHandleKey<SpacePointCache> m_SpacePointCache_PixKey;
     ToolHandle< SiSpacePointMakerTool > m_SiSpacePointMakerTool;
 
+    SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
     SG::ReadCondHandleKey<InDet::SiElementPropertiesTable> m_SCTPropertiesKey{this, "SCTPropertiesKey", "SCT_ElementPropertiesTable", "Key of input SiElementPropertiesTable for SCT"};
   };
 
diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.cxx b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.cxx
index 68d0b8533082de62015abf2b11597cdd6d1bb8c5..cfff38a7aec47ef81a5b276913c48df10eded197 100644
--- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.cxx
+++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.cxx
@@ -5,7 +5,6 @@
 #include "SiElementPropertiesTableCondAlg.h"
 
 #include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 
 #include <memory>
@@ -16,7 +15,6 @@ namespace InDet {
     : ::AthAlgorithm(name, pSvcLocator)
     , m_condSvc{"CondSvc", name}
     , m_idHelper{nullptr}
-    , m_detManager{nullptr}
 {
 }
 
@@ -34,7 +32,6 @@ namespace InDet {
     // Register write handle
     ATH_CHECK(m_condSvc->regHandle(this, m_writeKey));
 
-    ATH_CHECK(detStore()->retrieve(m_detManager, "SCT"));
     ATH_CHECK(detStore()->retrieve(m_idHelper, "SCT_ID"));
 
     return StatusCode::SUCCESS;
@@ -70,10 +67,6 @@ namespace InDet {
       return StatusCode::FAILURE;
     }
 
-    if (m_useDetectorManager) { // For debugging: use SiDetectorElementCollection from SCT_DetectorManager
-      readCdo = m_detManager->getDetectorElementCollection();
-    }
-
     // ____________ Construct new Write Cond Object ____________
     std::unique_ptr<InDet::SiElementPropertiesTable> writeCdo{std::make_unique<InDet::SiElementPropertiesTable>(*m_idHelper, *readCdo, m_epsWidth)};
 
diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.h b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.h
index fa25dec5df461873044ef8fd0fc3854753d7e763..7b1fbd908c83d00fdb628edf1774129db5655d47 100644
--- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.h
+++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.h
@@ -16,10 +16,6 @@
 
 class SCT_ID;
 
-namespace InDetDD {
-  class SCT_DetectorManager;
-}
-
 namespace InDet {
 
   class SiElementPropertiesTableCondAlg : public AthAlgorithm {
@@ -36,11 +32,9 @@ namespace InDet {
     SG::WriteCondHandleKey<InDet::SiElementPropertiesTable> m_writeKey{this, "WriteKey", "SCT_ElementPropertiesTable", "Key of output SiElementPropertiesTable for SCT"};
 
     FloatProperty m_epsWidth{this, "EpsWidth", 0.02, "Safety margin for half-widths, in cm"};
-    BooleanProperty m_useDetectorManager{this, "UseDetectorManager", true/*false*/, "Switch to use SiDetectorElementCollection from SCT_DetectorManager for debugging"};
 
     ServiceHandle<ICondSvc> m_condSvc;
     const SCT_ID* m_idHelper;
-    const InDetDD::SCT_DetectorManager* m_detManager;
   };
 
 }
diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx
index 9b7180dfcb471ab7a4c9e9deac38b9dee39194ce..2e3ecf2eb40b2f7bdad6ee97008f597dd70e7080 100755
--- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx
+++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx
@@ -13,11 +13,9 @@ ATLAS Collaboration
 #include "SiSpacePointFormation/SiTrackerSpacePointFinder.h"
 
 // For processing clusters
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiLocalPosition.h"
 #include "InDetReadoutGeometry/SiDetectorDesign.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 
 // Space point Classes,
 #include "TrkSpacePoint/SpacePoint.h"
@@ -32,6 +30,7 @@ ATLAS Collaboration
 #include "AtlasDetDescr/AtlasDetectorID.h"
 #include "xAODEventInfo/EventInfo.h"
 #include "InDetBeamSpotService/IBeamCondSvc.h"
+#include "StoreGate/ReadCondHandle.h"
 
 namespace InDet {
 
@@ -57,7 +56,6 @@ namespace InDet {
     m_numberOfEvents(0), m_numberOfPixel(0), m_numberOfSCT(0),
     m_sctCacheHits(0), m_pixCacheHits(0),
     m_cachemode(false),
-    m_manager(0),
     m_idHelper(nullptr),
     m_idHelperPixel(nullptr),
     m_SpacePointContainer_SCTKey("SCT_SpacePoints"),
@@ -146,11 +144,9 @@ StatusCode SiTrackerSpacePointFinder::initialize()
   if (m_selectSCTs) {
     ATH_CHECK(detStore()->retrieve(m_idHelper,"SCT_ID"));
 
-    // also need the SCT Manager to get the detectorElementCollection
-    ATH_CHECK(detStore()->retrieve(m_manager,"SCT"));
-
-    // Initialize the key of input SiElementPropertiesTable for SCT
+    // Initialize the key of input SiElementPropertiesTable and SiDetectorElementCollection for SCT
     ATH_CHECK(m_SCTPropertiesKey.initialize());
+    ATH_CHECK(m_SCTDetEleCollKey.initialize());
   }
 
   ATH_CHECK(m_SiSpacePointMakerTool.retrieve());
@@ -178,8 +174,15 @@ StatusCode SiTrackerSpacePointFinder::execute_r (const EventContext& ctx) const
 
 
   ++m_numberOfEvents;
+  const InDetDD::SiDetectorElementCollection* elements = nullptr;
   const SiElementPropertiesTable* properties = nullptr;
   if (m_selectSCTs) {
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey, ctx);
+    elements = sctDetEle.retrieve();
+    if (elements==nullptr) {
+      ATH_MSG_FATAL("Pointer of SiDetectorElementCollection (" << m_SCTDetEleCollKey.fullKey() << ") could not be retrieved");
+      return StatusCode::SUCCESS;
+    }
     SG::ReadCondHandle<SiElementPropertiesTable> sctProperties(m_SCTPropertiesKey, ctx);
     properties = sctProperties.retrieve();
     if (properties==nullptr) {
@@ -267,7 +270,7 @@ StatusCode SiTrackerSpacePointFinder::execute_r (const EventContext& ctx) const
       spacepointCollection->setIdentifier(elementID);
 
       if ( colNext->size() != 0){
-        addSCT_SpacePoints(colNext, properties,
+        addSCT_SpacePoints(colNext, properties, elements,
                            spacepointCollection.get(), spacepointoverlapCollection.ptr(), r_cache);
       } else {
         ATH_MSG_DEBUG( "Empty SCT cluster collection" );
@@ -390,6 +393,7 @@ StatusCode SiTrackerSpacePointFinder::finalize()
 void SiTrackerSpacePointFinder::
 addSCT_SpacePoints(const SCT_ClusterCollection* next,
                    const SiElementPropertiesTable* properties,
+                   const InDetDD::SiDetectorElementCollection* elements,
     SpacePointCollection* spacepointCollection, SpacePointOverlapCollection* spacepointOverlapCollection, SPFCache &r_cache) const
 {
 
@@ -397,7 +401,7 @@ addSCT_SpacePoints(const SCT_ClusterCollection* next,
   IdentifierHash thisHash(next->identifyHash());
 
   // if it is not the stereo side
-  const InDetDD::SiDetectorElement *element = m_manager->getDetectorElement(thisHash);
+  const InDetDD::SiDetectorElement *element = elements->getDetectorElement(thisHash);
   if (element && !(element->isStereo())){
     //if (m_idHelper->side(thisID)==1){
     // Space points are created from clusters for all possibly
@@ -416,8 +420,9 @@ addSCT_SpacePoints(const SCT_ClusterCollection* next,
     bool overlapColl = false;
     // check opposite wafer
     checkForSCT_Points(next, *otherHash,
-        -m_overlapLimitOpposite, +m_overlapLimitOpposite,
-        spacepointCollection,overlapColl,spacepointOverlapCollection, r_cache);
+                       elements,
+                       -m_overlapLimitOpposite, +m_overlapLimitOpposite,
+                       spacepointCollection,overlapColl,spacepointOverlapCollection, r_cache);
 
     if (! m_overlap) return;
 
@@ -429,13 +434,15 @@ addSCT_SpacePoints(const SCT_ClusterCollection* next,
     // half-width of wafer
 
     checkForSCT_Points(next, *otherHash,
-        -hwidth, -hwidth+m_overlapLimitPhi,
-        +hwidth-m_overlapLimitPhi, +hwidth,spacepointOverlapCollection, r_cache);
+                       elements,
+                       -hwidth, -hwidth+m_overlapLimitPhi,
+                       +hwidth-m_overlapLimitPhi, +hwidth,spacepointOverlapCollection, r_cache);
     ++otherHash;
     if (otherHash == others->end() ) return;
     checkForSCT_Points(next, *otherHash,
-        +hwidth-m_overlapLimitPhi, +hwidth,
-        -hwidth, -hwidth+m_overlapLimitPhi,spacepointOverlapCollection, r_cache);
+                       elements,
+                       +hwidth-m_overlapLimitPhi, +hwidth,
+                       -hwidth, -hwidth+m_overlapLimitPhi,spacepointOverlapCollection, r_cache);
 
     // if barrel, check the eta overlaps too.
     // In this case, action depends on whether layer is even or odd
@@ -452,26 +459,34 @@ addSCT_SpacePoints(const SCT_ClusterCollection* next,
       //if (m_idHelper->layer_disk(thisID)==0 || m_idHelper->layer_disk(thisID)==2)
       if (m_idHelper->layer_disk(thisID)%2 == 0)
       {
-        checkForSCT_Points(next, *otherHash, +m_overlapLimitEtaMin, 
-            +m_overlapLimitEtaMax,
-            spacepointCollection,overlapColl,spacepointOverlapCollection, r_cache);
+        checkForSCT_Points(next, *otherHash,
+                           elements,
+                           +m_overlapLimitEtaMin,
+                           +m_overlapLimitEtaMax,
+                           spacepointCollection,overlapColl,spacepointOverlapCollection, r_cache);
         ++otherHash;
         if (otherHash == others->end() )  return;
 
-        checkForSCT_Points(next, *otherHash, -m_overlapLimitEtaMax, 
-            -m_overlapLimitEtaMin,
-            spacepointCollection,overlapColl,spacepointOverlapCollection, r_cache);
+        checkForSCT_Points(next, *otherHash,
+                           elements,
+                           -m_overlapLimitEtaMax,
+                           -m_overlapLimitEtaMin,
+                           spacepointCollection,overlapColl,spacepointOverlapCollection, r_cache);
       }else{
-        checkForSCT_Points(next, *otherHash, -m_overlapLimitEtaMax, 
-            -m_overlapLimitEtaMin,
-            spacepointCollection,overlapColl,spacepointOverlapCollection, r_cache);
+        checkForSCT_Points(next, *otherHash,
+                           elements,
+                           -m_overlapLimitEtaMax,
+                           -m_overlapLimitEtaMin,
+                           spacepointCollection,overlapColl,spacepointOverlapCollection, r_cache);
         ++otherHash;
         if (otherHash == others->end() )  return;
 
 
-        checkForSCT_Points(next, *otherHash, +m_overlapLimitEtaMin,
-            +m_overlapLimitEtaMax,
-            spacepointCollection,overlapColl,spacepointOverlapCollection, r_cache);
+        checkForSCT_Points(next, *otherHash,
+                           elements,
+                           +m_overlapLimitEtaMin,
+                           +m_overlapLimitEtaMax,
+                           spacepointCollection,overlapColl,spacepointOverlapCollection, r_cache);
       }
     }
   }
@@ -481,8 +496,10 @@ addSCT_SpacePoints(const SCT_ClusterCollection* next,
 
 void SiTrackerSpacePointFinder::
 checkForSCT_Points(const SCT_ClusterCollection* clusters1,
-    const IdentifierHash id2, double min, double max,
-    SpacePointCollection* spacepointCollection, bool overlapColl, SpacePointOverlapCollection* spacepointOverlapCollection, SPFCache &r_cache) const
+                   const IdentifierHash id2,
+                   const InDetDD::SiDetectorElementCollection* elements,
+                   double min, double max,
+                   SpacePointCollection* spacepointCollection, bool overlapColl, SpacePointOverlapCollection* spacepointOverlapCollection, SPFCache &r_cache) const
 {
 
 
@@ -495,16 +512,17 @@ checkForSCT_Points(const SCT_ClusterCollection* clusters1,
   if (clusters2==nullptr) return;
 
   if (!overlapColl) {
-    m_SiSpacePointMakerTool->fillSCT_SpacePointCollection(clusters1, clusters2, min, max, m_allClusters, r_cache.vertex, m_manager, spacepointCollection);
+    m_SiSpacePointMakerTool->fillSCT_SpacePointCollection(clusters1, clusters2, min, max, m_allClusters, r_cache.vertex, elements, spacepointCollection);
   }
   else {
-    m_SiSpacePointMakerTool->fillSCT_SpacePointEtaOverlapCollection(clusters1, clusters2, min, max, m_allClusters, r_cache.vertex, m_manager, spacepointOverlapCollection);
+    m_SiSpacePointMakerTool->fillSCT_SpacePointEtaOverlapCollection(clusters1, clusters2, min, max, m_allClusters, r_cache.vertex, elements, spacepointOverlapCollection);
   }
 }
 //--------------------------------------------------------------------------
 void SiTrackerSpacePointFinder::
 checkForSCT_Points(const SCT_ClusterCollection* clusters1,
-    const IdentifierHash id2,
+                   const IdentifierHash id2,
+                   const InDetDD::SiDetectorElementCollection* elements,
     double min1, double max1, double min2, double max2, SpacePointOverlapCollection* spacepointOverlapCollection, SPFCache &r_cache) const
 {
 
@@ -514,7 +532,7 @@ checkForSCT_Points(const SCT_ClusterCollection* clusters1,
   const SCT_ClusterCollection * clusters2 (r_cache.SCTCContainer->indexFindPtr(id2));
   if (clusters2==nullptr) return;
 
-  m_SiSpacePointMakerTool->fillSCT_SpacePointPhiOverlapCollection(clusters1, clusters2, min1, max1, min2, max2, m_allClusters, r_cache.vertex, m_manager, spacepointOverlapCollection);
+  m_SiSpacePointMakerTool->fillSCT_SpacePointPhiOverlapCollection(clusters1, clusters2, min1, max1, min2, max2, m_allClusters, r_cache.vertex, elements, spacepointOverlapCollection);
 }
 
 } //namespace
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/CMakeLists.txt b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/CMakeLists.txt
index 1a266f90c44c26f50713323d03226f74f061cbe1..7635b18fc8136c9a70691a1e3e7d39b26356c4e7 100644
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/CMakeLists.txt
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/CMakeLists.txt
@@ -28,17 +28,14 @@ atlas_depends_on_subdirs( PUBLIC
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( Eigen )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread TMVA )
+find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
-atlas_add_library( InDetVKalVxInJetTool 
+atlas_add_component( InDetVKalVxInJetTool
                      src/*.cxx
                      src/components/*.cxx
-		     PUBLIC_HEADERS InDetVKalVxInJetTool
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps xAODTracking GaudiKernel 
-		        InDetRecToolInterfaces Particle TrkVKalVrtFitterLib GeoPrimitives AnalysisUtilsLib TrkNeutralParameters 
-		        TrkParticleBase TrkTrackSummary VxSecVertex VxVertex TrkToolInterfaces TrkVertexFitterInterfaces PathResolver )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps xAODTracking GaudiKernel InDetRecToolInterfaces Particle TrkVKalVrtFitterLib GeoPrimitives AnalysisUtilsLib TrkNeutralParameters TrkParticleBase TrkTrackSummary VxSecVertex VxVertex TrkToolInterfaces TrkVertexFitterInterfaces )
 
 # Install files from the package:
 atlas_install_headers( InDetVKalVxInJetTool )
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetTrkInJetType.h b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetTrkInJetType.h
deleted file mode 100644
index f192f9ef81402a3383385b03a531d4490b338b8b..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetTrkInJetType.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-//
-// InDetTrkInJetType.h - Description
-//
-/*
-   Tool to classify track origins in a jet.
-   Track types:
-    0 -  Heavy Flavour         (Signal)
-    1 -  Fragmentation tracks  (Fragment)
-    2 -  Garbage    (Interactions+V0s+Pileup)
-    
-   The tool works for JetPt<2.5TeV.
-   Tool is trained using ttbar+Z'(1.5,3,5TeV)+JZ4,5,6 samples
-
-    Author: Vadim Kostyukhin
-    e-mail: vadim.kostyukhin@cern.ch
-*/
-#ifndef InDet_InDetTrkInJetType_H
-#define InDet_InDetTrkInJetType_H
-
-#include <vector>
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "TLorentzVector.h"
-#include "xAODTracking/TrackParticleContainer.h"
-#include  "TrkVKalVrtFitter/TrkVKalVrtFitter.h"
-#include  "Particle/TrackParticle.h"
-//
-
-namespace TMVA { class Reader; }
-
-namespace InDet {
-
-//------------------------------------------------------------------------
-  static const InterfaceID IID_IInDetTrkInJetType("IInDetTrkInJetType", 1, 0);
-
-  class IInDetTrkInJetType : virtual public IAlgTool {
-    public:
-      static const InterfaceID& interfaceID() { return IID_IInDetTrkInJetType;}
-//---------------------------------------------------------------------------
-//Interface itself
-
-      virtual std::vector<float> trkTypeWgts( const xAOD::TrackParticle *, const xAOD::Vertex &, const TLorentzVector &) =0;
-      virtual std::vector<float> trkTypeWgts( const Rec::TrackParticle *, const xAOD::Vertex &, const TLorentzVector &) =0;
-
-  };
-
-
-
-
-  class InDetTrkInJetType : public AthAlgTool, virtual public IInDetTrkInJetType
-  {
-
-   public:
-       /* Constructor */
-      InDetTrkInJetType(const std::string& type, const std::string& name, const IInterface* parent);
-       /* Destructor */
-      virtual ~InDetTrkInJetType();
-
-
-      StatusCode initialize();
-      StatusCode finalize();
-
-      std::vector<float> trkTypeWgts(const xAOD::TrackParticle *, const xAOD::Vertex &, const TLorentzVector &);
-      std::vector<float> trkTypeWgts(const Rec::TrackParticle *, const xAOD::Vertex &, const TLorentzVector &);
-
-//------------------------------------------------------------------------------------------------------------------
-// Private data and functions
-//
-
-   private:
-
-    TMVA::Reader* m_tmvaReader;
-    double m_trkMinPtCut;
-    float m_d0_limLow;
-    float m_d0_limUpp;
-    float m_Z0_limLow;
-    float m_Z0_limUpp;
-    std::string m_calibFileName;
-    ToolHandle < Trk::IVertexFitter >  m_fitterSvc;
-    Trk::TrkVKalVrtFitter*   m_fitSvc;
-
-    int m_initialised;
-
-    float m_prbS;
-    float m_Sig3D;
-    float m_prbP;
-    float m_d0;
-    float m_vChi2;
-    float m_pTvsJet;
-    float m_prodTJ;
-    float m_SigZ;
-    float m_SigR;
-    float m_ptjet;
-    float m_etajet;
-    float   m_ibl;
-    float   m_bl;
- };
-
-
-
-
-}  //end namespace
-#endif
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetVKalVxInJetTool.h b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetVKalVxInJetTool.h
index 303c8afcc14b75cf5397d86cbdb9f905d4a9d1f7..3f9491b17fdfca99ba4dc0e6db409fc6a418630a 100755
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetVKalVxInJetTool.h
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetVKalVxInJetTool.h
@@ -50,15 +50,13 @@
 #include  "xAODTracking/TrackParticleContainer.h"
 //
 //
+
 #include "InDetRecToolInterfaces/ISecVertexInJetFinder.h"
-//#include "InDetMaterialRejTool/InDetMaterialRejTool.h"
-#include "InDetVKalVxInJetTool/InDetTrkInJetType.h"
 
 class TH1D;
 class TH2D;
 class TH1F;
 class TProfile;
-class TTree;
 
 namespace Trk{
   class TrkVKalVrtFitter;
@@ -72,10 +70,12 @@ typedef std::vector<double> dvect;
 //------------------------------------------------------------------------
 namespace InDet {
 
+
   class VKalVxInJetTemp{
     public:
       std::vector<int> m_Incomp;
       std::vector<int> m_Prmtrack;
+
   };
 
   struct workVectorArrxAOD{
@@ -120,14 +120,6 @@ namespace InDet {
                                                 const TLorentzVector & jetMomentum,
                                                 const std::vector<const xAOD::IParticle*> & inputTracks) const;
 
-//--------------------------------------------- For package debugging
-  public:
-      void setVBTrk(std::vector<const xAOD::TrackParticle*> * BTrk) const { m_dbgVBTrk=BTrk; };
-  private:
-      int isBTrk(const xAOD::TrackParticle* prt) const
-        { if(!m_dbgVBTrk) return 0; if(std::find((*m_dbgVBTrk).begin(),(*m_dbgVBTrk).end(), prt) != (*m_dbgVBTrk).end()) return 1; return 0; }
-      int isBTrk(const Rec::TrackParticle*) const { return 0; }
-      mutable std::vector<const xAOD::TrackParticle*> *m_dbgVBTrk=0;
 //------------------------------------------------------------------------------------------------------------------
 // Private data and functions
 //
@@ -135,7 +127,6 @@ namespace InDet {
     private:
 
       double m_w_1;
-      TTree* m_tuple;
       TH1D* m_hb_massPiPi;
       TH1D* m_hb_massPiPi1;
       TH1D* m_hb_massPPi;
@@ -150,7 +141,6 @@ namespace InDet {
       TH1D* m_hb_impact;
       TH1D* m_hb_impactR;
       TH2D* m_hb_impactRZ;
-      TH1D* m_hb_trkD0;
       TH1D* m_hb_ntrkjet;
       TH1D* m_hb_impactZ;
       TH1D* m_hb_r2d;
@@ -171,6 +161,7 @@ namespace InDet {
       TH1D* m_hb_sig3D2tr;
       TH1D* m_hb_sig3DNtr;
       TH1D* m_hb_trkPtMax;
+      TH1D* m_hb_tr2SelVar;
       TH1F* m_hb_blshared;
       TH1F* m_hb_pxshared;
       TH1F* m_hb_rawVrtN;
@@ -178,7 +169,12 @@ namespace InDet {
       TH1F* m_hb_trkPErr;
       TH1F* m_hb_deltaRSVPV;
 //--
-      TProfile * m_pr_NSelTrkMean;
+      TH1D*  m_hb_massJetTrkSV;
+      TH1D*  m_hb_ratioJetTrkSV;
+      TH1D*  m_hb_DST_JetTrkSV;
+      TH1D*  m_hb_NImpJetTrkSV;
+      TH1D*  m_hb_nHImpTrkCnt;
+//--
       TProfile * m_pr_effVrt2tr;
       TProfile * m_pr_effVrt2trEta;
       TProfile * m_pr_effVrt;
@@ -191,61 +187,69 @@ namespace InDet {
 
 
 
-      long int m_cutSctHits;
-      long int m_cutPixelHits;
-      long int m_cutSiHits;
-      long int m_cutBLayHits;
-      long int m_cutSharedHits;
-      double m_cutPt;
-      double m_cutZVrt;
-      double m_cutA0;
-      double m_cutChi2;
-      double m_secTrkChi2Cut;
-      double m_coneForTag;
-      double m_sel2VrtChi2Cut;
-      double m_sel2VrtSigCut;
-      double m_trkSigCut;
-      double m_a0TrkErrorCut;
-      double m_zTrkErrorCut;
-      double m_cutHFClass;
-      double m_antiGarbageCut;
-
-      bool m_fillHist;
+      long int m_CutSctHits;
+      long int m_CutPixelHits;
+      long int m_CutSiHits;
+      long int m_CutBLayHits;
+      long int m_CutSharedHits;
+      double m_CutPt;
+      double m_CutZVrt;
+      double m_CutA0;
+      double m_CutChi2;
+      double m_SecTrkChi2Cut;
+      double m_ConeForTag;
+      double m_Sel2VrtChi2Cut;
+      double m_Sel2VrtSigCut;
+      double m_TrkSigCut;
+      double m_TrkSigNTrkDep;
+      double m_TrkSigSumCut;
+      double m_A0TrkErrorCut;
+      double m_ZTrkErrorCut;
+      double m_AntiPileupSigRCut;
+      double m_AntiPileupSigZCut;
+      double m_AntiFake2trVrtCut;
+      double m_JetPtFractionCut;
+      int    m_TrackInJetNumberLimit;
+      double m_pseudoSigCut;
+      double m_hadronIntPtCut;
+
+      bool m_FillHist;
 
       bool m_existIBL;
 
       long int m_RobustFit;
 
-      double m_beampipeX;
-      double m_beampipeY;
-      double m_xLayerB;
-      double m_yLayerB;
-      double m_xLayer1;
-      double m_yLayer1;
-      double m_xLayer2;
-      double m_yLayer2;
-      double m_beampipeR;
-      double m_rLayerB;
-      double m_rLayer1;
-      double m_rLayer2;
-      double m_rLayer3;
-
-//      bool     m_useMaterialRejection;
+      double m_Xbeampipe;
+      double m_Ybeampipe;
+      double m_XlayerB;
+      double m_YlayerB;
+      double m_Xlayer1;
+      double m_Ylayer1;
+      double m_Xlayer2;
+      double m_Ylayer2;
+      double m_Rbeampipe;
+      double m_RlayerB;
+      double m_Rlayer1;
+      double m_Rlayer2;
+      double m_Rlayer3;
+      double m_SVResolutionR;
+
+      bool     m_useMaterialRejection;
       bool     m_useVertexCleaning;
-      bool     m_multiVertex;
-      bool     m_multiWithPrimary;
+      int      m_MassType;
+      bool     m_MultiVertex;
+      bool     m_MultiWithPrimary;
       bool     m_getNegativeTail;
       bool     m_getNegativeTag;
-      bool     m_multiWithOneTrkVrt;
+      bool     m_MultiWithOneTrkVrt;
 
-      double    m_vertexMergeCut;
-      double    m_trackDetachCut;
+      double    m_VertexMergeCut;
+      double    m_TrackDetachCut;
 
 
       ToolHandle < Trk::IVertexFitter >       m_fitterSvc;
       Trk::TrkVKalVrtFitter*   m_fitSvc;
  
-      ToolHandle < IInDetTrkInJetType >       m_trackClassificator;
 
       double m_massPi ;
       double m_massP ;
@@ -253,70 +257,9 @@ namespace InDet {
       double m_massK0;
       double m_massLam;
       double m_massB;
-      mutable int m_NRefPVTrk;    //Measure of track in jet multiplicity
+      mutable int m_NRefTrk;    //Measure of track in jet multiplicity
       std::string m_instanceName;
 
-//-------------------------------------------
-//For ntuples (only for development/tuning!)
-
-      int getG4Inter( const  Rec::TrackParticle* TP ) const;
-      int getG4Inter( const xAOD::TrackParticle* TP ) const;
-      int getMCPileup(const  Rec::TrackParticle* TP ) const;
-      int getMCPileup(const xAOD::TrackParticle* TP ) const;
-
-      struct DevTuple 
-     { 
-       static const int maxNTrk=100;
-       int nTrkInJet;
-       float ptjet;
-       float etajet;
-       float phijet;
-       float p_prob[maxNTrk];
-       float s_prob[maxNTrk];
-       int   idMC[maxNTrk];
-       float SigR[maxNTrk];
-       float SigZ[maxNTrk];
-       float   d0[maxNTrk];
-       float   Z0[maxNTrk];
-       float pTvsJet[maxNTrk];
-       float  prodTJ[maxNTrk];
-       float    wgtB[maxNTrk];
-       float    wgtL[maxNTrk];
-       float    wgtG[maxNTrk];
-       float   Sig3D[maxNTrk];
-       int    chg[maxNTrk];
-       int  nVrtT[maxNTrk];
-       int  nVrt;
-       float VrtDist2D[maxNTrk];
-       float VrtSig3D[maxNTrk];
-       float VrtSig2D[maxNTrk];
-       float mass[maxNTrk];
-       float Chi2[maxNTrk];
-       int   itrk[maxNTrk];
-       int   jtrk[maxNTrk];
-       int badVrt[maxNTrk];
-       int    ibl[maxNTrk];
-       int     bl[maxNTrk];
-       int        NTHF;
-       int   itHF[maxNTrk];
-     };
-     DevTuple*  m_curTup;
-
-     struct Vrt2Tr 
-     {   int i=0, j=0;
-         int badVrt=0;
-         Amg::Vector3D     FitVertex;
-         TLorentzVector    Momentum;
-         long int   vertexCharge;
-         std::vector<double> ErrorMatrix;
-         std::vector<double> Chi2PerTrk;
-         std::vector< std::vector<double> > TrkAtVrt;
-         double Signif3D=0.;
-         double Signif3DProj=0.;
-         double Signif2D=0.;
-         double Chi2=0.;
-     };
-
 
 // For multivertex version only
 
@@ -324,34 +267,23 @@ namespace InDet {
       float m_chiScale[11];
       VKalVxInJetTemp*  m_WorkArray;     
       struct WrkVrt 
-      {   bool Good;
+     {   bool Good;
          std::deque<long int> SelTrk;
          Amg::Vector3D     vertex;
          TLorentzVector    vertexMom;
-         long int   vertexCharge=0;
+         long int   vertexCharge;
          std::vector<double> vertexCov;
          std::vector<double> Chi2PerTrk;
          std::vector< std::vector<double> > TrkAtVrt;
-         double Chi2=0.;
-         int nCloseVrt=0;
-         double dCloseVrt=0.;
-	 double ProjectedVrt=0.;
+         double Chi2;
+         int nCloseVrt;
+         double dCloseVrt;
+	 double ProjectedVrt;
          int detachedTrack=-1;
-      };
+	 };
 
 
 //
-//   Private struct for track oredering (happened to be not needed)
-//
-//     struct compareTrk {
-//        compareTrk(const TLorentzVector J):JetDir(J.Vect()){};
-//        bool operator() (const xAOD::TrackParticle* p1, const xAOD::TrackParticle*p2) { 
-//                double cmp1=p1->p4().Rho()*(1.-sin(p1->p4().Angle(JetDir)));
-//                double cmp2=p2->p4().Rho()*(1.-sin(p2->p4().Angle(JetDir)));
-//                return (cmp1>cmp2);  }
-//	TVector3 JetDir;
-//     };
-
 //   Private technical functions
 //
 //
@@ -374,6 +306,13 @@ namespace InDet {
 	                           const TLorentzVector                        & JetDir,
 	                           std::vector<double>                         & Results) const;
 
+      xAOD::Vertex* tryPseudoVertex(const std::vector<const xAOD::TrackParticle*>& Tracks,
+                                                      const xAOD::Vertex         & PrimVrt,
+                                                      const TLorentzVector       & JetDir,
+                                                      const TLorentzVector       & TrkJet,
+						      const int                  & nTrkLead,
+	                                              std::vector<double>        & Results)  const;
+
       void  TrackClassification(std::vector<WrkVrt> *WrkVrtSet, 
                                 std::vector< std::deque<long int> > *TrkInVrt) const;
 
@@ -397,7 +336,7 @@ namespace InDet {
 //
 // Gives correct mass assignment in case of nonequal masses
       double massV0( std::vector< std::vector<double> >& TrkAtVrt, double massP, double massPi ) const;
-      int FindMax( std::vector<double>& Chi2PerTrk, std::vector<float>&  rank) const;
+      int FindMax( std::vector<double>& Chi2PerTrk, std::vector<int>&  countT) const;
 
 
       TLorentzVector TotalMom(const std::vector<const Trk::Perigee*>& InpTrk) const; 
@@ -406,10 +345,8 @@ namespace InDet {
       double           TotalTMom(const std::vector<const Trk::Perigee*> & InpTrk) const; 
       double           TotalTVMom(const Amg::Vector3D &Dir, const std::vector<const Trk::Perigee*>& InpTrk) const; 
       double           pTvsDir(const Amg::Vector3D &Dir, const std::vector<double>& InpTrk) const; 
-      double           VrtRadiusError(const Amg::Vector3D & SecVrt, const std::vector<double>  & VrtErr) const;
 
-      bool  insideMatLayer(float ,float ) const;
-      void  fillVrtNTup( std::vector<Vrt2Tr>  & all2TrVrt) const;
+      bool   insideMatLayer(float ,float ) const;
 
       TLorentzVector GetBDir( const xAOD::TrackParticle* trk1,
                               const xAOD::TrackParticle* trk2,
@@ -427,8 +364,6 @@ namespace InDet {
                                   const std::vector<double> VrtErr,double& Signif ) const;
       double VrtVrtDist(const xAOD::Vertex & PrimVrt, const Amg::Vector3D & SecVrt, 
                                   const std::vector<double> VrtErr,double& Signif ) const;
-      double VrtVrtDist2D(const xAOD::Vertex & PrimVrt, const Amg::Vector3D & SecVrt, 
-                                  const std::vector<double> VrtErr,double& Signif ) const;
       double VrtVrtDist(const Trk::RecVertex & PrimVrt, const Amg::Vector3D & SecVrt, 
                                   const std::vector<double> SecVrtErr, const TLorentzVector & JetDir) const;
       double VrtVrtDist(const xAOD::Vertex & PrimVrt, const Amg::Vector3D & SecVrt, 
@@ -440,10 +375,8 @@ namespace InDet {
       void DisassembleVertex(std::vector<WrkVrt> *WrkVrtSet, int iv, 
                          std::vector<const Particle*>  AllTracks) const;
 					  
-      double ProjSV_PV(const Amg::Vector3D & SV, const xAOD::Vertex & PV, const TLorentzVector & Jet) const;
-
-      double RankBTrk(double TrkPt, double JetPt, double Signif) const;
- 
+      double ProjPos(const Amg::Vector3D & Vrt, const TLorentzVector & JetDir) const;
+      double ProjPosT(const Amg::Vector3D & Vrt, const TLorentzVector & JetDir) const;
 
       const Trk::Perigee* GetPerigee( const xAOD::TrackParticle* ) const;
       const Trk::Perigee* GetPerigee( const Rec::TrackParticle* ) const;
@@ -453,7 +386,7 @@ namespace InDet {
 
       template <class Trk>
       double FitCommonVrt(std::vector<const Trk*>& ListSecondTracks,
-                          std::vector<float>   & trkRank,
+                          std::vector<int>     & cntComb,
                           const xAOD::Vertex   & PrimVrt,
  	                  const TLorentzVector & JetDir,
                           std::vector<double>  & InpMass, 
@@ -463,10 +396,13 @@ namespace InDet {
 		     std::vector< std::vector<double> >  & TrkAtVrt) const; 
 
       template <class Trk>
-      void RemoveEntryInList(std::vector<const Trk*>& , std::vector<float>&, int) const;
+      void RemoveEntryInList(std::vector<const Trk*>& , std::vector<int>&, int) const;
       template <class Trk>
       void RemoveDoubleEntries(std::vector<const Trk*>& ) const;
 
+      template <class Trk>
+      double RemoveNegImpact(std::vector<const Trk*>& , const xAOD::Vertex &, const TLorentzVector&, const double ) const;
+
       template <class Particle>
       StatusCode RefitVertex( std::vector<WrkVrt> *WrkVrtSet, int SelectedVertex,
                               std::vector<const Particle*> & SelectedTracks) const;
@@ -492,6 +428,14 @@ namespace InDet {
                                 const xAOD::Vertex                           & PrimVrt,
 	                        const TLorentzVector                         & JetDir,
                                       std::vector<const xAOD::TrackParticle*>& SelPart) const;
+      int   SelGoodTrkParticleRelax( const std::vector<const Rec::TrackParticle*>& InpPart,
+                                const xAOD::Vertex                               & PrimVrt,
+	                        const TLorentzVector                             & JetDir,
+                                      std::vector<const Rec::TrackParticle*>& SelPart) const;
+      int   SelGoodTrkParticleRelax( const std::vector<const xAOD::TrackParticle*>& InpPart,
+                                const xAOD::Vertex                                & PrimVrt,
+	                        const TLorentzVector                              & JetDir,
+                                           std::vector<const xAOD::TrackParticle*>& SelPart) const;
 
 
       template <class Trk>
@@ -505,6 +449,7 @@ namespace InDet {
 
      Amg::MatrixX  makeVrtCovMatrix( std::vector<double> & ErrorMatrix ) const;
 
+     double trkPtCorr(double pT) const;
      Amg::MatrixX SetFullMatrix(int NTrk, std::vector<double> & Matrix) const;
 
 
@@ -517,9 +462,11 @@ namespace InDet {
      StatusCode VKalVrtFitFastBase(const std::vector<const xAOD::TrackParticle*>& listPart,Amg::Vector3D& Vertex) const;
 
      template <class Track>
-     bool  Check2TrVertexInPixel( const Track* p1, const Track* p2, Amg::Vector3D &, std::vector<double> &) const;
+     bool  Check2TrVertexInPixel( const Track* p1, const Track* p2, Amg::Vector3D &, double ) const;
+     template <class Track>
+     bool  Check1TrVertexInPixel( const Track* p1, Amg::Vector3D &) const;
      template <class Track>
-     bool  Check1TrVertexInPixel( const Track* p1, Amg::Vector3D &, std::vector<double> & ) const;
+     double medianPtF( std::vector<const Track*> & Trks) const;
 
      void  getPixelLayers(const  Rec::TrackParticle* Part, int &blHit, int &l1Hit, int &l2Hit, int &nLay) const;
      void  getPixelLayers(const xAOD::TrackParticle* Part, int &blHit, int &l1Hit, int &l2Hit, int &nLay) const;
@@ -549,17 +496,16 @@ namespace InDet {
                PartToBase(const std::vector<const Rec::TrackParticle*> & listPart) const;
      const std::vector<const Rec::TrackParticle*> 
                BaseToPart(const std::vector<const Trk::TrackParticleBase*> & listBase) const;
-     StatusCode GetTrkFitWeights(std::vector<double> & wgt) const;
    };
 
 
   template <class Trk>
-  void InDetVKalVxInJetTool::RemoveEntryInList(std::vector<const Trk*>& ListTracks, std::vector<float> & rank, int Outlier) const
+  void InDetVKalVxInJetTool::RemoveEntryInList(std::vector<const Trk*>& ListTracks, std::vector<int> &cnt, int Outlier) const
   {
     if(Outlier < 0 ) return;
     if(Outlier >= (int)ListTracks.size() ) return;
     ListTracks.erase( ListTracks.begin()+Outlier);
-    rank.erase( rank.begin()+Outlier);
+    cnt.erase( cnt.begin()+Outlier);
   }     
 
   template <class Trk>
@@ -588,39 +534,39 @@ namespace InDet {
   };
 
    template <class Track>
-   bool InDetVKalVxInJetTool::Check1TrVertexInPixel( const Track* p1, Amg::Vector3D &FitVertex, std::vector<double> &VrtCov)
+   bool InDetVKalVxInJetTool::Check1TrVertexInPixel( const Track* p1, Amg::Vector3D &FitVertex)
    const
    {
 	int blTrk=0, blP=0, l1Trk=0, l1P=0, l2Trk=0, nLays=0; 
         getPixelLayers( p1, blTrk , l1Trk, l2Trk, nLays );
         getPixelProblems(p1, blP, l1P );
-        double xDif=FitVertex.x()-m_xLayerB, yDif=FitVertex.y()-m_yLayerB ; 
+        double xDif=FitVertex.x()-m_XlayerB, yDif=FitVertex.y()-m_YlayerB ; 
         double Dist2DBL=sqrt(xDif*xDif+yDif*yDif);
-        if      (Dist2DBL < m_rLayerB-VrtRadiusError(FitVertex, VrtCov)){       //----------------------------------------- Inside B-layer
+        if      (Dist2DBL < m_RlayerB-m_SVResolutionR){       //----------------------------------------- Inside B-layer
           if( blTrk<1  && l1Trk<1  )  return false;
           if(  nLays           <2 )   return false;  // Less than 2 layers on track 0
 	  return true;
-        }else if(Dist2DBL > m_rLayerB+VrtRadiusError(FitVertex, VrtCov)){      //----------------------------------------- Outside b-layer
+        }else if(Dist2DBL > m_RlayerB+m_SVResolutionR){      //----------------------------------------- Outside b-layer
           if( blTrk>0 && blP==0 ) return false;  // Good hit in b-layer is present
        }
 // 
 // L1 and L2 are considered only if vertex is in acceptance
 //
 	if(fabs(FitVertex.z())<400.){
-          xDif=FitVertex.x()-m_xLayer1, yDif=FitVertex.y()-m_yLayer1 ;
+          xDif=FitVertex.x()-m_Xlayer1, yDif=FitVertex.y()-m_Ylayer1 ;
 	  double Dist2DL1=sqrt(xDif*xDif+yDif*yDif);
-          xDif=FitVertex.x()-m_xLayer2, yDif=FitVertex.y()-m_yLayer2 ; 
+          xDif=FitVertex.x()-m_Xlayer2, yDif=FitVertex.y()-m_Ylayer2 ; 
 	  double Dist2DL2=sqrt(xDif*xDif+yDif*yDif);
-          if      (Dist2DL1 < m_rLayer1-VrtRadiusError(FitVertex, VrtCov)) {   //------------------------------------------ Inside 1st-layer
+          if      (Dist2DL1 < m_Rlayer1-m_SVResolutionR) {   //------------------------------------------ Inside 1st-layer
              if( l1Trk<1  && l2Trk<1  )     return false;  // Less than 1 hits on track 0
              return true;
-          }else if(Dist2DL1 > m_rLayer1+VrtRadiusError(FitVertex, VrtCov)) {  //------------------------------------------- Outside 1st-layer
+          }else if(Dist2DL1 > m_Rlayer1+m_SVResolutionR) {  //------------------------------------------- Outside 1st-layer
 	     if( l1Trk>0 && l1P==0 )       return false;  //  Good L1 hit is present
           }
           
-          if      (Dist2DL2 < m_rLayer2-VrtRadiusError(FitVertex, VrtCov)) {  //------------------------------------------- Inside 2nd-layer
+          if      (Dist2DL2 < m_Rlayer2-m_SVResolutionR) {  //------------------------------------------- Inside 2nd-layer
 	     if( l2Trk==0 )  return false;           // At least one L2 hit must be present
-          }else if(Dist2DL2 > m_rLayer2+VrtRadiusError(FitVertex, VrtCov)) {  
+          }else if(Dist2DL2 > m_Rlayer2+m_SVResolutionR) {  
 	  //   if( l2Trk>0  )  return false;           // L2 hits are present
 	  }           
         } else {
@@ -631,6 +577,11 @@ namespace InDet {
         return true;
    }
 
+   template <class Track>
+   double InDetVKalVxInJetTool::medianPtF( std::vector<const Track*> & Trks) const{
+     int NT=Trks.size(); if(NT==0)return 0.;
+     return (Trks[(NT-1)/2]->pt()+Trks[NT/2]->pt())/2.;
+   }
 }  //end namespace
 
 #endif
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/Root/Train.C b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/Root/Train.C
deleted file mode 100644
index 62242ed720c222fbab0a0168d0a7b0e669cec9b3..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/Root/Train.C
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-/*-------------------------------------------------------------------------
-   Script for multiclass TMVA training using track origin information.
-   Don't forget to set AntiGarbageCut=1 in SSVF to create the training data.
-   Author: V.Kostyukhin
-*/
-#include <cstdlib>
-#include <iostream>
-#include <map>
-#include <string>
-
-#include "TChain.h"
-#include "TFile.h"
-#include "TTree.h"
-#include "TString.h"
-#include "TObjString.h"
-#include "TSystem.h"
-#include "TROOT.h"
-
-#include "TMVA/Factory.h"
-#include "TMVA/Tools.h"
-#include "TMVA/TMVAGui.h"
-
-
-void TrainMulti(  )
-{
-   TString outfileName( "TMVAMulti.root" );
-   TFile* outputFile = TFile::Open( outfileName, "RECREATE" );
-   TMVA::Factory *factory = new TMVA::Factory( "TMVAMulticlass", outputFile,
-                                               "!V:!Silent:Color:DrawProgressBar:Transformations=I;P;G,D:AnalysisType=multiclass" );
-   TMVA::DataLoader *dataloader=new TMVA::DataLoader("dataset");
-
-   //dataloader->AddVariable( "prbS", 'F' );
-   dataloader->AddVariable( "Sig3D", 'F' );
-   dataloader->AddVariable( "prbP", 'F' );
-   dataloader->AddVariable( "pTvsJet", 'F' );
-   //dataloader->AddVariable( "prodTJ", 'F' );
-   dataloader->AddVariable( "d0", 'F' );
-   dataloader->AddVariable( "SigR", 'F' );
-   dataloader->AddVariable( "SigZ", 'F' );
-   dataloader->AddVariable( "ptjet", 'F' );
-   dataloader->AddVariable( "ibl", 'I' );
-   dataloader->AddVariable( "bl", 'I' );
-   dataloader->AddVariable( "etajet", 'F' );
-   //dataloader->AddVariable( "vChi2", 'F' );
-   //dataloader->AddSpectator( "idMC",  'I' );
-
-   TChain *chainB =new TChain("/stat/SVrtInJetTrackExample.BJetSVFinder/Tracks");
-   chainB->Add("../run/allcalib.root");
-   chainB->Add("../runZp1500/allcalib.root");
-   chainB->Add("../runZp3000/allcalib.root");
-   chainB->Add("../runZp5000/allcalib.root");
-   chainB->Add("../runLJ4/allcalib.root");
-   chainB->Add("../runLJ6/allcalib.root");
-   chainB->Add("../runLJ8/allcalib.root");
-   TChain *chainL =new TChain("/stat/SVrtInJetTrackExample.LJetSVFinder/Tracks");
-   chainL->Add("../run/allcalib.root");
-   chainL->Add("../runZp1500/allcalib.root");
-   chainL->Add("../runZp3000/allcalib.root");
-   chainL->Add("../runZp5000/allcalib.root");
-   chainL->Add("../runLJ4/allcalib.root");
-   chainL->Add("../runLJ6/allcalib.root");
-   chainL->Add("../runLJ8/allcalib.root");
-
-   dataloader->AddTree(chainB,"Signal");
-   dataloader->AddTree(chainL,"Signal");
-   dataloader->AddTree(chainB,"Fragment");
-   dataloader->AddTree(chainL,"Fragment");
-   dataloader->AddTree(chainB,"Garbage");
-   dataloader->AddTree(chainL,"Garbage");
-   //dataloader->AddTree(chainB,"Pileup");
-   //dataloader->AddTree(chainL,"Pileup");
-
-   //dataloader->SetCut(TCut("idMC==2&&prbS>0&&(-3)<d0&&d0<5.&&(-8)<Z0&&Z0<12."),"Signal");
-   //dataloader->SetCut(TCut("idMC==0&&prbS>0&&(-3)<d0&&d0<5.&&(-8)<Z0&&Z0<12."),"Fragment");
-   //dataloader->SetCut(TCut("idMC==1&&prbS>0&&(-3)<d0&&d0<5.&&(-8)<Z0&&Z0<12."),"Garbage");
-   //dataloader->SetCut(TCut("idMC==3&&prbS>0&&(-3)<d0&&d0<5.&&(-8)<Z0&&Z0<12."),"Pileup");
-   dataloader->SetCut(TCut("idMC==2&&(SigR*SigR+SigZ*SigZ)>1.&&(-3)<d0&&d0<5.&&(-8)<Z0&&Z0<12.&&ptjet<2500000"),"Signal");
-   dataloader->SetCut(TCut("idMC==0&&(SigR*SigR+SigZ*SigZ)>1.&&(-3)<d0&&d0<5.&&(-8)<Z0&&Z0<12.&&ptjet<2500000"),"Fragment");
-   dataloader->SetCut(TCut("(idMC==1||idMC==3)&&(SigR*SigR+SigZ*SigZ)>1.&&(-3)<d0&&d0<5.&&(-8)<Z0&&Z0<12.&&ptjet<2500000"),"Garbage");
-
-   dataloader->PrepareTrainingAndTestTree( "", "SplitMode=Random:NormMode=NumEvents:!V" );
-   //dataloader->PrepareTrainingAndTestTree( "", "SplitMode=Random:NormMode=NumEvents:!V:nTrain_Signal=5000:nTrain_Fragment=5000:nTrain_Garbage=10000:nTest_Signal=5000:nTest_Fragment=5000:nTest_Garbage=10000" );
-   //dataloader->PrepareTrainingAndTestTree( "", "SplitMode=Random:NormMode=NumEvents:!V:nTrain_Signal=5000:nTrain_Fragment=5000:nTrain_Garbage=5000:nTrain_Pileup=5000:nTest_Signal=5000:nTest_Fragment=5000:nTest_Garbage=5000:nTest_Pileup=5000" );
-
-   factory->BookMethod(dataloader, TMVA::Types::kBDT, "BDTG", "!H:!V:NTrees=1000:BoostType=Grad:Shrinkage=0.25:UseBaggedBoost:BaggedSampleFraction=0.50:nCuts=20:MaxDepth=5");
-   //factory->BookMethod( TMVA::Types::kPDEFoam, "PDEFoam", "!H:!V:TailCut=0.001:VolFrac=0.0666:nActiveCells=500:nSampl=2000:nBin=5:Nmin=100:Kernel=None:Compress=T" );
-  // Train MVAs using the set of training events
-   factory->TrainAllMethods();
-
-   // ---- Evaluate all MVAs using the set of test events
-   factory->TestAllMethods();
-
-   // ----- Evaluate and compare performance of all configured MVAs
-   factory->EvaluateAllMethods();
-
-   // --------------------------------------------------------------
-   
-   // Save the output
-   outputFile->Close();
-   
-   std::cout << "==> Wrote root file: " << outputFile->GetName() << std::endl;
-   std::cout << "==> TMVAClassification is done!" << std::endl;
-   
-   delete factory;
-}
-
-//
-
-void TMVAMultiApply( )
-{
-   // create the Reader object
-   TMVA::Reader *reader = new TMVA::Reader( "!Color:!Silent" );    
-   Float_t prbS, prbP, ptjet, etajet;
-   Int_t ntrk;
-   reader->AddVariable( "prbS", &prbS );
-   reader->AddVariable( "prbP", &prbP );
-   reader->AddVariable( "ptjet", &ptjet );
-   reader->AddVariable( "etajet", &etajet );
-   //reader->AddSpectator( "ntrk",  &ntrk );
-
-   TString methodName = "BDTG";
-   TString weightfile = "weights/TMVAMulticlass_BDTG.weights.xml";
-   reader->BookMVA( methodName, weightfile ); 
-
-   prbS=0.6;
-   prbP=0.9;
-   ptjet=250000.;
-   etajet=1.;
-   const std::vector<Float_t> &result=reader->EvaluateMulticlass("BDTG");
-   std::cout<<" TEST="<<result.size()<<" wgt="<<result[0]<<","<<result[1]<<","<<result[2]<<'\n';
-
-   delete reader;
-}
-
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSec.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSec.cxx
index 3526573ea87ae60dab47dfd6ee919a753cd1fe4b..780819de28b06e29dccf38edaa67eab32bd4dd2c 100755
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSec.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSec.cxx
@@ -15,7 +15,6 @@
 #include "TH2D.h"
 #include  "TMath.h"
 //
-#include<iostream>
 
 //----------------------------------------------------------------------------------------
 //  GetVrtSec resurns the vector Results with the following
@@ -33,20 +32,8 @@
 //---------------------------------------------------------------------------------------- 
 namespace InDet{
 
-  float median(std::vector<float> &Vec){
-    int N=Vec.size();
-    if(N==1) return Vec[0];
-    if(N>1){
-      std::vector<float> tmp(Vec);
-      std::sort(tmp.begin(),tmp.end());
-      return (tmp[(N-1)/2]+tmp[N/2])/2.;
-    }
-    return 0.;
-  }
-
-  const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not coming from B,C-decays
-
-//inline double cutNDepNorm(int N, double Prb){return TMath::ChisquareQuantile(1.-sqrt(2.*Prb/(N*N-N)),2.);}
+  //inline double cutNDepNorm(int N, double Prb){return 1.41421356237*TMath::ErfInverse(1.-sqrt(2.*Prb/(N*N-N)));}
+  inline double cutNDepNorm(int N, double Prb){return TMath::ChisquareQuantile(1.-sqrt(2.*Prb/(N*N-N)),2.);}
 
   xAOD::Vertex* InDetVKalVxInJetTool::GetVrtSec(const std::vector<const Rec::TrackParticle*>& InpTrk,
                                                 const xAOD::Vertex                          & PrimVrt,
@@ -59,25 +46,26 @@ namespace InDet{
 
       if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "GetVrtSec() called with Rec::TrackParticle=" <<InpTrk.size()<< endmsg;
    
-      std::vector<const Rec::TrackParticle*> SelectedTracks;
-      SelectedTracks.clear();
+      std::vector<const Rec::TrackParticle*> SelectedTracks,SelectedTracksRelax;
+      SelectedTracks.clear(); SelectedTracksRelax.clear();
       ListSecondTracks.clear();
       Results.clear();        
 
-      m_NRefPVTrk=0;
+      m_NRefTrk=0;
       if( InpTrk.size() < 2 ) { return 0;} // 0,1 track => nothing to do!
 
 
-      SelGoodTrkParticle( InpTrk, PrimVrt, JetDir, SelectedTracks);
+      int NPVParticle = SelGoodTrkParticle( InpTrk, PrimVrt, JetDir, SelectedTracks);
 
       long int NTracks = (int) (SelectedTracks.size());
-      if(m_fillHist){m_hb_ntrkjet->Fill( (double) NTracks, m_w_1); }
+      if(m_FillHist){m_hb_ntrkjet->Fill( (double) NTracks, m_w_1); }
       if( NTracks < 2 ) { return 0;} // 0,1 selected track => nothing to do!
 
       if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Number of selected tracks inside jet= " <<NTracks << endmsg;
       
-      TLorentzVector MomentumJet = TotalMom(GetPerigeeVector(SelectedTracks));
-      if(m_fillHist){m_hb_jmom->Fill( MomentumJet.E(), m_w_1); }
+      SelGoodTrkParticleRelax( InpTrk, PrimVrt, JetDir, SelectedTracksRelax);
+      TLorentzVector MomentumJet = TotalMom(GetPerigeeVector(SelectedTracksRelax));
+      if(m_FillHist){m_hb_jmom->Fill( MomentumJet.E(), m_w_1); }
 
 
 //--------------------------------------------------------------------------------------------	 
@@ -105,9 +93,11 @@ namespace InDet{
       double Vrt2TrackNumber = (double) ListSecondTracks.size()/2.;
       RemoveDoubleEntries(ListSecondTracks);
       AnalysisUtils::Sort::pT (&ListSecondTracks);
-//--Ranking of selected tracks
-      std::vector<float> trkRank(0);
-      for(auto tk : ListSecondTracks) trkRank.push_back( m_trackClassificator->trkTypeWgts(tk, PrimVrt, JetDir)[0] );
+//--Number of 2tr vertices where each track is used
+      std::vector<int> combCount(ListSecondTracks.size());
+      for(int tk=0;tk<(int)ListSecondTracks.size(); tk++){
+        combCount[tk]=std::count(saveSecondTracks.begin(),saveSecondTracks.end(),ListSecondTracks[tk]);
+      }
 //---
       if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Found different tracks in pairs="<< ListSecondTracks.size()<<endmsg;
       if(ListSecondTracks.size() < 2 ) { return 0;} // Less than 2 tracks left
@@ -124,7 +114,7 @@ namespace InDet{
       double Signif3D, Signif3DP=0, Signif3DS=0;
       std::vector<double> Impact,ImpactError;
 
-      double Chi2 =  FitCommonVrt( ListSecondTracks, trkRank, xaodPrimVrt, JetDir, InpMass, FitVertex, ErrorMatrix, Momentum, TrkAtVrt);
+      double Chi2 =  FitCommonVrt( ListSecondTracks,combCount, xaodPrimVrt, JetDir, InpMass, FitVertex, ErrorMatrix, Momentum, TrkAtVrt);
 //
       if( Chi2 < 0) { return 0; }      // Vertex not reconstructed
 //
@@ -139,7 +129,7 @@ namespace InDet{
          Signif3DS = m_fitSvc->VKalGetImpact(i_ntrk, FitVertex         , 1, Impact, ImpactError);
          if( Signif3DS > 10.) continue;
          Signif3DP = m_fitSvc->VKalGetImpact(i_ntrk, PrimVrt.position(), 1, Impact, ImpactError);
-         if(m_fillHist){ m_hb_diffPS->Fill( Signif3DP-Signif3DS, m_w_1); }
+         if(m_FillHist){ m_hb_diffPS->Fill( Signif3DP-Signif3DS, m_w_1); }
 	 if(Signif3DP-Signif3DS>1.0) AdditionalTracks.push_back(i_ntrk);
        }
       }
@@ -147,9 +137,8 @@ namespace InDet{
 // Add found tracks and refit
       if( AdditionalTracks.size() > 0){
         for (auto i_ntrk : AdditionalTracks) ListSecondTracks.push_back(i_ntrk);
-        trkRank.clear();
-        for(auto tk : ListSecondTracks) trkRank.push_back( m_trackClassificator->trkTypeWgts(tk, PrimVrt, JetDir)[0] );
-        Chi2 =  FitCommonVrt( ListSecondTracks, trkRank, xaodPrimVrt, JetDir, InpMass, FitVertex, ErrorMatrix, Momentum, TrkAtVrt);
+        std::vector<int> tmpCount(ListSecondTracks.size(),1);
+        Chi2 =  FitCommonVrt( ListSecondTracks, tmpCount, xaodPrimVrt, JetDir, InpMass, FitVertex, ErrorMatrix, Momentum, TrkAtVrt);
         if( Chi2 < 0) { return 0; }      // Vertex not reconstructed
       }
 //
@@ -169,16 +158,16 @@ namespace InDet{
             tCnt++;
         }
         if(m_useVertexCleaning){
-          if(!Check2TrVertexInPixel(ListSecondTracks[0],ListSecondTracks[1],FitVertex,ErrorMatrix)) return 0;
-          double xDif=FitVertex.x()-m_xLayerB, yDif=FitVertex.y()-m_yLayerB ; 
+          if(!Check2TrVertexInPixel(ListSecondTracks[0],ListSecondTracks[1],FitVertex,Signif3D)) return 0;
+          double xDif=FitVertex.x()-m_XlayerB, yDif=FitVertex.y()-m_YlayerB ; 
           double Dist2D=sqrt(xDif*xDif+yDif*yDif);
-          if     (Dist2D < m_rLayerB) {       // Inside B-layer
-            if(m_fillHist){ if(Charge){m_hb_totmass2T1->Fill(Momentum.M(),m_w_1);}else{m_hb_totmass2T0->Fill(Momentum.M(),m_w_1);} }
-            if(m_fillHist){ m_hb_blshared->Fill((float)BLshared,m_w_1); }
-            //if(BLshared>m_cutSharedHits) return 0;
-          } else if(Dist2D > m_rLayerB) {       //Outside b-layer
-            if(m_fillHist){ m_hb_pxshared->Fill((float)PXshared,m_w_1); }
-            //if(PXshared>m_cutSharedHits) return 0;
+          if     (Dist2D < m_RlayerB-m_SVResolutionR) {       // Inside B-layer
+            if(m_FillHist){ if(Charge){m_hb_totmass2T1->Fill(Momentum.M(),m_w_1);}else{m_hb_totmass2T0->Fill(Momentum.M(),m_w_1);} }
+            if(m_FillHist){ m_hb_blshared->Fill((float)BLshared,m_w_1); }
+            //if(BLshared>m_CutSharedHits) return 0;
+          } else if(Dist2D > m_RlayerB+m_SVResolutionR) {       //Outside b-layer
+            if(m_FillHist){ m_hb_pxshared->Fill((float)PXshared,m_w_1); }
+            //if(PXshared>m_CutSharedHits) return 0;
           }
         }   // end of 2tr vertex cleaning code
 //
@@ -191,7 +180,15 @@ namespace InDet{
           }
           return 0;
         }
-        if(m_fillHist){ m_hb_totmass2T2->Fill(Momentum.M(),m_w_1); }
+//-- Protection against fake vertices far from interaction point 
+	if(NPVParticle<1)NPVParticle=1;
+        double vvdist3D=VrtVrtDist(PrimVrt, FitVertex, ErrorMatrix, Signif3D);
+        double t3Dimp1= m_fitSvc->VKalGetImpact(ListSecondTracks[0], PrimVrt.position(), 1, Impact, ImpactError)/fabs(TrkAtVrt[0][2]);
+        double t3Dimp2= m_fitSvc->VKalGetImpact(ListSecondTracks[1], PrimVrt.position(), 1, Impact, ImpactError)/fabs(TrkAtVrt[1][2]);
+	double selVar=(t3Dimp1<t3Dimp2 ? t3Dimp1 : t3Dimp2)/sqrt((double)NPVParticle)/vvdist3D/500.;
+        if(m_FillHist){ m_hb_tr2SelVar->Fill( selVar , m_w_1); }
+	if(selVar<m_AntiFake2trVrtCut)return 0;
+        if(m_FillHist){ m_hb_totmass2T2->Fill(Momentum.M(),m_w_1); }
       }
 
 
@@ -208,16 +205,16 @@ namespace InDet{
 
  
       double xvt=FitVertex.x(); double yvt=FitVertex.y();
-      double Dist2DBP=sqrt( (xvt-m_beampipeX)*(xvt-m_beampipeX) + (yvt-m_beampipeY)*(yvt-m_beampipeY) ); 
-      double Dist2DBL=sqrt( (xvt-m_xLayerB)*(xvt-m_xLayerB) + (yvt-m_yLayerB)*(yvt-m_yLayerB) ); 
-      double Dist2DL1=sqrt( (xvt-m_xLayer1)*(xvt-m_xLayer1) + (yvt-m_yLayer1)*(yvt-m_yLayer1) );
-      double Dist2DL2=sqrt( (xvt-m_xLayer2)*(xvt-m_xLayer2) + (yvt-m_yLayer2)*(yvt-m_yLayer2) );
+      double Dist2DBP=sqrt( (xvt-m_Xbeampipe)*(xvt-m_Xbeampipe) + (yvt-m_Ybeampipe)*(yvt-m_Ybeampipe) ); 
+      double Dist2DBL=sqrt( (xvt-m_XlayerB)*(xvt-m_XlayerB) + (yvt-m_YlayerB)*(yvt-m_YlayerB) ); 
+      double Dist2DL1=sqrt( (xvt-m_Xlayer1)*(xvt-m_Xlayer1) + (yvt-m_Ylayer1)*(yvt-m_Ylayer1) );
+      double Dist2DL2=sqrt( (xvt-m_Xlayer2)*(xvt-m_Xlayer2) + (yvt-m_Ylayer2)*(yvt-m_Ylayer2) );
       double minDstMat=39.9;
-      minDstMat=TMath::Min(minDstMat,fabs(Dist2DBP-m_beampipeR));
-      minDstMat=TMath::Min(minDstMat,fabs(Dist2DBL-m_rLayerB));
-      minDstMat=TMath::Min(minDstMat,fabs(Dist2DL1-m_rLayer1));
-      minDstMat=TMath::Min(minDstMat,fabs(Dist2DL2-m_rLayer2));
-      if(m_existIBL) minDstMat=TMath::Min(minDstMat,fabs(Dist2DL2-m_rLayer3));  // 4-layer pixel detector
+      minDstMat=TMath::Min(minDstMat,fabs(Dist2DBP-m_Rbeampipe));
+      minDstMat=TMath::Min(minDstMat,fabs(Dist2DBL-m_RlayerB));
+      minDstMat=TMath::Min(minDstMat,fabs(Dist2DL1-m_Rlayer1));
+      minDstMat=TMath::Min(minDstMat,fabs(Dist2DL2-m_Rlayer2));
+      if(m_existIBL) minDstMat=TMath::Min(minDstMat,fabs(Dist2DL2-m_Rlayer3));  // 4-layer pixel detector
 
       VrtVrtDist(PrimVrt, FitVertex, ErrorMatrix, Signif3D);
       if(JetVrtDir < 0) Signif3D = -Signif3D;
@@ -225,7 +222,10 @@ namespace InDet{
       Amg::Vector3D DirForPt( FitVertex.x()-PrimVrt.x(),
                               FitVertex.y()-PrimVrt.y(),
 		              FitVertex.z()-PrimVrt.z());
-      Results.push_back(Momentum.M());                             //1st
+      if( m_MassType == 3 ) Results.push_back( TotalTVMom(DirForPt, GetPerigeeVector(ListSecondTracks))); 
+      if( m_MassType == 2 ) Results.push_back(TotalTMom(GetPerigeeVector(ListSecondTracks))*1.15); 
+      if( m_MassType == 1 ) Results.push_back(Momentum.M());        //1st
+
       double eRatio = Momentum.E()/MomentumJet.E(); 
       Results.push_back(  eRatio<0.99999 ? eRatio : 0.99999);      //2nd
       Results.push_back(Vrt2TrackNumber);                          //3rd
@@ -239,7 +239,7 @@ namespace InDet{
       Results.push_back((Momentum.M()-2.*m_massPi)*eRatio/m_massB);           //10th   "Product" variable
       Results.push_back((Momentum.Pt()/Momentum.M())*(m_massB/JetDir.Pt()) ); //11th   "Boost" variable
 
-      if(m_fillHist){
+      if(m_FillHist){
           if(ListSecondTracks.size()==2) m_hb_r2dc->Fill( FitVertex.perp(), m_w_1);
           else                           m_hb_rNdc->Fill( FitVertex.perp(), m_w_1);
           m_hb_mom->Fill( MomentumJet.E(), m_w_1);     
@@ -254,7 +254,7 @@ namespace InDet{
 	    if(trackPt>trackPtMax)trackPtMax=trackPt;
           }
           m_hb_trkPtMax->Fill( trackPtMax, m_w_1);
-          m_pr_effVrt->Fill((float)m_NRefPVTrk,1.);              
+          m_pr_effVrt->Fill((float)m_NRefTrk,1.);              
 	  m_pr_effVrtEta->Fill( JetDir.Eta(),1.);
       }
 
@@ -281,6 +281,133 @@ namespace InDet{
 
 
 
+  xAOD::Vertex* InDetVKalVxInJetTool::tryPseudoVertex(const std::vector<const xAOD::TrackParticle*>& SelectedTracks,
+                                                      const xAOD::Vertex                           & PrimVrt,
+                                                      const TLorentzVector                         & JetDir,
+                                                      const TLorentzVector                         & TrkJet,
+						      const int                                    & nTrkLead,
+	                                              std::vector<double>                          & Results)
+  const
+  {
+//---------------First try jet axis+track
+    if((int)SelectedTracks.size()<nTrkLead)return 0;
+    //-----------------------------------------
+    TLorentzVector sumSelTrk(0.,0.,0.,0.);  //Tracks coming from any SV
+
+    Amg::Vector3D                           FitVertex;
+    std::vector<double>                     ErrorMatrix;
+    std::vector< std::vector<double> >      TrkAtVrt; 
+    TLorentzVector                          Momentum;
+    std::vector<double>                     Chi2PerTrk;
+    long int              tChrg=0;
+    double                Chi2=0.;
+    std::vector<const xAOD::TrackParticle*> tTrkForFit(2,0);
+    std::vector<float> tmpCov(15,0.); tmpCov[0]=1e-4; tmpCov[2]=4.e-4; tmpCov[5]=4.e-4; tmpCov[9]=4.e-4; tmpCov[14]=1.e-10; 
+    StatusCode scode; scode.setChecked();  
+    std::vector<const xAOD::TrackParticle*> reducedTrkSet(SelectedTracks.begin(),SelectedTracks.begin()+nTrkLead);
+    double maxImp=RemoveNegImpact(reducedTrkSet,PrimVrt,JetDir,m_pseudoSigCut);
+    if(reducedTrkSet.size()==0) return 0; 
+    if(reducedTrkSet.size()==1 && maxImp<m_pseudoSigCut+1.)return 0;
+    if(m_FillHist)m_hb_rawVrtN->Fill(reducedTrkSet.size(),1.);
+//
+//------ 
+    int sel1T=-1; double selDST=0.;
+    if(reducedTrkSet.size()>0){ 
+       m_fitSvc->setApproximateVertex(PrimVrt.x(), PrimVrt.y(), PrimVrt.z()); 
+       xAOD::TrackParticle *tmpBTP=new xAOD::TrackParticle(); tmpBTP->makePrivateStore();
+       tmpBTP->setDefiningParameters(0., 0., JetDir.Phi(), JetDir.Theta(), sin(JetDir.Theta())/2.e5);   // Pt=200GeV track
+       tmpBTP->setParametersOrigin(PrimVrt.x(),PrimVrt.y(),PrimVrt.z());
+       tmpBTP->setDefiningParametersCovMatrixVec(tmpCov);
+       tTrkForFit[1]=tmpBTP; 
+       TLorentzVector sumB(0.,0.,0.,0.);
+       int nvFitted=0;
+       int nPRT=reducedTrkSet.size();
+       for(int it=0; it<nPRT; it++){
+          tTrkForFit[0]=reducedTrkSet[it];
+	  if(tTrkForFit[0]->pt()<2000.)continue;
+	  if(nPRT==1 && tTrkForFit[0]->pt()<300.*log(JetDir.Pt()))continue;
+          m_fitSvc->setApproximateVertex(0., 0., 0.); 
+	  scode=VKalVrtFitBase( tTrkForFit, FitVertex, Momentum, tChrg, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2);  nvFitted++;
+	  if(scode.isFailure() || Chi2>6.)continue;
+          if(FitVertex.perp()>reducedTrkSet[it]->radiusOfFirstHit())continue; 
+          //double dSVPV=ProjPosT(FitVertex-PrimVrt.position(),JetDir);
+	  double Signif3D; VrtVrtDist(PrimVrt, FitVertex, ErrorMatrix, Signif3D);
+          if(FitVertex.perp()>m_Rbeampipe && Signif3D<2.)  continue;  // Cleaning of material interactions
+   	  if(m_FillHist)m_hb_DST_JetTrkSV->Fill(Signif3D,1.);
+          if(tTrkForFit[0]->pt()<2.e4){
+            if(!Check2TrVertexInPixel(tTrkForFit[0],tTrkForFit[0],FitVertex,Signif3D)) continue;
+	  }
+          //sumSelTrk += MomAtVrt(TrkAtVrt[0]) ; sumB += MomAtVrt(TrkAtVrt[1]) ;
+	  if(Signif3D>selDST){ sel1T=it; selDST=Signif3D; sumSelTrk=MomAtVrt(TrkAtVrt[0]); sumB=MomAtVrt(TrkAtVrt[1]);} 
+       }
+       if(sumSelTrk.Pt()>0. && sel1T>=0 ){
+	  Results.resize(4);
+	  double pt1=sumSelTrk.Pt(sumB.Vect()); double E1=sqrt(pt1*pt1+sumSelTrk.M2()); 
+          Results[0]=pt1+E1;                      //Invariant mass
+          Results[1]=sumSelTrk.Pt()/TrkJet.Pt();  //Ratio
+          Results[2]=0.;                          //Should be
+          Results[3]=reducedTrkSet.size();        //Found leading tracks with high positive impact
+          tTrkForFit[0]=reducedTrkSet[sel1T]; //------------------------- Refit selected vertex for xAOD::Vertex
+          if(nvFitted>1){  //If only one fit attempt made - don't need to refit
+	    scode=VKalVrtFitBase( tTrkForFit, FitVertex, Momentum, tChrg, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2);
+	    if(scode.isFailure()){sumSelTrk.SetXYZT(0.,0.,0.,0.); Results.clear();}
+          }
+       }
+       delete tmpBTP;
+     }
+// 
+//------ Plane-Plane crossing doesn't provide good vertices for the moment
+//     int sel2TI=-1,sel2TJ=-1;
+//     if(reducedTrkSet.size()<1 && sel1T<0){ 
+//       int nPRT=reducedTrkSet.size();  Amg::Vector3D VB1,VB2;  float distMax=1.e10;
+//       for(int it=0; it<nPRT-1; it++){  for(int jt=it+1; jt<nPRT; jt++){
+//          TLorentzVector  pseudoB=GetBDir( reducedTrkSet[it], reducedTrkSet[jt], PrimVrt, VB1, VB2);
+//          if( VB1.dot(VB2)==0. || pseudoB.DeltaR(JetDir)>0.3 ) continue;
+//          if(Amg::distance(VB1,VB2)<distMax){ sel2TI=it; sel2TJ=jt; distMax=Amg::distance(VB1,VB2);}
+//       } }
+//       if(sel2TI>=0){
+//          tTrkForFit[0]=reducedTrkSet[sel2TI]; tTrkForFit[1]=reducedTrkSet[sel2TJ];
+//          //float RMHIT=TMath::Min(tTrkForFit[0]->radiusOfFirstHit(),tTrkForFit[1]->radiusOfFirstHit());   // Closest hit on both tracks 
+//          m_fitSvc->setApproximateVertex(0., 0., 0.); 
+//	  scode=VKalVrtFitBase( tTrkForFit, FitVertex, Momentum, tChrg, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2);
+//	  if(scode.isSuccess() && ProjPosT(FitVertex-PrimVrt.position(),JetDir)>0 && FitVertex.perp()<180.){ 
+//            sumSelTrk += MomAtVrt(TrkAtVrt[0]) ; sumSelTrk += MomAtVrt(TrkAtVrt[1]) ;
+//            Results.resize(4);
+//            Results[0]=Momentum.M();               //Invariant mass
+//            Results[1]=Momentum.Pt()/TrkJet.Pt();  //Ratio
+//            Results[2]=0.;                         //Should be
+//            Results[3]=nPRT;        //Found leading tracks with high positive impact
+//       } }
+//     }
+//
+//------ 
+     if(sumSelTrk.Pt()==0)return 0;    //---------- Nothing found. Damn it! Else - return xAOD::Vertex
+     Results.resize(7);
+     Results[4]=0.; Results[5]=0.;
+     Results[6]=TrkJet.E();
+     xAOD::Vertex * tmpVertex=new xAOD::Vertex();
+     tmpVertex->makePrivateStore();
+     tmpVertex->setPosition(FitVertex);
+     std::vector<float> floatErrMtx; floatErrMtx.resize(ErrorMatrix.size());
+     for(int i=0; i<(int)ErrorMatrix.size(); i++) floatErrMtx[i]=ErrorMatrix[i];
+     tmpVertex->setCovariance(floatErrMtx);
+     tmpVertex->setFitQuality(Chi2, (float)(tTrkForFit.size()*2.-3.));
+     std::vector<Trk::VxTrackAtVertex> & tmpVTAV=tmpVertex->vxTrackAtVertex();    tmpVTAV.clear();
+       AmgSymMatrix(5) *CovMtxP=new AmgSymMatrix(5);   (*CovMtxP).setIdentity(); 
+       Trk::Perigee * tmpMeasPer  =  new Trk::Perigee( 0.,0., TrkAtVrt[0][0], TrkAtVrt[0][1], TrkAtVrt[0][2],
+                                                              Trk::PerigeeSurface(FitVertex), CovMtxP );
+       tmpVTAV.push_back( Trk::VxTrackAtVertex( 1., tmpMeasPer) );
+       ElementLink<xAOD::TrackParticleContainer> TEL;  TEL.setElement( tTrkForFit[0] );
+       const xAOD::TrackParticleContainer* cont = (const xAOD::TrackParticleContainer* ) (tTrkForFit[0]->container() );
+       TEL.setStorableObject(*cont);
+       tmpVertex->addTrackAtVertex(TEL,1.);
+     if(m_FillHist){m_hb_massJetTrkSV ->Fill(Results[0],1.);
+                    m_hb_ratioJetTrkSV->Fill(Results[1],1.); 
+                    m_hb_NImpJetTrkSV ->Fill(Results[3],1.);}
+     return tmpVertex;
+  }
+
+
 
 
 
@@ -301,33 +428,40 @@ namespace InDet{
       TLorentzVector    Momentum;
       double Signif3D=0., Chi2=0.;
 
-      std::vector<const xAOD::TrackParticle*> SelectedTracks(0);
+      std::vector<const xAOD::TrackParticle*> SelectedTracks(0),SelectedTracksRelax(0);
       Results.clear();        
       ListSecondTracks.clear();
 
-      m_NRefPVTrk=0;
+      m_NRefTrk=0;
       if( InpTrk.size() < 2 ) { return 0;} // 0,1 track => nothing to do!
-      SelGoodTrkParticle( InpTrk, PrimVrt, JetDir, SelectedTracks);
-      if(m_fillHist){m_hb_ntrkjet->Fill( (double)SelectedTracks.size(), m_w_1);
-                     m_pr_NSelTrkMean->Fill(JetDir.Pt(),(double)SelectedTracks.size()); }
+      int NPVParticle = SelGoodTrkParticle( InpTrk, PrimVrt, JetDir, SelectedTracks);
+      while(SelectedTracks.size() && SelectedTracks[0]->pt()/JetDir.Pt()>1.)SelectedTracks.erase(SelectedTracks.begin());
+      if((int)SelectedTracks.size()>m_TrackInJetNumberLimit){
+        SelectedTracks.resize(m_TrackInJetNumberLimit); // SelectedTracks are ordered in pT
+      }
+      while( SelectedTracks.size()>4 && medianPtF(SelectedTracks)/JetDir.Pt()<0.01) SelectedTracks.pop_back();
+
       long int NTracks = (int) (SelectedTracks.size());
+      if(m_FillHist){m_hb_ntrkjet->Fill( (double) NTracks, m_w_1); }
       if( NTracks < 2 ) { return 0;} // 0,1 selected track => nothing to do!
 
       if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Number of selected tracks inside jet= " <<NTracks << endmsg;
       
-      TLorentzVector MomentumJet = TotalMom(SelectedTracks);
-      if(m_fillHist){m_hb_jmom->Fill( MomentumJet.E(), m_w_1); }
+      SelGoodTrkParticleRelax( InpTrk, PrimVrt, JetDir, SelectedTracksRelax);
+      TLorentzVector MomentumJet = TotalMom(SelectedTracksRelax);
+      if(m_FillHist){m_hb_jmom->Fill( MomentumJet.E(), m_w_1); }
 
 
 //--------------------------------------------------------------------------------------------	 
 //                    Initial xAOD::TrackParticle list ready
       float Vrt2TrackNumber =0;
+      const int nTrkLead=5;
+
 
       std::vector<const xAOD::TrackParticle*>  TracksForFit;
       //std::vector<double> InpMass; for(int i=0; i<NTracks; i++){InpMass.push_back(m_massPi);}
       std::vector<double> InpMass(NTracks,m_massPi);
-      Select2TrVrt(SelectedTracks, TracksForFit, PrimVrt, JetDir, InpMass, TrkFromV0,
-                     ListSecondTracks);
+      Select2TrVrt(SelectedTracks, TracksForFit, PrimVrt, JetDir, InpMass, TrkFromV0, ListSecondTracks);
       m_WorkArray->m_Incomp.clear();  // Not needed for single vertex version
 //
 //--- Cleaning
@@ -344,14 +478,15 @@ namespace InDet{
                                  if(itf!=SelectedTracks.end())  SelectedTracks.erase(itf);}
 //---
       if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Found different xAOD tracks in pairs="<< ListSecondTracks.size()<<endmsg;
-      if(ListSecondTracks.size() < 2 ) return 0;
-
-//--Ranking of selected tracks
-      std::vector<float> trkRank(0);
-      for(auto tk : ListSecondTracks) trkRank.push_back( m_trackClassificator->trkTypeWgts(tk, PrimVrt, JetDir)[0] );
-      while( median(trkRank)<0.3 && trkRank.size()>3 ) {
-        int Smallest= std::min_element(trkRank.begin(),trkRank.end()) - trkRank.begin();
-        RemoveEntryInList(ListSecondTracks,trkRank,Smallest);
+      if(ListSecondTracks.size() < 2 ) return tryPseudoVertex( SelectedTracks, PrimVrt, JetDir, MomentumJet, nTrkLead, Results);
+
+//--- At least 2 secondary tracks are found.
+
+      AnalysisUtils::Sort::pT (&ListSecondTracks);
+//--Number of 2tr vertices where each track is used
+      std::vector<int> combCount(ListSecondTracks.size(),0);
+      for(int tk=0;tk<(int)ListSecondTracks.size(); tk++){
+        combCount[tk]=std::count(saveSecondTracks.begin(),saveSecondTracks.end(),ListSecondTracks[tk]);
       }
 //
 //-----------------------------------------------------------------------------------------------------
@@ -360,55 +495,57 @@ namespace InDet{
 //
       double Signif3DP=0, Signif3DS=0;
 
-      Chi2 =  FitCommonVrt( ListSecondTracks, trkRank, PrimVrt, JetDir, InpMass, FitVertex, ErrorMatrix, Momentum, TrkAtVrt);
+      Chi2 =  FitCommonVrt( ListSecondTracks, combCount, PrimVrt, JetDir, InpMass, FitVertex, ErrorMatrix, Momentum, TrkAtVrt);
       if( Chi2 < 0 && ListSecondTracks.size()>2 ) { // Vertex not reconstructed. Try to remove one track with biggest pt.
         double tpmax=0; int ipmax=-1;
         for(int it=0; it<(int)ListSecondTracks.size(); it++) if(tpmax<ListSecondTracks[it]->pt()){tpmax=ListSecondTracks[it]->pt(); ipmax=it;}
-        if(ipmax>=0)RemoveEntryInList(ListSecondTracks,trkRank,ipmax);
-        Chi2 =  FitCommonVrt( ListSecondTracks, trkRank, PrimVrt, JetDir, InpMass, FitVertex, ErrorMatrix, Momentum, TrkAtVrt);
-        if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Second FitCommonVrt try="<< Chi2<<" Ntrk="<<ListSecondTracks.size()<<endmsg;
+        if(ipmax>=0)RemoveEntryInList(ListSecondTracks,combCount,ipmax);
+        Chi2 =  FitCommonVrt( ListSecondTracks, combCount, PrimVrt, JetDir, InpMass, FitVertex, ErrorMatrix, Momentum, TrkAtVrt);
+        if( Chi2 < 0 && ListSecondTracks.size()>2 ) { // Vertex not reconstructed. Try to remove another track with biggest pt.
+          tpmax=0.; ipmax=-1;
+          for(int it=0; it<(int)ListSecondTracks.size(); it++) if(tpmax<ListSecondTracks[it]->pt()){tpmax=ListSecondTracks[it]->pt(); ipmax=it;}
+          if(ipmax>=0)RemoveEntryInList(ListSecondTracks,combCount,ipmax);
+          Chi2 =  FitCommonVrt( ListSecondTracks, combCount, PrimVrt, JetDir, InpMass, FitVertex, ErrorMatrix, Momentum, TrkAtVrt);
+        }
       }
-      if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" FitCommonVrt result="<< Chi2<<" Ntrk="<<ListSecondTracks.size()<<endmsg;
+      if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" FitCommonVrt result="<< Chi2<<endmsg;
 //
-      if( Chi2 < 0) return 0;
+      if( Chi2 < 0) return tryPseudoVertex( SelectedTracks, PrimVrt, JetDir, MomentumJet, nTrkLead, Results);
 //
 // Check jet tracks not in secondary vertex
       std::map<double,const xAOD::TrackParticle*> AdditionalTracks;
       VrtVrtDist(PrimVrt, FitVertex, ErrorMatrix, Signif3D);
       if(Signif3D>8.){
-	int hitL1=0, nLays=0, hitIBL=0, hitBL=0; 
-        for (auto i_ntrk : SelectedTracks) {
-          if(  find( ListSecondTracks.begin(), ListSecondTracks.end(), i_ntrk) != ListSecondTracks.end() ) continue; // Track is used already
-          std::vector<float> trkScore=m_trackClassificator->trkTypeWgts(i_ntrk, PrimVrt, JetDir);
-	  if( trkScore[0] < m_cutHFClass/2.) continue;
-          Signif3DS = m_fitSvc->VKalGetImpact(i_ntrk, FitVertex         , 1, Impact, ImpactError);
-          if( Signif3DS > 10.) continue;
-          getPixelLayers(i_ntrk , hitIBL , hitBL, hitL1, nLays );
-          if( hitIBL<=0 && hitBL<=0 ) continue;                  // No IBL and BL pixel hits => non-precise track
-          Signif3DP = m_fitSvc->VKalGetImpact(i_ntrk, PrimVrt.position(), 1, Impact, ImpactError);
-          if(Signif3DP<1.)continue;
-          if(m_fillHist){ m_hb_diffPS->Fill( Signif3DP-Signif3DS, m_w_1); }
-	  if(Signif3DP-Signif3DS>4.0) AdditionalTracks[Signif3DP-Signif3DS]=i_ntrk;
-        }
+       for (auto i_ntrk : SelectedTracks) {
+         std::vector<const xAOD::TrackParticle*>::const_iterator   i_found =
+                             find( ListSecondTracks.begin(), ListSecondTracks.end(), i_ntrk);
+	 if( i_found != ListSecondTracks.end() ) continue;
+         if(i_ntrk->pt()<m_JetPtFractionCut*JetDir.Perp())continue;
+         if(!Check1TrVertexInPixel(i_ntrk,FitVertex)) continue;
+         Signif3DS = m_fitSvc->VKalGetImpact(i_ntrk, FitVertex         , 1, Impact, ImpactError);
+         if( Signif3DS > 10.) continue;
+         if(i_ntrk->radiusOfFirstHit()>60 && FitVertex.perp()<m_RlayerB-m_SVResolutionR)continue;  //VK no hit in IBL and BL
+         Signif3DP = m_fitSvc->VKalGetImpact(i_ntrk, PrimVrt.position(), 1, Impact, ImpactError);
+         if(m_FillHist){ m_hb_diffPS->Fill( Signif3DP-Signif3DS, m_w_1); }
+	 if(Signif3DP-Signif3DS>-1.0) AdditionalTracks[Signif3DP-Signif3DS]=i_ntrk;
+       }
       }
 //
 // Add found tracks and refit
-//
       if( AdditionalTracks.size() > 0){
-        while (AdditionalTracks.size()>3) AdditionalTracks.erase(AdditionalTracks.begin());//Tracks are in increasing DIFF order.
-        for (auto atrk : AdditionalTracks) ListSecondTracks.push_back(atrk.second);        //3tracks with max DIFF are selected
-        trkRank.clear();
-        for(auto tk : ListSecondTracks) trkRank.push_back( m_trackClassificator->trkTypeWgts(tk, PrimVrt, JetDir)[0] );
-        Chi2 =  FitCommonVrt( ListSecondTracks, trkRank, PrimVrt, JetDir, InpMass, FitVertex, ErrorMatrix, Momentum, TrkAtVrt);
+while (AdditionalTracks.size()>3) AdditionalTracks.erase(AdditionalTracks.begin());//Tracks are in increasing DIFF order.
+for (auto atrk : AdditionalTracks)ListSecondTracks.push_back(atrk.second);         //3tracks with max DIFF are selected
+        std::vector<int> tmpCount(ListSecondTracks.size(),1);
+        Chi2 =  FitCommonVrt( ListSecondTracks, tmpCount, PrimVrt, JetDir, InpMass, FitVertex, ErrorMatrix, Momentum, TrkAtVrt);
         if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Added track FitCommonVrt output="<< Chi2<<endmsg;
-        if( Chi2 < 0) return 0;
+        if( Chi2 < 0) return tryPseudoVertex( SelectedTracks, PrimVrt, JetDir, MomentumJet, nTrkLead, Results);
       }
 //
 //  Saving of results
 //
+//
 //
       if( ListSecondTracks.size()==2 ){         // If there are 2 only tracks
-        if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Start Ntr=2 vertex check"<<endmsg;
         int Charge=0;
 	uint8_t BLshared=0;
 	uint8_t PXshared=0;
@@ -418,18 +555,22 @@ namespace InDet{
             if( i_ntrk->summaryValue( retval, xAOD::numberOfPixelSharedHits)  )  PXshared  += retval;
             if( i_ntrk->summaryValue( retval, xAOD::numberOfInnermostPixelLayerSharedHits) )  BLshared  += retval;
         }
-	VrtVrtDist(PrimVrt, FitVertex, ErrorMatrix, Signif3D);
+
+        double vvdist3D=VrtVrtDist(PrimVrt, FitVertex, ErrorMatrix, Signif3D);
         if(m_useVertexCleaning){
-          if(!Check2TrVertexInPixel(ListSecondTracks[0],ListSecondTracks[1],FitVertex,ErrorMatrix)) return 0;
-          if(m_fillHist){
-            double xDif=FitVertex.x()-m_xLayerB, yDif=FitVertex.y()-m_yLayerB ; 
-            double Dist2D=sqrt(xDif*xDif+yDif*yDif);
-            if     (Dist2D < m_rLayerB-VrtRadiusError(FitVertex,ErrorMatrix))  m_hb_blshared->Fill((float)BLshared,m_w_1);
-            else if(Dist2D > m_rLayerB+VrtRadiusError(FitVertex,ErrorMatrix))  m_hb_pxshared->Fill((float)PXshared,m_w_1);
-         }
+          if(!Check2TrVertexInPixel(ListSecondTracks[0],ListSecondTracks[1],FitVertex,Signif3D)) return 0;
+          double xDif=FitVertex.x()-m_XlayerB, yDif=FitVertex.y()-m_YlayerB ; 
+          double Dist2D=sqrt(xDif*xDif+yDif*yDif);
+          if     (Dist2D < m_RlayerB-m_SVResolutionR) {       // Inside B-layer
+            if(m_FillHist){ if(Charge){m_hb_totmass2T1->Fill(Momentum.M(),m_w_1);}else{m_hb_totmass2T0->Fill(Momentum.M(),m_w_1);} }
+            if(m_FillHist){ m_hb_blshared->Fill((float)BLshared,m_w_1); }
+            //if(BLshared>m_CutSharedHits) return 0;          //VK Kills more b-jets events
+          }else if(Dist2D > m_RlayerB+m_SVResolutionR) {      //Outside b-layer
+            if(m_FillHist){ m_hb_pxshared->Fill((float)PXshared,m_w_1); }
+            //if(PXshared>m_CutSharedHits) return 0;
+          }
         } //end 2tr vertex cleaning code
 //
-        if(m_fillHist){ if(Charge){m_hb_totmass2T1->Fill(Momentum.M(),m_w_1);}else{m_hb_totmass2T0->Fill(Momentum.M(),m_w_1);} }
         if( !Charge && fabs(Momentum.M()-m_massK0)<15. ) {       // Final rejection of K0
 	  TrkFromV0.push_back(ListSecondTracks[0]);
 	  TrkFromV0.push_back(ListSecondTracks[1]);
@@ -439,12 +580,21 @@ namespace InDet{
           }
           return 0;
         }
-        if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Ntr=2 vertex check passed"<<endmsg;
+//-- Protection against fake vertices far from interaction point 
+	if(NPVParticle<1)NPVParticle=1;
+        double t3Dimp1= m_fitSvc->VKalGetImpact(ListSecondTracks[0], PrimVrt.position(), 1, Impact, ImpactError)/fabs(TrkAtVrt[0][2]);
+        double t3Dimp2= m_fitSvc->VKalGetImpact(ListSecondTracks[1], PrimVrt.position(), 1, Impact, ImpactError)/fabs(TrkAtVrt[1][2]);
+	double selVar=(t3Dimp1<t3Dimp2 ? t3Dimp1 : t3Dimp2)/sqrt((double)NPVParticle)/vvdist3D/500.;
+        if(m_FillHist){ m_hb_tr2SelVar->Fill( selVar , m_w_1); }
+	if(selVar<m_AntiFake2trVrtCut)return 0;
+        if(m_FillHist){ m_hb_totmass2T2->Fill(Momentum.M(),m_w_1); }
       }
 
 	    
-      double JetVrtDir = ProjSV_PV(FitVertex,PrimVrt,JetDir);
-      if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<"Combined SV neg.dir="<<JetVrtDir<<endmsg;
+      double JetVrtDir =
+             JetDir.Px()*(FitVertex.x()-PrimVrt.x())
+           + JetDir.Py()*(FitVertex.y()-PrimVrt.y())
+ 	   + JetDir.Pz()*(FitVertex.z()-PrimVrt.z());
       if(  m_getNegativeTag )
          { if( JetVrtDir>0. )   return 0; }
       else if( m_getNegativeTail )
@@ -453,26 +603,30 @@ namespace InDet{
          { if( JetVrtDir<0. ) return 0; } 
 
       double xvt=FitVertex.x(); double yvt=FitVertex.y();
-      double Dist2DBP=sqrt( (xvt-m_beampipeX)*(xvt-m_beampipeX) + (yvt-m_beampipeY)*(yvt-m_beampipeY) ); 
-      double Dist2DBL=sqrt( (xvt-m_xLayerB)*(xvt-m_xLayerB) + (yvt-m_yLayerB)*(yvt-m_yLayerB) ); 
-      double Dist2DL1=sqrt( (xvt-m_xLayer1)*(xvt-m_xLayer1) + (yvt-m_yLayer1)*(yvt-m_yLayer1) );
-      double Dist2DL2=sqrt( (xvt-m_xLayer2)*(xvt-m_xLayer2) + (yvt-m_yLayer2)*(yvt-m_yLayer2) );
+      double Dist2DBP=sqrt( (xvt-m_Xbeampipe)*(xvt-m_Xbeampipe) + (yvt-m_Ybeampipe)*(yvt-m_Ybeampipe) ); 
+      double Dist2DBL=sqrt( (xvt-m_XlayerB)*(xvt-m_XlayerB) + (yvt-m_YlayerB)*(yvt-m_YlayerB) ); 
+      double Dist2DL1=sqrt( (xvt-m_Xlayer1)*(xvt-m_Xlayer1) + (yvt-m_Ylayer1)*(yvt-m_Ylayer1) );
+      double Dist2DL2=sqrt( (xvt-m_Xlayer2)*(xvt-m_Xlayer2) + (yvt-m_Ylayer2)*(yvt-m_Ylayer2) );
       double minDstMat=39.9;
-      minDstMat=TMath::Min(minDstMat,fabs(Dist2DBP-m_beampipeR));
-      minDstMat=TMath::Min(minDstMat,fabs(Dist2DBL-m_rLayerB));
-      minDstMat=TMath::Min(minDstMat,fabs(Dist2DL1-m_rLayer1));
-      minDstMat=TMath::Min(minDstMat,fabs(Dist2DL2-m_rLayer2));
-      if(m_existIBL) minDstMat=TMath::Min(minDstMat,fabs(Dist2DL2-m_rLayer3));  // 4-layer pixel detector
+      minDstMat=TMath::Min(minDstMat,fabs(Dist2DBP-m_Rbeampipe));
+      minDstMat=TMath::Min(minDstMat,fabs(Dist2DBL-m_RlayerB));
+      minDstMat=TMath::Min(minDstMat,fabs(Dist2DL1-m_Rlayer1));
+      minDstMat=TMath::Min(minDstMat,fabs(Dist2DL2-m_Rlayer2));
+      if(m_existIBL) minDstMat=TMath::Min(minDstMat,fabs(Dist2DL2-m_Rlayer3));  // 4-layer pixel detector
  
  
       VrtVrtDist(PrimVrt, FitVertex, ErrorMatrix, Signif3D);
       if(JetVrtDir < 0) Signif3D = -Signif3D;
 
+      if(FitVertex.perp()>m_Rbeampipe && Signif3D<20.)  return 0;  // Final cleaning of material interactions
 
       Amg::Vector3D DirForPt( FitVertex.x()-PrimVrt.x(),
                               FitVertex.y()-PrimVrt.y(),
 		              FitVertex.z()-PrimVrt.z());
-      Results.push_back(Momentum.M());                             //1st
+      //if( m_MassType == 3 ) Results.push_back( TotalTVMom(DirForPt, GetPerigeeVector(ListSecondTracks))); 
+      //if( m_MassType == 2 ) Results.push_back(TotalTMom(GetPerigeeVector(ListSecondTracks))*1.15); 
+      if( m_MassType == 1 ) Results.push_back(Momentum.M());       //1st
+
       double eRatio = Momentum.E()/MomentumJet.E();
       Results.push_back(  eRatio<0.99999 ? eRatio : 0.99999);      //2nd
       Results.push_back(Vrt2TrackNumber);                          //3rd
@@ -486,17 +640,18 @@ namespace InDet{
       Results.push_back((Momentum.M()-2.*m_massPi)*eRatio/m_massB);           //10th   "Product" variable
       Results.push_back((Momentum.Pt()/Momentum.M())*(m_massB/JetDir.Pt()) ); //11th   "Boost" variable
 
-      if(m_fillHist){
+      if(m_FillHist){
           // Find highest track Pt with respect to jet direction
           double trackPt, trackPtMax=0.;
           for (int tr=0; tr<(int)ListSecondTracks.size(); tr++) {
-	    if(ListSecondTracks[tr]->pt()/JetDir.Pt()>0.5)continue;
             trackPt=pTvsDir(Amg::Vector3D(JetDir.X(),JetDir.Y(),JetDir.Z()) , TrkAtVrt[tr]);
 	    if(trackPt>trackPtMax)trackPtMax=trackPt;
           }
-	  m_hb_rNdc->Fill( FitVertex.perp(), m_w_1);
+          if(ListSecondTracks.size()==2) m_hb_r2dc->Fill( FitVertex.perp(), m_w_1);
+          else if(ListSecondTracks.size()==3) m_hb_r3dc->Fill( FitVertex.perp(), m_w_1);
+          else                           m_hb_rNdc->Fill( FitVertex.perp(), m_w_1);
           m_hb_trkPtMax->Fill( trackPtMax, m_w_1);
-          m_pr_effVrt->Fill((float)m_NRefPVTrk,1.);              
+          m_pr_effVrt->Fill((float)m_NRefTrk,1.);              
 	  m_pr_effVrtEta->Fill( JetDir.Eta(),1.);
           m_hb_mom->Fill( MomentumJet.E(), m_w_1);
           m_hb_ratio->Fill( Results[1], m_w_1); 
@@ -538,6 +693,14 @@ namespace InDet{
 
 
 
+
+
+
+
+
+
+
+
 //
 //--------------------------------------------------------
 //   Template routine for global secondary vertex fitting
@@ -545,7 +708,7 @@ namespace InDet{
 
   template <class Track>
   double InDetVKalVxInJetTool::FitCommonVrt(std::vector<const Track*>& ListSecondTracks,
- 				  std::vector<float>        & trkRank,
+ 				  std::vector<int>          & cntComb,
                                   const xAOD::Vertex        & PrimVrt,
  	                          const TLorentzVector      & JetDir,
                                   std::vector<double>       & InpMass, 
@@ -559,6 +722,7 @@ namespace InDet{
 //preparation
       StatusCode sc;
       std::vector<double> Chi2PerTrk;
+      const double maxRecMASS=6000.;
       long int           Charge;
       double             Chi2 = 0.;
       Amg::Vector3D      tmpVertex;
@@ -571,29 +735,37 @@ namespace InDet{
       m_fitSvc->setMassInputParticles( InpMass );            // Use pions masses
       m_fitSvc->setMomCovCalc(1);  /* Total momentum and its covariance matrix are calculated*/
       sc=VKalVrtFitFastBase(ListSecondTracks,FitVertex);          /* Fast crude estimation */
-      if(sc.isFailure() || FitVertex.perp() > m_rLayer2*2. ) {    /* No initial estimation */ 
+      if(sc.isFailure() || FitVertex.perp() > m_Rlayer2*2. ) {    /* No initial estimation */ 
          m_fitSvc->setApproximateVertex(PrimVrt.x(), PrimVrt.y(), PrimVrt.z()); /* Use as starting point */
       } else {
          m_fitSvc->setApproximateVertex(FitVertex.x(),FitVertex.y(),FitVertex.z()); /*Use as starting point*/
       }
+//      m_fitSvc-> setVertexForConstraint(PrimVrt.x(),PrimVrt.y(),PrimVrt.z());
+//      m_fitSvc->setCovVrtForConstraint(PrimVrt.errorPosition().covValue(Trk::x,Trk::x),
+//                                       PrimVrt.errorPosition().covValue(Trk::y,Trk::x),
+//                                       PrimVrt.errorPosition().covValue(Trk::y,Trk::y),
+//                                       PrimVrt.errorPosition().covValue(Trk::z,Trk::x),
+//                                       PrimVrt.errorPosition().covValue(Trk::z,Trk::y),
+//                                       PrimVrt.errorPosition().covValue(Trk::z,Trk::z) );
+//      m_fitSvc->setCnstType(7);
+      if(m_RobustFit)m_fitSvc->setRobustness(m_RobustFit);
+      else m_fitSvc->setRobustness(0);
 //fit itself
       int NTracksVrt = ListSecondTracks.size(); double FitProb=0.;
-      std::vector<double> trkFitWgt(0);
+
       for (i=0; i < NTracksVrt-1; i++) {
-         if(m_RobustFit)m_fitSvc->setRobustness(m_RobustFit);
-         else m_fitSvc->setRobustness(0);
-         sc=VKalVrtFitBase(ListSecondTracks,FitVertex,Momentum,Charge,
+//         sc=m_fitSvc->VKalVrtFit(ListSecondTracks,FitVertex, Momentum,Charge,
+//                                         ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2);
+         sc=VKalVrtFitBase(ListSecondTracks,FitVertex, Momentum,Charge,
                                  ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2);
          if(sc.isFailure() ||  Chi2 > 1000000. ) { return -10000.;}    // No fit
-         sc=GetTrkFitWeights(trkFitWgt);
-         if(sc.isFailure()){ return -10000.;}    // No weights
-	 Outlier=std::min_element(trkFitWgt.begin(),trkFitWgt.end())-trkFitWgt.begin();
-         //////Outlier = FindMax( Chi2PerTrk, trkRank ); 
+         //for( int mmt=0; mmt<(int) Chi2PerTrk.size(); mmt++) Chi2PerTrk[mmt] -= TMath::Min(trkSigPV[mmt],9.);
+         Outlier = FindMax( Chi2PerTrk, cntComb ); 
 	 FitProb=TMath::Prob( Chi2, 2*ListSecondTracks.size()-3);
 	 if(ListSecondTracks.size() == 2 )              break;         // Only 2 tracks left
 //////////////////////////////
          double Signif3Dproj=VrtVrtDist( PrimVrt, FitVertex, ErrorMatrix, JetDir);
-         if(Signif3Dproj<0 && (!m_getNegativeTail) && (!m_getNegativeTag)){
+         if(Signif3Dproj<0 && (!m_getNegativeTail) && (!m_getNegativeTag) && FitProb < 0.1){
 	   double maxDst=-1.e12; int maxT=-1; double minChi2=1.e12;
 	   for(int it=0; it<(int)ListSecondTracks.size(); it++){
               std::vector<const Track*> tmpList(ListSecondTracks);
@@ -604,19 +776,17 @@ namespace InDet{
 	      if(Signif3Dproj>maxDst  && maxDst<10. ){maxDst=Signif3Dproj; maxT=it; minChi2=Chi2;}
 	      else if(Signif3Dproj>0. && maxDst>10. && Chi2<minChi2) {minChi2=Chi2; maxT=it;}
 	   }
-	   if(maxT>=0){ Outlier=maxT;   RemoveEntryInList(ListSecondTracks,trkRank,Outlier);
+	   if(maxT>=0){ Outlier=maxT;   RemoveEntryInList(ListSecondTracks,cntComb,Outlier);
                         m_fitSvc->setApproximateVertex(FitVertex.x(),FitVertex.y(),FitVertex.z());
-                        if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Remove negative outlier="<< maxT<<" from "
-                            <<ListSecondTracks.size()+1<<" tracks"<<endmsg;
 			continue;}
 	 }
 ////////////////////////////////////////
-//	 if( Momentum.m() < c_vrtBCMassLimit) {
-//	   if( Chi2PerTrk[Outlier] < m_secTrkChi2Cut && FitProb > 0.001)  break;  // Solution found
+//	 if( Momentum.m() <6000.) {
+//	   if( Chi2PerTrk[Outlier] < m_SecTrkChi2Cut && FitProb > 0.001)  break;  // Solution found
 //	 }
 	 if( FitProb > 0.001) {
-	   if( Momentum.M() <c_vrtBCMassLimit) {
-	     if( Chi2PerTrk[Outlier] < m_secTrkChi2Cut*m_chiScale[ListSecondTracks.size()<10?ListSecondTracks.size():10])  break;  // Solution found
+	   if( Momentum.M() <maxRecMASS) {
+	     if( Chi2PerTrk[Outlier] < m_SecTrkChi2Cut*m_chiScale[ListSecondTracks.size()<10?ListSecondTracks.size():10])  break;  // Solution found
            } else {
 	     double minM=1.e12; int minT=-1; double minChi2=1.e12;
 	     for(int it=0; it<(int)ListSecondTracks.size(); it++){
@@ -624,33 +794,28 @@ namespace InDet{
                 tmpList.erase(tmpList.begin()+it);
                 sc=VKalVrtFitBase(tmpList,tmpVertex,Momentum,Charge,ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2);
                 if(sc.isFailure())continue;
-		if(ProjSV_PV(tmpVertex,PrimVrt,JetDir)<0.)continue; // Drop negative direction 
-	        Chi2 += trkRank[it];                                // Remove preferably non-HF-tracks
-		if(Momentum.M()<minM  && minM>c_vrtBCMassLimit){minM=Momentum.M(); minT=it; minChi2=Chi2;}
-		else if(Momentum.M()<c_vrtBCMassLimit && minM<c_vrtBCMassLimit && Chi2<minChi2){minChi2=Chi2; minT=it;}
+		if(Momentum.M()<minM  && minM>maxRecMASS){minM=Momentum.M(); minT=it; minChi2=Chi2;}
+		else if(Momentum.M()<maxRecMASS && minM<maxRecMASS && Chi2<minChi2){minChi2=Chi2; minT=it;}
 	     }
-             if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Big mass. Remove trk="<<minT<<" New mass="<<minM<<" New Chi2="<<minChi2<<endmsg;
 	     if(minT>=0)Outlier=minT;
 	   }
 	 }
-         if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<"SecVrt remove trk="<<Outlier<<" from "<< ListSecondTracks.size()<<" tracks"<<endmsg;
-         RemoveEntryInList(ListSecondTracks,trkRank,Outlier);
+         RemoveEntryInList(ListSecondTracks,cntComb,Outlier);
          m_fitSvc->setApproximateVertex(FitVertex.x(),FitVertex.y(),FitVertex.z()); /*Use as starting point*/
       }
 //--
-      if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" SecVrt fit converged. Ntr="<< ListSecondTracks.size()<<" Chi2="<<Chi2
-         <<" Chi2_trk="<<Chi2PerTrk[Outlier]<<" Prob="<<FitProb<<" M="<<Momentum.M()<<" Dir="<<ProjSV_PV(FitVertex,PrimVrt,JetDir)<<endmsg;
+      if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" SecVrt fit converged="<< ListSecondTracks.size()<<", "
+          <<Chi2<<", "<<Chi2PerTrk[Outlier]<<" Mass="<<Momentum.M()<<endmsg;
 //--
       if( ListSecondTracks.size()==2 ){
-	 if( Momentum.M() > c_vrtBCMassLimit || FitProb < 0.001 || Chi2PerTrk[Outlier] > m_secTrkChi2Cut) return -10000.;  
-         if(std::max(trkRank[0],trkRank[1])<m_cutHFClass*2.) return -10000.;
+	 if( Momentum.M() > 6000. || FitProb < 0.001 || Chi2PerTrk[Outlier] > m_SecTrkChi2Cut) { return -10000.;  }  
       } 
 //
 //-- To kill remnants of conversion
       double Dist2D=sqrt(FitVertex.x()*FitVertex.x()+FitVertex.y()*FitVertex.y());
       if( ListSecondTracks.size()==2  && (Dist2D > 20.) && Charge==0 ) {
         double mass_EE   =  massV0( TrkAtVrt,m_massE,m_massE);
-        if(m_fillHist){m_hb_totmassEE->Fill( mass_EE, m_w_1); }
+        if(m_FillHist){m_hb_totmassEE->Fill( mass_EE, m_w_1); }
         if( mass_EE < 40. ) return -40.;
       }
 //-- Test creation of Trk::Track
@@ -691,17 +856,15 @@ namespace InDet{
 	                          std::vector<const Track*>   & ListSecondTracks)
     const
     {
-      std::vector<double> Chi2PerTrk,VKPerigee,CovPerigee,closeVrtSig(0),closeVrtCh2(0);
-      //TLorentzVector   Momentum;
+      Amg::Vector3D          FitVertex, vDist;
+      std::vector<double> ErrorMatrix,Chi2PerTrk,VKPerigee,CovPerigee,closeVrtSig(0);
+      std::vector< std::vector<double> > TrkAtVrt; 
+      TLorentzVector   Momentum;
       std::vector<double> Impact,ImpactError;
       double ImpactSignif=0;
       double             Chi2, Signif3D, Dist2D, JetVrtDir;
       long int           Charge;
       int i,j;
-      StatusCode sc; sc.setChecked();
-      Vrt2Tr tmpVrt;
-      std::vector<Vrt2Tr> all2TrVrt(0);
-      TLorentzVector TLV; 
 //
       int NTracks = (int) (SelectedTracks.size());
 
@@ -710,15 +873,14 @@ namespace InDet{
 //
 //  Impact parameters with sign calculations
 //
-      std::vector<float> covPV=PrimVrt.covariance(); 
-      double SignifR=0.,SignifZ=0.;
-      int nTrkHF=0;
-      std::vector<int> hitIBL(NTracks,0), hitBL(NTracks,0);
-      std::vector<double> TrackSignif(NTracks),TrkSig3D(NTracks);
-      std::vector< std::vector<float> > trkScore(NTracks);
+      double SignifR,SignifZ;
+      std::vector<double> TrackSignif(NTracks),TrackPt(NTracks),TrackSignifBase(NTracks),adpt(NTracks),TrkSigZ(NTracks);
       AmgVector(5) tmpPerigee; tmpPerigee<<0.,0.,0.,0.,0.;
+      int NPrimTrk=0, NSecTrk=0;
+      m_NRefTrk=0;
       for (i=0; i<NTracks; i++) {
-         TrkSig3D[i] = m_fitSvc->VKalGetImpact(SelectedTracks[i], PrimVrt.position(), 1, Impact, ImpactError);
+         ImpactSignif = m_fitSvc->VKalGetImpact(SelectedTracks[i], PrimVrt.position(), 1, Impact, ImpactError);
+         TrackSignifBase[i]=ImpactSignif;
          tmpPerigee = GetPerigee(SelectedTracks[i])->parameters(); 
          if( sin(tmpPerigee[2]-JetDir.Phi())*Impact[0] < 0 ){ Impact[0] = -fabs(Impact[0]);}
 	                                                else{ Impact[0] =  fabs(Impact[0]);}
@@ -726,44 +888,48 @@ namespace InDet{
 	                                                else{ Impact[1] =  fabs(Impact[1]);}
 	 SignifR = Impact[0]/ sqrt(ImpactError[0]);
 	 SignifZ = Impact[1]/ sqrt(ImpactError[2]);
-  	 TrackSignif[i] = sqrt( SignifR*SignifR + SignifZ*SignifZ);
-	 int hL1=0, nLays=0; getPixelLayers(SelectedTracks[i] , hitIBL[i] , hitBL[i], hL1, nLays );
-         //----
-         trkScore[i]=m_trackClassificator->trkTypeWgts(SelectedTracks[i], PrimVrt, JetDir);
-	 if( trkScore[i][0]>trkScore[i][1] && trkScore[i][0]>trkScore[i][2] ) nTrkHF++;  //Good HF track
-         if(m_fillHist){
+         if(m_FillHist){
 	    m_hb_impactR->Fill( SignifR, m_w_1); 
             m_hb_impactZ->Fill( SignifZ, m_w_1); 
             m_hb_impactRZ->Fill(SignifR, SignifZ, m_w_1); 
-	    m_hb_impact->Fill( ImpactSignif, m_w_1);
-	    if(i<DevTuple::maxNTrk && m_curTup){
-                 m_curTup->p_prob[i]=RankBTrk(SelectedTracks[i]->pt(),JetDir.Pt(),0.);
-                 m_curTup->s_prob[i]=RankBTrk(0.,0.,ImpactSignif); 
-                 m_curTup->SigR[i]=SignifR; m_curTup->SigZ[i]=SignifZ; 
-                 m_curTup->d0[i]=Impact[0]; m_curTup->Z0[i]=Impact[1];
-	         m_curTup->idMC[i]=getG4Inter(SelectedTracks[i]); 
-	         if(isBTrk(SelectedTracks[i]))m_curTup->idMC[i]=2;
-	         if(getMCPileup(SelectedTracks[i]))m_curTup->idMC[i]=3;
-		 m_curTup->wgtB[i]=trkScore[i][0]; m_curTup->wgtL[i]=trkScore[i][1]; m_curTup->wgtG[i]=trkScore[i][2]; 
-		 m_curTup->Sig3D[i]=TrkSig3D[i];
-		 m_curTup->chg[i]=tmpPerigee[4]<0. ? 1: -1;
-                 m_curTup->ibl[i]=hitIBL[i];
-		 m_curTup->bl[i]=hitBL[i];
-		 TLorentzVector TLV; 
-                 TLV.SetPtEtaPhiE(SelectedTracks[i]->pt(),SelectedTracks[i]->eta(),SelectedTracks[i]->phi(),SelectedTracks[i]->e());
-		 m_curTup->pTvsJet[i]=TLV.Perp(JetDir.Vect());
-		 TLorentzVector normJ;  normJ.SetPtEtaPhiM(1.,JetDir.Eta(),JetDir.Phi(),0.);
-		 m_curTup->prodTJ[i]=sqrt(TLV.Dot(normJ));
-		 m_curTup->nVrtT[i]=0;
-            }
-	 }
+         }
+         TrackPt[i] = sin(tmpPerigee[3])/fabs(tmpPerigee[4]);
+	 if(ImpactSignif < 3.) { NPrimTrk += 1;}
+         else{NSecTrk += 1;}
+         if( SignifR<0 || SignifZ<0 ) m_NRefTrk++;
+         if(m_getNegativeTail){
+  	    ImpactSignif = sqrt( SignifR*SignifR + SignifZ*SignifZ);
+  	 }else if(m_getNegativeTag){
+  	    ImpactSignif = sqrt(  (SignifR-0.6)*(SignifR-0.6)
+  	                        + (SignifZ-0.5)*(SignifZ-0.5) );
+ 	 }else{
+  	    ImpactSignif = sqrt(  (SignifR+0.6)*(SignifR+0.6)
+  	                        + (SignifZ+0.5)*(SignifZ+0.5) );
+  	 }
+         if(fabs(SignifR) < m_AntiPileupSigRCut) {   // cut against tracks from pileup vertices  
+           if(SignifZ > 1.+m_AntiPileupSigZCut ) ImpactSignif=0.;  
+           if(SignifZ < 1.-m_AntiPileupSigZCut ) ImpactSignif=0.;  
+         }
+         TrackSignif[i]=ImpactSignif;
+         TrkSigZ[i]=SignifZ;
+         if(m_FillHist){m_hb_impact->Fill( ImpactSignif, m_w_1);}
+	 adpt[i]=pow(TrackPt[i]/JetDir.Perp(),0.5);
+	 //adpt[i]=trkPtCorr(TrackPt[i]);
       }
-      if(m_fillHist){  m_curTup->ptjet=JetDir.Perp();  m_curTup->etajet=fabs(JetDir.Eta()); m_curTup->phijet=JetDir.Phi();
-                       m_curTup->nTrkInJet=std::min(NTracks,DevTuple::maxNTrk); };
-      if(nTrkHF==0) return; //======  No at all good HF tracks 
 
-      ListSecondTracks.reserve(2*NTracks);                 // Reserve memory for single vertex
+      m_NRefTrk=TMath::Max(NPrimTrk,TMath::Max(2,(int)(0.3*NTracks)));
+      //double addNTrkDep=TMath::Min((JetDir.Perp()/1.e6),m_TrkSigNTrkDep)*m_NRefTrk;      // NTrk dependence
+      double addNTrkDep=TMath::Min((JetDir.Perp()/150.e3),1.)*m_TrkSigNTrkDep*m_NRefTrk;      // NTrk dependence
+      double SelLim = m_TrkSigCut;
 
+      if(m_FillHist){   int nSelTPairs=0;
+        for(i=0; i<NTracks; i++){ if(TrackSignif[i] < SelLim+m_TrkSigSumCut/2+adpt[i])continue;  nSelTPairs++;} 
+        m_hb_nHImpTrkCnt->Fill((double)nSelTPairs,m_w_1);
+      }
+
+      StatusCode sc; if(sc.isSuccess())ImpactSignif=0;      //Safety !
+      //if(m_MultiVertex || m_MultiWithPrimary) m_WorkArray->m_Incomp.reserve(NTracks*(NTracks-1));   // Reserve memory for PGRAPH multivertex
+      ListSecondTracks.reserve(2*NTracks);                 // Reserve memory for sigle vertex
 
       Amg::Vector3D iniVrt(0.,0.,0.);
       m_fitSvc->setDefault();
@@ -771,76 +937,87 @@ namespace InDet{
       m_fitSvc->setMomCovCalc(1);                     // Total momentum and its covariance matrix are calculated
       for (i=0; i<NTracks-1; i++) {
          for (j=i+1; j<NTracks; j++) {
-             if(trkScore[i][0]==0.)continue;
-             if(trkScore[j][0]==0.)continue;
- 	     if(!m_multiWithPrimary) {  // Not used for multi-vertex with primary one search
-                if( trkScore[i][0]<m_cutHFClass )continue;  //Not classified HF tracks
-                if( trkScore[j][0]<m_cutHFClass )continue;  //Not classified HF tracks
+         //--if(m_MultiVertex || m_MultiWithPrimary){m_WorkArray->m_Incomp.push_back(i);m_WorkArray->m_Incomp.push_back(j);} // For PGRAPH multivertex   !!!ALL SELECTIONS MUST BE AFTER THIS LINE!!!
+	     if(TrackSignif[i]==0.)continue; // Pileup and other problems
+ 	     if(TrackSignif[j]==0.)continue; // Pileup and other problems
+             double cutTrI= SelLim +adpt[i] +addNTrkDep/2.;
+             double cutTrJ= SelLim +adpt[j] +addNTrkDep/2.;
+	     if(!m_MultiWithPrimary) {  // Not used for multi-vertex with primary one search
+                if(TrackSignif[i] < cutTrI) continue;
+                if(TrackSignif[j] < cutTrJ) continue;
+		if(TrackSignif[i]+TrackSignif[j]  < cutTrI+cutTrJ +m_TrkSigSumCut +addNTrkDep) continue;
 	     }
 	     int BadTracks = 0;                                       //Bad tracks identification 
-             TracksForFit.resize(2);
+             TracksForFit.clear();
              m_fitSvc->setDefault();                          //Reset VKalVrt settings
              m_fitSvc->setMomCovCalc(1);                     // Total momentum and its covariance matrix are calculated
-             TracksForFit[0]=SelectedTracks[i];
-             TracksForFit[1]=SelectedTracks[j];
-             sc=VKalVrtFitFastBase(TracksForFit,tmpVrt.FitVertex);              /* Fast crude estimation*/
-             if( sc.isFailure() || tmpVrt.FitVertex.perp() > m_rLayer2*2. ) {   /* No initial estimation */ 
+             TracksForFit.push_back( SelectedTracks[i] );
+             TracksForFit.push_back( SelectedTracks[j] );
+             sc=VKalVrtFitFastBase(TracksForFit,FitVertex);              /* Fast crude estimation*/
+             if( sc.isFailure() || FitVertex.perp() > m_Rlayer2*2. ) {   /* No initial estimation */ 
                 iniVrt=PrimVrt.position();
-                if( m_multiWithPrimary ) iniVrt.setZero(); 
+                if( m_MultiWithPrimary ) iniVrt.setZero(); 
  	     } else {
-                JetVrtDir = ProjSV_PV(tmpVrt.FitVertex,PrimVrt,JetDir);
-                if( m_multiWithPrimary ) JetVrtDir=fabs(JetVrtDir); /* Always positive when primary vertex is seeked for*/ 
-                if( JetVrtDir>0. ) iniVrt=tmpVrt.FitVertex;                /* Good initial estimation */ 
+                vDist=FitVertex-PrimVrt.position();
+                JetVrtDir = JetDir.Px()*vDist.x() + JetDir.Py()*vDist.y() + JetDir.Pz()*vDist.z();
+                if( m_MultiWithPrimary ) JetVrtDir=fabs(JetVrtDir); /* Always positive when primary vertex is seeked for*/ 
+                if( JetVrtDir>0. ) iniVrt=FitVertex;                /* Good initial estimation */ 
                 else               iniVrt=PrimVrt.position();
              }
              m_fitSvc->setApproximateVertex(iniVrt.x(), iniVrt.y(), iniVrt.z()); 
-             tmpVrt.i=i; tmpVrt.j=j;
-             sc=VKalVrtFitBase(TracksForFit,tmpVrt.FitVertex, tmpVrt.Momentum, Charge,
-                               tmpVrt.ErrorMatrix, tmpVrt.Chi2PerTrk, tmpVrt.TrkAtVrt, tmpVrt.Chi2);
-             if(sc.isFailure())                       continue;          /* No fit */ 
-             if(tmpVrt.Chi2 > m_sel2VrtChi2Cut)       continue;          /* Bad Chi2 */
-	     if(fabs(tmpVrt.FitVertex.z())> 650.)     continue;  // definitely outside of Pixel detector
-             Dist2D=tmpVrt.FitVertex.perp(); 
+             sc=VKalVrtFitBase(TracksForFit,FitVertex, Momentum,Charge,
+                               ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2);
+             if(sc.isFailure())                continue;          /* No fit */ 
+             if(Chi2 > m_Sel2VrtChi2Cut+4.)    continue;          /* Bad Chi2 */
+	     if(fabs(FitVertex.z())> 650.)     continue;  // definitely outside of Pixel detector
+             Dist2D=FitVertex.perp(); 
 	     if(Dist2D    > 180. )             continue;  // can't be from B decay
-             double mass_PiPi =  tmpVrt.Momentum.M();  
-	     if(mass_PiPi > c_vrtBCMassLimit)      continue;  // can't be from B decay
-             VrtVrtDist(PrimVrt, tmpVrt.FitVertex, tmpVrt.ErrorMatrix, Signif3D);
-	     tmpVrt.Signif3D=Signif3D;
-             VrtVrtDist2D(PrimVrt, tmpVrt.FitVertex, tmpVrt.ErrorMatrix, tmpVrt.Signif2D);
+	     if(m_useMaterialRejection && Dist2D>m_Rbeampipe-2.)
+	         { if( TrkSigZ[i]>25. || TrkSigZ[j]>25. || TrkSigZ[i]<-10. || TrkSigZ[j]<-10.) continue; }
+             VrtVrtDist(PrimVrt, FitVertex, ErrorMatrix, Signif3D);
 //---
-             TVector3 SVmPV(tmpVrt.FitVertex.x()-PrimVrt.x(),tmpVrt.FitVertex.y()-PrimVrt.y(),tmpVrt.FitVertex.z()-PrimVrt.z());
-             JetVrtDir = SVmPV.Dot(JetDir.Vect());
- 	     double vPos=SVmPV.Dot(tmpVrt.Momentum.Vect())/tmpVrt.Momentum.Rho();
-             if((!m_multiWithPrimary) &&(!m_getNegativeTail) && (!m_getNegativeTag) &&  JetVrtDir<0. )  continue; /* secondary vertex behind primary*/
-	     if(vPos<-100.) continue;                                              /* Secondary vertex is too far behind primary*/
+	     vDist=FitVertex-PrimVrt.position();
+             JetVrtDir = JetDir.Px()*vDist.x() + JetDir.Py()*vDist.y() + JetDir.Pz()*vDist.z();
+	     double vPos=(vDist.x()*Momentum.Px()+vDist.y()*Momentum.Py()+vDist.z()*Momentum.Pz())/Momentum.Rho();
+  	     if((!m_MultiWithPrimary) &&(!m_getNegativeTail) && (!m_getNegativeTag) &&  JetVrtDir<0. )  continue; /* secondary vertex behind primary*/
+	     if(vPos<-150.) continue;                                              /* Secondary vertex is too far behind primary*/
 //
 // Check pixel hits vs vertex positions.
-             if(m_useVertexCleaning){    if(!Check2TrVertexInPixel(SelectedTracks[i],SelectedTracks[j],tmpVrt.FitVertex,tmpVrt.ErrorMatrix)) continue;     }
+             if(m_useVertexCleaning){    if(!Check2TrVertexInPixel(SelectedTracks[i],SelectedTracks[j],FitVertex,Signif3D)) continue;     }
 //--------
 //
-             double Signif3Dproj=VrtVrtDist( PrimVrt, tmpVrt.FitVertex, tmpVrt.ErrorMatrix, JetDir);
-	     tmpVrt.Signif3DProj=Signif3Dproj;
+             double Signif3Dproj=VrtVrtDist( PrimVrt, FitVertex, ErrorMatrix, JetDir);
              double Signif3DSign=Signif3D; if(JetVrtDir<0) Signif3DSign=-Signif3D;
-  	     if(m_fillHist){ m_hb_signif3D->Fill( Signif3DSign, m_w_1); m_hb_sig3DNtr->Fill(Signif3Dproj, 1.);}
-
-             //if( m_multiWithPrimary || m_multiVertex) { // For multivertex
-             //  add_edge(i,j,*m_compatibilityGraph);
-             //} 
-  	     if( m_multiWithPrimary )   continue;   /* Multivertex with primary one. All below is not needed */
+  	     if(m_FillHist)m_hb_signif3D->Fill( Signif3DSign, m_w_1);
+             if(Signif3DSign<12. && Chi2>m_Sel2VrtChi2Cut)       continue;          /* Bad Chi2 */
+
+             if( m_MultiWithPrimary || m_MultiVertex) { // For multivertex
+	       double limPtTr=m_JetPtFractionCut*JetDir.Perp();
+               if(TrackPt[i]<limPtTr && Signif3D<9. && m_MultiWithPrimary) continue;
+               if(TrackPt[j]<limPtTr && Signif3D<9. && m_MultiWithPrimary) continue;
+	       //m_WorkArray->m_Incomp.pop_back();m_WorkArray->m_Incomp.pop_back();   //For PGRAPH 
+               add_edge(i,j,*m_compatibilityGraph);
+             } 
+
+  	     if( m_MultiWithPrimary )   continue;   /* Multivertex with primary one. All below is not needed */
+             double mass_PiPi =  Momentum.M();  
+	     if(mass_PiPi > 6000.)      continue;  // can't be from B decay
 //
 //  Check if V0 or material interaction on Pixel layer is present
 //
 	     if( Charge == 0 && Signif3D>8. && mass_PiPi<900.) {
-               double mass_PPi  =  massV0( tmpVrt.TrkAtVrt,m_massP,m_massPi);
-               double mass_EE   =  massV0( tmpVrt.TrkAtVrt,m_massE,m_massE);
-               if(m_fillHist && !m_multiVertex){m_hb_massEE->Fill( mass_EE, m_w_1);} 
+               double mass_PPi  =  massV0( TrkAtVrt,m_massP,m_massPi);
+               double mass_EE   =  massV0( TrkAtVrt,m_massE,m_massE);
+               if(m_FillHist && !m_MultiVertex){m_hb_massEE->Fill( mass_EE, m_w_1);} 
 	       if(       mass_EE <  40.)  { 
 	         BadTracks = 3;
 	       }else{
-                 if(m_fillHist && !m_multiVertex){m_hb_massPiPi->Fill( mass_PiPi, m_w_1);} /* Total mass with input particles masses*/
-                 if(m_fillHist && !m_multiVertex){m_hb_massPPi->Fill( mass_PPi, m_w_1);} 
+                 if(m_FillHist && !m_MultiVertex){m_hb_massPiPi->Fill( mass_PiPi, m_w_1);} /* Total mass with input particles masses*/
+                 if(m_FillHist && !m_MultiVertex){m_hb_massPPi->Fill( mass_PPi, m_w_1);} 
 	         if( fabs(mass_PiPi-m_massK0) < 22. )  BadTracks = 1;
 	         if( fabs(mass_PPi-m_massLam) <  8. )  BadTracks = 2;
+	         //double TransMass=TotalTMom(GetPerigeeVector(TracksForFit));
+	         //if( TransMass<400. && m_FillHist)m_hb_massPiPi1->Fill( mass_PiPi, m_w_1);
 	       }
 //
 //  Creation of V0 tracks
@@ -857,7 +1034,7 @@ namespace InDet{
                     m_fitSvc->setCnstType(1);       // Set mass  constraint
                   }
 		  if( BadTracks == 2 ) {  // Lambda case
-	            if( fabs(1./tmpVrt.TrkAtVrt[0][2]) > fabs(1./tmpVrt.TrkAtVrt[1][2]) ) {
+	            if( fabs(1./TrkAtVrt[0][2]) > fabs(1./TrkAtVrt[1][2]) ) {
 		            InpMassV0.push_back(m_massP);InpMassV0.push_back(m_massPi);
 	            }else{  InpMassV0.push_back(m_massPi);InpMassV0.push_back(m_massP); }
                     m_fitSvc->setMassInputParticles( InpMassV0 );
@@ -868,45 +1045,41 @@ namespace InDet{
 		    InpMassV0.push_back(m_massE);InpMassV0.push_back(m_massE);
                     m_fitSvc->setMassInputParticles( InpMassV0 );
                     m_fitSvc->setCnstType(12);       // Set 3d angular constraint
+//                    m_fitSvc->setVertexForConstraint(PrimVrt.x(),PrimVrt.y(),PrimVrt.z());
+//                    m_fitSvc->setCovVrtForConstraint(0.015*0.015,0.,0.015*0.015,0.,0.,56.*56);
+//                    m_fitSvc->setCnstType(7);          // Set pointing to primary vertex constraint
                   }
-                  m_fitSvc->setApproximateVertex(tmpVrt.FitVertex.x(),tmpVrt.FitVertex.y(),tmpVrt.FitVertex.z()); 
+                  m_fitSvc->setApproximateVertex(FitVertex.x(),FitVertex.y(),FitVertex.z()); 
                   TLorentzVector MomentumV0;
                   Amg::Vector3D  FitVertexV0;
-                  std::vector< std::vector<double> > TrkAtVrtV0; 
-                  std::vector<double> ErrorMatrixV0;
-		  double Chi2V0;
+                  std::vector< std::vector<double> > TrkAtVrt0; 
+		  double Chi2_0;
                   sc=VKalVrtFitBase(TracksForFit, FitVertexV0, MomentumV0, Charge,
-                                    ErrorMatrixV0,Chi2PerTrk,TrkAtVrtV0,Chi2V0);
+                                    ErrorMatrix,Chi2PerTrk,TrkAtVrt0,Chi2_0);
                   if(sc.isSuccess()) {
-                    sc=m_fitSvc->VKalVrtCvtTool(FitVertexV0,MomentumV0,ErrorMatrixV0,0,VKPerigee,CovPerigee);
+                
+                    sc=m_fitSvc->VKalVrtCvtTool(FitVertexV0,MomentumV0,ErrorMatrix,0,VKPerigee,CovPerigee);
                     if(sc.isSuccess()) {
                       const Trk::Track* TT = m_fitSvc->CreateTrkTrack(VKPerigee,CovPerigee); 
-                      double ImpactSignifV0=m_fitSvc->VKalGetImpact(TT, PrimVrt.position(), 0, Impact, ImpactError);
-                      if(m_fillHist){m_hb_impV0->Fill( ImpactSignifV0, m_w_1);}
-	              if(ImpactSignifV0>3.0 ) BadTracks=0;
+                      ImpactSignif=m_fitSvc->VKalGetImpact(TT, PrimVrt.position(), 0, Impact, ImpactError);
+                      if(m_FillHist){m_hb_impV0->Fill( ImpactSignif, m_w_1); }
+	              if(ImpactSignif>3.5) BadTracks=0;
 		      delete TT;
 	            } else { BadTracks=0;}
 	         }  // else { BadTracks=0;}
                }
              }
 //
-//  Check interactions on material layers
+//  Check interactions on pixel layers
 //
-            float minWgtI = std::min(trkScore[i][2],trkScore[j][2]);
-            if( minWgtI >0.50 && Dist2D > m_beampipeR-VrtRadiusError(tmpVrt.FitVertex, tmpVrt.ErrorMatrix) ) BadTracks = 4;
-            //if( (trkScore[i][2]>0.4 || trkScore[j][2]>0.4) 
-            //   && insideMatLayer(tmpVrt.FitVertex.x(),tmpVrt.FitVertex.y()) ) BadTracks=5;
-//
-//-----------------------------------------------
-	     tmpVrt.badVrt=BadTracks;          //
-	     all2TrVrt.push_back(tmpVrt);      //
-//-----------------------------------------------
-             if(m_fillHist){  m_hb_r2d->Fill( tmpVrt.FitVertex.perp(), m_w_1); }
-	     //if(m_useMaterialRejection && Dist2D>m_beampipeR-2.){
-             //if(m_materialMap){
-             //  if(m_materialMap->inMaterial(tmpVrt.FitVertex)) BadTracks=4;
-             //  if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" MaterialMap test="<< BadTracks<<endreq;
-             //}
+             if(m_FillHist){  m_hb_r2d->Fill( FitVertex.perp(), m_w_1); }
+	     if(m_useMaterialRejection && Dist2D>m_Rbeampipe-2.){
+	        float ptLim=TMath::Max(m_hadronIntPtCut,m_JetPtFractionCut*JetDir.Perp());
+               
+                if( TMath::Min(TrackPt[i],TrackPt[j])<ptLim ){
+                   if(  insideMatLayer(FitVertex.x(), FitVertex.y()) ) BadTracks = 4;
+                } 
+             }
 //
 //  Creation of tracks from V0 list
 //	     
@@ -914,86 +1087,78 @@ namespace InDet{
 	        TrkFromV0.push_back(SelectedTracks[i]);
 	        TrkFromV0.push_back(SelectedTracks[j]);
 	     }else{
+                double limPtTr=m_JetPtFractionCut*JetDir.Perp();
+                if(TrackPt[i]<limPtTr && Signif3D<15.)continue;
+                if(TrackPt[j]<limPtTr && Signif3D<15.)continue;
 //
   		double JetVrtDir =
-   	          JetDir.Px()*(tmpVrt.FitVertex.x()-PrimVrt.x())
-                + JetDir.Py()*(tmpVrt.FitVertex.y()-PrimVrt.y())
- 		+ JetDir.Pz()*(tmpVrt.FitVertex.z()-PrimVrt.z());
+   	          JetDir.Px()*(FitVertex.x()-PrimVrt.x())
+                + JetDir.Py()*(FitVertex.y()-PrimVrt.y())
+ 		+ JetDir.Pz()*(FitVertex.z()-PrimVrt.z());
                 if(m_getNegativeTail) JetVrtDir=fabs(JetVrtDir);  // For negative TAIL
   	                                                          // accepts also negative
   	                                                          // track pairs
                 if(m_getNegativeTag) JetVrtDir=-JetVrtDir;        // For negative TAG
   	                                                          // accepts only negative
   	                                                          // track pairs
-	        if( (Signif3D>m_sel2VrtSigCut) ) {
-                  if(fabs(Signif3Dproj)<m_sel2VrtSigCut)continue;
+	        if( (Signif3D>m_Sel2VrtSigCut) && (JetVrtDir>0) ) {
+                  if(fabs(Signif3Dproj)<m_Sel2VrtSigCut)continue;
 	          ListSecondTracks.push_back(SelectedTracks[i]);
 	          ListSecondTracks.push_back(SelectedTracks[j]);
 	          closeVrtSig.push_back(Signif3D);
-	          closeVrtCh2.push_back(Chi2);
                 }
 	     }
          }
       } 
-//      if(m_fillHist)  fillVrtNTup(all2TrVrt);
-
 //
-//-- Start vertex analysis
-/*
-      std::vector<int> trkTypeSV(NTracks,-1);   // Track identification: -1 -unknown, 2-fragmentation, 1-Interaction, 0-HF
-      std::vector<int> nFrVrtT(NTracks,0);      // Fragmentation vertex per track counter
-      int foundHF=0;
-      for( auto vv : all2TrVrt){
-        if( 1.-1./11.*vv.Signif2D > std::min(trkScore[vv.i][0],trkScore[vv.j][0]) ){
-           if( std::min(trkScore[vv.i][1],trkScore[vv.j][1]) > 0.5 ){ nFrVrtT[vv.i]++;  nFrVrtT[vv.j]++; }
-           continue;
-        }
-	if( trkScore[vv.i][0]+trkScore[vv.j][0] < trkScore[vv.i][1]+trkScore[vv.j][1]) continue;
-	if( trkScore[vv.i][0]+trkScore[vv.j][0] < trkScore[vv.i][2]+trkScore[vv.j][2]) continue;
-        trkTypeSV[vv.i]=0; trkTypeSV[vv.j]=0; foundHF++;
-        //if( trkScore[vv.i][0]>trkScore[vv.i][1] && trkScore[vv.j][0]>trkScore[vv.j][1] 
-        // && trkScore[vv.i][0]>trkScore[vv.i][2] && trkScore[vv.j][0]>trkScore[vv.j][2] ){ trkTypeSV[vv.i]=0; trkTypeSV[vv.j]=0; foundHF++; } 
-      }
-      for( auto vv : all2TrVrt){                                                 //Now interactions+V0s
-	if( foundHF==1 && (trkTypeSV[vv.i]==0 || trkTypeSV[vv.j]==0 )) continue; //preserve single HF-vertex
-        if( vv.badVrt ){ trkTypeSV[vv.i]=1; trkTypeSV[vv.j]=1;}
-      }
-      for( auto vv : all2TrVrt){                                                              //Now fragmentation
-        if( trkTypeSV[vv.i]>=0 || trkTypeSV[vv.j]>=0 ) continue;                              //Skip identified tracks
-        if( trkScore[vv.i][1]>trkScore[vv.i][0] && trkScore[vv.j][1]>trkScore[vv.j][0] 
-         && trkScore[vv.i][1]>trkScore[vv.i][2] && trkScore[vv.j][1]>trkScore[vv.j][2] ){ trkTypeSV[vv.i]=2; trkTypeSV[vv.j]=2;} 
-      }
-      for (i=0; i<NTracks; i++) if( trkTypeSV[i]==0 && nFrVrtT[i]>0 && trkScore[i][1]>0.5 ) trkTypeSV[i]=2;
-//      
-//-- Remove FF, IF(some) and II vertices
-//      iv=0; while ( iv < (int)all2TrVrt.size() )
-//             { if( trkTypeSV[all2TrVrt[iv].i]>0 && trkTypeSV[all2TrVrt[iv].j]>0) all2TrVrt.erase(all2TrVrt.begin()+iv); else iv++; }
+//-- Post-selection cleaning 
 //
-*/
-//-- Save results
-      ListSecondTracks.clear();
-      std::map<float,int> trkHF;
-      for( auto vv : all2TrVrt){ 
-        if( m_multiWithPrimary || m_multiVertex) add_edge(vv.i,vv.j,*m_compatibilityGraph);
-        trkHF[trkScore[vv.i][0]]=vv.i; trkHF[trkScore[vv.j][0]]=vv.j;
-      }
-      for( auto it : trkHF) { ListSecondTracks.push_back(SelectedTracks[it.second]); }
-//-Debug
-      if( m_fillHist && m_curTup ){ 
-         for( auto it : trkHF) { m_curTup->itHF[m_curTup->NTHF++]=it.second; }
-         for( auto vv : all2TrVrt){ m_curTup->nVrtT[vv.i]++; m_curTup->nVrtT[vv.j]++; }
-         fillVrtNTup(all2TrVrt);
+      if(ListSecondTracks.size()==1 && closeVrtSig[0]<9.){    //Turned off for the moment (ListSecondTracks.size() can't be 1!)
+        auto it0=std::find(SelectedTracks.begin(),SelectedTracks.end(),ListSecondTracks[0]);
+        auto it1=std::find(SelectedTracks.begin(),SelectedTracks.end(),ListSecondTracks[1]);
+	int eGood=1; double cutNTrkDep=cutNDepNorm(m_NRefTrk,0.05);                        // NTrk dependence
+        if(it0!=SelectedTracks.end() && pow(TrackSignifBase[it0-SelectedTracks.begin()],2.) < cutNTrkDep )  eGood=0;
+        if(it1!=SelectedTracks.end() && pow(TrackSignifBase[it1-SelectedTracks.begin()],2.) < cutNTrkDep )  eGood=0;
+	if(!eGood)ListSecondTracks.clear();
       }
-//
-//--------------------------------------------------------------------
-//-- Post-selection checks 
-//--------------------------------------------------------------------
+      //--------------------------------------------------------------------
       if(ListSecondTracks.size()>0 ){ 
-        if(m_fillHist){ m_pr_effVrt2tr->Fill((float)m_NRefPVTrk,1.);
+        if(m_FillHist){ m_pr_effVrt2tr->Fill((float)m_NRefTrk,1.);
                       //m_pr_effVrt2trEta->Fill( JetDir.Eta(),1.);}
                         m_pr_effVrt2trEta->Fill( JetDir.Eta(),(double)ListSecondTracks.size()/2.);}
-      } else if(ListSecondTracks.size()==0) { if(m_fillHist){m_pr_effVrt2tr->Fill((float)m_NRefPVTrk,0.);
+	//----- Only vertices with unique tracks are considered as bad
+	if(TrkFromV0.size()){
+	  std::vector<const Track*> tmpVec(0);
+          for(int tk=0;tk<(int)TrkFromV0.size(); tk+=2){
+            int nCheck1=std::count(TrkFromV0.begin(),TrkFromV0.end(),TrkFromV0[tk]);
+            int nCheck2=std::count(TrkFromV0.begin(),TrkFromV0.end(),TrkFromV0[tk+1]);
+            int nFound1=std::count(ListSecondTracks.begin(),ListSecondTracks.end(),TrkFromV0[tk]);
+            int nFound2=std::count(ListSecondTracks.begin(),ListSecondTracks.end(),TrkFromV0[tk+1]);
+	    if(nFound1+nFound2 && nCheck1==1 && nCheck2==1 ){  //Unique in TrkFromV0 but duplicated in ListSecondTracks
+	       ListSecondTracks.push_back(TrkFromV0[tk]);
+	       ListSecondTracks.push_back(TrkFromV0[tk+1]);
+	    }else{
+	       tmpVec.push_back(TrkFromV0[tk]);
+	       tmpVec.push_back(TrkFromV0[tk+1]);
+            }
+          }
+          TrkFromV0.swap(tmpVec);
+	}
+      } else if(ListSecondTracks.size()==0) { if(m_FillHist){m_pr_effVrt2tr->Fill((float)m_NRefTrk,0.);
                                                              m_pr_effVrt2trEta->Fill(JetDir.Eta(),0.); }}
+/////////// Attempt to find iasolated tracks with high impact parameter. They are RARE!!! No worth to use them!
+//        TLorentzVector psum,tmp; int nprt=0;
+//        for (i=0; i<NTracks; i++) {
+//          if( TrackSignif[i]<2.*SelLim || signTrk[i]<0) continue;
+//     auto it0=std::find(ListSecondTracks.begin(),ListSecondTracks.end(),SelectedTracks[i]); if( it0!=ListSecondTracks.end() )continue;
+//          it0=std::find(TrkFromV0.begin(),TrkFromV0.end(),SelectedTracks[i]);               if( it0!=TrkFromV0.end() )continue;
+//          it0=std::find(ListCloseTracks.begin(),ListCloseTracks.end(),SelectedTracks[i]);   if( it0!=ListCloseTracks.end() )continue;
+//          int ibl,bl,l1,nlay; getPixelLayers(SelectedTracks[i], ibl, bl, l1, nlay); if(ibl+bl<2)continue; 
+//          nprt++; tmp.SetPtEtaPhiM(SelectedTracks[i]->pt(),SelectedTracks[i]->eta(),SelectedTracks[i]->phi(),m_massPi); psum += tmp;
+//        } if(nprt<1)return;
+//        if(nprt==1) { tmp.SetPtEtaPhiM(psum.Pt(),JetDir.Eta(),JetDir.Phi(),m_massPi); psum += tmp; }
+//        if(m_FillHist)m_hb_massPiPi1->Fill( psum.M(), m_w_1);
+/////////////////////////////////////
       return;
    }
 
@@ -1002,7 +1167,8 @@ namespace InDet{
 
    template <class Track>
    bool InDetVKalVxInJetTool::Check2TrVertexInPixel( const Track* p1, const Track* p2,
-                                              Amg::Vector3D &FitVertex, std::vector<double> & VrtErr)
+                                              //Amg::Vector3D &FitVertex, double Signif3D)
+                                              Amg::Vector3D &FitVertex, double)
    const
    {
 	int blTrk[2]={0,0};
@@ -1015,40 +1181,46 @@ namespace InDet{
         getPixelLayers( p2, blTrk[1] , l1Trk[1], l2Trk[1], nLays[1] );    // Very close to PV. Both b-layer hits are mandatory.
         getPixelProblems(p1, blP[0], l1P[0] );
         getPixelProblems(p2, blP[1], l1P[1] );
-        double xDif=FitVertex.x()-m_xLayerB, yDif=FitVertex.y()-m_yLayerB ; 
+        //if( Signif3D<15. && FitVertex.perp()<15. ){
+	//   if( blTrk[0]<1  && l1Trk[0]<1  )  return false;
+	//   if( blTrk[1]<1  && l1Trk[1]<1  )  return false;
+        //}
+        double xDif=FitVertex.x()-m_XlayerB, yDif=FitVertex.y()-m_YlayerB ; 
         double Dist2DBL=sqrt(xDif*xDif+yDif*yDif);
-        if      (Dist2DBL < m_rLayerB-VrtRadiusError(FitVertex, VrtErr)) {       //----------------------------------------- Inside B-layer
+        if      (Dist2DBL < m_RlayerB-m_SVResolutionR){       //----------------------------------------- Inside B-layer
           if( blTrk[0]==0 && blTrk[1]==0) return false;  // No b-layer hits at all, but all expected
 	  if( blTrk[0]<1  && l1Trk[0]<1 ) return false;
 	  if( blTrk[1]<1  && l1Trk[1]<1 ) return false;
           if(  nLays[0]           <2 )    return false;  // Less than 2 layers on track 0
           if(  nLays[1]           <2 )    return false;  // Less than 2 layers on track 1
 	  return true;
-        }else if(Dist2DBL > m_rLayerB+VrtRadiusError(FitVertex, VrtErr)){      //----------------------------------------- Outside b-layer
-          if( blTrk[0]>0 && blP[0]==0 && blTrk[1]>0 && blP[1]==0 ) return false;  // Good hit in b-layer is present
-        }
+        }else if(Dist2DBL > m_RlayerB+m_SVResolutionR){      //----------------------------------------- Outside b-layer
+          if( blTrk[0]>0 && blP[0]==0 ) return false;  // Good hit in b-layer is present
+          if( blTrk[1]>0 && blP[1]==0 ) return false;  // Good hit in b-layer is present
+       }
 // 
 // L1 and L2 are considered only if vertex is in acceptance
 //
 	if(fabs(FitVertex.z())<400.){
-          xDif=FitVertex.x()-m_xLayer1, yDif=FitVertex.y()-m_yLayer1 ;
+          xDif=FitVertex.x()-m_Xlayer1, yDif=FitVertex.y()-m_Ylayer1 ;
 	  double Dist2DL1=sqrt(xDif*xDif+yDif*yDif);
-          xDif=FitVertex.x()-m_xLayer2, yDif=FitVertex.y()-m_yLayer2 ; 
+          xDif=FitVertex.x()-m_Xlayer2, yDif=FitVertex.y()-m_Ylayer2 ; 
 	  double Dist2DL2=sqrt(xDif*xDif+yDif*yDif);
-          if      (Dist2DL1 < m_rLayer1-VrtRadiusError(FitVertex, VrtErr)) {   //------------------------------------------ Inside 1st-layer
+          if      (Dist2DL1 < m_Rlayer1-m_SVResolutionR) {   //------------------------------------------ Inside 1st-layer
 	     if( l1Trk[0]==0 && l1Trk[1]==0 )     return false;  // No L1 hits at all
              if( l1Trk[0]<1  && l2Trk[0]<1  )     return false;  // Less than 1 hits on track 0
              if( l1Trk[1]<1  && l2Trk[1]<1  )     return false;  // Less than 1 hits on track 1
              return true;
-          }else if(Dist2DL1 > m_rLayer1+VrtRadiusError(FitVertex, VrtErr)) {  //------------------------------------------- Outside 1st-layer
-	     if( l1Trk[0]>0 && l1P[0]==0 && l1Trk[1]>0 && l1P[1]==0 )       return false;  //  Good L1 hit is present
+          }else if(Dist2DL1 > m_Rlayer1+m_SVResolutionR) {  //------------------------------------------- Outside 1st-layer
+	     if( l1Trk[0]>0 && l1P[0]==0 )       return false;  //  Good L1 hit is present
+	     if( l1Trk[1]>0 && l1P[1]==0 )       return false;  //  Good L1 hit is present
           }
           
-          if      (Dist2DL2 < m_rLayer2-VrtRadiusError(FitVertex, VrtErr)) {  //------------------------------------------- Inside 2nd-layer
+          if      (Dist2DL2 < m_Rlayer2-m_SVResolutionR) {  //------------------------------------------- Inside 2nd-layer
 	     if( (l2Trk[0]+l2Trk[1])==0 )  return false;           // At least one L2 hit must be present
-          }else if(Dist2DL2 > m_rLayer2+VrtRadiusError(FitVertex, VrtErr)) {  
+          }else if(Dist2DL2 > m_Rlayer2+m_SVResolutionR) {  
 	  //   if( (l2Trk[0]+l2Trk[1])>0  )  return false;           // L2 hits are present
-	  }     
+	  }           
         } else {
 	  int d0Trk[2]={0,0}; 
 	  int d1Trk[2]={0,0}; 
@@ -1061,4 +1233,60 @@ namespace InDet{
         return true;
    }
 
+    
+
+
+    template <class Track>
+    double InDetVKalVxInJetTool::RemoveNegImpact(std::vector<const Track*>  & inTracks,
+                                                 const xAOD::Vertex        & PrimVrt,
+	                                         const TLorentzVector      & JetDir,
+					         double Limit)
+    const
+    {
+      int blTrk=0, l1Trk=0, l2Trk=0, nLays=0;
+      int i=0;
+      while( i<(int)inTracks.size()){
+        getPixelLayers( inTracks[i], blTrk , l1Trk, l2Trk, nLays );
+        //if(nLays<1 || inTracks[i]->pt()>JetDir.Pt()) inTracks.erase(inTracks.begin()+i); //bad track: no pixel hit OR trk_pt>jet_pt
+        if(nLays<1) inTracks.erase(inTracks.begin()+i); //bad track: no pixel hit
+        else        i++;
+      }
+//----
+      int NTracks = inTracks.size();
+      std::vector<double> ImpR(NTracks);
+      std::vector<double> Impact,ImpactError;
+      AmgVector(5) tmpPerigee; tmpPerigee<<0.,0.,0.,0.,0.;
+      double maxImp=-1.e10, zImp=0.;
+      for (i=0; i<NTracks; i++) {
+         m_fitSvc->VKalGetImpact(inTracks[i], PrimVrt.position(), 1, Impact, ImpactError);
+         tmpPerigee = GetPerigee(inTracks[i])->parameters(); 
+         if( sin(tmpPerigee[2]-JetDir.Phi())*Impact[0] < 0 ){ Impact[0] = -fabs(Impact[0]);}
+	                                                else{ Impact[0] =  fabs(Impact[0]);}
+         if(  (tmpPerigee[3]-JetDir.Theta())*Impact[1] < 0 ){ Impact[1] = -fabs(Impact[1]);}
+	                                                else{ Impact[1] =  fabs(Impact[1]);}
+	 double SignifR = Impact[0]/ sqrt(ImpactError[0]); ImpR[i]=SignifR;
+         if(fabs(SignifR)   < m_AntiPileupSigRCut) {   // cut against tracks from pileup vertices  
+           if( fabs(Impact[1])/sqrt(ImpactError[2]) > m_AntiPileupSigZCut ) ImpR[i]=-9999.;  
+         }
+         if(fabs(Impact[1])/sqrt(ImpactError[2])>fabs(ImpR[i]) && Impact[1]<0 && ImpR[i]>0) ImpR[i]*=-1.;
+	 if(ImpR[i]>maxImp){maxImp=ImpR[i]; zImp=Impact[1]/sqrt(ImpactError[2]);}
+      }
+      if(maxImp<Limit){  inTracks.clear(); return maxImp;}
+      double rmin=1.e6;
+      do{ rmin=1.e6; int jpm=0; 
+          for(i=0; i<(int)ImpR.size(); i++){ if(rmin>ImpR[i]){rmin=ImpR[i]; jpm=i;}}; if(rmin>Limit)continue;
+          ImpR.erase(ImpR.begin()+jpm); inTracks.erase(inTracks.begin()+jpm);
+      }while(rmin<=Limit);
+      if(inTracks.size()==1 && zImp<1.){ inTracks.clear(); maxImp=0.;}
+      return maxImp;
+    }
+
+
+template
+bool InDetVKalVxInJetTool::Check2TrVertexInPixel( const xAOD::TrackParticle* p1,
+                                                  const xAOD::TrackParticle* p2,
+                                                  Amg::Vector3D &FitVertex, double)
+  const;
+
+
 }  //end of namespace
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSecMulti.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSecMulti.cxx
index 132cae29634bbc4f282fd9c385c26cec9a136cc1..615e19706a2bb8a1fa4cbb04e34e3a70ac2088a8 100755
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSecMulti.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSecMulti.cxx
@@ -30,15 +30,19 @@
 //   7) Jet energy used in (2) calculation 
 //---------------------------------------------------------------------------------------- 
 
-//namespace Trk {
-//  extern int  pgraphm_(
-//         long int *weit, long int *edges, long int *nodes,
-//         long int *set, long int *nptr,  long int *nth); }
+namespace Trk {
+extern   int  pgraphm_(
+         long int *weit, long int *edges, long int *nodes,
+         long int *set, long int *nptr,  long int *nth);
+}
+//extern "C" {
+//  float prob_(const float & Chi2, const long int& ndf);
+//}
 
 
 namespace InDet{
 
-const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not coming from B,C-decays
+const double VrtBCMassLimit=6000.;  // Mass limit to consider a vertex not comoming from B,C-decays
 
 
 //   std::vector<xAOD::Vertex*> InDetVKalVxInJetTool::GetVrtSecMulti(
@@ -57,9 +61,8 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
    {
 
       const double probVrtMergeLimit=0.04;
-      const int    useMaterialRejection=1;
 
-      m_NRefPVTrk=0;
+      m_NRefTrk=0;
       int inpNPart=0; 
       int i,j;
       if(xAODwrk){
@@ -92,11 +95,21 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
                           NTracks = RECwork->listJetTracks.size();
                           MomentumJet = TotalMom(GetPerigeeVector(RECwork->listJetTracks));}
 
+      if(NTracks>m_TrackInJetNumberLimit){
+        if     (xAODwrk ) xAODwrk->listJetTracks.resize(m_TrackInJetNumberLimit);
+        else if(RECwork ) RECwork->listJetTracks.resize(m_TrackInJetNumberLimit);
+        NTracks=m_TrackInJetNumberLimit;
+      }
       if( NTracks < 2 ) { return finalVertices;} // 0,1 selected track => nothing to do!
 
+      if(xAODwrk){
+          while( xAODwrk->listJetTracks.size()>4 && medianPtF(xAODwrk->listJetTracks)/JetDir.Pt()<0.01) 
+             xAODwrk->listJetTracks.pop_back();
+          NTracks = xAODwrk->listJetTracks.size();
+      }
       if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Number of selected tracks inside jet= " <<NTracks << endmsg;
       
-      if(m_fillHist){m_hb_jmom->Fill( MomentumJet.Perp(), m_w_1);
+      if(m_FillHist){m_hb_jmom->Fill( MomentumJet.Perp(), m_w_1);
                      m_hb_ntrkjet->Fill( (double) NTracks, m_w_1); }
 
 //
@@ -177,13 +190,13 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
           }
           if     (xAODwrk)sc = VKalVrtFitFastBase(xAODwrk->tmpListTracks,newvrt.vertex);
 	  else if(RECwork)sc = VKalVrtFitFastBase(RECwork->tmpListTracks,newvrt.vertex);
-          if( sc.isFailure() || newvrt.vertex.perp() > m_rLayer2*2.  ) {   /* No initial estimation */ 
+          if( sc.isFailure() || newvrt.vertex.perp() > m_Rlayer2*2.  ) {   /* No initial estimation */ 
               m_fitSvc->setApproximateVertex(PrimVrt.x(), PrimVrt.y(), PrimVrt.z()); /*Use as starting point*/
-              if( m_multiWithPrimary ) m_fitSvc->setApproximateVertex(0., 0., 0.); 
+              if( m_MultiWithPrimary ) m_fitSvc->setApproximateVertex(0., 0., 0.); 
  	  } else {
 	      Amg::Vector3D vDist=newvrt.vertex-PrimVrt.position();
               double JetVrtDir = JetDir.Px()*vDist.x() + JetDir.Py()*vDist.y() + JetDir.Pz()*vDist.z();
-              if( m_multiWithPrimary ) JetVrtDir=fabs(JetVrtDir); /* Always positive when primary vertex is seeked for*/ 
+              if( m_MultiWithPrimary ) JetVrtDir=fabs(JetVrtDir); /* Always positive when primary vertex is seeked for*/ 
               if( JetVrtDir>0. ) {                           /* Good initial estimation */ 
                   m_fitSvc->setApproximateVertex(newvrt.vertex.x(),newvrt.vertex.y(),newvrt.vertex.z()); /*Use as starting point*/
 	      }else{
@@ -272,7 +285,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
         }   if(jv!=tmpN)   break;  // One vertex is erased. Restart check
       }     if(iv==tmpN-1) break;  // No vertex deleted
     }
-    if(m_fillHist){ int cvgood=0; for(int iv=0; iv<(int)(*WrkVrtSet).size(); iv++) if((*WrkVrtSet)[iv].Good)cvgood++;
+    if(m_FillHist){ int cvgood=0; for(int iv=0; iv<(int)(*WrkVrtSet).size(); iv++) if((*WrkVrtSet)[iv].Good)cvgood++;
                     m_hb_rawVrtN->Fill( (float)cvgood, m_w_1); }
 //- Try to merge all vertices which have at least 2 common track
     for(int iv=0; iv<(int)(*WrkVrtSet).size()-1; iv++ ){
@@ -281,7 +294,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
          if(!(*WrkVrtSet)[jv].Good )           continue;
          if(nTrkCommon( WrkVrtSet, iv, jv)<2)  continue;
          if( VrtVrtDist((*WrkVrtSet)[iv].vertex,(*WrkVrtSet)[iv].vertexCov,
-                        (*WrkVrtSet)[jv].vertex,(*WrkVrtSet)[jv].vertexCov) < m_vertexMergeCut) {
+                        (*WrkVrtSet)[jv].vertex,(*WrkVrtSet)[jv].vertexCov) < m_VertexMergeCut) {
 	    double probV=0.;
             if     (xAODwrk)probV=mergeAndRefitVertices( WrkVrtSet, iv, jv, newvrt, xAODwrk->listJetTracks);
             else if(RECwork)probV=mergeAndRefitVertices( WrkVrtSet, iv, jv, newvrt, RECwork->listJetTracks);
@@ -306,7 +319,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
 //       if( (*WrkVrtSet)[iv].SelTrk.size()!=2)continue;
 //       if( (*WrkVrtSet)[iv].ProjectedVrt <0.) (*WrkVrtSet)[iv].Good =false;
 //       if( (*WrkVrtSet)[iv].Chi2 > 10.) (*WrkVrtSet)[iv].Good=false;
-//       if( (*WrkVrtSet)[iv].vertexMom.M()>c_vrtBCMassLimit) (*WrkVrtSet)[iv].Good=false; //VK B-tagging specific requirement
+//       if( (*WrkVrtSet)[iv].vertexMom.M()>VrtBCMassLimit) (*WrkVrtSet)[iv].Good=false; //VK B-tagging specific requirement
 //     }      
 //-Remove all bad vertices from the working set    
     int tmpV=0; while( tmpV<(int)(*WrkVrtSet).size() )if( !(*WrkVrtSet)[tmpV].Good ) { (*WrkVrtSet).erase((*WrkVrtSet).begin()+tmpV);} else {tmpV++;}
@@ -360,18 +373,18 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
  //printWrkSet(WrkVrtSet,"Iterat");
 
          double foundMinVrtDst = 1000000.;
-         if(foundMaxT<m_trackDetachCut) foundMinVrtDst = minVrtVrtDist( WrkVrtSet, foundV1, foundV2);
+         if(foundMaxT<m_TrackDetachCut) foundMinVrtDst = minVrtVrtDist( WrkVrtSet, foundV1, foundV2);
 
 //Choice of action
-          if( foundMaxT<m_trackDetachCut && foundMinVrtDst<m_vertexMergeCut && nTrkCommon( WrkVrtSet, foundV1, foundV2)){
-          //if( foundMaxT<m_trackDetachCut && foundMinVrtDst<m_vertexMergeCut){
+          if( foundMaxT<m_TrackDetachCut && foundMinVrtDst<m_VertexMergeCut && nTrkCommon( WrkVrtSet, foundV1, foundV2)){
+          //if( foundMaxT<m_TrackDetachCut && foundMinVrtDst<m_VertexMergeCut){
              bool vrtMerged=false;   //to check whether something is really merged
-             while(foundMinVrtDst<m_vertexMergeCut){
+             while(foundMinVrtDst<m_VertexMergeCut){
                if(foundV1<foundV2) { int tmp=foundV1; foundV1=foundV2; foundV2=tmp;} /*Always drop vertex with smallest number*/
 	       double probV=0.;
                if     (xAODwrk)probV=mergeAndRefitVertices( WrkVrtSet, foundV1, foundV2, newvrt, xAODwrk->listJetTracks);
                else if(RECwork)probV=mergeAndRefitVertices( WrkVrtSet, foundV1, foundV2, newvrt, RECwork->listJetTracks);
-	       if(probV>probVrtMergeLimit && newvrt.vertexMom.M()<c_vrtBCMassLimit){        //  Good merged vertex found
+	       if(probV>probVrtMergeLimit && newvrt.vertexMom.M()<VrtBCMassLimit){        //  Good merged vertex found
                  double tstDst=JetProjDist(newvrt.vertex, PrimVrt, JetDir);
 	         if(tstDst>0.){                               // only positive vertex directions are accepted as merging result
                    std::swap((*WrkVrtSet)[foundV1],newvrt);
@@ -406,12 +419,12 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
 // Final check/merge for close vertices
 //
     double minDistVV=minVrtVrtDist( WrkVrtSet, foundV1, foundV2); //recalculate VV distances
-    while ( minDistVV < m_vertexMergeCut) {
+    while ( minDistVV < m_VertexMergeCut) {
         if(foundV1<foundV2) { int tmp=foundV1; foundV1=foundV2; foundV2=tmp;}
 	double probV=0.;
         if     (xAODwrk)probV=mergeAndRefitVertices( WrkVrtSet, foundV1, foundV2, newvrt, xAODwrk->listJetTracks);
         else if(RECwork)probV=mergeAndRefitVertices( WrkVrtSet, foundV1, foundV2, newvrt, RECwork->listJetTracks);
-	if(probV>probVrtMergeLimit && newvrt.vertexMom.M()<c_vrtBCMassLimit){        //  Good merged vertex found
+	if(probV>probVrtMergeLimit && newvrt.vertexMom.M()<VrtBCMassLimit){        //  Good merged vertex found
            double tstDst=JetProjDist(newvrt.vertex, PrimVrt, JetDir);
 	   if(tstDst>0.){                               // only positive vertex directions are accepted as merging result
               std::swap((*WrkVrtSet)[foundV1],newvrt);
@@ -485,19 +498,20 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
        if( fabs(curVrt.vertex.z())>650. ){curVrt.Good=false; continue;}  //vertex outside Pixel det. For ALL vertices
        if(curVrt.SelTrk.size() != 1)     continue;
        curVrt.Good=false;       // Make them bad by default
-       if(m_multiWithOneTrkVrt){          /* 1track vertices left unassigned from good 2tr vertices */
+       if(MomAtVrt(curVrt.TrkAtVrt[0]).Pt() < m_JetPtFractionCut*JetDir.Perp() ) continue; //Low Pt
+       if(m_MultiWithOneTrkVrt){          /* 1track vertices left unassigned from good 2tr vertices */
           VrtVrtDist(PrimVrt,curVrt.vertex, curVrt.vertexCov, Signif3D); //VK non-projected Signif3D is worse
           double tmpProb=TMath::Prob( curVrt.Chi2, 1);                 //Chi2 of the original 2tr vertex
           bool trkGood=false;
-          if     (RECwork)trkGood=Check1TrVertexInPixel(RECwork->listJetTracks[curVrt.SelTrk[0]],curVrt.vertex,curVrt.vertexCov);
-          else if(xAODwrk)trkGood=Check1TrVertexInPixel(xAODwrk->listJetTracks[curVrt.SelTrk[0]],curVrt.vertex,curVrt.vertexCov);
+          if     (RECwork)trkGood=Check1TrVertexInPixel(RECwork->listJetTracks[curVrt.SelTrk[0]],curVrt.vertex);
+          else if(xAODwrk)trkGood=Check1TrVertexInPixel(xAODwrk->listJetTracks[curVrt.SelTrk[0]],curVrt.vertex);
           if(trkGood && tmpProb>0.01){  /* accept only good tracks coming from good 2tr vertex*/
-             //if( useMaterialRejection && insideMatLayer(curVrt.vertex.x(),curVrt.vertex.y()) ) continue;
+             //if( m_useMaterialRejection && insideMatLayer(curVrt.vertex.x(),curVrt.vertex.y()) ) continue;
              std::vector<double> Impact,ImpactError;   double Signif3DP = 0;
              if     (xAODwrk) Signif3DP=m_fitSvc->VKalGetImpact(xAODwrk->listJetTracks[curVrt.SelTrk[0]],PrimVrt.position(), 1, Impact, ImpactError);
 	     else if(RECwork) Signif3DP=m_fitSvc->VKalGetImpact(RECwork->listJetTracks[curVrt.SelTrk[0]],PrimVrt.position(), 1, Impact, ImpactError);
-             if(m_fillHist&&curVrt.vertex.perp()>20.){m_hb_diffPS->Fill( Signif3DP, m_w_1); }
-             if( Signif3DP>2.*m_trkSigCut && Signif3D>m_sel2VrtSigCut) curVrt.Good=true; // accept only tracks which are far from primary vertex
+             if(m_FillHist&&curVrt.vertex.perp()>20.){m_hb_diffPS->Fill( Signif3DP, m_w_1); }
+             if( Signif3DP>2.*m_TrkSigCut && Signif3D>m_Sel2VrtSigCut) curVrt.Good=true; // accept only tracks which are far from primary vertex
           }
        }
     }
@@ -534,28 +548,29 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
 //-----------------------------------------------------------------------------------------
           if(nth==2 && m_useVertexCleaning){
             if(RECwork){
-	       if(!Check2TrVertexInPixel(RECwork->tmpListTracks[0],RECwork->tmpListTracks[1],curVrt.vertex,curVrt.vertexCov))continue;
+	       if(!Check2TrVertexInPixel(RECwork->tmpListTracks[0],RECwork->tmpListTracks[1],curVrt.vertex,Signif3D))continue;
             }else if(xAODwrk){
-	       if(!Check2TrVertexInPixel(xAODwrk->tmpListTracks[0],xAODwrk->tmpListTracks[1],curVrt.vertex,curVrt.vertexCov))continue;
+	       if(!Check2TrVertexInPixel(xAODwrk->tmpListTracks[0],xAODwrk->tmpListTracks[1],curVrt.vertex,Signif3D))continue;
             }
 	  }
 //
 //---  Check interactions on pixel layers
 //
-          //if( curVrt.vertex.perp()>m_beampipeR-2. && curVrt.detachedTrack<0) {
-          if( curVrt.vertex.perp()>m_beampipeR-2.) {
+          //if( curVrt.vertex.perp()>m_Rbeampipe-2. && curVrt.detachedTrack<0) {
+          if( curVrt.vertex.perp()>m_Rbeampipe-2.) {
 	    double minPt=1.e9;  for(int ti=0; ti<nth; ti++) minPt=TMath::Min(minPt,MomAtVrt(curVrt.TrkAtVrt[ti]).Pt());
-            if(m_fillHist){  
+	    double ptLim=TMath::Max(m_hadronIntPtCut,m_JetPtFractionCut*JetDir.Perp());
+            if(m_FillHist){  
 	       m_hb_totmass2T0->Fill( curVrt.vertexMom.M()-nth*m_massPi, m_w_1);
 	       m_hb_r2d->Fill( curVrt.vertex.perp(), m_w_1);
             }
-            if(useMaterialRejection){
+            if(m_useMaterialRejection && minPt<ptLim){
 	      if( insideMatLayer(curVrt.vertex.x(),curVrt.vertex.y()) ) continue;
             }
 	    //double dR=0; for(int mi=0;mi<nth-1;mi++)for(int mj=mi+1;mj<nth;mj++)
 	    //         dR=TMath::Max(dR,MomAtVrt(curVrt.TrkAtVrt[mi]).DeltaR(MomAtVrt(curVrt.TrkAtVrt[mj])));
-            //if(m_fillHist)m_hb_deltaRSVPV->Fill(dR,m_w_1);
-            //if( m_killHighPtIBLFakes && curVrt.vertex.perp()<m_rLayer1 && dR<0.015)continue;
+            //if(m_FillHist)m_hb_deltaRSVPV->Fill(dR,m_w_1);
+            //if( m_killHighPtIBLFakes && curVrt.vertex.perp()<m_Rlayer1 && dR<0.015)continue;
 	    if(Signif3D<20.) continue;
           }
 //
@@ -564,7 +579,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
              double mass_PiPi =  curVrt.vertexMom.M();  
              double mass_PPi  =  massV0(curVrt.TrkAtVrt,m_massP,m_massPi);
              double mass_EE   =  massV0(curVrt.TrkAtVrt,m_massE,m_massE);
-             if(m_fillHist){ m_hb_massPiPi->Fill( mass_PiPi, m_w_1);
+             if(m_FillHist){ m_hb_massPiPi->Fill( mass_PiPi, m_w_1);
                              m_hb_massPPi ->Fill( mass_PPi,  m_w_1); 
                              if( curVrt.vertex.perp()>20.)m_hb_massEE  ->Fill( mass_EE,   m_w_1);  } 
  	     if( fabs(mass_PiPi-m_massK0) < 22.)     continue;
@@ -572,15 +587,15 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
              if( mass_EE < 60. && curVrt.vertex.perp() > 20.) continue;
           }          
 //---
-	  if(m_fillHist){m_hb_sig3DTot->Fill( Signif3D, m_w_1); }
-          if(Signif3D<m_sel2VrtSigCut)continue;      //Main PV-SV distance quality cut 
+	  if(m_FillHist){m_hb_sig3DTot->Fill( Signif3D, m_w_1); }
+          if(Signif3D<m_Sel2VrtSigCut)continue;      //Main PV-SV distance quality cut 
 //-----
 //        float Dist2D= (*WrkVrtSet)[iv].vertex.perp();
 //	  if(Dist2D<2.){
 //            double tmpProb=0.;
 //            if       (xAODwrk)tmpProb=FitVertexWithPV( WrkVrtSet, iv, PrimVrt, xAODwrk->listJetTracks);
 //            else if(RECwork)tmpProb=FitVertexWithPV( WrkVrtSet, iv, PrimVrt, RECwork->listJetTracks);
-//            if(m_fillHist){m_hb_trkPtMax->Fill( tmpProb*1.e5, m_w_1); }
+//            if(m_FillHist){m_hb_trkPtMax->Fill( tmpProb*1.e5, m_w_1); }
 //            if(tmpProb>0.01)continue; // Vertex can be associated with PV
 //	  }
 //---
@@ -590,7 +605,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
     }
 //
 //--Final cleaning of the 1-track vertices set. Must be behind all other cleanings.
-    if(m_multiWithOneTrkVrt) Clean1TrVertexSet(WrkVrtSet);
+    if(m_MultiWithOneTrkVrt) Clean1TrVertexSet(WrkVrtSet);
 //------------ Debug
 //    std::vector<const xAOD::TrackParticle*> tempTrk(0);
 //    for(auto & iv : (*WrkVrtSet)){ if(iv.Good){for(auto & it : iv.SelTrk)tempTrk.push_back(xAODwrk->listJetTracks.at(it));}}
@@ -605,7 +620,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
        nth=iv.SelTrk.size(); if(nth == 0) continue;   /* Definitely bad vertices */
        Amg::Vector3D tmpVec=iv.vertex-PrimVrt.position();
        TLorentzVector Momentum(tmpVec.x(),tmpVec.y(),tmpVec.z(),m_massPi);
-       //if(Momentum.DeltaR(JetDir)>m_coneForTag) iv.Good=false; /* Vertex outside jet cone??? Very bad cut*/
+       //if(Momentum.DeltaR(JetDir)>m_ConeForTag) iv.Good=false; /* Vertex outside jet cone??? Very bad cut*/
        if( iv.Good) {
 	  nGoodVertices++;                                    
 	  GoodVertices.emplace_back(iv);    /* add it */
@@ -639,7 +654,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
     if(nGoodVertices>1){
       if( GoodVertices[1].vertexMom.M()-GoodVertices[0].vertexMom.M() > 5000.) std::swap( GoodVertices[0], GoodVertices[1] );
     }
-    if(m_fillHist){m_hb_distVV->Fill( minVrtVrtDist( WrkVrtSet, foundV1, foundV2), m_w_1); }
+    if(m_FillHist){m_hb_distVV->Fill( minVrtVrtDist( WrkVrtSet, foundV1, foundV2), m_w_1); }
 //----------------------------------------------------------------------------------
 //  Nonused tracks for one-track-vertex search
 //
@@ -721,7 +736,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
              trackPt=pTvsDir(Amg::Vector3D(JetDir.Vect().X(),JetDir.Vect().X(),JetDir.Vect().Z()), GoodVertices[iv].TrkAtVrt[i]);
              if(trackPt>trackPtMax)trackPtMax=trackPt;
           }
-          if( m_fillHist ){
+          if( m_FillHist ){
             if(nth==1)m_hb_r1dc->Fill( GoodVertices[iv].vertex.perp(), m_w_1);
             if(nth==2)m_hb_r2dc->Fill( GoodVertices[iv].vertex.perp(), m_w_1);
             if(nth==3)m_hb_r3dc->Fill( GoodVertices[iv].vertex.perp(), m_w_1);
@@ -770,7 +785,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
           nGoodVertices++;
           if(nth==1)n1trVrt++;
 //-----
-          if( iv==0 && m_multiWithPrimary ) continue;  //skip primary vertex if present
+          if( iv==0 && m_MultiWithPrimary ) continue;  //skip primary vertex if present
           VertexMom += GoodVertices[iv].vertexMom;
     }
 //===================Fake vertex with list of all tracks for optimisation
@@ -784,7 +799,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
 //    }       finalVertices.push_back(tmpVertex);
 //==============================================
 
-    if(m_fillHist){m_hb_goodvrtN->Fill( nGoodVertices+0.1, m_w_1);
+    if(m_FillHist){m_hb_goodvrtN->Fill( nGoodVertices+0.1, m_w_1);
                    m_hb_goodvrtN->Fill( n1trVrt+15., m_w_1);}
     if(nGoodVertices == 0){
       delete WrkVrtSet;
@@ -807,10 +822,10 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
       Results.push_back(0.);                                        //6th  -  not clear what to use here -> return 0.
       Results.push_back(MomentumJet.E());                 //7th
 
-      if(m_fillHist){m_hb_ratio->Fill( Results[1], m_w_1); }
-      if(m_fillHist){m_hb_totmass->Fill( Results[0], m_w_1); }
-      if(m_fillHist){m_hb_nvrt2->Fill( Results[2], m_w_1); }
-      if(m_fillHist){m_hb_mom->Fill( MomentumJet.Perp(), m_w_1);} 
+      if(m_FillHist){m_hb_ratio->Fill( Results[1], m_w_1); }
+      if(m_FillHist){m_hb_totmass->Fill( Results[0], m_w_1); }
+      if(m_FillHist){m_hb_nvrt2->Fill( Results[2], m_w_1); }
+      if(m_FillHist){m_hb_mom->Fill( MomentumJet.Perp(), m_w_1);} 
 
       delete WrkVrtSet; delete TrkInVrt; if(weit)delete[] weit; if(Solution)delete[] Solution;
 
@@ -871,7 +886,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
 	   newvrt.SelTrk[1]=(*WrkVrtSet)[iv].SelTrk[SelT];
            sc = VKalVrtFitFastBase(ListBaseTracks,newvrt.vertex);
            if( sc.isFailure() )  continue;
-           if( newvrt.vertex.perp() > m_rLayer2*2. )  newvrt.vertex=Amg::Vector3D(0.,0.,0.);
+           if( newvrt.vertex.perp() > m_Rlayer2*2. )  newvrt.vertex=Amg::Vector3D(0.,0.,0.);
            m_fitSvc->setApproximateVertex(newvrt.vertex[0],newvrt.vertex[1],newvrt.vertex[2]);
            sc=VKalVrtFitBase(ListBaseTracks,
                                        newvrt.vertex,
@@ -914,7 +929,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
 	 if(!(*WrkVrtSet)[mtv].Good)            continue;   
          if( std::find((*WrkVrtSet)[mtv].SelTrk.begin(),(*WrkVrtSet)[mtv].SelTrk.end(), Trk1) != (*WrkVrtSet)[mtv].SelTrk.end()){
            //double m2Vrt=((*WrkVrtSet)[mtv].vertexMom+(*WrkVrtSet)[i1tv].vertexMom).M(); //VK Commented.  M cut in other places
-           //if(m2Vrt>c_vrtBCMassLimit){ (*WrkVrtSet)[i1tv].Good=false;  break; } //1Tr + manyTr system is too heavy
+           //if(m2Vrt>VrtBCMassLimit){ (*WrkVrtSet)[i1tv].Good=false;  break; } //1Tr + manyTr system is too heavy
 	   foundInGoodVrt++; countVT[mtv]++; linkedVrt[i1tv]=mtv;  //Linked vertex found
          }
        }
@@ -995,7 +1010,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
 	          Chi2Red=(*WrkVrtSet)[VertexNumber].Chi2PerTrk.at(itmp);            //   Normal Chi2 seems the best
                   if(NTrkInVrt==2){
 		    Chi2Red=(*WrkVrtSet)[VertexNumber].Chi2/2.;                     //VK 2track vertices with Normal Chi2Red
-	            if((*WrkVrtSet)[VertexNumber].vertexMom.M()>c_vrtBCMassLimit)Chi2Red=100.; //VK break immediately very heavy 2tr vertices
+	            if((*WrkVrtSet)[VertexNumber].vertexMom.M()>VrtBCMassLimit)Chi2Red=100.; //VK break immediately very heavy 2tr vertices
                   }
                   double prob_vrt = TMath::Prob( (*WrkVrtSet)[VertexNumber].Chi2, 2*(*WrkVrtSet)[VertexNumber].SelTrk.size()-3);
                   if( MaxOf < Chi2Red ){
@@ -1019,8 +1034,8 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
               if     (SelectedVertex==v1 && dst2<dst1)  SelectedVertex=v2;  // Swap to remove the closest to PV vertex
               else if(SelectedVertex==v2 && dst1<dst2)  SelectedVertex=v1;  // Swap to remove the closest to PV vertex
               double M1=(*WrkVrtSet)[v1].vertexMom.M();  double M2=(*WrkVrtSet)[v2].vertexMom.M();
-              if( M1>c_vrtBCMassLimit && M2<c_vrtBCMassLimit ) SelectedVertex=v1;
-              if( M1<c_vrtBCMassLimit && M2>c_vrtBCMassLimit ) SelectedVertex=v2;
+              if( M1>VrtBCMassLimit && M2<VrtBCMassLimit ) SelectedVertex=v1;
+              if( M1<VrtBCMassLimit && M2>VrtBCMassLimit ) SelectedVertex=v2;
             }
             if( (*WrkVrtSet)[v1].SelTrk.size()+(*WrkVrtSet)[v2].SelTrk.size() > 4){
 	       if( (*WrkVrtSet)[v1].SelTrk.size()==2 && dst1>dst2) SelectedVertex=v2;
@@ -1064,7 +1079,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
 	       (*TrkInVrt)[LeftTrack].erase(it); break;
 	      }     
 	   }   
-	   if( (*WrkVrtSet)[SelectedVertex].vertexMom.M()>c_vrtBCMassLimit)(*WrkVrtSet)[SelectedVertex].Good=false; // Vertex is too heavy
+	   if( (*WrkVrtSet)[SelectedVertex].vertexMom.M()>VrtBCMassLimit)(*WrkVrtSet)[SelectedVertex].Good=false; // Vertex is too heavy
            int ipos=0; if(posInVrtFit==0)ipos=1;  // Position of remaining track in previous 2track vertex fit
 	   (*WrkVrtSet)[SelectedVertex].vertexMom=MomAtVrt((*WrkVrtSet)[SelectedVertex].TrkAtVrt[ipos]); //Redefine vertexMom using remaining track
 	   if((*TrkInVrt)[LeftTrack].size()>0)(*WrkVrtSet)[SelectedVertex].Good=false;    //Vertex is declared false only if remaining track 
@@ -1158,6 +1173,14 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
    {
       if(!(*WrkVrtSet).at(V1).Good)return -1.;         //bad vertex
       if(!(*WrkVrtSet).at(V2).Good)return -1.;         //bad vertex
+      double RMin=TMath::Min((*WrkVrtSet)[V1].vertex.perp(),(*WrkVrtSet)[V2].vertex.perp());
+      double RMax=TMath::Max((*WrkVrtSet)[V1].vertex.perp(),(*WrkVrtSet)[V2].vertex.perp());
+      if(RMax-RMin>m_SVResolutionR){
+        if(RMin<m_RlayerB && m_RlayerB<RMax) return -1.;
+        if(RMin<m_Rlayer1 && m_Rlayer1<RMax) return -1.;
+        if(RMin<m_Rlayer2 && m_Rlayer2<RMax) return -1.;
+      }
+      
       newvrt.Good=true;
       int NTrk_V1=(*WrkVrtSet)[V1].SelTrk.size();
       int NTrk_V2=(*WrkVrtSet)[V2].SelTrk.size();
@@ -1346,7 +1369,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
 
 
 //For possble future use 
-/*    if( m_multiWithOneTrkVrt && (!m_multiWithPrimary) && nGoodVertices<5){        // Addition of one-track vertices is allowed
+/*    if( m_MultiWithOneTrkVrt && (!m_MultiWithPrimary) && nGoodVertices<5){        // Addition of one-track vertices is allowed
       double addVrtChi2Cut   =5.0;
       double addSig3DCut     =5.0;
       int tmpNTrk=0; if(xAODwrk)tmpNTrk=xAODwrk->listJetTracks.size(); else if(RECwork)tmpNTrk=RECwork->listJetTracks.size();
@@ -1367,7 +1390,7 @@ const double c_vrtBCMassLimit=5500.;  // Mass limit to consider a vertex not com
           if(tmpNBLHits>0){       // accept only tracks with b-layer hit
             if       (RECwork)Signif3DP = m_fitSvc->VKalGetImpact(RECwork->listJetTracks[atr], PrimVrt.position(), 1, Impact, ImpactError);
             else if(xAODwrk)Signif3DP = m_fitSvc->VKalGetImpact(xAODwrk->listJetTracks[atr], PrimVrt.position(), 1, Impact, ImpactError);
-            if( Signif3DP > m_trkSigCut ) nonusedTracks.push_back(atr);
+            if( Signif3DP > m_TrkSigCut ) nonusedTracks.push_back(atr);
           }
         }
       }       
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/CutTrk.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/CutTrk.cxx
index f4b302fc6e235e1adc6736e5aba7e4c2fb3a9488..eec26c5391299373febf0a2696ff94244828f641 100755
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/CutTrk.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/CutTrk.cxx
@@ -21,22 +21,20 @@ namespace InDet{
   {
      double Pt = sin(ThetaVert)/fabs(PInvVert);
 //- Track quality
-     if(Pt               < m_cutPt) 			return StatusCode::FAILURE;
-//std::cout<<" ZVert="<<ZVert<<", "<<sin(ThetaVert)<<'\n';
-//std::cout<<" Chi2="<<Chi2<<'\n';
-//std::cout<<" A0Vert="<<A0Vert<<'\n';
-     if(!m_multiWithPrimary){           //Must not be used for primary vertex search
-       if(fabs(ZVert)      > m_cutZVrt)	                return StatusCode::FAILURE;
+     if(Pt               < m_CutPt) 			return StatusCode::FAILURE;
+
+     if(!m_MultiWithPrimary){           //Must not be used for primary vertex search
+       if(fabs(ZVert)      > m_CutZVrt/sin(ThetaVert))	return StatusCode::FAILURE;
      }
-     if(Chi2 	         > m_cutChi2) 			return StatusCode::FAILURE;
-     if(fabs(A0Vert)     > m_cutA0) 			return StatusCode::FAILURE;
+     if(Chi2 	         > m_CutChi2) 			return StatusCode::FAILURE;
+     if(fabs(A0Vert)     > m_CutA0) 			return StatusCode::FAILURE;
 
 
-     if(PixelHits	    < m_cutPixelHits) 		return StatusCode::FAILURE;
-     if(SctHits		    < m_cutSctHits) 		return StatusCode::FAILURE;
-     if((PixelHits+SctHits) < m_cutSiHits) 		return StatusCode::FAILURE;
-     if(BLayHits	    < m_cutBLayHits) 		return StatusCode::FAILURE;
-     if(SharedHits	    > m_cutSharedHits) 		return StatusCode::FAILURE;
+     if(PixelHits	    < m_CutPixelHits) 		return StatusCode::FAILURE;
+     if(SctHits		    < m_CutSctHits) 		return StatusCode::FAILURE;
+     if((PixelHits+SctHits) < m_CutSiHits) 		return StatusCode::FAILURE;
+     if(BLayHits	    < m_CutBLayHits) 		return StatusCode::FAILURE;
+     if(SharedHits	    > m_CutSharedHits) 		return StatusCode::FAILURE;
 
      return StatusCode::SUCCESS;
   }
@@ -71,15 +69,14 @@ namespace InDet{
           double CovTrkMtx11 = (*(mPer->covariance()))(0,0);
           double CovTrkMtx22 = (*(mPer->covariance()))(1,1);
 
-	  if ( CovTrkMtx11 > m_a0TrkErrorCut*m_a0TrkErrorCut )  continue;
-	  if ( CovTrkMtx22 > m_zTrkErrorCut*m_zTrkErrorCut )    continue;
-	  if( ConeDist(VectPerig,JetDir) > m_coneForTag )       continue;
-          if( (*i_ntrk)->pt() > JetDir.Pt() )                   continue;
+	  if ( CovTrkMtx11 > m_A0TrkErrorCut*m_A0TrkErrorCut )  continue;
+	  if ( CovTrkMtx22 > m_ZTrkErrorCut*m_ZTrkErrorCut )    continue;
+	  if( ConeDist(VectPerig,JetDir) > m_ConeForTag )       continue;
 
           double trkP=1./fabs(VectPerig[4]);         
           double CovTrkMtx55 = (*(mPer->covariance()))(4,4);
           if(trkP>10000.){  double trkPErr=sqrt(CovTrkMtx55)*trkP;
-	                    if(m_fillHist)m_hb_trkPErr->Fill( trkPErr , m_w_1);       
+	                    if(m_FillHist)m_hb_trkPErr->Fill( trkPErr , m_w_1);       
                             if(trkPErr>0.5) continue;   }
 
           long int PixelHits     = 3;
@@ -113,8 +110,49 @@ namespace InDet{
       AnalysisUtils::Sort::pT (&SelectedTracks); // no equivalent for TrkTrack yet...
       return NPrimTrk;
    }
+//
+//  Simplified TrackParticle selection to get reliably reconstructed tracks for jet momentum estimation 
+// 
+   int  InDetVKalVxInJetTool::SelGoodTrkParticleRelax( const std::vector<const Rec::TrackParticle*>& InpTrk,
+                                         const xAOD::Vertex                                        & PrimVrt,
+	                                 const TLorentzVector                                      & JetDir,
+                                               std::vector<const Rec::TrackParticle*>    & SelectedTracks)
+   const
+   {    
+
+    std::vector<const Rec::TrackParticle*>::const_iterator   i_ntrk;
+    AmgVector(5) VectPerig; VectPerig<<0.,0.,0.,0.,0.;
+    const Trk::Perigee* mPer;
+    std::vector<double> Impact,ImpactError;
+    int NPrimTrk=0;
+    for (i_ntrk = InpTrk.begin(); i_ntrk < InpTrk.end(); ++i_ntrk) {
+//
+//-- MeasuredPerigee in TrackParticle
+//
+          mPer=GetPerigee( (*i_ntrk) ) ;
+          if( mPer == NULL ){ continue; } 
+          VectPerig = mPer->parameters(); 
+	  if( ConeDist(VectPerig,JetDir) > m_ConeForTag )       continue;
+//----------------------------------- Summary tools
+          const Trk::TrackSummary* testSum = (*i_ntrk)->trackSummary();
+          long int PixelHits = (long int) testSum->get(Trk::numberOfPixelHits);
+          long int SctHits   = (long int) testSum->get(Trk::numberOfSCTHits);
+	  if(PixelHits < 0 ) PixelHits=0; 
+	  if(SctHits   < 0 ) SctHits=0; 
 
+          double ImpactSignif = m_fitSvc->VKalGetImpact((*i_ntrk), PrimVrt.position(), 1, Impact, ImpactError);
+          if(fabs(Impact[0])     > m_CutA0)			continue;
+          if(fabs(Impact[1])     > m_CutZVrt/sin(VectPerig[3]))	continue;
 
+          if(PixelHits	< m_CutPixelHits) 	continue;
+          if(SctHits	< m_CutSctHits) 	continue;
+          if((PixelHits+SctHits) < m_CutSiHits) continue;
+	  if(ImpactSignif < 3.)NPrimTrk += 1;
+	  SelectedTracks.push_back(*i_ntrk);
+      }
+      AnalysisUtils::Sort::pT (&SelectedTracks); // no equivalent for TrkTrack yet...
+      return NPrimTrk;
+  }
 //==============================================================================================================
 //          xAOD based stuff
 //
@@ -127,7 +165,6 @@ namespace InDet{
 
     std::vector<const xAOD::TrackParticle*>::const_iterator   i_ntrk;
     std::vector<double> Impact,ImpactError;
-    std::map<double,const xAOD::TrackParticle*> orderedTrk;
     int NPrimTrk=0;
     for (i_ntrk = InpTrk.begin(); i_ntrk < InpTrk.end(); ++i_ntrk) {
 //
@@ -146,14 +183,13 @@ namespace InDet{
 
 
 
-	  if ( CovTrkMtx11 > m_a0TrkErrorCut*m_a0TrkErrorCut )  continue;
-	  if ( CovTrkMtx22 > m_zTrkErrorCut*m_zTrkErrorCut )    continue;
-	  if ( ConeDist(VectPerig,JetDir) > m_coneForTag )      continue;
-          if( (*i_ntrk)->pt() > JetDir.Pt() )                   continue;
+	  if ( CovTrkMtx11 > m_A0TrkErrorCut*m_A0TrkErrorCut )  continue;
+	  if ( CovTrkMtx22 > m_ZTrkErrorCut*m_ZTrkErrorCut )    continue;
+	  if ( ConeDist(VectPerig,JetDir) > m_ConeForTag )       continue;
 
           double trkP=1./fabs(VectPerig[4]);         
           if(trkP>10000.){  double trkPErr=sqrt(CovTrkMtx55)*trkP;
-	                    if(m_fillHist)m_hb_trkPErr->Fill( trkPErr , m_w_1);       
+	                    if(m_FillHist)m_hb_trkPErr->Fill( trkPErr , m_w_1);       
                             if(trkPErr>0.5) continue;   }
 
           uint8_t PixelHits,SctHits,BLayHits;
@@ -184,12 +220,11 @@ namespace InDet{
 //std::cout<<"NwInnerM="<<(long int)InmHits<<", "<<(long int)InmSharedH<<", "<<(long int)InmSplitH<<", "<<(long int)InmOutlier<<'\n';
 
 
-          m_fitSvc->VKalGetImpact((*i_ntrk), PrimVrt.position(), 1, Impact, ImpactError);
-          //double ImpactA0=VectPerig[0];                         // Temporary
-          //double ImpactZ=VectPerig[1]-PrimVrt.position().z();   // Temporary
-	  double ImpactA0=Impact[0];  
-	  double ImpactZ=Impact[1];   
-          if(m_fillHist){  m_hb_trkD0->Fill( ImpactA0, m_w_1); }
+          double ImpactSignif = m_fitSvc->VKalGetImpact((*i_ntrk), PrimVrt.position(), 1, Impact, ImpactError);
+          double ImpactA0=VectPerig[0];                         // Temporary
+          double ImpactZ=VectPerig[1]-PrimVrt.position().z();   // Temporary
+	  ImpactA0=Impact[0];  
+	  ImpactZ=Impact[1];   
 //---- Improved cleaning
 /////          if(PixelHits<=2 && ( outPixHits || splPixHits )) continue;  //VK Bad idea at high Pt!
           if(fabs((*i_ntrk)->eta())>2.  ) {
@@ -198,31 +233,59 @@ namespace InDet{
             else          {if(PixelHits)PixelHits -=1;}                                      // 3-layer pixel detector
           }
           if(fabs((*i_ntrk)->eta())>1.65)   if(SctHits)SctHits   -=1;
-//----Anti-pileup cut
-//          double SignifR = Impact[0]/ sqrt(ImpactError[0]);
-//          if(fabs(SignifR) < m_AntiPileupSigRCut) {   // cut against tracks from pileup vertices
-//            double SignifZ = Impact[1]/ sqrt(ImpactError[2]);
-//            if(SignifZ > 1.+m_AntiPileupSigZCut ) continue;
-//            if(SignifZ < 1.-m_AntiPileupSigZCut ) continue;
-//          }
-//---- Use classificator to remove Pileup+Interactions
-          std::vector<float> trkRank=m_trackClassificator->trkTypeWgts(*i_ntrk, PrimVrt, JetDir);
-          if(trkRank[2] > m_antiGarbageCut)continue;
 //----
           StatusCode sc = CutTrk( VectPerig[4] , VectPerig[3],
                           ImpactA0 , ImpactZ, trkChi2,
-                          PixelHits, SctHits, SharedHits, BLayHits);
+		          PixelHits, SctHits, SharedHits, BLayHits);  //
           if( sc.isFailure() )                 continue;
-	  //double rankBTrk=RankBTrk((*i_ntrk)->pt(),JetDir.Perp(),ImpactSignif);
-	  if(trkRank[1]>0.5)NPrimTrk += 1;
-	  orderedTrk[trkRank[0]]= *i_ntrk;
+	  if(ImpactSignif < 3.)NPrimTrk += 1;
+	  SelectedTracks.push_back(*i_ntrk);
       }
-//---- Order tracks according to ranks
-      std::map<double,const xAOD::TrackParticle*>::reverse_iterator rt=orderedTrk.rbegin();
-      SelectedTracks.resize(orderedTrk.size());
-      for ( int cntt=0; rt!=orderedTrk.rend(); ++rt,++cntt) {SelectedTracks[cntt]=(*rt).second;}
-      m_NRefPVTrk=std::max(NPrimTrk,1);   // VK set reference multiplicity here
+      AnalysisUtils::Sort::pT (&SelectedTracks); // no equivalent for TrkTrack yet...
       return NPrimTrk;
    }
+//
+//  Simplified xAOD::TrackParticle selection to get reliably reconstructed tracks for jet momentum estimation 
+// 
+   int  InDetVKalVxInJetTool::SelGoodTrkParticleRelax( const std::vector<const xAOD::TrackParticle*>& InpTrk,
+                                                       const xAOD::Vertex                           & PrimVrt,
+	                                               const TLorentzVector                         & JetDir,
+                                                             std::vector<const xAOD::TrackParticle*>& SelectedTracks)
+   const
+   {    
+    std::vector<const xAOD::TrackParticle*>::const_iterator   i_ntrk;
+    std::vector<double> Impact,ImpactError;
+    int NPrimTrk=0;
+    for (i_ntrk = InpTrk.begin(); i_ntrk < InpTrk.end(); ++i_ntrk) {
+//
+//-- MeasuredPerigee in xAOD::TrackParticle
+//
+          const Trk::Perigee mPer=(*i_ntrk)->perigeeParameters() ;
+          AmgVector(5) VectPerig = mPer.parameters(); 
+	  if( ConeDist(VectPerig,JetDir) > m_ConeForTag )       continue;
+//----------------------------------- Summary tools
+          uint8_t PixelHits,SctHits;
+          if( !((*i_ntrk)->summaryValue(PixelHits,xAOD::numberOfPixelHits)) ) PixelHits=0;
+          if( !((*i_ntrk)->summaryValue(  SctHits,xAOD::numberOfSCTHits))   )   SctHits=0;
+ 
+
+          double ImpactSignif = m_fitSvc->VKalGetImpact((*i_ntrk), PrimVrt.position(), 1, Impact, ImpactError);
+          if(fabs(Impact[0])     > m_CutA0)			continue;
+          if(fabs(Impact[1])     > m_CutZVrt/sin(VectPerig[3]))	continue;
+
+          int currCutPixelHits=m_CutPixelHits; if(fabs((*i_ntrk)->eta())>2.  )currCutPixelHits +=1;
+          int currCutSctHits  =m_CutSctHits;   if(fabs((*i_ntrk)->eta())>1.65)currCutSctHits   +=1;
+ 
+          if(PixelHits 	         < currCutPixelHits) continue;
+          if(SctHits	         < currCutSctHits)   continue;
+          if((PixelHits+SctHits) < m_CutSiHits)	     continue;
+	  if(ImpactSignif < 3.)NPrimTrk += 1;
+	  SelectedTracks.push_back(*i_ntrk);
+      }
+      AnalysisUtils::Sort::pT (&SelectedTracks); // no equivalent for TrkTrack yet...
+      return NPrimTrk;
+  }
+
+
 
 }//end namespace
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetTrkInJetType.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetTrkInJetType.cxx
deleted file mode 100644
index 523b0522ef7cab6c3f418cde18411a68dcc55e4b..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetTrkInJetType.cxx
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "InDetVKalVxInJetTool/InDetTrkInJetType.h"
-#include "TMVA/MethodBase.h"
-#include "TMVA/Reader.h"
-#include "PathResolver/PathResolver.h"
-//
-//-------------------------------------------------
-namespace InDet {
-//
-//Constructor-------------------------------------------------------------- 
-InDetTrkInJetType::InDetTrkInJetType(const std::string& type,
-                                           const std::string& name,
-                                           const IInterface* parent):
-  AthAlgTool(type,name,parent),
-  m_tmvaReader(0),
-  m_trkMinPtCut(700.),
-  m_d0_limLow(-3.),
-  m_d0_limUpp( 5.),
-  m_Z0_limLow(-8.),
-  m_Z0_limUpp(12.),
-  m_calibFileName("TrackClassif_3cl.v01.xml"),
-  m_fitterSvc("Trk::TrkVKalVrtFitter/VertexFitterTool",this)
-  {
-     declareInterface<IInDetTrkInJetType>(this);
-     declareProperty("trkMinPt",  m_trkMinPtCut  ,  "Minimal track Pt cut" );
-     declareProperty("d0_limLow", m_d0_limLow    ,  "Low d0 impact cut" );
-     declareProperty("d0_limUpp", m_d0_limUpp    ,  "Upper d0 impact cut" );
-     declareProperty("Z0_limLow", m_Z0_limLow    ,  "Low Z0 impact cut" );
-     declareProperty("Z0_limUpp", m_Z0_limUpp    ,  "Upper Z0 impact cut" );
-  }
-
-//Destructor---------------------------------------------------------------
-  InDetTrkInJetType::~InDetTrkInJetType(){
-    delete m_tmvaReader;
-    if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< "InDetTrkInJetType destructor called" << endmsg;
-  }
-
-//Initialize---------------------------------------------------------------
-   StatusCode InDetTrkInJetType::initialize(){
-     m_initialised = 0;
-     m_tmvaReader = new TMVA::Reader();
-     //m_tmvaReader->AddVariable( "prbS",  &m_prbS );
-     m_tmvaReader->AddVariable( "Sig3D", &m_Sig3D );
-     m_tmvaReader->AddVariable( "prbP",  &m_prbP );
-     m_tmvaReader->AddVariable( "pTvsJet", &m_pTvsJet );
-     //m_tmvaReader->AddVariable( "prodTJ", &m_prodTJ );
-     m_tmvaReader->AddVariable( "d0",    &m_d0 );
-     m_tmvaReader->AddVariable( "SigR",  &m_SigR );
-     m_tmvaReader->AddVariable( "SigZ",  &m_SigZ );
-     m_tmvaReader->AddVariable( "ptjet", &m_ptjet );
-     m_tmvaReader->AddVariable( "ibl"   , &m_ibl );
-     m_tmvaReader->AddVariable( "bl"   ,  &m_bl );
-     m_tmvaReader->AddVariable( "etajet", &m_etajet );
-     //m_tmvaReader->AddVariable( "vChi2", &m_vChi2 );
-//
-//-- Calibration file
-//
-//     std::string fullPathToFile = PathResolverFindCalibFile("InDetVKalVxInJetTool/TrackClassif_3cl.v01.xml");
-     std::string fullPathToFile = PathResolverFindCalibFile("InDetVKalVxInJetTool/"+m_calibFileName);
-     if(fullPathToFile != ""){
-        if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) <<"TrackClassification calibration file" << fullPathToFile << endmsg;
-        m_tmvaReader->BookMVA("BDTG", fullPathToFile);
-     }else{
-        if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) <<"Error! No calibration for TrackClassification found." << endmsg;
-        return StatusCode::SUCCESS;
-     }    
-     //-------
-     if (m_fitterSvc.retrieve().isFailure()) {
-        if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Could not find Trk::TrkVKalVrtFitter" << endmsg;
-        return StatusCode::SUCCESS;
-     } else {
-        if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "InDetTrkInJetTool TrkVKalVrtFitter found" << endmsg;
-     }
-     m_fitSvc = dynamic_cast<Trk::TrkVKalVrtFitter*>(&(*m_fitterSvc));
-     if(!m_fitSvc){
-        if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" No implemented Trk::ITrkVKalVrtFitter interface" << endmsg;
-        return StatusCode::SUCCESS;
-     }
-     m_initialised = 1;          // Tool is initialised successfully.
-     return StatusCode::SUCCESS;
-   }
-
-   StatusCode InDetTrkInJetType::finalize()
-   {
-    if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) <<"InDetTrkInJetType finalize()" << endmsg;
-    return StatusCode::SUCCESS; 
-   }
-
-   std::vector<float> InDetTrkInJetType::trkTypeWgts(const Rec::TrackParticle *, const xAOD::Vertex &, const TLorentzVector &)
-   {   return std::vector<float>(3,0.); }
-
-   std::vector<float> InDetTrkInJetType::trkTypeWgts(const xAOD::TrackParticle * Trk, const xAOD::Vertex & PV, const TLorentzVector & Jet)
-   {  
-      std::vector<float> safeReturn(3,0.);
-      if( !m_initialised ) return safeReturn;
-      if(Jet.Perp()>2500000.)return safeReturn;
-      std::vector<double> Impact,ImpactError;
-      m_Sig3D=m_fitSvc->VKalGetImpact(Trk, PV.position(), 1, Impact, ImpactError);
-      AmgVector(5) tmpPerigee = Trk->perigeeParameters().parameters(); 
-      if( sin(tmpPerigee[2]-Jet.Phi())*Impact[0] < 0 ){ Impact[0] = -fabs(Impact[0]);}
-                                                  else{ Impact[0] =  fabs(Impact[0]);}
-      if(  (tmpPerigee[3]-Jet.Theta())*Impact[1] < 0 ){ Impact[1] = -fabs(Impact[1]);}
-                                                  else{ Impact[1] =  fabs(Impact[1]);}
-      double SignifR = Impact[0]/ sqrt(ImpactError[0]);
-      double SignifZ = Impact[1]/ sqrt(ImpactError[2]);
-      double trkSignif = sqrt(  (SignifR+0.6)*(SignifR+0.6) + (SignifZ+0.0)*(SignifZ+0.0) );
-//---
-      if(Impact[0]<m_d0_limLow || Impact[0]>m_d0_limUpp) return safeReturn;
-      if(Impact[0]<m_Z0_limLow || Impact[0]>m_Z0_limUpp) return safeReturn;
-      if( sqrt(SignifR*SignifR +SignifZ*SignifZ) < 1.)   return safeReturn;
-//---IBL/BL hits
-      int hitIBL=0, hitBL=0; 
-      uint8_t IBLhit,BLhit,IBLexp,BLexp;
-      if(!Trk->summaryValue( IBLhit,  xAOD::numberOfInnermostPixelLayerHits) )        IBLhit = 0;
-      if(!Trk->summaryValue(  BLhit,  xAOD::numberOfNextToInnermostPixelLayerHits) )   BLhit = 0;
-      if(!Trk->summaryValue( IBLexp,  xAOD::expectInnermostPixelLayerHit) )           IBLexp = 0;
-      if(!Trk->summaryValue(  BLexp,  xAOD::expectNextToInnermostPixelLayerHit) )      BLexp = 0;
-      hitIBL=IBLhit; if( IBLexp==0 ) hitIBL=-1;
-      hitBL = BLhit; if(  BLexp==0 ) hitBL =-1;
-/*---PV constraint (doesn't improve rejection in first try)
-      Amg::Vector3D     FitVrt;
-      TLorentzVector    Momentum;
-      long int  Charge=0;
-      std::vector<double> ErrorMatrix, Chi2PerTrk;
-      std::vector< std::vector<double> > TrkAtVrt;
-      std::vector<const xAOD::TrackParticle *>  TrkForFit(1,Trk);
-      std::vector<const xAOD::NeutralParticle*> netralDummy(0);
-      m_fitSvc->setDefault();                                  //Reset VKalVrt settings
-      std::vector<float> covPV=PV.covariance();
-      m_fitSvc->setVertexForConstraint(PV.x(),PV.y(),PV.z());
-      m_fitSvc->setCovVrtForConstraint(covPV[0],covPV[1],covPV[2],covPV[3],covPV[4],covPV[5]);
-      m_fitSvc->setCnstType(6);                                // Set primary vertex constraint
-      StatusCode sc=m_fitSvc->VKalVrtFit( TrkForFit, netralDummy, FitVrt, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2);
-      if(sc.isFailure())Chi2=exp(11.);
-      if(Chi2>exp(11.))Chi2=exp(11.);
-*/
-//====================== BDT weights
-     double coeffPt=10.;
-     double pfrac=(Trk->pt()-m_trkMinPtCut)/sqrt(Jet.Perp());
-     m_prbP= pfrac/(coeffPt+pfrac);
-//---
-     double coeffSig=1.0;
-     if(trkSignif<coeffSig) return safeReturn;
-     m_prbS=(trkSignif-coeffSig)/trkSignif;
-     if(m_prbS<0.) return safeReturn;
-//---
-     m_d0=Impact[0];
-     m_SigZ=SignifZ;
-     m_SigR=SignifR;
-//---
-     m_ptjet=Jet.Perp();
-     m_etajet=fabs(Jet.Eta());
-//---
-     m_ibl = (float)hitIBL;
-     m_bl  = (float)hitBL;
-//---
-     TLorentzVector TLV; 
-     TLV.SetPtEtaPhiE(Trk->pt(),Trk->eta(),Trk->phi(),Trk->e());
-     m_pTvsJet=TLV.Perp(Jet.Vect());
-//---
-     TLorentzVector normJ;  normJ.SetPtEtaPhiM(1.,Jet.Eta(),Jet.Phi(),0.);
-     m_prodTJ=sqrt(TLV.Dot(normJ));
-     return m_tmvaReader->EvaluateMulticlass("BDTG");
-
-   }
-   
-}// close namespace
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetVKalVxInJetTool.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetVKalVxInJetTool.cxx
index ef535a46d8439e5cec1b72b315b675ade84725c9..522aed13051fc19a3a723baf82db9991a51f1220 100755
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetVKalVxInJetTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetVKalVxInJetTool.cxx
@@ -11,13 +11,13 @@
 #include "GaudiKernel/ITHistSvc.h"
 #include "TH1D.h"
 #include "TH2D.h"
-#include "TTree.h"
 #include "TProfile.h"
 
 #include "TMath.h"
 //
 //-------------------------------------------------
 // Other stuff
+//
 #include<iostream>
 
 //extern "C" {
@@ -31,52 +31,61 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
                                            const std::string& name,
                                            const IInterface* parent):
     AthAlgTool(type,name,parent),
-    m_cutSctHits(4),
-    m_cutPixelHits(1),
-    m_cutSiHits(7),
-    m_cutBLayHits(0),
-    m_cutSharedHits(1),
-    m_cutPt(700.),
-    m_cutZVrt(15.),
-    m_cutA0(5.),
-    m_cutChi2(5.),
-    m_secTrkChi2Cut(10.),
-    m_coneForTag(0.4),
-    m_sel2VrtChi2Cut(10.0),
-    m_sel2VrtSigCut(4.0),
-    m_trkSigCut(2.0),
-    m_a0TrkErrorCut(1.0),
-    m_zTrkErrorCut(5.0),
-    m_cutHFClass(0.1),
-    m_antiGarbageCut(0.85),
-    m_fillHist(false),
+    m_CutSctHits(4),
+    m_CutPixelHits(1),
+    m_CutSiHits(7),
+    m_CutBLayHits(0),
+    m_CutSharedHits(1),
+    m_CutPt(700.),
+    m_CutZVrt(25.),
+    m_CutA0(5.),
+    m_CutChi2(5.),
+    m_SecTrkChi2Cut(10.),
+    m_ConeForTag(0.4),
+    m_Sel2VrtChi2Cut(4.5),
+    m_Sel2VrtSigCut(3.0),
+    m_TrkSigCut(2.0),
+    m_TrkSigNTrkDep(0.20),
+    m_TrkSigSumCut(2.),
+    m_A0TrkErrorCut(1.0),
+    m_ZTrkErrorCut(5.0),
+    m_AntiPileupSigRCut(2.0),
+    m_AntiPileupSigZCut(6.0),
+    m_AntiFake2trVrtCut(0.5),
+    m_JetPtFractionCut(0.01),
+    m_TrackInJetNumberLimit(25),
+    m_pseudoSigCut(3.),
+    m_hadronIntPtCut(5000.),
+    m_FillHist(false),
     m_existIBL(true),
     m_RobustFit(1),
-    m_beampipeX (0.),
-    m_beampipeY (0.),
-    m_xLayerB (0.),
-    m_yLayerB (0.),
-    m_xLayer1 (0.),
-    m_yLayer1 (0.),
-    m_xLayer2 (0.),
-    m_yLayer2 (0.),
-    m_beampipeR (0.),  //Correct values are filled     
-    m_rLayerB   (0.),  // in jobO or initialize()
-    m_rLayer1   (0.),
-    m_rLayer2   (0.),
-    m_useVertexCleaning(false),
-    m_multiVertex(false),
-    m_multiWithPrimary(false),
+    m_Xbeampipe (0.),
+    m_Ybeampipe (0.),
+    m_XlayerB (0.),
+    m_YlayerB (0.),
+    m_Xlayer1 (0.),
+    m_Ylayer1 (0.),
+    m_Xlayer2 (0.),
+    m_Ylayer2 (0.),
+    m_Rbeampipe (0.),  //Correct values are filled     
+    m_RlayerB   (0.),  // in jobO or initialize()
+    m_Rlayer1   (0.),
+    m_Rlayer2   (0.),
+    m_SVResolutionR(3.),
+    m_useMaterialRejection(true),
+    m_useVertexCleaning(true),
+    m_MassType (1),
+    m_MultiVertex(false),
+    m_MultiWithPrimary(false),
     m_getNegativeTail(false),
     m_getNegativeTag(false),
-    m_multiWithOneTrkVrt(true),
-    m_vertexMergeCut(3.),
-    m_trackDetachCut(6.),
-    m_fitterSvc("Trk::TrkVKalVrtFitter/VertexFitterTool",this),
-//    m_useMaterialRejection(true),
+    m_MultiWithOneTrkVrt(true),
+    //m_killHighPtIBLFakes(false),
+    m_VertexMergeCut(3.),
+    m_TrackDetachCut(6.),
+    m_fitterSvc("Trk::TrkVKalVrtFitter/VertexFitterTool",this)
 //    m_materialMap ("InDet::InDetMaterialRejTool", this)
 //    m_fitSvc("Trk::TrkVKalVrtFitter/VKalVrtFitter",this)
-    m_trackClassificator("InDet::InDetTrkInJetType",this)
    {
 //
 // Declare additional interface
@@ -85,57 +94,67 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
 // Properties
 //
 //
-    declareProperty("CutSctHits",    m_cutSctHits ,  "Remove track is it has less SCT hits" );
-    declareProperty("CutPixelHits",  m_cutPixelHits, "Remove track is it has less Pixel hits");
-    declareProperty("CutSiHits",     m_cutSiHits,    "Remove track is it has less Pixel+SCT hits"  );
-    declareProperty("CutBLayHits",   m_cutBLayHits,  "Remove track is it has less B-layer hits"   );
-    declareProperty("CutSharedHits", m_cutSharedHits,"Reject final 2tr vertices if tracks have shared hits" );
-
-    declareProperty("CutPt",         m_cutPt,     "Track Pt selection cut"  );
-    declareProperty("CutA0",         m_cutA0,     "Track A0 selection cut"  );
-    declareProperty("CutZVrt",       m_cutZVrt,   "Track Z impact selection cut");
-    declareProperty("ConeForTag",    m_coneForTag,"Cone around jet direction for track selection");
-    declareProperty("CutChi2",       m_cutChi2,   "Track Chi2 selection cut" );
-    declareProperty("TrkSigCut",     m_trkSigCut, "Track 3D impact significance w/r primary vertex" );
-    declareProperty("SecTrkChi2Cut", m_secTrkChi2Cut,"Track - common secondary vertex association cut. Single Vertex Finder only");
-
-    declareProperty("A0TrkErrorCut",  m_a0TrkErrorCut, "Track A0 error cut" );
-    declareProperty("ZTrkErrorCut",   m_zTrkErrorCut,  "Track Z impact error cut" );
-    declareProperty("CutHFClass",     m_cutHFClass,  "Cut on HF classification weight" );
-    declareProperty("AntiGarbageCut", m_antiGarbageCut,  "Cut on Garbage classification weight for removal" );
-
-    declareProperty("Sel2VrtChi2Cut",    m_sel2VrtChi2Cut, "Cut on Chi2 of 2-track vertex for initial selection"  );
-    declareProperty("Sel2VrtSigCut",     m_sel2VrtSigCut,  "Cut on significance of 3D distance between initial 2-track vertex and PV"  );
-
-    declareProperty("FillHist",   m_fillHist, "Fill technical histograms"  );
+    declareProperty("CutSctHits",    m_CutSctHits ,  "Remove track is it has less SCT hits" );
+    declareProperty("CutPixelHits",  m_CutPixelHits, "Remove track is it has less Pixel hits");
+    declareProperty("CutSiHits",     m_CutSiHits,    "Remove track is it has less Pixel+SCT hits"  );
+    declareProperty("CutBLayHits",   m_CutBLayHits,  "Remove track is it has less B-layer hits"   );
+    declareProperty("CutSharedHits", m_CutSharedHits,"Reject final 2tr vertices if tracks have shared hits" );
+
+    declareProperty("CutPt",         m_CutPt,     "Track Pt selection cut"  );
+    declareProperty("CutA0",         m_CutA0,     "Track A0 selection cut"  );
+    declareProperty("CutZVrt",       m_CutZVrt,   "Track Z impact selection cut");
+    declareProperty("ConeForTag",    m_ConeForTag,"Cone around jet direction for track selection");
+    declareProperty("CutChi2",       m_CutChi2,   "Track Chi2 selection cut" );
+    declareProperty("TrkSigCut",     m_TrkSigCut, "Track 3D impact significance w/r primary vertex" );
+    declareProperty("TrkSigSumCut",  m_TrkSigSumCut, "Sum of 3D track significances cut for 2tr vertex search");
+    declareProperty("TrkSigNTrkDep", m_TrkSigNTrkDep, "NTrack in jet dependent increase of TrkSigCut and TrkSigSumCut");
+    declareProperty("SecTrkChi2Cut", m_SecTrkChi2Cut,"Track - common secondary vertex association cut. Single Vertex Finder only");
+
+    declareProperty("A0TrkErrorCut",  m_A0TrkErrorCut, "Track A0 error cut" );
+    declareProperty("ZTrkErrorCut",   m_ZTrkErrorCut,  "Track Z impact error cut" );
+
+    declareProperty("Sel2VrtChi2Cut",    m_Sel2VrtChi2Cut, "Cut on Chi2 of 2-track vertex for initial selection"  );
+    declareProperty("Sel2VrtSigCut",     m_Sel2VrtSigCut,  "Cut on significance of 3D distance between initial 2-track vertex and PV"  );
+    declareProperty("AntiPileupSigRCut",   m_AntiPileupSigRCut, "Remove tracks with low Rphi and big Z impacts presumably coming from pileup"  );
+    declareProperty("AntiPileupSigZCut",   m_AntiPileupSigZCut, "Remove tracks with low Rphi and big Z impacts presumably coming from pileup"  );
+    declareProperty("AntiFake2trVrtCut",   m_AntiFake2trVrtCut, "Cut to reduce fake 2-track vertices contribution.Single Vertex Finder only"  );
+    declareProperty("JetPtFractionCut",    m_JetPtFractionCut,  "Reduce high Pt fakes. Jet HLV input is mandatory, direction is not enough. Multi and single vertex versions are affected"  );
+    declareProperty("TrackInJetNumberLimit", m_TrackInJetNumberLimit, " Use only limited number of highest pT tracks in jet for vertex search"  );
+    declareProperty("PseudoSigCut",        m_pseudoSigCut, " Cut on track impact significance for pseudo-vertex search"  );
+    declareProperty("HadronIntPtCut",      m_hadronIntPtCut,  "Pt cut to select hadronic interactions"  );
+
+    declareProperty("FillHist",   m_FillHist, "Fill technical histograms"  );
     declareProperty("ExistIBL",   m_existIBL, "Inform whether 3-layer or 4-layer detector is used "  );
 
     declareProperty("RobustFit",  m_RobustFit, "Use vertex fit with RobustFit functional(VKalVrt) for common secondary vertex fit" );
 
-    declareProperty("Xbeampipe", m_beampipeX);
-    declareProperty("Ybeampipe", m_beampipeY);
-    declareProperty("XlayerB",   m_xLayerB  );
-    declareProperty("YlayerB",   m_yLayerB  );
-    declareProperty("Xlayer1",   m_xLayer1  );
-    declareProperty("Ylayer1",   m_yLayer1  );
-    declareProperty("Xlayer2",   m_xLayer2  );
-    declareProperty("Ylayer2",   m_yLayer2  );
-    declareProperty("Rbeampipe", m_beampipeR);
-    declareProperty("RlayerB",   m_rLayerB  );
-    declareProperty("Rlayer1",   m_rLayer1  );
-    declareProperty("Rlayer2",   m_rLayer2  );
-
-//    declareProperty("useMaterialRejection",  m_useMaterialRejection, "Reject vertices from hadronic interactions in detector material" );
+    declareProperty("Xbeampipe", m_Xbeampipe);
+    declareProperty("Ybeampipe", m_Ybeampipe);
+    declareProperty("XlayerB",   m_XlayerB  );
+    declareProperty("YlayerB",   m_YlayerB  );
+    declareProperty("Xlayer1",   m_Xlayer1  );
+    declareProperty("Ylayer1",   m_Ylayer1  );
+    declareProperty("Xlayer2",   m_Xlayer2  );
+    declareProperty("Ylayer2",   m_Ylayer2  );
+    declareProperty("Rbeampipe", m_Rbeampipe);
+    declareProperty("RlayerB",   m_RlayerB  );
+    declareProperty("Rlayer1",   m_Rlayer1  );
+    declareProperty("Rlayer2",   m_Rlayer2  );
+
+    declareProperty("SVResolutionR",  m_SVResolutionR, "Radial resolution of SVs. Needed for correct pixel layers crossing checks" );
+    declareProperty("useMaterialRejection",  m_useMaterialRejection, "Reject vertices from hadronic interactions in detector material" );
     declareProperty("useVertexCleaning",     m_useVertexCleaning,    "Clean vertices by requiring pixel hit presence according to vertex position" );
 
-    declareProperty("MultiVertex",        m_multiVertex,       "Run Multiple Secondary Vertices in jet finder"  );
-    declareProperty("MultiWithPrimary",   m_multiWithPrimary,  "Find Multiple Secondary Vertices + primary vertex in jet. MultiVertex Finder only!"  );
-    declareProperty("MultiWithOneTrkVrt", m_multiWithOneTrkVrt,"Allow one-track-vertex addition to already found secondary vertices. MultiVertex Finder only! ");
+    declareProperty("MassType",  m_MassType, "Type of vertex mass returned by finder. Single Vertex Finder only!" );
+    declareProperty("MultiVertex",        m_MultiVertex,       "Run Multiple Secondary Vertices in jet finder"  );
+    declareProperty("MultiWithPrimary",   m_MultiWithPrimary,  "Find Multiple Secondary Vertices + primary vertex in jet. MultiVertex Finder only!"  );
+    declareProperty("MultiWithOneTrkVrt", m_MultiWithOneTrkVrt,"Allow one-track-vertex addition to already found secondary vertices. MultiVertex Finder only! ");
+    //declareProperty("KillHighPtIBLFakes", m_killHighPtIBLFakes,"Remove fake vertices produced by tracking. MultiVertex Finder only! ");
     declareProperty("getNegativeTail", m_getNegativeTail, "Allow secondary vertex behind the primary one (negative) w/r jet direction (not for multivertex!)" );
     declareProperty("getNegativeTag",  m_getNegativeTag,  "Return ONLY negative secondary vertices (not for multivertex!)"   );
 
-    declareProperty("VertexMergeCut",	  m_vertexMergeCut, "To allow vertex merging for MultiVertex Finder" );
-    declareProperty("TrackDetachCut",	  m_trackDetachCut, "To allow track from vertex detachment for MultiVertex Finder" );
+    declareProperty("VertexMergeCut",	  m_VertexMergeCut, "To allow vertex merging for MultiVertex Finder" );
+    declareProperty("TrackDetachCut",	  m_TrackDetachCut, "To allow track from vertex detachment for MultiVertex Finder" );
 
     declareProperty("VertexFitterTool",  m_fitterSvc);
 //    declareProperty("MaterialMap", m_materialMap);
@@ -151,7 +170,6 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
     m_WorkArray = 0;
     m_compatibilityGraph = nullptr;
     m_instanceName=name;
-    m_curTup = 0;
 
    }
 
@@ -159,9 +177,9 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
     InDetVKalVxInJetTool::~InDetVKalVxInJetTool(){
      //MsgStream log( msgSvc(), name() ) ;
      //log << MSG::DEBUG << "InDetVKalVxInJetTool destructor called" << endmsg;
+     if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< "InDetVKalVxInJetTool destructor called" << endmsg;
      if(m_WorkArray) delete m_WorkArray;
      if(m_compatibilityGraph)delete m_compatibilityGraph;
-     if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< "InDetVKalVxInJetTool destructor called" << endmsg;
    }
 
 //Initialize---------------------------------------------------------------
@@ -210,22 +228,22 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
 //------------------------------------------
 // Chose whether IBL is installed
      if(m_existIBL){ // 4-layer pixel detector
-       if( m_beampipeR==0.)  m_beampipeR=24.0;    
-       if( m_rLayerB  ==0.)  m_rLayerB  =34.0;
-       if( m_rLayer1  ==0.)  m_rLayer1  =51.6;
-       if( m_rLayer2  ==0.)  m_rLayer2  =90.0;
-       m_rLayer3  =122.5;
+       if( m_Rbeampipe==0.)  m_Rbeampipe=24.0;    
+       if( m_RlayerB  ==0.)  m_RlayerB  =34.0;
+       if( m_Rlayer1  ==0.)  m_Rlayer1  =51.6;
+       if( m_Rlayer2  ==0.)  m_Rlayer2  =90.0;
+       m_Rlayer3  =122.5;
      } else {   // 3-layer pixel detector
-       if( m_beampipeR==0.)  m_beampipeR=29.4;    
-       if( m_rLayerB  ==0.)  m_rLayerB  =51.5;
-       if( m_rLayer1  ==0.)  m_rLayer1  =90.0;
-       if( m_rLayer2  ==0.)  m_rLayer2  =122.5;
+       if( m_Rbeampipe==0.)  m_Rbeampipe=29.4;    
+       if( m_RlayerB  ==0.)  m_RlayerB  =51.5;
+       if( m_Rlayer1  ==0.)  m_Rlayer1  =90.0;
+       if( m_Rlayer2  ==0.)  m_Rlayer2  =122.5;
      }       
        
 //
 //
      ITHistSvc*     hist_root=0;
-     if(m_fillHist){
+     if(m_FillHist){
 
        StatusCode sc = service( "THistSvc", hist_root); 
        if( sc.isFailure() ) {
@@ -233,8 +251,7 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
        }
        if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "InDetVKalVxInJetTool Histograms found" << endmsg;
  
-       m_hb_massPiPi   = new TH1D("massPiPi"," mass PiPi",160,200., 1000.);
-       m_hb_massPiPi1  = new TH1D("massPiPi1"," mass PiPi",100,200., 2000.);
+       m_hb_massPiPi   = new TH1D("massPiPi"," massPiPi",160,200., 1000.);
        m_hb_massPPi    = new TH1D("massPPi"," massPPi", 100,1000., 1250.);
        m_hb_massEE     = new TH1D("massEE"," massEE", 100,0., 200.);
        m_hb_nvrt2      = new TH1D("nvrt2"," vertices2", 50,0., 50.);
@@ -245,10 +262,9 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
        m_hb_totmass2T1 = new TH1D("mass2trcomvrt1"," totmass 2tr common vertex", 200,0., 10000.);
        m_hb_totmass2T2 = new TH1D("mass2trcomvrt2"," totmass 2tr common vertex", 200,0., 10000.);
        m_hb_impact     = new TH1D("impact", " impact", 100,0., 20.);
-       m_hb_impactR    = new TH1D("impactR"," impactR", 400,-30., 70.);
+       m_hb_impactR    = new TH1D("impactR"," impactR", 100,-30., 70.);
        m_hb_impactZ    = new TH1D("impactZ"," impactZ", 100,-30., 70.);
        m_hb_impactRZ   = new TH2D("impactRZ"," impactRZ", 40,-10., 10., 60, -30.,30. );
-       m_hb_trkD0      = new TH1D("trkD0"," d0 of tracks", 100,-20., 20.);
        m_hb_r2d        = new TH1D("r2interact","Interaction radius 2tr selected", 150,0., 150.);
        m_hb_r1dc       = new TH1D("r1interactCommon","Interaction 1tr radius common", 150,0., 150.);
        m_hb_r2dc       = new TH1D("r2interactCommon","Interaction 2tr radius common", 150,0., 150.);
@@ -260,6 +276,7 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
        m_hb_jmom       = new TH1D("jetmom"," Jet mom", 200,0., 2000000.);
        m_hb_mom        = new TH1D("jetmomvrt"," Jet mom with sec. vertex", 200,0., 2000000.);
        m_hb_signif3D   = new TH1D("signif3D"," Signif3D for initial 2tr vertex", 140,-20., 50.);
+       m_hb_massPiPi1  = new TH1D("massPiPi1"," massPiPi",100,0., 4000.);
        m_hb_sig3DTot   = new TH1D("sig3dcommon"," Signif3D for common vertex", 140,-20., 50.);
        m_hb_sig3D1tr   = new TH1D("sig3D1tr","Signif3D for 1tr  vertices", 140,-20., 50.);
        m_hb_sig3D2tr   = new TH1D("sig3D2tr","Signif3D for 2tr single vertex", 140,-20., 50.);
@@ -267,24 +284,30 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
        m_hb_goodvrtN   = new TH1F("goodvrtN","Number of good vertices", 20,0., 20.);
        m_hb_distVV     = new TH1D("distvv","Vertex-Vertex dist", 100,0., 20.);
        m_hb_diffPS     = new TH1D("diffPS","Primary-Secondary assoc", 200,-20., 20.);
-       m_hb_trkPtMax   = new TH1D("trkPtMax","Maximal track Pt to jet", 100, 0., 5000.);
+       m_hb_trkPtMax   = new TH1D("trkPtMax","Maximal track Pt to jet", 100, 0., 10000.);
+       m_hb_tr2SelVar  = new TH1D("tr2SelVar","New 2tr variable", 200, 0., 10.);
        m_hb_blshared   = new TH1F("blshared","Number of shared hits in B-layer for R<BL", 5, 0., 5.);
        m_hb_pxshared   = new TH1F("pxshared","Number of shared hits in pixel for R>BL", 5, 0., 5.);
-       m_hb_rawVrtN    = new TH1F("rawVrtN","Number of raw vertices multivertex case", 20, 0., 20.);
+       m_hb_rawVrtN    = new TH1F("rawVrtN","Number of raw vertices multivertex case", 10, 0., 10.);
        m_hb_lifetime   = new TH1F("lifetime","Distance/momentum", 100, 0., 5.);
        m_hb_trkPErr    = new TH1F("trkPErr","Track momentum error for P>10 GeV", 100, 0., 0.5);
        m_hb_deltaRSVPV = new TH1F("deltaRSVPV","SV-PV vs jet dR ", 200, 0., 1.);
 //---
-       m_pr_NSelTrkMean = new TProfile("NSelTrkMean"," NTracks selected vs jet pt", 80, 0., 1600000.);
+       m_hb_massJetTrkSV    = new TH1D("PSEUmassJetTrkSV","SV mass for jet+track case", 250, 0., 10000.);
+       m_hb_ratioJetTrkSV   = new TH1D("PSEUratioJetTrkSV","SV ratio for jet+track case", 51,0., 1.02);
+       m_hb_DST_JetTrkSV    = new TH1D("PSEUDST_JetTrkSV", "DST PV-SV for jet+track  case", 100,0., 20.);
+       m_hb_NImpJetTrkSV    = new TH1D("PSEUnTrkJetTrkSV", "N Track selected for jet+track  case", 10,0., 10.);
+//---
+       m_hb_nHImpTrkCnt    = new TH1D("NHImpTrkCnt", "N Big Impact Track selected in jet", 30,0., 30.);
+//---
        m_pr_effVrt2tr   = new TProfile("effVrt2tr"," 2tr vertex efficiency vs Ntrack", 50, 0., 50.);
        m_pr_effVrt2trEta= new TProfile("effVrt2trEta"," 2tr vertex efficiency vs eta", 50, -3., 3.);
        m_pr_effVrt   = new TProfile("effVrt","Full vertex efficiency vs Ntrack", 50, 0., 50.);
        m_pr_effVrtEta= new TProfile("effVrtEta","Full vertex efficiency vs eta", 50, -3., 3.);
        std::string histDir;
-       if(m_multiVertex) histDir="/file1/stat/MSVrtInJet"+m_instanceName+"/";
+       if(m_MultiVertex) histDir="/file1/stat/MSVrtInJet"+m_instanceName+"/";
        else              histDir="/file1/stat/SVrtInJet"+m_instanceName+"/";
        sc = hist_root->regHist(histDir+"massPiPi", m_hb_massPiPi);
-       sc = hist_root->regHist(histDir+"massPiPi1", m_hb_massPiPi1);
        sc = hist_root->regHist(histDir+"massPPi", m_hb_massPPi);
        sc = hist_root->regHist(histDir+"massEE", m_hb_massEE );
        sc = hist_root->regHist(histDir+"nvrt2", m_hb_nvrt2);
@@ -298,7 +321,6 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
        sc = hist_root->regHist(histDir+"impactR",   m_hb_impactR);
        sc = hist_root->regHist(histDir+"impactZ",   m_hb_impactZ);
        sc = hist_root->regHist(histDir+"impactRZ",  m_hb_impactRZ);
-       sc = hist_root->regHist(histDir+"trkD0",     m_hb_trkD0);
        sc = hist_root->regHist(histDir+"r2interact",       m_hb_r2d);
        sc = hist_root->regHist(histDir+"r1interactCommon", m_hb_r1dc);
        sc = hist_root->regHist(histDir+"r2interactCommon", m_hb_r2dc);
@@ -310,6 +332,7 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
        sc = hist_root->regHist(histDir+"jetmom",    m_hb_jmom);
        sc = hist_root->regHist(histDir+"jetmomvrt", m_hb_mom);
        sc = hist_root->regHist(histDir+"signif3D",  m_hb_signif3D);
+       sc = hist_root->regHist(histDir+"massPiPi1", m_hb_massPiPi1);
        sc = hist_root->regHist(histDir+"sig3dcommon", m_hb_sig3DTot);
        sc = hist_root->regHist(histDir+"sig3D1tr",  m_hb_sig3D1tr);
        sc = hist_root->regHist(histDir+"sig3D2tr",  m_hb_sig3D2tr);
@@ -318,63 +341,30 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
        sc = hist_root->regHist(histDir+"distVV",    m_hb_distVV);
        sc = hist_root->regHist(histDir+"diffPS",    m_hb_diffPS);
        sc = hist_root->regHist(histDir+"trkPtMax",  m_hb_trkPtMax);
+       sc = hist_root->regHist(histDir+"tr2SelVar", m_hb_tr2SelVar);
        sc = hist_root->regHist(histDir+"blshared",  m_hb_blshared);
        sc = hist_root->regHist(histDir+"pxshared",  m_hb_pxshared);
        sc = hist_root->regHist(histDir+"rawVrtN",   m_hb_rawVrtN);
        sc = hist_root->regHist(histDir+"lifetime",  m_hb_lifetime);
        sc = hist_root->regHist(histDir+"trkPErr",   m_hb_trkPErr);
        sc = hist_root->regHist(histDir+"deltaRSVPV",   m_hb_deltaRSVPV);
-       sc = hist_root->regHist(histDir+"NSelTrkMean",  m_pr_NSelTrkMean);
        sc = hist_root->regHist(histDir+"effVrt2tr",    m_pr_effVrt2tr);
        sc = hist_root->regHist(histDir+"effVrt2trEta", m_pr_effVrt2trEta);
        sc = hist_root->regHist(histDir+"effVrt",       m_pr_effVrt);
        sc = hist_root->regHist(histDir+"effVrtEta",    m_pr_effVrtEta);
+       sc = hist_root->regHist(histDir+"PSEUmassJetTrkSV", m_hb_massJetTrkSV);
+       sc = hist_root->regHist(histDir+"PSEUratioJetTrkSV",m_hb_ratioJetTrkSV);
+       sc = hist_root->regHist(histDir+"PSEUDST_JetTrkSV", m_hb_DST_JetTrkSV);
+       sc = hist_root->regHist(histDir+"PSEUnTrkJetTrkSV", m_hb_NImpJetTrkSV);
+       sc = hist_root->regHist(histDir+"NHImpTrkCnt", m_hb_nHImpTrkCnt);
        if( sc.isFailure() ) {     // Check of StatusCode
          if(msgLvl(MSG::INFO))msg(MSG::INFO) << "BTagVrtSec Histogram registration failure!!!" << endmsg;
        }
        m_w_1 = 1.;
-//-------------------------------------------------------
-       m_curTup=new DevTuple();
-       m_tuple = new TTree("Tracks","Tracks");
-       std::string TreeDir("/file1/stat/SVrtInJet"+m_instanceName+"/");
-       sc = hist_root->regTree(TreeDir,m_tuple);
-       if (sc.isSuccess()) {
-          m_tuple->Branch("ptjet",       &m_curTup->ptjet,     "ptjet/F");
-          m_tuple->Branch("etajet",      &m_curTup->etajet,    "etajet/F");
-          m_tuple->Branch("phijet",      &m_curTup->phijet,    "phijet/F");
-          m_tuple->Branch("ntrk",        &m_curTup->nTrkInJet, "ntrk/I");
-          m_tuple->Branch("prbS",        &m_curTup->s_prob,    "prbS[ntrk]/F");
-          m_tuple->Branch("prbP",        &m_curTup->p_prob,    "prbP[ntrk]/F");
-          m_tuple->Branch("wgtB",        &m_curTup->wgtB,      "wgtB[ntrk]/F");
-          m_tuple->Branch("wgtL",        &m_curTup->wgtL,      "wgtL[ntrk]/F");
-          m_tuple->Branch("wgtG",        &m_curTup->wgtG,      "wgtG[ntrk]/F");
-          m_tuple->Branch("Sig3D",       &m_curTup->Sig3D,     "Sig3D[ntrk]/F");
-          m_tuple->Branch("idMC",        &m_curTup->idMC,      "idMC[ntrk]/I");
-          m_tuple->Branch("ibl",         &m_curTup->ibl,       "ibl[ntrk]/I");
-          m_tuple->Branch("bl",          &m_curTup->bl,        "bl[ntrk]/I");
-          m_tuple->Branch("SigR",        &m_curTup->SigR,      "SigR[ntrk]/F");
-          m_tuple->Branch("SigZ",        &m_curTup->SigZ,      "SigZ[ntrk]/F");
-          m_tuple->Branch("d0",          &m_curTup->d0,        "d0[ntrk]/F");
-          m_tuple->Branch("Z0",          &m_curTup->Z0,        "Z0[ntrk]/F");
-          m_tuple->Branch("pTvsJet",     &m_curTup->pTvsJet,   "pTvsJet[ntrk]/F");
-          m_tuple->Branch("prodTJ",      &m_curTup->prodTJ,    "prodTJ[ntrk]/F");
-          m_tuple->Branch("nVrtT",       &m_curTup->nVrtT,     "nVrtT[ntrk]/I");
-          m_tuple->Branch("chg",         &m_curTup->chg,       "chg[ntrk]/I");
-          m_tuple->Branch("nvrt",        &m_curTup->nVrt,      "nvrt/I");
-          m_tuple->Branch("VrtDist2D",   &m_curTup->VrtDist2D, "VrtDist2D[nvrt]/F");
-          m_tuple->Branch("VrtSig3D",    &m_curTup->VrtSig3D,  "VrtSig3D[nvrt]/F");
-          m_tuple->Branch("VrtSig2D",    &m_curTup->VrtSig2D,  "VrtSig2D[nvrt]/F");
-          m_tuple->Branch("itrk",        &m_curTup->itrk,      "itrk[nvrt]/I");
-          m_tuple->Branch("jtrk",        &m_curTup->jtrk,      "jtrk[nvrt]/I");
-          m_tuple->Branch("badV",        &m_curTup->badVrt,    "badV[nvrt]/I");
-          m_tuple->Branch("mass",        &m_curTup->mass,      "mass[nvrt]/F");
-          m_tuple->Branch("Chi2",        &m_curTup->Chi2,      "Chi2[nvrt]/F");
-          m_tuple->Branch("ntHF",        &m_curTup->NTHF,      "ntHF/I");
-          m_tuple->Branch("itHF",        &m_curTup->itHF,      "itHF[ntHF]/I");
-       }
+
      }
 
-     if(!m_multiVertex)m_multiWithPrimary = false; 
+     if(!m_MultiVertex)m_MultiWithPrimary = false; 
 
      if(m_getNegativeTag){
         if(msgLvl(MSG::INFO))msg(MSG::INFO) << " Negative TAG is requested! " << endmsg;
@@ -422,7 +412,6 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
     double EnergyJet  =   0.;
     int N2trVertices  =   0 ;
     int NBigImpTrk    =   0 ;
-    if(m_curTup){ m_curTup->nVrt=0; m_curTup->nTrkInJet=0; m_curTup->NTHF=0; }
 
     int pseudoVrt = 0;
 
@@ -433,7 +422,7 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
           if(tmp)InpTrk.push_back(tmp);
     }
 
-    if(m_multiVertex){
+    if(m_MultiVertex){
       workVectorArrxAOD * tmpVectxAOD=new workVectorArrxAOD();
       tmpVectxAOD->InpTrk.resize(InpTrk.size());
       std::copy(InpTrk.begin(),InpTrk.end(), tmpVectxAOD->InpTrk.begin());
@@ -445,7 +434,7 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
     }else{
        xAOD::Vertex* secVrt = GetVrtSec( InpTrk,PrimVrt,JetDir,Results,SelSecTrk,xaodTrkFromV0);
        if(secVrt != 0) listVrtSec.push_back(secVrt);
-       else if(m_fillHist){ m_pr_effVrt->Fill((float)m_NRefPVTrk,0.);
+       else if(m_FillHist){ m_pr_effVrt->Fill((float)m_NRefTrk,0.);
 	                    m_pr_effVrtEta->Fill( JetDir.Eta(),0.);}
     }
     if(Results.size()<3) {
@@ -471,7 +460,6 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
     }
 
 
-    if(m_fillHist){  m_tuple->Fill(); };
     m_fitSvc->clearMemory();
     m_compatibilityGraph->clear();
     std::vector<int> zytmp(1000); m_WorkArray->m_Incomp.swap(zytmp);    // Deallocate memory
@@ -495,13 +483,12 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
     double RatioE     =   0.;
     double EnergyJet  =   0.;
     int N2trVertices  =   0 ;
-    if(m_curTup){ m_curTup->nVrt=0; m_curTup->nTrkInJet=0; }
 
     xAOD::Vertex xaodPrimVrt; 
                             xaodPrimVrt.setPosition(PrimVrt.position());
                             xaodPrimVrt.setCovariancePosition(PrimVrt.covariancePosition());
 
-    if(m_multiVertex){
+    if(m_MultiVertex){
        workVectorArrREC * tmpVectREC=new workVectorArrREC();
        tmpVectREC->InpTrk.resize(InpTrk.size());
        std::copy(InpTrk.begin(),InpTrk.end(), tmpVectREC->InpTrk.begin());
@@ -513,7 +500,7 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
     }else{
        xAOD::Vertex* secVrt = GetVrtSec( InpTrk,xaodPrimVrt,JetDir,Results,SelSecTrk,TrkFromV0);
        if(secVrt != 0) listVrtSec.push_back(secVrt);
-       else if(m_fillHist){ m_pr_effVrt->Fill((float)m_NRefPVTrk,0.);              
+       else if(m_FillHist){ m_pr_effVrt->Fill((float)m_NRefTrk,0.);              
 	                    m_pr_effVrtEta->Fill( JetDir.Eta(),0.);}
     }
     if(Results.size()<3) {
@@ -527,8 +514,6 @@ InDetVKalVxInJetTool::InDetVKalVxInJetTool(const std::string& type,
     const Trk::VxSecVKalVertexInfo* res = 
           new Trk::VxSecVKalVertexInfo(listVrtSec, SecVtxMass, RatioE, N2trVertices, EnergyJet, PartToBase(TrkFromV0) );
     if(Results.size()>8)res->setDstToMatLay(Results[7]);
-
-    if(m_fillHist){  m_tuple->Fill(); };
     m_fitSvc->clearMemory();
     m_compatibilityGraph->clear();
     std::vector<int> zytmp(1000); m_WorkArray->m_Incomp.swap(zytmp);    // Deallocate memory
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx
index 502962aaa9dcc35321721e4d5f3a566c14843f16..ddd1cff33020f0d00f67c9258918b21f2e902fab 100755
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx
@@ -7,30 +7,14 @@
 #include "TrkNeutralParameters/NeutralParameters.h"
 #include "TrkTrackSummary/TrackSummary.h"
 #include  "TrkVKalVrtFitter/TrkVKalVrtFitter.h"
-#include "xAODTruth/TruthParticleContainer.h"
+
 //-------------------------------------------------
 // Other stuff
 #include <cmath>
-#include<iostream>
 
 
 namespace InDet{  
 
-  double InDetVKalVxInJetTool::RankBTrk(double TrkPt, double JetPt, double Signif)  const
-  {
-     double coeffSig=1.0;
-     double s_prob=(Signif-coeffSig)/Signif;   // Old probability to be b-track
-     double coeffPt=10.;
-     double pfrac=(TrkPt-m_cutPt)/sqrt(JetPt);
-     double p_prob= pfrac/(coeffPt+pfrac);    // Old probability to be b-track
-     if(TrkPt + JetPt == 0.) return s_prob;
-     else if(Signif == 0.)   return p_prob;
-     //----------------------------------Initial definition of selective variable
-     double contrib=0.4;
-     return (1.+contrib)*std::max(s_prob,0.)+(1.-contrib)*p_prob;
-  }
-
-
   TLorentzVector  InDetVKalVxInJetTool::GetBDir( const xAOD::TrackParticle* trk1,
                                                  const xAOD::TrackParticle* trk2,
                                                  const xAOD::Vertex    & PrimVrt,
@@ -38,6 +22,7 @@ namespace InDet{
   const
   { // B hadron flight direction based on 2 separate tracks and PV. Calculated via plane-plane crossing
     Amg::Vector3D PVRT(PrimVrt.x(),PrimVrt.y(),PrimVrt.z());
+
 //----------------------------------------------------------------------------
     Amg::Vector3D   pnt1=trk1->perigeeParameters().position()-PVRT;
     Amg::Vector3D   mom1((trk1->p4()).Px(),(trk1->p4()).Py(),(trk1->p4()).Pz());
@@ -70,54 +55,40 @@ namespace InDet{
   }
 
   void InDetVKalVxInJetTool::printWrkSet(const std::vector<WrkVrt> *, const std::string ) const {
-/*  void InDetVKalVxInJetTool::printWrkSet(const std::vector<WrkVrt> *WrkVrtSet, const std::string name) const {
-    int nGoodV=0;
-    for(int iv=0; iv<(int)WrkVrtSet->size(); iv++) {
-      std::cout<<name
-      <<"= "<<(*WrkVrtSet)[iv].vertex[0]
-      <<", "<<(*WrkVrtSet)[iv].vertex[1]
-      <<", "<<(*WrkVrtSet)[iv].vertex[2]
-      <<" NTrk="<<(*WrkVrtSet)[iv].SelTrk.size()
-      <<" is good="<<std::boolalpha<<(*WrkVrtSet)[iv].Good<<std::noboolalpha
-      <<"  Chi2="<<(*WrkVrtSet)[iv].Chi2
-      <<"  Mass="<<(*WrkVrtSet)[iv].vertexMom.M()
-      <<"  detached="<<(*WrkVrtSet)[iv].detachedTrack
-      <<"  proj.dist="<<(*WrkVrtSet)[iv].ProjectedVrt
-      <<" trk=";
-      for(int kk=0; kk<(int)(*WrkVrtSet)[iv].SelTrk.size(); kk++) {
-                std::cout<<", "<<(*WrkVrtSet)[iv].SelTrk[kk];}
-      //for(int kk=0; kk<(int)(*WrkVrtSet)[iv].SelTrk.size(); kk++) {
-      //          std::cout<<", "<<MomAtVrt((*WrkVrtSet)[iv].TrkAtVrt[kk]).Perp();}
-      std::cout<<'\n';
-      if((*WrkVrtSet)[iv].Good)nGoodV++;
-    }
-    std::cout<<name<<" N="<<nGoodV<<'\n';*/
+
   }
 
                /*  Technicalities */
-  double InDetVKalVxInJetTool::ProjSV_PV(const Amg::Vector3D & SV, const xAOD::Vertex & PV, const TLorentzVector & Jet) const
-  {  
-     TVector3 SV_PV( SV.x()-PV.x(), SV.y()-PV.y(), SV.z()-PV.z() );
-     return Jet.Vect().Unit()*SV_PV.Unit();
+  double InDetVKalVxInJetTool::ProjPos(const Amg::Vector3D & Vrt, const TLorentzVector & JetDir)
+  const
+  {
+    //Amg::Vector3D Vrt=SV-PV;
+    return (Vrt.x()*JetDir.Px() + Vrt.y()*JetDir.Py() + Vrt.z()*JetDir.Pz())/JetDir.P();
+  }
+
+  double InDetVKalVxInJetTool::ProjPosT(const Amg::Vector3D & Vrt, const TLorentzVector & JetDir)
+  const
+  {
+    return (Vrt.x()*JetDir.Px() + Vrt.y()*JetDir.Py())/JetDir.Pt();
   }
 
   bool InDetVKalVxInJetTool::insideMatLayer(float xvt,float yvt) const
   {
-        float Dist2DBP=sqrt( (xvt-m_beampipeX)*(xvt-m_beampipeX) + (yvt-m_beampipeY)*(yvt-m_beampipeY) ); 
-        float Dist2DBL=sqrt( (xvt-m_xLayerB)*(xvt-m_xLayerB) + (yvt-m_yLayerB)*(yvt-m_yLayerB) ); 
-        float Dist2DL1=sqrt( (xvt-m_xLayer1)*(xvt-m_xLayer1) + (yvt-m_yLayer1)*(yvt-m_yLayer1) );
-        float Dist2DL2=sqrt( (xvt-m_xLayer2)*(xvt-m_xLayer2) + (yvt-m_yLayer2)*(yvt-m_yLayer2) );
+        float Dist2DBP=sqrt( (xvt-m_Xbeampipe)*(xvt-m_Xbeampipe) + (yvt-m_Ybeampipe)*(yvt-m_Ybeampipe) ); 
+        float Dist2DBL=sqrt( (xvt-m_XlayerB)*(xvt-m_XlayerB) + (yvt-m_YlayerB)*(yvt-m_YlayerB) ); 
+        float Dist2DL1=sqrt( (xvt-m_Xlayer1)*(xvt-m_Xlayer1) + (yvt-m_Ylayer1)*(yvt-m_Ylayer1) );
+        float Dist2DL2=sqrt( (xvt-m_Xlayer2)*(xvt-m_Xlayer2) + (yvt-m_Ylayer2)*(yvt-m_Ylayer2) );
         if(m_existIBL){              // 4-layer pixel detector
-               if( fabs(Dist2DBP-m_beampipeR)< 1.0)  return true;           // Beam Pipe removal  
-               if( fabs(Dist2DBL-m_rLayerB)  < 2.5)     return true;
-               if( fabs(Dist2DL1-m_rLayer1)  < 3.0)      return true;
-               if( fabs(Dist2DL2-m_rLayer2)  < 3.0)      return true;
-               //if( fabs(Dist2DL2-m_rLayer3)  < 4.0)      return true;
+               if( fabs(Dist2DBP-m_Rbeampipe)< 1.0)  return true;           // Beam Pipe removal  
+               if( fabs(Dist2DBL-m_RlayerB)  < 2.5)     return true;
+               if( fabs(Dist2DL1-m_Rlayer1)  < 3.0)      return true;
+               if( fabs(Dist2DL2-m_Rlayer2)  < 3.0)      return true;
+               //if( fabs(Dist2DL2-m_Rlayer3)  < 4.0)      return true;
         }else{                       // 3-layer pixel detector
-               if( fabs(Dist2DBP-m_beampipeR)< 1.5)  return true;           // Beam Pipe removal  
-               if( fabs(Dist2DBL-m_rLayerB)  < 3.5)     return true;
-               if( fabs(Dist2DL1-m_rLayer1)  < 4.0)      return true;
-               if( fabs(Dist2DL2-m_rLayer2)  < 5.0)      return true;
+               if( fabs(Dist2DBP-m_Rbeampipe)< 1.5)  return true;           // Beam Pipe removal  
+               if( fabs(Dist2DBL-m_RlayerB)  < 3.5)     return true;
+               if( fabs(Dist2DL1-m_Rlayer1)  < 4.0)      return true;
+               if( fabs(Dist2DL2-m_Rlayer2)  < 5.0)      return true;
         }
         return false; 
   }
@@ -187,31 +158,6 @@ namespace InDet{
     return sqrt(distx*distx+disty*disty+distz*distz);
   }
 
-  double InDetVKalVxInJetTool::VrtVrtDist2D(const xAOD::Vertex & PrimVrt, const Amg::Vector3D & SecVrt, 
-                                          const std::vector<double> SecVrtErr, double& Signif)
-  const
-  {
-    double distx =  PrimVrt.x()- SecVrt.x();
-    double disty =  PrimVrt.y()- SecVrt.y();
-
-
-    AmgSymMatrix(3)  PrimCovMtx=PrimVrt.covariancePosition();  //Create
-    AmgSymMatrix(2)  CovMtx;
-    CovMtx(0,0) = PrimCovMtx(0,0) + SecVrtErr[0];
-    CovMtx(0,1) = PrimCovMtx(0,1) + SecVrtErr[1];
-    CovMtx(1,0) = PrimCovMtx(1,0) + SecVrtErr[1];
-    CovMtx(1,1) = PrimCovMtx(1,1) + SecVrtErr[2];
-
-    AmgSymMatrix(2)  WgtMtx = CovMtx.inverse();
-
-    Signif = distx*WgtMtx(0,0)*distx
-            +disty*WgtMtx(1,1)*disty
-         +2.*distx*WgtMtx(0,1)*disty;
-    Signif=sqrt(Signif);
-    if( Signif!=Signif ) Signif = 0.;
-    return sqrt(distx*distx+disty*disty);
-  }
-
 //--------------------------------------------------
 // Significance along jet direction
 //--------------------------------------------------
@@ -321,22 +267,6 @@ namespace InDet{
 //
 
 
-//----------------------------
-//   Vertex error along radius
-//----------------------------
-  double InDetVKalVxInJetTool::VrtRadiusError(const Amg::Vector3D & SecVrt, const std::vector<double>  & VrtErr) const
-  {
-    double DirX=SecVrt.x(), DirY=SecVrt.y(); 
-    double Covar =    DirX*VrtErr[0]*DirX
-                  +2.*DirX*VrtErr[1]*DirY
-                     +DirY*VrtErr[2]*DirY;
-    Covar /= DirX*DirX + DirY*DirY;
-    Covar=sqrt(Covar);
-    if(Covar != Covar)  Covar = 0.;
-    return Covar;
-  }
-
-
 
   double InDetVKalVxInJetTool::ConeDist(const AmgVector(5) & VectPerig, const TLorentzVector & JetDir)
   const
@@ -374,15 +304,16 @@ namespace InDet{
 
 
 
-   int InDetVKalVxInJetTool::FindMax( std::vector<double>& Chi2PerTrk, std::vector<float> & Rank)
+   int InDetVKalVxInJetTool::FindMax( std::vector<double>& Chi2PerTrk, std::vector<int> & cntTrk)
    const
    { 
       double Chi2Ref=0.;
-      int Position=-1;
+      int Position=0;
       if( Chi2PerTrk.size() < 1 ) return Position ;
       for (int i=0; i< (int)Chi2PerTrk.size(); i++){
-	if(Chi2PerTrk[i]/std::max(Rank[i],(float)0.1) > Chi2Ref) { Chi2Ref=Chi2PerTrk[i]/std::max(Rank[i],(float)0.1); Position=i;}
+         if( Chi2PerTrk[i]/cntTrk[i] > Chi2Ref) { Chi2Ref=Chi2PerTrk[i]/cntTrk[i]; Position=i;}
       }
+
       return Position;
    }      
   
@@ -588,10 +519,8 @@ namespace InDet{
 
   }
 
-  StatusCode InDetVKalVxInJetTool::GetTrkFitWeights(std::vector<double> & wgt) const
-  {
-    return m_fitSvc->VKalGetTrkWeights(wgt);
-  }
+
+
 /*************************************************************************************************************/
   void   InDetVKalVxInJetTool::getPixelLayers(const Rec::TrackParticle* Part, int &blHit, int &l1Hit, int &l2Hit, int &nLays  ) const
   {
@@ -629,7 +558,7 @@ namespace InDet{
 	  //   bitH=HitPattern&((int)pow(2,Trk::pixelBarrel1));
         } else {                     // 3-layer pixel detector
           uint8_t BLhit,NPlay,NHoles,IBLhit;
-          if(!Part->summaryValue( BLhit,  xAOD::numberOfBLayerHits) )          BLhit = 0;
+          if(!Part->summaryValue( BLhit,  xAOD::numberOfInnermostPixelLayerHits) )          BLhit = 0;
           if(!Part->summaryValue(IBLhit,  xAOD::numberOfInnermostPixelLayerHits) )  IBLhit = 0; // Some safety
           BLhit=BLhit>IBLhit ? BLhit : IBLhit;                                                  // Some safety
           if(!Part->summaryValue( NPlay,  xAOD::numberOfContribPixelLayers) )  NPlay = 0;
@@ -737,41 +666,10 @@ namespace InDet{
       return VrtCovMtx;
   }
 
-  void InDetVKalVxInJetTool::fillVrtNTup( std::vector<Vrt2Tr>  & all2TrVrt)
-  const
-  {	 if(!m_curTup)return;
-         int ipnt=0;
-         for(auto vrt : all2TrVrt) {
-	   if(ipnt==100)break;
-	   m_curTup->VrtDist2D[ipnt]=vrt.FitVertex.perp();
-	   m_curTup->VrtSig3D[ipnt]=vrt.Signif3D;
-	   m_curTup->VrtSig2D[ipnt]=vrt.Signif2D;
-	   m_curTup->itrk[ipnt]=vrt.i;
-	   m_curTup->jtrk[ipnt]=vrt.j;
-	   m_curTup->mass[ipnt]=vrt.Momentum.M();
-	   m_curTup->Chi2[ipnt]=vrt.Chi2;
-	   m_curTup->badVrt[ipnt]=vrt.badVrt;
-           ipnt++; m_curTup->nVrt=ipnt;
-        }
-  } 
-
-  int InDetVKalVxInJetTool::getG4Inter(const xAOD::TrackParticle* TP ) const {
-      if( TP->isAvailable< ElementLink< xAOD::TruthParticleContainer> >( "truthParticleLink") ) {
-        const ElementLink<xAOD::TruthParticleContainer>& tplink = 
-                               TP->auxdata< ElementLink< xAOD::TruthParticleContainer > >("truthParticleLink");
-        if( tplink.isValid() && (*tplink)->barcode()>200000) return 1;
-      }
-      return 0;
-  }
-  int InDetVKalVxInJetTool::getMCPileup(const xAOD::TrackParticle* TP ) const {
-      if( TP->isAvailable< ElementLink< xAOD::TruthParticleContainer> >( "truthParticleLink") ) {
-        const ElementLink<xAOD::TruthParticleContainer>& tplink = 
-                               TP->auxdata< ElementLink< xAOD::TruthParticleContainer > >("truthParticleLink");
-        if( !tplink.isValid() ) return 1;
-      } else { return 1; }
-      return 0;
+  double InDetVKalVxInJetTool::trkPtCorr(double pT) const
+  {
+     double adp=pT/64000.; if(adp<0.)adp=0; if(adp>1.)adp=1.; adp=sqrt(adp)/2.;
+     return adp;
   }
-  int InDetVKalVxInJetTool::getG4Inter(const Rec::TrackParticle* ) const { return 0; }
-  int InDetVKalVxInJetTool::getMCPileup(const Rec::TrackParticle* ) const { return 0; }
 
 }  //end namespace
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/components/InDetVKalVxInJetTool_entries.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/components/InDetVKalVxInJetTool_entries.cxx
index 6262d64189554b94732996c72e8528a14ac90e6b..24809f0610bb5ed8bdb3564e872b67f2681936e6 100644
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/components/InDetVKalVxInJetTool_entries.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/components/InDetVKalVxInJetTool_entries.cxx
@@ -1,8 +1,6 @@
 #include "InDetVKalVxInJetTool/InDetVKalVxInJetTool.h"
-#include "InDetVKalVxInJetTool/InDetTrkInJetType.h"
 
 using namespace InDet;
 
 DECLARE_COMPONENT( InDetVKalVxInJetTool )
-DECLARE_COMPONENT( InDetTrkInJetType )
 
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h
index b877b3b21f3dc28e99c502bc4693554e3ab8c16e..8663d81537c86c2a6b7647b33ac94901d7f72980 100755
--- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h
@@ -99,7 +99,6 @@ public:
    ToolHandle<ISCT_ModuleDistortionsTool> m_distortionsTool;
    ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool", "Tool to retreive Lorentz angle"};
    //! flag storing if errors need scaling or should be kept nominal
-   bool                               m_scaleSctCov;
 
    //! job options
    bool                               m_option_make2dimBarrelClusters;
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx
index 9914b2dc842b3b5fb745ba1c43ddf0ccee459c86..2f8f14871e096aa61bdf9b3b5b8ea07d7bea3c29 100755
--- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx
@@ -13,7 +13,6 @@
 ///////////////////////////////////////////////////////////////////
 
 #include "SiClusterOnTrackTool/PixelClusterOnTrackTool.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetReadoutGeometry/PixelModuleDesign.h"
 #include "InDetIdentifier/PixelID.h"
 #include "PixelConditionsServices/IPixelOfflineCalibSvc.h"
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ISCT_ClusteringTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ISCT_ClusteringTool.h
index a0b857afb38d62d11fdec55bea03acdad23a89d2..f30f3d7d7391cedbc6f86df318d9dcab83b72ba1 100755
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ISCT_ClusteringTool.h
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ISCT_ClusteringTool.h
@@ -23,10 +23,6 @@
 
 class SCT_ID;
 
-namespace InDetDD {
-  class SiDetectorManager;
-}
-
 class SCT_ChannelStatusAlg;
 class SCT_ConditionsSummary;
 
@@ -54,7 +50,6 @@ class ISCT_ClusteringTool : virtual public IAlgTool
  */
  virtual SCT_ClusterCollection *clusterize(
 			  const InDetRawDataCollection<SCT_RDORawData> & RDOs,
-			  const InDetDD::SiDetectorManager& manager,
 			  const SCT_ID& idHelper,
 			  const SCT_ChannelStatusAlg* status,
 			  const bool CTBBadChannels) const = 0;
@@ -69,7 +64,6 @@ class ISCT_ClusteringTool : virtual public IAlgTool
  */
  virtual SCT_ClusterCollection *clusterize(
 			  const InDetRawDataCollection<SCT_RDORawData> & rdoCollection,
-			  const InDetDD::SiDetectorManager& manager,
 			  const SCT_ID& idHelper) const = 0;
 };
 
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/PixelGangedAmbiguitiesFinder.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/PixelGangedAmbiguitiesFinder.h
index 058b83416628b310e31467cad5778c4896ead404..5abbadae9c077600c46f99950168853bfcee21f2 100755
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/PixelGangedAmbiguitiesFinder.h
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/PixelGangedAmbiguitiesFinder.h
@@ -22,11 +22,15 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "Identifier/Identifier.h"
 #include "InDetIdentifier/PixelID.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetPrepRawData/PixelCluster.h"
 #include "InDetPrepRawData/PixelClusterCollection.h"
 #include "InDetPrepRawData/PixelGangedClusterAmbiguities.h"
+
+namespace InDetDD {
+  class SiDetectorElement;
+  class SiDetectorManager;
+}
+
 
 namespace InDet{
 
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h
index ba2bdf66585e9e6c132421f732d077531b53a0db..15d49786be4572ee6fe0ddb2d1058586ebb21426 100755
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h
@@ -47,7 +47,6 @@ namespace InDet {
     /// Clusterize the SCT RDOs... deprecated form passes explicit channel status object
     virtual SCT_ClusterCollection *
     clusterize( const InDetRawDataCollection<SCT_RDORawData> & RDOs,
-                const InDetDD::SiDetectorManager& manager,
                 const SCT_ID& idHelper,
                 const SCT_ChannelStatusAlg* status,
                 const bool CTBBadChannels) const;
@@ -55,7 +54,6 @@ namespace InDet {
     /// Clusterize the SCT RDOs...
     virtual SCT_ClusterCollection *
     clusterize( const InDetRawDataCollection<SCT_RDORawData> & RDOs,
-                const InDetDD::SiDetectorManager& manager,
                 const SCT_ID& idHelper) const;
     
   private:
@@ -73,7 +71,6 @@ namespace InDet {
     bool                                      m_majority01X;
     bool                                      m_useRowInformation;
 
-    BooleanProperty m_useDetectorManager{this, "UseDetectorManager", true/*false*/, "Switch to use SiDetectorElementCollection from SCT_DetectorManager for debugging"};
     SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
     ///Add strips to a cluster vector without checking for bad strips
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx
index f9ef7ce6e78598cb82cf805a51b44a648c170207..9c00ee38ae9b74adef9ef8cbc4516c59eac4b219 100755
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx
@@ -15,7 +15,6 @@
 #include "SiClusterizationTool/ClusterMakerTool.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetReadoutGeometry/SiLocalPosition.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetReadoutGeometry/PixelModuleDesign.h"
 #include "InDetPrepRawData/PixelCluster.h"
 #include "InDetPrepRawData/SCT_Cluster.h"
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx
index 6a6150be4fb786fd5d3a0de1a9d36b5c127853a7..a0641d4ec4287d1c333d06b67eae4d61f33d170b 100755
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx
@@ -15,6 +15,7 @@
 
 #include "InDetReadoutGeometry/SiCellId.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetReadoutGeometry/PixelModuleDesign.h"
 
 #include "GaudiKernel/SmartDataPtr.h"
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx
index eeefa8d4e2d720f6241a5f0b3aa002b776e91d1f..8ec902c0fb20196149aecabf0cb98b1e35c3e72f 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx
@@ -18,7 +18,6 @@
 #include "InDetReadoutGeometry/SiCellId.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetReadoutGeometry/SiDetectorDesign.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetReadoutGeometry/SiLocalPosition.h"
 #include "InDetPrepRawData/SiWidth.h"
 #include "Identifier/IdentifierHash.h"
@@ -188,13 +187,12 @@ namespace InDet{
   }
 
   SCT_ClusterCollection*  SCT_ClusteringTool::clusterize(const InDetRawDataCollection<SCT_RDORawData> &collection,
-                                                         const InDetDD::SiDetectorManager& manager,
                                                          const SCT_ID& idHelper,
                                                          const SCT_ChannelStatusAlg* /*status */,
                                                          const bool /*CTBBadChannels */) const
   {
-    ATH_MSG_INFO( "You have invoked the deprecated form of clusterize(...), please use the new interface, of the form  clusterize(InDetRawDataCollection<SCT_RDORawData> & collection,InDetDD::SiDetectorManager& manager,SCT_ID& idHelper)");
-    return clusterize(collection, manager, idHelper);
+    ATH_MSG_INFO( "You have invoked the deprecated form of clusterize(...), please use the new interface, of the form  clusterize(InDetRawDataCollection<SCT_RDORawData> & collection,SCT_ID& idHelper)");
+    return clusterize(collection, idHelper);
   }
   
   void SCT_ClusteringTool::addStripsToCluster(const Identifier & firstStripId, const unsigned int nStrips, 
@@ -320,7 +318,7 @@ namespace InDet{
   
   SCT_ClusterCollection * 
   SCT_ClusteringTool::clusterize(const InDetRawDataCollection<SCT_RDORawData> & collection,
-                                 const InDetDD::SiDetectorManager& manager, const SCT_ID& idHelper) const
+                                 const SCT_ID& idHelper) const
   {
     ATH_MSG_VERBOSE ("SCT_ClusteringTool::clusterize()");
 
@@ -438,20 +436,15 @@ namespace InDet{
 
     // Find detector element for these digits
     Identifier elementID(collection.identify());
-    const  InDetDD::SiDetectorElement* element = nullptr;
-    if (m_useDetectorManager) {
-      element = manager.getDetectorElement(elementID);
-    } else {
-      const Identifier waferId{idHelper.wafer_id(elementID)};
-      const IdentifierHash waferHash{idHelper.wafer_hash(waferId)};
-      SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
-      const InDetDD::SiDetectorElementCollection* sctDetEle{*sctDetEleHandle};
-      if (not sctDetEleHandle.isValid() or sctDetEle==nullptr) {
-        ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available.");
-        return nullResult;
-      }
-      element = sctDetEle->getDetectorElement(waferHash);
+    const Identifier waferId{idHelper.wafer_id(elementID)};
+    const IdentifierHash waferHash{idHelper.wafer_hash(waferId)};
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
+    const InDetDD::SiDetectorElementCollection* sctDetEle{*sctDetEleHandle};
+    if (not sctDetEleHandle.isValid() or sctDetEle==nullptr) {
+      ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available.");
+      return nullResult;
     }
+    const  InDetDD::SiDetectorElement* element = sctDetEle->getDetectorElement(waferHash);
     if (!element) {
       ATH_MSG_WARNING("Element not in the element map, ID = "<< elementID);
       return nullResult;
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.cxx b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.cxx
index 418f5763f8a4d831b9a4b6841ddcc07d0a64dfa1..7d8d9c33cbd4b1eaa15b21f77dfe8fdd3f8def94 100644
--- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.cxx
@@ -4,7 +4,6 @@
 
 #include "SiDetElementBoundaryLinksCondAlg_xk.h"
 
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "SiCombinatorialTrackFinderTool_xk/SiDetElementBoundaryLink_xk.h"
 #include "StoreGate/ReadCondHandle.h"
@@ -15,7 +14,6 @@ namespace InDet {
   SiDetElementBoundaryLinksCondAlg_xk::SiDetElementBoundaryLinksCondAlg_xk(const std::string& name, ISvcLocator* pSvcLocator)
     : ::AthAlgorithm(name, pSvcLocator)
     , m_condSvc{"CondSvc", name}
-    , m_detManager{nullptr}
 {
 }
 
@@ -33,8 +31,6 @@ namespace InDet {
     // Register write handle
     ATH_CHECK(m_condSvc->regHandle(this, m_writeKey));
 
-    ATH_CHECK(detStore()->retrieve(m_detManager, "SCT"));
-
     return StatusCode::SUCCESS;
   }
 
@@ -68,10 +64,6 @@ namespace InDet {
       return StatusCode::FAILURE;
     }
 
-    if (m_useDetectorManager) { // For debugging: use SiDetectorElementCollection from SCT_DetectorManager
-      readCdo = m_detManager->getDetectorElementCollection();
-    }
-
     // ____________ Construct new Write Cond Object ____________
     // Copied from
     // InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.h
index c98d0f042b808ae4b79e1024c6eeacccc2b69280..1f614f6e359eeb5b62f0b0b091b1c3ffa235fd97 100644
--- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.h
+++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.h
@@ -14,10 +14,6 @@
 
 #include "GaudiKernel/ICondSvc.h"
 
-namespace InDetDD {
-  class SCT_DetectorManager;
-}
-
 namespace InDet {
 
   class SiDetElementBoundaryLinksCondAlg_xk : public AthAlgorithm {
@@ -33,10 +29,7 @@ namespace InDet {
     SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_readKey{this, "ReadKey", "SCT_DetectorElementCollection", "Key of input SiDetectorElementCollection for SCT"};
     SG::WriteCondHandleKey<InDet::SiDetElementBoundaryLinks_xk> m_writeKey{this, "WriteKey", "SCT_DetElementBoundaryLinks_xk", "Key of output SiDetElementBoundaryLinks_xk for SCT"};
 
-    BooleanProperty m_useDetectorManager{this, "UseDetectorManager", true/*false*/, "Switch to use SiDetectorElementCollection from SCT_DetectorManager for debugging"};
-
     ServiceHandle<ICondSvc> m_condSvc;
-    const InDetDD::SCT_DetectorManager* m_detManager;
   };
 
 }
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h
index 62c6952ea6da7549d705a17106d23f0e00e11aba..4cbb33ad9a5a4482d431a7f5763f6b93d9609a69 100755
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h
@@ -29,7 +29,7 @@ namespace InDet{
     public:
       
       SiDetElementLink_xk();
-      SiDetElementLink_xk(InDetDD::SiDetectorElement*&,const double*);
+      SiDetElementLink_xk(const InDetDD::SiDetectorElement*,const double*);
       SiDetElementLink_xk(const SiDetElementLink_xk&);
       ~SiDetElementLink_xk();
       SiDetElementLink_xk& operator  = (const SiDetElementLink_xk&);
@@ -113,7 +113,7 @@ namespace InDet{
     }
 
   inline InDet::SiDetElementLink_xk::SiDetElementLink_xk
-    (InDetDD::SiDetectorElement*& el,const double* P)
+    (const InDetDD::SiDetectorElement* el,const double* P)
     {
       m_detelement = el; set(P); m_used = false; m_way = 0.;
     } 
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayerVectors_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayerVectors_xk.h
new file mode 100644
index 0000000000000000000000000000000000000000..19c2f21512432b1253f115c3d9171298a4855e21
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayerVectors_xk.h
@@ -0,0 +1,24 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+/////////////////////////////////////////////////////////////////////////////////
+//  Header file for class SiDetElementsLayerVectors_xk
+/////////////////////////////////////////////////////////////////////////////////
+
+#ifndef SiDetElementsLayerVectors_xk_H
+#define SiDetElementsLayerVectors_xk_H
+
+#include "SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h"
+#include <vector>
+
+namespace InDet {
+  typedef std::vector<std::vector<InDet::SiDetElementsLayer_xk>> SiDetElementsLayerVectors_xk;
+}
+
+#include "AthenaKernel/CLASS_DEF.h"
+CLASS_DEF( InDet::SiDetElementsLayerVectors_xk , 231384279 , 1 )
+#include "AthenaKernel/CondCont.h"
+CONDCONT_DEF( InDet::SiDetElementsLayerVectors_xk , 226495641 );
+
+#endif // SiDetElementsLayerVectors_xk_H
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h
index 3a9a72159f70932d46b897daaffeb95c6535b41d..9ab80e078bc32e4eec30b1fc95ecc0b7372eb481 100755
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h
@@ -17,18 +17,23 @@
 #ifndef SiDetElementsRoadMaker_xk_H
 #define SiDetElementsRoadMaker_xk_H
 
-#include <list>
-#include <vector>
-#include "GaudiKernel/ServiceHandle.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgTool.h"
 #include "InDetRecToolInterfaces/ISiDetElementsRoadMaker.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+
+#include "MagFieldInterfaces/IMagFieldSvc.h"
+#include "SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h"
+#include "SiDetElementsRoadTool_xk/SiDetElementsLayerVectors_xk.h"
+#include "StoreGate/ReadCondHandleKey.h"
 #include "TrkGeometry/MagneticFieldProperties.h"
 #include "TrkSurfaces/CylinderBounds.h"
 
-#include "SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
 #include <iosfwd>
+#include <list>
+#include <mutex>
+#include <vector>
 
 class MsgStream;
 class IMagFieldAthenaSvc;
@@ -112,21 +117,26 @@ namespace InDet{
       float                                m_width{}    ;  // Width of the road
       double                               m_step {}    ;  // Max step allowed
       Trk::CylinderBounds                  m_bounds{}   ;  //  
-      int                                  m_map  [3] ;
       std::vector<SiDetElementsLayer_xk>   m_layer[3] ;  // Layers
       std::string                          m_pix      ;  // PIX manager   location
       std::string                          m_sct      ;  // SCT manager   location
       std::string                          m_fieldmode;  // Mode of magnetic field
-      std::string                     m_callbackString;
       Trk::MagneticFieldProperties         m_fieldprop;  // Magnetic field properties
+      SG::ReadCondHandleKey<SiDetElementsLayerVectors_xk> m_layerVecKey{this, "LayerVecKey",
+          "SiDetElementsLayerVectors_xk", "Key of SiDetElementsLayerVectors_xk"};
+
+      // Mutex to protect the contents
+      mutable std::mutex m_mutex;
+      // Cache to store events for slots
+      mutable std::vector<EventContext::ContextEvt_t> m_cache;
+      // std::vector<SiDetElementsLayer_xk> for each event. This is not const.
+      mutable SiDetElementsLayerVectors_xk m_layerVectors[3];
 
       ///////////////////////////////////////////////////////////////////
       // Methods
       ///////////////////////////////////////////////////////////////////
 
       void       mapDetectorElementsProduction();
-      StatusCode mapDetectorElementsUpdate(IOVSVC_CALLBACK_ARGS);
-      void detElementInformation(const InDetDD::SiDetectorElement&,double*);
       float stepToDetElement
 	(const InDetDD::SiDetectorElement*&,Amg::Vector3D&,Amg::Vector3D&);
 
@@ -137,6 +147,8 @@ namespace InDet{
 
       MsgStream&    dumpConditions(MsgStream   & out) const;
       MsgStream&    dumpEvent     (MsgStream   & out) const;
+
+      void getLayers(std::vector<SiDetElementsLayer_xk>* (&layer)[3]) const;
   };
 
   MsgStream&    operator << (MsgStream&   ,const SiDetElementsRoadMaker_xk&);
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..6a94690b339c382a9e2be6ed2cde8dc4c5212288
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.cxx
@@ -0,0 +1,244 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "SiDetElementsRoadCondAlg_xk.h"
+
+#include <utility>
+#include <memory>
+#include "SiDetElementsRoadTool_xk/SiDetElementsComparison.h"
+#include "SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h"
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
+#include "SiDetElementsRoadUtils_xk.h"
+
+///////////////////////////////////////////////////////////////////
+// Constructor
+///////////////////////////////////////////////////////////////////
+
+InDet::SiDetElementsRoadCondAlg_xk::SiDetElementsRoadCondAlg_xk(const std::string& name, ISvcLocator* pSvcLocator)
+  : ::AthAlgorithm(name, pSvcLocator),
+  m_pixmgr{nullptr},
+  m_condSvc{"CondSvc", name}
+{
+}
+
+///////////////////////////////////////////////////////////////////
+// Initialisation
+///////////////////////////////////////////////////////////////////
+
+StatusCode InDet::SiDetElementsRoadCondAlg_xk::initialize()
+{
+  if ((not m_usePIX) and (not m_useSCT)) {
+    ATH_MSG_FATAL("Please don't call this tool if usePixel and useSCT are false");
+    return StatusCode::FAILURE;
+  }
+
+  // Get Pixel Detector Manager and Pixel ID helper
+  if (m_usePIX) {
+    ATH_CHECK(detStore()->retrieve(m_pixmgr, m_pix));
+    ATH_CHECK(m_IBLDistFolderKey.initialize());
+    if (m_useDynamicAlignFolders) {
+      ATH_CHECK(m_pixelL2FolderKey.initialize());
+    }
+  }
+  
+  // Get  SCT Detector Manager and SCT ID helper
+  if (m_useSCT) {
+    ATH_CHECK(m_SCTDetEleCollKey.initialize());
+  }
+
+  ATH_CHECK(m_writeKey.initialize());
+  ATH_CHECK(m_condSvc.retrieve());
+  ATH_CHECK(m_condSvc->regHandle(this, m_writeKey));
+
+  return StatusCode::SUCCESS;
+}
+
+///////////////////////////////////////////////////////////////////
+// Finalize
+///////////////////////////////////////////////////////////////////
+
+StatusCode InDet::SiDetElementsRoadCondAlg_xk::finalize()
+{
+  return StatusCode::SUCCESS;
+}
+
+///////////////////////////////////////////////////////////////////
+// Map of detector elements production
+// Taken from InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsProduction()
+///////////////////////////////////////////////////////////////////
+
+StatusCode InDet::SiDetElementsRoadCondAlg_xk::execute()
+{
+  const double pi2=2.*M_PI;
+  const double pi=M_PI;
+
+  SG::WriteCondHandle<SiDetElementsLayerVectors_xk> writeHandle{m_writeKey};
+  if (writeHandle.isValid()) {
+    ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid."
+                  << ". In theory this should not be called, but may happen"
+                  << " if multiple concurrent events are being processed out of order.");
+    return StatusCode::SUCCESS;
+  }
+
+  std::unique_ptr<SiDetElementsLayerVectors_xk> writeCdo{std::make_unique<SiDetElementsLayerVectors_xk>(3)};
+
+  std::vector<const InDetDD::SiDetectorElement*> pW[3];
+
+  EventIDRange rangePixel;
+  if (m_usePIX) {
+    // Loop over each wafer of pixels
+    InDetDD::SiDetectorElementCollection::const_iterator s  =  m_pixmgr->getDetectorElementBegin();
+    InDetDD::SiDetectorElementCollection::const_iterator se =  m_pixmgr->getDetectorElementEnd  ();
+    for (; s!=se; ++s) {
+      if      ((*s)->isBarrel()       ) pW[1].push_back((*s)); // Barrel
+      else if ((*s)->center().z() > 0.) pW[2].push_back((*s)); // Right endcap
+      else                              pW[0].push_back((*s)); // Left  endcap
+    }
+
+    SG::ReadCondHandle<CondAttrListCollection> iblDistFolder(m_IBLDistFolderKey);
+    if (not iblDistFolder.isValid()) {
+      ATH_MSG_ERROR(m_IBLDistFolderKey.fullKey() << " is not available.");
+      return StatusCode::FAILURE;
+    }
+    if (not iblDistFolder.range(rangePixel)) {
+      ATH_MSG_ERROR("Failed to retrieve validity range for " << iblDistFolder.key());
+      return StatusCode::FAILURE;
+    }
+    if (m_useDynamicAlignFolders) {
+      SG::ReadCondHandle<CondAttrListCollection> pixelL2Folder(m_pixelL2FolderKey);
+      if (not pixelL2Folder.isValid()) {
+        ATH_MSG_ERROR(pixelL2Folder.fullKey() << " is not available.");
+        return StatusCode::FAILURE;
+      }
+      EventIDRange rangePixelL2;
+      if (not pixelL2Folder.range(rangePixelL2)) {
+        ATH_MSG_ERROR("Failed to retrieve validity range for " << pixelL2Folder.key());
+        return StatusCode::FAILURE;
+      }
+      rangePixel = EventIDRange::intersect(rangePixel, rangePixelL2);
+    }
+  }
+
+  EventIDRange rangeSct;
+  if (m_useSCT) {
+    // Loop over each wafer of sct
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
+    const InDetDD::SiDetectorElementCollection* sctDetEle{*sctDetEleHandle};
+    if (not sctDetEleHandle.isValid() or sctDetEle==nullptr) {
+      ATH_MSG_ERROR(m_SCTDetEleCollKey.fullKey() << " is not available.");
+      return StatusCode::FAILURE;
+    }
+    for (const InDetDD::SiDetectorElement* s: *sctDetEle) {
+      if      (s->isBarrel()       ) pW[1].push_back(s); // Barrel
+      else if (s->center().z() > 0.) pW[2].push_back(s); // Right endcap
+      else                           pW[0].push_back(s); // Left  endcap
+    }
+
+    if (not sctDetEleHandle.range(rangeSct)) {
+      ATH_MSG_ERROR("Failed to retrieve validity range for " << sctDetEleHandle.key());
+      return StatusCode::FAILURE;
+    }
+  }
+
+  int nel = pW[0].size()+pW[1].size()+pW[2].size();
+  if (nel==0) {
+    ATH_MSG_WARNING("The number of elements is zero.");
+    return StatusCode::SUCCESS;
+  }
+
+  std::sort(pW[1].begin(), pW[1].end(), InDet::compDetElements_RAZ());
+  std::sort(pW[0].begin(), pW[0].end(), InDet::compDetElements_ZRA());
+  std::sort(pW[2].begin(), pW[2].end(), InDet::compDetElements_ZRA());
+
+  for(int N=0; N<3; ++N) {
+
+    double P[40];
+    int im    = static_cast<int>(pW[N].size())-1;
+    int If    = 0      ;
+    double z0 = 0.     ;
+    double r0 = 0.     ;
+    
+    for (int i = 0; i<= im; ++i) {
+     
+      InDet::SiDetElementsRoadUtils_xk::detElementInformation(*(pW[N][i]), P);
+
+      double r    = P[0];
+      double z    = P[1];
+      bool newl = false;
+      if (N==1) {
+        if (fabs(r-r0) > 10.) {
+          newl=true;
+          r0=r;
+        }
+      } else {
+        if (fabs(z-z0) > 10.) {
+          newl=true; 
+          r0=r; 
+          z0=z;
+        }
+      }
+
+      if (newl || i==im) {
+
+        int Il = i-1;
+        if (i==im) ++Il;
+
+        if (If<=Il) {
+
+          double rmin = 100000., rmax =-100000.;
+          double zmin = 100000., zmax =-100000.;
+          double dfm  = 0.;
+
+          std::vector<const InDetDD::SiDetectorElement*> pE;
+          for (int j=If; j<=Il; ++j) pE.push_back(pW[N][j]);
+          std::sort(pE.begin(), pE.end(), InDet::compDetElements_A());
+
+          InDet::SiDetElementsLayer_xk layer;
+
+          for (unsigned int j=0; j!=pE.size(); ++j) {
+
+            if (pE[j]) {
+
+              InDet::SiDetElementsRoadUtils_xk::detElementInformation(*(pE[j]),P);
+
+              if ( P[ 9] < rmin ) rmin = P[ 9];
+              if ( P[10] > rmax ) rmax = P[10];
+              if ( P[11] < zmin ) zmin = P[11];
+              if ( P[12] > zmax ) zmax = P[12];
+
+              double df1 = fabs(P[13]-P[2]);
+              if (df1>pi) df1 = fabs(df1-pi2);
+              double df2 = fabs(P[14]-P[2]);
+              if (df2>pi) df2 = fabs(df2-pi2);
+              if (df1>dfm) dfm = df1;
+              if (df2>dfm) dfm = df2;
+
+              InDet::SiDetElementLink_xk link(pE[j], P);
+              layer.add(link);
+            }
+          }
+          layer.sortDetectorElements();
+          double r  =(rmax+rmin)*.5;
+          double dr =(rmax-rmin)*.5;
+          double z  =(zmax+zmin)*.5;
+          double dz =(zmax-zmin)*.5;
+          layer.set(r, dr, z, dz, dfm);
+          (writeCdo->at(N)).push_back(layer);
+        }
+        If = i;
+      }
+    }
+  }
+
+  EventIDRange rangeW{EventIDRange::intersect(rangePixel, rangeSct)};
+  if (writeHandle.record(rangeW, std::move(writeCdo)).isFailure()) {
+    ATH_MSG_ERROR("Could not record " << writeHandle.key()
+                  << " with EventRange " << rangeW
+                  << " into Conditions Store");
+    return StatusCode::FAILURE;
+  }
+  ATH_MSG_INFO("recorded new CDO " << writeHandle.key() << " with range " << rangeW << " into Conditions Store");
+
+  return StatusCode::SUCCESS;
+}
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.h
new file mode 100644
index 0000000000000000000000000000000000000000..d4bc41f32ef0c3c6fe73beef1e1535000755a17e
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.h
@@ -0,0 +1,80 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+/////////////////////////////////////////////////////////////////////////////////
+//  Header file for class SiDetElementsRoadCondAlg_xk
+/////////////////////////////////////////////////////////////////////////////////
+
+#ifndef SiDetElementsRoadCondAlg_xk_H
+#define SiDetElementsRoadCondAlg_xk_H
+
+#include <vector>
+#include "GaudiKernel/ICondSvc.h"
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaPoolUtilities/CondAttrListCollection.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "SiDetElementsRoadTool_xk/SiDetElementsLayerVectors_xk.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/WriteCondHandleKey.h"
+#include "TrkParameters/TrackParameters.h"
+#include "TrkSurfaces/CylinderBounds.h"
+
+class PixelID;
+class SCT_ID;
+
+namespace InDetDD {
+  class PixelDetectorManager;
+}
+
+namespace InDet {
+  /**
+     @class SiDetElementsRoadCondAlg_xk
+     @author Susumu.Oda@cern.ch
+  */
+
+  class SiDetElementsRoadCondAlg_xk : public AthAlgorithm
+  {
+    ///////////////////////////////////////////////////////////////////
+    // Public methods:
+    ///////////////////////////////////////////////////////////////////
+      
+  public:
+      
+    ///////////////////////////////////////////////////////////////////
+    // Standard tool methods
+    ///////////////////////////////////////////////////////////////////
+
+    SiDetElementsRoadCondAlg_xk(const std::string& name, ISvcLocator* pSvcLocator);
+    virtual ~SiDetElementsRoadCondAlg_xk() = default;
+    virtual StatusCode initialize();
+    virtual StatusCode finalize();
+    virtual StatusCode execute();
+
+  private:
+      
+    ///////////////////////////////////////////////////////////////////
+    // Private Data
+    ///////////////////////////////////////////////////////////////////
+    BooleanProperty m_usePIX{this, "usePixel", true, "Flag to use Pixel"};
+    BooleanProperty m_useSCT{this, "useSCT",   true, "Flag to use SCT"};
+    BooleanProperty m_useDynamicAlignFolders{this, "UseDynamicAlignFolders", false, "Flag to use dynamic alignment folders"};
+    SG::ReadCondHandleKey<CondAttrListCollection> m_IBLDistFolderKey{this, "IBLDistFolderKey", "/Indet/IBLDist", "Key of /Indet/IBLDist folder"};
+    SG::ReadCondHandleKey<CondAttrListCollection> m_pixelL2FolderKey{this, "PixelL2FolderKey", "/Indet/AlignL2/PIX", "Key of /Indet/AlignL2/PIX folder"};
+    SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+    SG::WriteCondHandleKey<SiDetElementsLayerVectors_xk> m_writeKey{this, "WriteKey", "SiDetElementsLayerVectors_xk", "Key of SiDetElementsLayerVectors_xk"};
+    StringProperty m_pix{this, "PixManagerLocation", "Pixel", "PIX manager location"};
+    StringProperty m_sct{this, "SCTManagerLocation", "SCT", "SCT manager location"};
+    const InDetDD::PixelDetectorManager* m_pixmgr;
+    ServiceHandle<ICondSvc> m_condSvc;
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////
+    void detElementInformation(const InDetDD::SiDetectorElement&, double*);
+  };
+
+} // end of name space
+
+#endif // SiDetElementsRoadCondAlg_xk_H
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
index 04f114a650afee494b276a74c3deabc1961fdaf0..7ee06922446727e9f3b3dfb61bef96ac39dd8ffe 100755
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
@@ -11,15 +11,20 @@
 // Version 1.0 21/04/2004 I.Gavrilenko
 ///////////////////////////////////////////////////////////////////
 
+#include "SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h"
+
+#include "SiDetElementsRoadUtils_xk.h"
 
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
-#include "SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h"
-#include "SiDetElementsRoadTool_xk/SiDetElementsComparison.h"
+#include "EventInfo/TagInfo.h"
 #include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "TrkExInterfaces/IPropagator.h"
 #include "TrkPrepRawData/PrepRawData.h"
-#include "EventInfo/TagInfo.h"
+#include "SiDetElementsRoadTool_xk/SiDetElementsComparison.h"
+#include "SiDetElementsRoadUtils_xk.h"
+#include "StoreGate/ReadCondHandle.h"
+
 #include <ostream>
 #include <iomanip>
 
@@ -93,29 +98,7 @@ StatusCode InDet::SiDetElementsRoadMaker_xk::initialize()
   //
   mapDetectorElementsProduction(); 
 
-  // get the key -- from StoreGate (DetectorStore)
-  //
-  std::vector< std::string > tagInfoKeys =  detStore()->keys<TagInfo> ();
-  std::string tagInfoKey = "";
-
-  if(tagInfoKeys.empty())
-    msg(MSG::WARNING) << " No TagInfo keys in DetectorStore "<< endmsg;
-   else {
-     if(tagInfoKeys.size() > 1) {
-       msg(MSG::WARNING) <<"More than one TagInfo key in the DetectorStore, using the first one "<< endmsg;
-     }
-     tagInfoKey = tagInfoKeys[0];
-   }
-
-  m_callbackString = tagInfoKey;
-
-  const DataHandle<TagInfo> tagInfoH;
-  
-  // Setup call back for geometry
-  //
-  ATH_CHECK( detStore()->regFcn(&InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsUpdate,
-			  this,tagInfoH,m_callbackString));
-
+  ATH_CHECK(m_layerVecKey.initialize());
 
  std::string folder( "/EXT/DCS/MAGNETS/SENSORDATA" );
  const DataHandle<CondAttrListCollection> currentHandle;
@@ -177,10 +160,13 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co
   n     = 62-m_pix.size();
   std::string s6; for(int i=0; i<n; ++i) s6.append(" "); s6.append("|");
 
+  std::vector<SiDetElementsLayer_xk>* layer[3];
+  getLayers(layer);
+
   int maps = 0;
-  if(m_layer[0].size()) ++maps;
-  if(m_layer[1].size()) ++maps;
-  if(m_layer[2].size()) ++maps;
+  if(layer[0]->size()) ++maps;
+  if(layer[1]->size()) ++maps;
+  if(layer[2]->size()) ++maps;
   out<<"|----------------------------------------------------------------------"
      <<"-------------------|"
      <<"\n";
@@ -201,10 +187,10 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co
 
   if(!maps || m_outputlevel==0) return out;
 
-  if(m_layer[1].size()) {
-    int nl = m_layer[1].size();
+  if(layer[1]->size()) {
+    int nl = layer[1]->size();
     int nc = 0;
-    for(unsigned int i=0; i!=m_layer[1].size(); ++i) nc+=m_layer[1][i].nElements();
+    for(unsigned int i=0; i!=layer[1]->size(); ++i) nc+=layer[1]->at(i).nElements();
     out<<"|----------------------------------------------------------------|"
        <<"\n";
     out<<"| Barrel map containt "
@@ -217,27 +203,27 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co
        <<"\n";
     out<<"|------|-----------|------------|------------|------------|------|"
        <<"\n";
-    for(unsigned int i=0; i!=m_layer[1].size(); ++i) {
-      double zmin = m_layer[1][i].z()-m_layer[1][i].dz();
-      double zmax = m_layer[1][i].z()+m_layer[1][i].dz();
+    for(unsigned int i=0; i!=layer[1]->size(); ++i) {
+      double zmin = layer[1]->at(i).z()-layer[1]->at(i).dz();
+      double zmax = layer[1]->at(i).z()+layer[1]->at(i).dz();
       out<<"| "
 	 <<std::setw(4)<<i<<" |"
-	 <<std::setw(10)<<std::setprecision(4)<<  m_layer[1][i].r ()<<" | "
+	 <<std::setw(10)<<std::setprecision(4)<<  layer[1]->at(i).r ()<<" | "
 	 <<std::setw(10)<<std::setprecision(4)<<                zmin<<" | "
 	 <<std::setw(10)<<std::setprecision(4)<<                zmax<<" | "
-	 <<std::setw(10)<<std::setprecision(4)<< m_layer[1][i].dfe()<<" | "
-	 <<std::setw(4)<<m_layer[1][i].nElements()<<" | "
+	 <<std::setw(10)<<std::setprecision(4)<< layer[1]->at(i).dfe()<<" | "
+	 <<std::setw(4)<<layer[1]->at(i).nElements()<<" | "
 	 <<"\n";
     }
     out<<"|------|-----------|------------|------------|------------|------|"
        <<"\n";
 
   }
-  if(m_layer[0].size()) {
+  if(layer[0]->size()) {
 
-    int nl = m_layer[0].size();
+    int nl = layer[0]->size();
     int nc = 0;
-    for(unsigned int i=0; i!=m_layer[0].size(); ++i) nc+=m_layer[0][i].nElements();
+    for(unsigned int i=0; i!=layer[0]->size(); ++i) nc+=layer[0]->at(i).nElements();
     out<<"|----------------------------------------------------------------|"
        <<"\n";
     out<<"| L.Endcap map containt"
@@ -251,25 +237,25 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co
        <<"\n";
     out<<"|------|-----------|------------|------------|------------|------|"
        <<"\n";
-    for(unsigned int i=0; i!=m_layer[0].size(); ++i) {
-      double rmin = m_layer[0][i].r()-m_layer[0][i].dr();
-      double rmax = m_layer[0][i].r()+m_layer[0][i].dr();
+    for(unsigned int i=0; i!=layer[0]->size(); ++i) {
+      double rmin = layer[0]->at(i).r()-layer[0]->at(i).dr();
+      double rmax = layer[0]->at(i).r()+layer[0]->at(i).dr();
       out<<"| "
 	 <<std::setw(4)<<i<<" |"
-	 <<std::setw(10)<<std::setprecision(4)<<  m_layer[0][i].z()<<" | "
+	 <<std::setw(10)<<std::setprecision(4)<<  layer[0]->at(i).z()<<" | "
 	 <<std::setw(10)<<std::setprecision(4)<<               rmin<<" | "
 	 <<std::setw(10)<<std::setprecision(4)<<               rmax<<" | "
-	 <<std::setw(10)<<std::setprecision(4)<<m_layer[0][i].dfe()<<" | "
-	 <<std::setw(4)<<m_layer[0][i].nElements()<<" | "
+	 <<std::setw(10)<<std::setprecision(4)<<layer[0]->at(i).dfe()<<" | "
+	 <<std::setw(4)<<layer[0]->at(i).nElements()<<" | "
 	 <<"\n";
     }
     out<<"|------|-----------|------------|------------|------------|------|"
        <<"\n";
   }
-  if(m_layer[2].size()) {
-    int nl = m_layer[2].size();
+  if(layer[2]->size()) {
+    int nl = layer[2]->size();
     int nc = 0;
-    for(unsigned int i=0; i!=m_layer[2].size(); ++i) nc+=m_layer[2][i].nElements();
+    for(unsigned int i=0; i!=layer[2]->size(); ++i) nc+=layer[2]->at(i).nElements();
     out<<"|----------------------------------------------------------------|"
        <<"\n";
    out<<"| R.Endcap map containt"
@@ -282,16 +268,16 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co
        <<"\n";
     out<<"|------|-----------|------------|------------|------------|------|"
        <<"\n";
-    for(unsigned int i=0; i!=m_layer[2].size(); ++i) {
-      double rmin = m_layer[2][i].r()-m_layer[0][i].dr();
-      double rmax = m_layer[2][i].r()+m_layer[0][i].dr();
+    for(unsigned int i=0; i!=layer[2]->size(); ++i) {
+      double rmin = layer[2]->at(i).r()-layer[0]->at(i).dr();
+      double rmax = layer[2]->at(i).r()+layer[0]->at(i).dr();
       out<<"| "
 	 <<std::setw(4)<<i<<" |"
-	 <<std::setw(10)<<std::setprecision(4)<<  m_layer[2][i].z()<<" | "
+	 <<std::setw(10)<<std::setprecision(4)<<  layer[2]->at(i).z()<<" | "
 	 <<std::setw(10)<<std::setprecision(4)<<               rmin<<" | "
 	 <<std::setw(10)<<std::setprecision(4)<<               rmax<<" | "
-	 <<std::setw(10)<<std::setprecision(4)<<m_layer[2][i].dfe()<<" | "
-	 <<std::setw(4)<<m_layer[2][i].nElements()<<" | "
+	 <<std::setw(10)<<std::setprecision(4)<<layer[2]->at(i).dfe()<<" | "
+	 <<std::setw(4)<<layer[2]->at(i).nElements()<<" | "
 	 <<"\n";
     }
     out<<"|------|-----------|------------|------------|------------|------|"
@@ -371,6 +357,10 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
 {  
   if (!m_usePIX && !m_useSCT) return;
 
+  std::vector<SiDetElementsLayer_xk>* layer[3];
+  getLayers(layer);
+  std::lock_guard<std::mutex> lock{m_mutex};
+
   int n0 = 0;
   int n1 = 0;
   int n2 = 0;
@@ -380,9 +370,9 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
   float Po[6] = {float((*g).x()),float((*g).y()),float((*g).z()),
 		  float(sqrt((*g).x()*(*g).x()+(*g).y()*(*g).y())),m_width,0.};
 
-  for(; n0!=m_map[0]; ++n0) {if(Po[2] > m_layer[0][n0].z()) break;}
-  for(; n1!=m_map[1]; ++n1) {if(Po[3] < m_layer[1][n1].r()) break;}
-  for(; n2!=m_map[2]; ++n2) {if(Po[2] < m_layer[2][n2].z()) break;}
+  for(; n0!=static_cast<int>(layer[0]->size()); ++n0) {if(Po[2] > layer[0]->at(n0).z()) break;}
+  for(; n1!=static_cast<int>(layer[1]->size()); ++n1) {if(Po[3] < layer[1]->at(n1).r()) break;}
+  for(; n2!=static_cast<int>(layer[2]->size()); ++n2) {if(Po[2] < layer[2]->at(n2).z()) break;}
 
   std::list<InDet::SiDetElementLink_xk*> lDE;
 
@@ -419,15 +409,15 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
     // Barrel
     //
     if(Pn[3]>Po[3]) {
-      for(; n1<m_map[1]; ++n1) {
-	if(Pn[3] < m_layer[1][n1].r()) break;
-	m_layer[1][n1].getBarrelDetElements(Po,A,lDE);
+      for(; n1<static_cast<int>(layer[1]->size()); ++n1) {
+	if(Pn[3] < layer[1]->at(n1).r()) break;
+	layer[1]->at(n1).getBarrelDetElements(Po,A,lDE);
       }
     }
     else     {
       for(--n1; n1>=0; --n1) {
-	if(Pn[3] > m_layer[1][n1].r()+dr) break; 
-	m_layer[1][n1].getBarrelDetElements(Po,A,lDE);
+	if(Pn[3] > layer[1]->at(n1).r()+dr) break; 
+	layer[1]->at(n1).getBarrelDetElements(Po,A,lDE);
      }
       ++n1;
     }
@@ -436,15 +426,15 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
     //
     if(Pn[2]>Po[2]) {
 
-      for(; n2<m_map[2]; ++n2) {
-	if(Pn[2] < m_layer[2][n2].z()) break; 
-	m_layer[2][n2].getEndcapDetElements(Po,A,lDE);
+      for(; n2<static_cast<int>(layer[2]->size()); ++n2) {
+	if(Pn[2] < layer[2]->at(n2).z()) break; 
+	layer[2]->at(n2).getEndcapDetElements(Po,A,lDE);
       }
     }
     else     {
       for(--n2; n2>=0; --n2) {
-	if(Pn[2] > m_layer[2][n2].z()) break; 
-	m_layer[2][n2].getEndcapDetElements(Po,A,lDE);
+	if(Pn[2] > layer[2]->at(n2).z()) break; 
+	layer[2]->at(n2).getEndcapDetElements(Po,A,lDE);
       }
       ++n2;
     }
@@ -453,15 +443,15 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
     //
     if(Pn[2]<Po[2]) {
 
-      for(; n0<m_map[0]; ++n0) {
-	if(Pn[2] > m_layer[0][n0].z()) break; 
-	m_layer[0][n0].getEndcapDetElements(Po,A,lDE);
+      for(; n0<static_cast<int>(layer[0]->size()); ++n0) {
+	if(Pn[2] > layer[0]->at(n0).z()) break; 
+	layer[0]->at(n0).getEndcapDetElements(Po,A,lDE);
       }
     }
     else   {
       for(--n0; n0>=0; --n0) {
-	if(Pn[2] < m_layer[0][n0].z()) break; 
-	m_layer[0][n0].getEndcapDetElements(Po,A,lDE);
+	if(Pn[2] < layer[0]->at(n0).z()) break; 
+	layer[0]->at(n0).getEndcapDetElements(Po,A,lDE);
       } 
       ++n0;
     }
@@ -571,8 +561,6 @@ void InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsProduction()
     }
   }
 
-  m_map[0]=m_map[1]=m_map[2]=0;
-
   const PixelID* IDp = 0; 
   const SCT_ID*  IDs = 0; 
 
@@ -643,7 +631,7 @@ void InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsProduction()
     
     for(int i = 0; i<= im; ++i) {
      
-      detElementInformation(*(pW[N][i]),P); 
+      InDet::SiDetElementsRoadUtils_xk::detElementInformation(*(pW[N][i]),P); 
 
       if( P[ 9] < mrmin[N] ) mrmin[N] = P[ 9]; 
       if( P[10] > mrmax[N] ) mrmax[N] = P[10]; 
@@ -680,7 +668,7 @@ void InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsProduction()
 
 	    if(pE[j]) {
 
-	      detElementInformation(*(pE[j]),P);
+	      InDet::SiDetElementsRoadUtils_xk::detElementInformation(*(pE[j]),P);
 
 	      if( P[ 9] < rmin ) rmin = P[ 9]; 
 	      if( P[10] > rmax ) rmax = P[10]; 
@@ -707,9 +695,6 @@ void InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsProduction()
       }
     }
   }
-  m_map[0] = m_layer[0].size();
-  m_map[1] = m_layer[1].size();
-  m_map[2] = m_layer[2].size();
 
   // CylinderBounds production
   //
@@ -717,7 +702,7 @@ void InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsProduction()
   double zma = -100000;
   double rma = -100000;
   for(int i=0; i!=3; ++i) {
-    if(m_map[i]) {
+    if(m_layer[i].size()) {
       if(mzmin[i]<zmi) zmi=mzmin[i]; 
       if(mzmax[i]>zma) zma=mzmax[i]; 
       if(mrmax[i]>rma) rma=mrmax[i];
@@ -729,230 +714,6 @@ void InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsProduction()
   m_bounds  = CB;
 }
 
-///////////////////////////////////////////////////////////////////
-// Map of detector elements update
-///////////////////////////////////////////////////////////////////
-
-StatusCode InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsUpdate
-(IOVSVC_CALLBACK_ARGS_P(I,keys))
-{
-  (void) I;
-
-  // check if the string is ESD for guaranteeing that misalignment has been introduced already
-  //
-  bool needsUpdate = false;
-
-  for (std::list<std::string>::const_iterator k=keys.begin(); k!=keys.end(); ++k) {
-    if ((*k) == m_callbackString) {needsUpdate = true; break;}
-  } 
-  if(!needsUpdate) return StatusCode::SUCCESS;
-
-  const double pi2=2.*M_PI, pi=M_PI;
-
-  double   mzmin [3];  // min Z coordinate 
-  double   mzmax [3];  // max Z coordinate
-  double   mrmin [3];  // min radius
-  double   mrmax [3];  // max radius
-
-  // Loop through barrel and two edncap
-  //
-  for(unsigned int N=0; N!=3; ++N) {
-
-    mrmin[N] = 100000.; mrmax[N] =-100000.;
-    mzmin[N] = 100000.; mzmax[N] =-100000.;
-
-    // Loop throug all layers
-    //
-    for(unsigned int l=0; l!=m_layer[N].size(); ++l) {
-      
-      std::vector<SiDetElementLink_xk>::iterator d, de = m_layer[N][l].elements().end(); 
-
-      double rmin = 100000., rmax =-100000.;
-      double zmin = 100000., zmax =-100000.;
-      double dfm  = 0.;
-
-      for(d=m_layer[N][l].elements().begin(); d!=de; ++d) {
-
-	double P[40]; detElementInformation(*(*d).detElement(),P); 
-	(*d).set(P);
-
-	if( P[ 9] < mrmin[N]  ) mrmin[N] = P[ 9]; 
-	if( P[10] > mrmax[N]  ) mrmax[N] = P[10]; 
-	if( P[11] < mzmin[N]  ) mzmin[N] = P[11]; 
-	if( P[12] > mzmax[N]  ) mzmax[N] = P[12]; 
-	if( P[ 9] <   rmin    )  rmin    = P[ 9]; 
-	if( P[10] >   rmax    )  rmax    = P[10]; 
-	if( P[11] <   zmin    )  zmin    = P[11]; 
-	if( P[12] >   zmax    )  zmax    = P[12]; 
-
-	double df1 = fabs(P[13]-P[2]); if(df1>pi) df1 = fabs(df1-pi2); 
-	double df2 = fabs(P[14]-P[2]); if(df2>pi) df2 = fabs(df2-pi2); 
-	if(df1>dfm) dfm = df1;
-	if(df2>dfm) dfm = df2;
-      }
-      m_layer[N][l].sortDetectorElements();
-
-      double r  =(rmax+rmin)*.5;
-      double dr =(rmax-rmin)*.5; 
-      double z  =(zmax+zmin)*.5;
-      double dz =(zmax-zmin)*.5;
-      m_layer[N][l].set(r,dr,z,dz,dfm);
-    }
-  }
-  
-  return StatusCode::SUCCESS;
-}
-
-///////////////////////////////////////////////////////////////////
-// Output parameters: P[ 0]  - radius          centre of wafer
-//                    P[ 1]  - z               centre of wafer
-//                    P[ 2]  - azimuthal angle centra of wifer
-//                    P[ 3]  - min. distance to surface
-//                    P[ 4]  - azimythal angle normal to surface
-//                    P[ 5]  - sin(P[4])
-//                    P[ 6]  - cos(P[4])
-//                    P[ 7]  - sin(Polar angle)
-//                    P[ 8]  - cos(Polar abgle)
-//                    P[ 9]  - min. radius   
-//                    P[10]  - max. radius   
-//                    P[11]  - min. z
-//                    P[12]  - max  z  
-//                    P[13]  - min. azimythal angle  
-//                    P[14]  - max. azimuthal angle
-//                    P[15]  - tilt angle
-//                    P[16]  - min. dist to surface in XY-plane
-//                    P[17]  - Tilt angle
-//                    P[18]  - first  local coordinate of wafer
-//                    P[19]  - second local coordinate of wafer 
-//               P[20],P[21] - vector to -F  boundary 
-//               P[22],P[23] - vector to +ZR boundary 
-//               P[24],P[25] - vector to +F  boundary 
-//               P[26],P[27] - vector to -ZR boundary 
-//                    P[28]  - thikness of the detector element
-//                    P[29]  - Ax of Phi exis
-//                    P[30]  - Ay of Phi exis
-//                    P[31]  - Ax of Eta exis
-//                    P[32]  - Ay of Eta exis
-///////////////////////////////////////////////////////////////////
-
-void InDet::SiDetElementsRoadMaker_xk::detElementInformation
-(const InDetDD::SiDetectorElement& Si,double* P) 
-{
-  const double pi2=2.*M_PI, pi= M_PI;
-  
-  double Sl    = .5*Si.design().length  ();
-  double Swmax = .5*Si.design().maxWidth();
-  double Swmin = .5*Si.design().minWidth();
-  
-  // Thickness of the waver
-  //
-  P[28] = Si.design().thickness();
-  Amg::Vector3D C  = Si.center();  double x0=C.x(), y0=C.y(), z0=C.z(); 
-  Amg::Vector3D AT = Si.normal ();
-  Amg::Vector3D AF = Si.phiAxis();
-  Amg::Vector3D AE = Si.etaAxis();
-
-  double      A[3]={AT.x(),AT.y(),AT.z()};   
-
-  P[ 0]    = sqrt(x0*x0+y0*y0);
-  P[ 1]    = z0;   
-  P[ 2]    = atan2(y0,x0);
-  P[ 3]    = A[0]*x0+A[1]*y0+A[2]*z0;
-  if(P[3]<0.) {P[3]*=-1.; A[0]*=-1.; A[1]*=-1.; A[2]*=-1.;} 
-  P[ 7]    =  sqrt(A[0]*A[0]+A[1]*A[1]);
-
-  if(P[7] >.000001) P[4]=atan2(A[1],A[0]); else P[4]=P[2]; 
-  sincos(P[4],&P[5],&P[6]);
-  P[ 8]    = A[2];                      
-
-  if( fabs(P[7]) <= .000001) {
-
-    P[3] = fabs(P[1]); 
-    if(P[8] > 0.) P[8] = 1.; else P[8] = -1.; 
-    P[7] = 0.;
-  }
-
-  double x[4],y[4],z[4];
-
-  x[0]     = x0+AF.x()*Swmax+AE.x()*Sl;
-  y[0]     = y0+AF.y()*Swmax+AE.y()*Sl;
-  z[0]     = z0+AF.z()*Swmax+AE.z()*Sl;
-
-  x[1]     = x0+AF.x()*Swmin-AE.x()*Sl;
-  y[1]     = y0+AF.y()*Swmin-AE.y()*Sl;
-  z[1]     = z0+AF.z()*Swmin-AE.z()*Sl;
-
-  x[2]     = x0-AF.x()*Swmin-AE.x()*Sl;
-  y[2]     = y0-AF.y()*Swmin-AE.y()*Sl;
-  z[2]     = z0-AF.z()*Swmin-AE.z()*Sl;
-
-  x[3]     = x0-AF.x()*Swmax+AE.x()*Sl;
-  y[3]     = y0-AF.y()*Swmax+AE.y()*Sl;
-  z[3]     = z0-AF.z()*Swmax+AE.z()*Sl;
-
-  double rmin= 10000., rmax=-10000.;
-  double zmin= 10000., zmax=-10000.;
-  double fmin= 10000., fmax=-10000.;
-  for(int i=0; i!=4; ++i) {
-    double r = sqrt(x[i]*x[i]+y[i]*y[i]);
-    double f = atan2(y[i],x[i])-P[2]; if(f<-pi) f+=pi2; else if(f>pi) f-=pi2;
-    double zf= z[i];
-    if(r <rmin) rmin= r;
-    if(r >rmax) rmax= r;
-    if(zf<zmin) zmin=zf;
-    if(zf>zmax) zmax=zf;
-    if(f <fmin) fmin= f;
-    if(f >fmax) fmax= f;
-  }
-  P[ 9]    = rmin;
-  P[10]    = rmax;
-  P[11]    = zmin;
-  P[12]    = zmax;
-  P[13]    = P[2]+fmin;
-  P[14]    = P[2]+fmax;
-  P[15]    = P[4]-P[2]; if(P[15]<-pi) P[15]+=pi2; else if(P[15]>pi) P[15]-=pi2;
-  P[16]    = A[0]*x0+A[1]*y0;
-  P[17]    = atan2(AE.y(),AE.x());
-  P[17]    = P[17]-P[2]; if(P[17]<-pi) P[17]+=pi2; else if(P[17]>pi) P[17]-=pi2;
-
-  // Calculation shape parameters
-  //
-  P[18]    = y0*P[6]-x0*P[5];                       // F  center
-  P[19]    = P[8]*(x0*P[6]+y0*P[5])-P[7]*z0;        // ZR center
-  P[20]    = +10000.;                               // -F
-  P[21]    = 0.     ;                               //
-  P[22]    = 0.     ;                               // +ZR
-  P[23]    = -10000.;                               //
-  P[24]    = -10000.;                               // +F
-  P[25]    = 0.     ;                               //
-  P[26]    = 0.     ;                               // -ZR
-  P[27]    = +10000.;                               //
-  //  
-  for(int i=0; i!=4; ++i) {
-
-    int   k1    = i;
-    int   k2    = i+1; if(k2>3) k2=0;
-    double x1   = y[k1]*P[6]-x[k1]*P[5]                  -P[18];                        
-    double y1   = P[8]*(x[k1]*P[6]+y[k1]*P[5])-P[7]*z[k1]-P[19];
-    double x2   = y[k2]*P[6]-x[k2]*P[5]                  -P[18];                        
-    double y2   = P[8]*(x[k2]*P[6]+y[k2]*P[5])-P[7]*z[k2]-P[19];
-    double d    = (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1);
-    double ax   =-(y2-y1)*(y1*x2-x1*y2)/d;
-    double ay   = (x2-x1)*(y1*x2-x1*y2)/d;
-    if(ax<P[20]) {P[20]=ax; P[21]=ay;}
-    if(ax>P[24]) {P[24]=ax; P[25]=ay;}
-    if(ay<P[27]) {P[26]=ax; P[27]=ay;}
-    if(ay>P[23]) {P[22]=ax; P[23]=ay;}
-  }
-
-  // Directions Phi and Eta in local system coordinates 
-  //
-  P[29] = AF.y()*P[6]-AF.x()*P[5];                
-  P[30] = P[8]*(AF.x()*P[6]+AF.y()*P[5])-P[7]*AF.z();
-  P[31] = AE.y()*P[6]-AE.x()*P[5];                
-  P[32] = P[8]*(AE.x()*P[6]+AE.y()*P[5])-P[7]*AE.z();
-}
-
 ///////////////////////////////////////////////////////////////////
 // Distance to detector element according stright line model
 ///////////////////////////////////////////////////////////////////
@@ -1031,3 +792,29 @@ Trk::CylinderBounds InDet::SiDetElementsRoadMaker_xk::getBound
   return CB;
 }
 
+void InDet::SiDetElementsRoadMaker_xk::getLayers(std::vector<SiDetElementsLayer_xk>* (&layer)[3]) const {
+  const EventContext& ctx{Gaudi::Hive::currentContext()};
+  EventContext::ContextID_t slot{ctx.slot()};
+  EventContext::ContextEvt_t evt{ctx.evt()};
+  std::lock_guard<std::mutex> lock{m_mutex};
+  static const EventContext::ContextEvt_t invalidValue{EventContext::INVALID_CONTEXT_EVT};
+  if (slot>=m_cache.size()) {
+    m_cache.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement.
+    m_layerVectors[0].resize(slot+1);
+    m_layerVectors[1].resize(slot+1);
+    m_layerVectors[2].resize(slot+1);
+  }
+  if (m_cache[slot]!=evt) {
+    SG::ReadCondHandle<SiDetElementsLayerVectors_xk> layerVec{m_layerVecKey, ctx};
+    if (not layerVec.isValid()) {
+      ATH_MSG_ERROR("Failed to get " << m_layerVecKey.key());
+    }
+    m_cache[slot] = evt;
+    m_layerVectors[0][slot] = (*layerVec)->at(0);
+    m_layerVectors[1][slot] = (*layerVec)->at(1);
+    m_layerVectors[2][slot] = (*layerVec)->at(2);
+  }
+  layer[0] = &(m_layerVectors[0][slot]);
+  layer[1] = &(m_layerVectors[1][slot]);
+  layer[2] = &(m_layerVectors[2][slot]);
+}
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadUtils_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadUtils_xk.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..70fb60db9b9cfd3277dca2f061785de6c519cc7d
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadUtils_xk.cxx
@@ -0,0 +1,160 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "SiDetElementsRoadUtils_xk.h"
+#include <cmath>
+
+///////////////////////////////////////////////////////////////////
+// Output parameters: P[ 0]  - radius          centre of wafer
+//                    P[ 1]  - z               centre of wafer
+//                    P[ 2]  - azimuthal angle centra of wifer
+//                    P[ 3]  - min. distance to surface
+//                    P[ 4]  - azimythal angle normal to surface
+//                    P[ 5]  - sin(P[4])
+//                    P[ 6]  - cos(P[4])
+//                    P[ 7]  - sin(Polar angle)
+//                    P[ 8]  - cos(Polar abgle)
+//                    P[ 9]  - min. radius   
+//                    P[10]  - max. radius   
+//                    P[11]  - min. z
+//                    P[12]  - max  z  
+//                    P[13]  - min. azimythal angle  
+//                    P[14]  - max. azimuthal angle
+//                    P[15]  - tilt angle
+//                    P[16]  - min. dist to surface in XY-plane
+//                    P[17]  - Tilt angle
+//                    P[18]  - first  local coordinate of wafer
+//                    P[19]  - second local coordinate of wafer 
+//               P[20],P[21] - vector to -F  boundary 
+//               P[22],P[23] - vector to +ZR boundary 
+//               P[24],P[25] - vector to +F  boundary 
+//               P[26],P[27] - vector to -ZR boundary 
+//                    P[28]  - thikness of the detector element
+//                    P[29]  - Ax of Phi exis
+//                    P[30]  - Ay of Phi exis
+//                    P[31]  - Ax of Eta exis
+//                    P[32]  - Ay of Eta exis
+///////////////////////////////////////////////////////////////////
+
+namespace InDet {
+  namespace SiDetElementsRoadUtils_xk {
+    void detElementInformation(const InDetDD::SiDetectorElement& Si,double* P)
+    {
+      const double pi2=2.*M_PI, pi= M_PI;
+  
+      double Sl    = .5*Si.design().length  ();
+      double Swmax = .5*Si.design().maxWidth();
+      double Swmin = .5*Si.design().minWidth();
+  
+      // Thickness of the waver
+      //
+      P[28] = Si.design().thickness();
+      Amg::Vector3D C  = Si.center();  double x0=C.x(), y0=C.y(), z0=C.z(); 
+      Amg::Vector3D AT = Si.normal ();
+      Amg::Vector3D AF = Si.phiAxis();
+      Amg::Vector3D AE = Si.etaAxis();
+
+      double      A[3]={AT.x(),AT.y(),AT.z()};   
+
+      P[ 0]    = sqrt(x0*x0+y0*y0);
+      P[ 1]    = z0;   
+      P[ 2]    = atan2(y0,x0);
+      P[ 3]    = A[0]*x0+A[1]*y0+A[2]*z0;
+      if(P[3]<0.) {P[3]*=-1.; A[0]*=-1.; A[1]*=-1.; A[2]*=-1.;} 
+      P[ 7]    =  sqrt(A[0]*A[0]+A[1]*A[1]);
+
+      if(P[7] >.000001) P[4]=atan2(A[1],A[0]); else P[4]=P[2]; 
+      sincos(P[4],&P[5],&P[6]);
+      P[ 8]    = A[2];                      
+
+      if( fabs(P[7]) <= .000001) {
+
+        P[3] = fabs(P[1]); 
+        if(P[8] > 0.) P[8] = 1.; else P[8] = -1.; 
+        P[7] = 0.;
+      }
+
+      double x[4],y[4],z[4];
+
+      x[0]     = x0+AF.x()*Swmax+AE.x()*Sl;
+      y[0]     = y0+AF.y()*Swmax+AE.y()*Sl;
+      z[0]     = z0+AF.z()*Swmax+AE.z()*Sl;
+
+      x[1]     = x0+AF.x()*Swmin-AE.x()*Sl;
+      y[1]     = y0+AF.y()*Swmin-AE.y()*Sl;
+      z[1]     = z0+AF.z()*Swmin-AE.z()*Sl;
+
+      x[2]     = x0-AF.x()*Swmin-AE.x()*Sl;
+      y[2]     = y0-AF.y()*Swmin-AE.y()*Sl;
+      z[2]     = z0-AF.z()*Swmin-AE.z()*Sl;
+
+      x[3]     = x0-AF.x()*Swmax+AE.x()*Sl;
+      y[3]     = y0-AF.y()*Swmax+AE.y()*Sl;
+      z[3]     = z0-AF.z()*Swmax+AE.z()*Sl;
+
+      double rmin= 10000., rmax=-10000.;
+      double zmin= 10000., zmax=-10000.;
+      double fmin= 10000., fmax=-10000.;
+      for(int i=0; i!=4; ++i) {
+        double r = sqrt(x[i]*x[i]+y[i]*y[i]);
+        double f = atan2(y[i],x[i])-P[2]; if(f<-pi) f+=pi2; else if(f>pi) f-=pi2;
+        double zf= z[i];
+        if(r <rmin) rmin= r;
+        if(r >rmax) rmax= r;
+        if(zf<zmin) zmin=zf;
+        if(zf>zmax) zmax=zf;
+        if(f <fmin) fmin= f;
+        if(f >fmax) fmax= f;
+      }
+      P[ 9]    = rmin;
+      P[10]    = rmax;
+      P[11]    = zmin;
+      P[12]    = zmax;
+      P[13]    = P[2]+fmin;
+      P[14]    = P[2]+fmax;
+      P[15]    = P[4]-P[2]; if(P[15]<-pi) P[15]+=pi2; else if(P[15]>pi) P[15]-=pi2;
+      P[16]    = A[0]*x0+A[1]*y0;
+      P[17]    = atan2(AE.y(),AE.x());
+      P[17]    = P[17]-P[2]; if(P[17]<-pi) P[17]+=pi2; else if(P[17]>pi) P[17]-=pi2;
+
+      // Calculation shape parameters
+      //
+      P[18]    = y0*P[6]-x0*P[5];                       // F  center
+      P[19]    = P[8]*(x0*P[6]+y0*P[5])-P[7]*z0;        // ZR center
+      P[20]    = +10000.;                               // -F
+      P[21]    = 0.     ;                               //
+      P[22]    = 0.     ;                               // +ZR
+      P[23]    = -10000.;                               //
+      P[24]    = -10000.;                               // +F
+      P[25]    = 0.     ;                               //
+      P[26]    = 0.     ;                               // -ZR
+      P[27]    = +10000.;                               //
+      //  
+      for(int i=0; i!=4; ++i) {
+
+        int   k1    = i;
+        int   k2    = i+1; if(k2>3) k2=0;
+        double x1   = y[k1]*P[6]-x[k1]*P[5]                  -P[18];                        
+        double y1   = P[8]*(x[k1]*P[6]+y[k1]*P[5])-P[7]*z[k1]-P[19];
+        double x2   = y[k2]*P[6]-x[k2]*P[5]                  -P[18];                        
+        double y2   = P[8]*(x[k2]*P[6]+y[k2]*P[5])-P[7]*z[k2]-P[19];
+        double d    = (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1);
+        double ax   =-(y2-y1)*(y1*x2-x1*y2)/d;
+        double ay   = (x2-x1)*(y1*x2-x1*y2)/d;
+        if(ax<P[20]) {P[20]=ax; P[21]=ay;}
+        if(ax>P[24]) {P[24]=ax; P[25]=ay;}
+        if(ay<P[27]) {P[26]=ax; P[27]=ay;}
+        if(ay>P[23]) {P[22]=ax; P[23]=ay;}
+      }
+
+      // Directions Phi and Eta in local system coordinates 
+      //
+      P[29] = AF.y()*P[6]-AF.x()*P[5];                
+      P[30] = P[8]*(AF.x()*P[6]+AF.y()*P[5])-P[7]*AF.z();
+      P[31] = AE.y()*P[6]-AE.x()*P[5];                
+      P[32] = P[8]*(AE.x()*P[6]+AE.y()*P[5])-P[7]*AE.z();
+    }
+
+  }
+}
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadUtils_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadUtils_xk.h
new file mode 100644
index 0000000000000000000000000000000000000000..671d9951bdb48940dfdc6ce4f029cdc93da55776
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadUtils_xk.h
@@ -0,0 +1,48 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef SiDetElementsRoadUtils_xk_h
+#define SiDetElementsRoadUtils_xk_h
+
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+
+///////////////////////////////////////////////////////////////////
+// Output parameters: P[ 0]  - radius          centre of wafer
+//                    P[ 1]  - z               centre of wafer
+//                    P[ 2]  - azimuthal angle centra of wifer
+//                    P[ 3]  - min. distance to surface
+//                    P[ 4]  - azimythal angle normal to surface
+//                    P[ 5]  - sin(P[4])
+//                    P[ 6]  - cos(P[4])
+//                    P[ 7]  - sin(Polar angle)
+//                    P[ 8]  - cos(Polar abgle)
+//                    P[ 9]  - min. radius   
+//                    P[10]  - max. radius   
+//                    P[11]  - min. z
+//                    P[12]  - max  z  
+//                    P[13]  - min. azimythal angle  
+//                    P[14]  - max. azimuthal angle
+//                    P[15]  - tilt angle
+//                    P[16]  - min. dist to surface in XY-plane
+//                    P[17]  - Tilt angle
+//                    P[18]  - first  local coordinate of wafer
+//                    P[19]  - second local coordinate of wafer 
+//               P[20],P[21] - vector to -F  boundary 
+//               P[22],P[23] - vector to +ZR boundary 
+//               P[24],P[25] - vector to +F  boundary 
+//               P[26],P[27] - vector to -ZR boundary 
+//                    P[28]  - thikness of the detector element
+//                    P[29]  - Ax of Phi exis
+//                    P[30]  - Ay of Phi exis
+//                    P[31]  - Ax of Eta exis
+//                    P[32]  - Ay of Eta exis
+///////////////////////////////////////////////////////////////////
+
+namespace InDet {
+  namespace SiDetElementsRoadUtils_xk {
+    void detElementInformation(const InDetDD::SiDetectorElement& Si, double* P);
+  }
+}
+
+#endif // SiDetElementsRoadUtils_xk_h
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/components/SiDetElementsRoadTool_xk_entries.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/components/SiDetElementsRoadTool_xk_entries.cxx
index 9de9dc94a1ff054082af2713ca6afe8b213c58b1..ae89124342e20fe21fdd7629c5e0e4a6e6db06c9 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/components/SiDetElementsRoadTool_xk_entries.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/components/SiDetElementsRoadTool_xk_entries.cxx
@@ -1,6 +1,7 @@
+#include "../SiDetElementsRoadCondAlg_xk.h"
 #include "SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h"
 
 using namespace InDet;
 
+DECLARE_COMPONENT( SiDetElementsRoadCondAlg_xk )
 DECLARE_COMPONENT( SiDetElementsRoadMaker_xk )
-
diff --git a/InnerDetector/InDetRecTools/SiSpacePointTool/SiSpacePointTool/SiSpacePointMakerTool.h b/InnerDetector/InDetRecTools/SiSpacePointTool/SiSpacePointTool/SiSpacePointMakerTool.h
index 6925944b410a2666a1f47beb2ab6fdcd4b66c50a..aff7ae5ab72ddab1676b7d39a22ecb29ef8984b9 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointTool/SiSpacePointTool/SiSpacePointMakerTool.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointTool/SiSpacePointTool/SiSpacePointMakerTool.h
@@ -21,7 +21,7 @@ namespace Trk{
 }
 
 namespace InDetDD{
-  class SCT_DetectorManager;
+  class SiDetectorElementCollection;
   class SiDetectorElement;
 }
 namespace InDet{
@@ -49,24 +49,24 @@ namespace InDet{
 		  const Amg::Vector3D& vertexVec,
 		  const InDetDD::SiDetectorElement *element1, const InDetDD::SiDetectorElement *element2, double stripLengthGapTolerance) const;
 
-		void fillSCT_SpacePointCollection(const InDet::SCT_ClusterCollection* clusters1, 
-		  const InDet::SCT_ClusterCollection* clusters2, double min, double max, bool allClusters, 
-		  const Amg::Vector3D& vertexVec, const InDetDD::SCT_DetectorManager *SCT_Manager, 
-		  SpacePointCollection* spacepointCollection) const;
+                void fillSCT_SpacePointCollection(const InDet::SCT_ClusterCollection* clusters1,
+                                                  const InDet::SCT_ClusterCollection* clusters2, double min, double max, bool allClusters,
+                                                  const Amg::Vector3D& vertexVec, const InDetDD::SiDetectorElementCollection* elements,
+                                                  SpacePointCollection* spacepointCollection) const;
 
-		void fillPixelSpacePointCollection(const InDet::PixelClusterCollection* clusters, 
-		  SpacePointCollection* spacepointCollection) const;
+                void fillPixelSpacePointCollection(const InDet::PixelClusterCollection* clusters,
+                                                   SpacePointCollection* spacepointCollection) const;
 
-		void fillSCT_SpacePointEtaOverlapCollection(const InDet::SCT_ClusterCollection* clusters1, 
-		  const InDet::SCT_ClusterCollection* clusters2, double min, double max, bool allClusters, 
-		  const Amg::Vector3D& vertexVec, const InDetDD::SCT_DetectorManager *SCT_Manager, 
-		  SpacePointOverlapCollection* spacepointOverlapCollection) const;
+                void fillSCT_SpacePointEtaOverlapCollection(const InDet::SCT_ClusterCollection* clusters1,
+                                                            const InDet::SCT_ClusterCollection* clusters2, double min, double max, bool allClusters,
+                                                            const Amg::Vector3D& vertexVec, const InDetDD::SiDetectorElementCollection* elements,
+                                                            SpacePointOverlapCollection* spacepointOverlapCollection) const;
 
-		void fillSCT_SpacePointPhiOverlapCollection(const InDet::SCT_ClusterCollection* clusters1, 
-		  const InDet::SCT_ClusterCollection* clusters2, double min1, double max1, double min2, 
-		  double max2, bool allClusters, const Amg::Vector3D& vertexVec , 
-		  const InDetDD::SCT_DetectorManager *SCT_Manager, 
-		  SpacePointOverlapCollection* spacepointOverlapCollection) const;
+                void fillSCT_SpacePointPhiOverlapCollection(const InDet::SCT_ClusterCollection* clusters1,
+                                                            const InDet::SCT_ClusterCollection* clusters2, double min1, double max1, double min2,
+                                                            double max2, bool allClusters, const Amg::Vector3D& vertexVec ,
+                                                            const InDetDD::SiDetectorElementCollection* elements,
+                                                            SpacePointOverlapCollection* spacepointOverlapCollection) const;
 
 	private:
 		double m_stripLengthTolerance;
diff --git a/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx b/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx
index 3038003db0fe03a21203a5c869a891aa5a8ec3db..b0382ee529c5c83e6dce19fbe2edc1b92395016b 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx
@@ -6,14 +6,14 @@
 #include "SiSpacePointTool/SiSpacePointMakerTool.h"
 // Cluster and space point collections
 
-#include "TrkSpacePoint/SpacePointCollection.h" 
-#include "TrkSpacePoint/SpacePointOverlapCollection.h" 
+#include "TrkSpacePoint/SpacePointCollection.h"
+#include "TrkSpacePoint/SpacePointOverlapCollection.h"
 
 // For processing clusters
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SiLocalPosition.h" 
-#include "InDetReadoutGeometry/SiDetectorElement.h" 
+#include "InDetReadoutGeometry/SiLocalPosition.h"
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 
 // Space points
 #include "SiSpacePoint/SCT_SpacePoint.h"
@@ -60,7 +60,6 @@ StatusCode SiSpacePointMakerTool::finalize() {
 Trk::SpacePoint* SiSpacePointMakerTool::makeSCT_SpacePoint(const InDet::SiCluster& cluster1, 
   const InDet::SiCluster& cluster2, const Amg::Vector3D& vertexVec, 
   const InDetDD::SiDetectorElement *element1, const InDetDD::SiDetectorElement *element2, double stripLengthGapTolerance) const {
-// -ME fixme- const InDetDD::SCT_DetectorManager *m_manager, const SCT_ID* m_idHelper) {
 
   // Find intersection of a line through a cluster on one sct detector and
   // a line through a cluster on its stereo pair. Return zero if lines 
@@ -180,7 +179,7 @@ Trk::SpacePoint* SiSpacePointMakerTool::makeSCT_SpacePoint(const InDet::SiCluste
 //--------------------------------------------------------------------------
 void SiSpacePointMakerTool::fillSCT_SpacePointCollection(const InDet::SCT_ClusterCollection* clusters1, 
   const InDet::SCT_ClusterCollection* clusters2, double min, double max, bool allClusters, 
-  const Amg::Vector3D& vertexVec, const InDetDD::SCT_DetectorManager *SCT_Manager, SpacePointCollection* spacepointCollection) const {
+  const Amg::Vector3D& vertexVec, const InDetDD::SiDetectorElementCollection* elements, SpacePointCollection* spacepointCollection) const {
 
   double stripLengthGapTolerance = 0.; 
 
@@ -194,7 +193,7 @@ void SiSpacePointMakerTool::fillSCT_SpacePointCollection(const InDet::SCT_Cluste
   // -ME fixme- get first element
   const InDetDD::SiDetectorElement *element1 =0;
  
-  if ((*clusters1Next) &&(clusters1Next!=clusters1Finish)) element1 = SCT_Manager->getDetectorElement(m_idHelper->wafer_id((*clusters1Next)->identify()));
+  if ((*clusters1Next) &&(clusters1Next!=clusters1Finish)) element1 = elements->getDetectorElement(clusters1->identifyHash());
 
   if (!element1) {
     msg(MSG::ERROR) << "Bad cluster identifier  " << m_idHelper->show_to_string((*clusters1Next)->identify()) <<endmsg;
@@ -213,7 +212,7 @@ void SiSpacePointMakerTool::fillSCT_SpacePointCollection(const InDet::SCT_Cluste
     
     // -ME fixme- get first element
     const InDetDD::SiDetectorElement *element2 =0;
-    if (*clusters2Next && (clusters2Next != clusters2Finish)) element2= SCT_Manager->getDetectorElement(m_idHelper->wafer_id((*clusters2Next)->identify()));
+    if (*clusters2Next && (clusters2Next != clusters2Finish)) element2= elements->getDetectorElement(clusters2->identifyHash());
 
     if (!element2) {
       msg(MSG::ERROR) << "Bad cluster identifier  " << m_idHelper->show_to_string((*clusters2Next)->identify()) <<endmsg;
@@ -264,7 +263,7 @@ void SiSpacePointMakerTool::fillPixelSpacePointCollection(const InDet::PixelClus
 //--------------------------------------------------------------------------
 void SiSpacePointMakerTool::fillSCT_SpacePointEtaOverlapCollection(const InDet::SCT_ClusterCollection* clusters1, 
   const InDet::SCT_ClusterCollection* clusters2, double min, double max, bool allClusters, 
-  const Amg::Vector3D& vertexVec, const InDetDD::SCT_DetectorManager *SCT_Manager, 
+  const Amg::Vector3D& vertexVec, const InDetDD::SiDetectorElementCollection* elements,
   SpacePointOverlapCollection* spacepointoverlapCollection) const {
 
   double stripLengthGapTolerance = 0.; 
@@ -279,7 +278,7 @@ void SiSpacePointMakerTool::fillSCT_SpacePointEtaOverlapCollection(const InDet::
 
   const InDetDD::SiDetectorElement *element1 =0;
    
-  if ((*clusters1Next) &&(clusters1Next!=clusters1Finish)) element1 = SCT_Manager->getDetectorElement(m_idHelper->wafer_id((*clusters1Next)->identify()));
+  if ((*clusters1Next) &&(clusters1Next!=clusters1Finish)) element1 = elements->getDetectorElement(clusters1->identifyHash());
   if (!element1) {
     msg(MSG::ERROR) << "Bad cluster identifier  " << m_idHelper->show_to_string((*clusters1Next)->identify()) <<endmsg;
     return;
@@ -296,7 +295,7 @@ void SiSpacePointMakerTool::fillSCT_SpacePointEtaOverlapCollection(const InDet::
       clusters2Finish=(*clusters2).end();
     
     const InDetDD::SiDetectorElement *element2 =0;
-    if (*clusters2Next && (clusters2Next != clusters2Finish)) element2= SCT_Manager->getDetectorElement(m_idHelper->wafer_id((*clusters2Next)->identify()));
+    if (*clusters2Next && (clusters2Next != clusters2Finish)) element2= elements->getDetectorElement(clusters2->identifyHash());
     if (!element2) {
       msg(MSG::ERROR) << "Bad cluster identifier  " << m_idHelper->show_to_string((*clusters2Next)->identify()) <<endmsg;
       break;
@@ -324,7 +323,7 @@ void SiSpacePointMakerTool::fillSCT_SpacePointEtaOverlapCollection(const InDet::
 //--------------------------------------------------------------------------
 void SiSpacePointMakerTool::fillSCT_SpacePointPhiOverlapCollection(const InDet::SCT_ClusterCollection* clusters1, 
   const InDet::SCT_ClusterCollection* clusters2, double min1, double max1, double min2, double max2, 
-  bool allClusters, const Amg::Vector3D& vertexVec, const InDetDD::SCT_DetectorManager *SCT_Manager, 
+  bool allClusters, const Amg::Vector3D& vertexVec, const InDetDD::SiDetectorElementCollection* elements,
   SpacePointOverlapCollection* spacepointoverlapCollection) const {
 
   double stripLengthGapTolerance = 0.; if(m_SCTgapParameter!=0.) {min1-=20.;  max1+=20.;}
@@ -340,7 +339,7 @@ void SiSpacePointMakerTool::fillSCT_SpacePointPhiOverlapCollection(const InDet::
     clusters1Finish = clusters1->end();
 
   const InDetDD::SiDetectorElement *element1 =0;
-  if ( (*clusters1Next) && (clusters1Next!=clusters1Finish)) element1= SCT_Manager->getDetectorElement(m_idHelper->wafer_id((*clusters1Next)->identify()));
+  if ( (*clusters1Next) && (clusters1Next!=clusters1Finish)) element1= elements->getDetectorElement(clusters1->identifyHash());
   if (!element1) {
     msg(MSG::ERROR) << "Bad cluster identifier  " << m_idHelper->show_to_string((*clusters1Next)->identify()) <<endmsg;
     return;
@@ -357,7 +356,7 @@ void SiSpacePointMakerTool::fillSCT_SpacePointPhiOverlapCollection(const InDet::
 	clusters2Finish=(*clusters2).end();
       
       const InDetDD::SiDetectorElement *element2 =0;
-      if (*clusters2Next&&(clusters2Next != clusters2Finish)) element2 = SCT_Manager->getDetectorElement(m_idHelper->wafer_id((*clusters2Next)->identify()));
+      if (*clusters2Next&&(clusters2Next != clusters2Finish)) element2 = elements->getDetectorElement(clusters2->identifyHash());
       if (!element2) {
 	msg(MSG::ERROR) << "Bad cluster identifier  " << m_idHelper->show_to_string((*clusters2Next)->identify()) <<endmsg;
 	break;
diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleTool.cxx b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleTool.cxx
index fe4351725549cab779b5f7bbd8fd4e1126ffd985..bdef6a0596e5f8160f0e2ff9767cfc8fb20d5d0c 100755
--- a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleTool.cxx
+++ b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleTool.cxx
@@ -214,196 +214,121 @@ InDet::TRT_DriftCircleCollection* InDet::TRT_DriftCircleTool::convert(int Mode,c
       }
 
   DataVector<TRT_RDORawData>::const_iterator r,rb=rdo->begin(),re=rdo->end(); 
-  if(rb!=re) { 
 
-   //Get the BaseElement and the rio of the collection
+    //Get the BaseElement and initialize the RIO collection
     IdentifierHash IHc                 = rdo      ->identifyHash();
     const InDetDD::TRT_BaseElement* pE = m_trt_mgr->getElement(IHc);
     rio                                = new InDet::TRT_DriftCircleCollection(IHc);
     rio->setIdentifier(rdo->identify());
     rio->reserve( std::distance(rb, re) );
 
-    //In case of real CTB data: 
-    if(m_driftFunctionTool->isTestBeamData()) {
-      //   perform initial loop to find the trigger pll in first layer
-       for(r=rb; r!=re; ++r) {
-          // skip if rdo is not testbeam or cosmic flavor
-          const TRT_TB04_RawData* tb_rdo = dynamic_cast<const TRT_TB04_RawData*>(*r);
-          if(tb_rdo) {
-            Identifier   id  = tb_rdo->identify();
-            // skip if not first layer
-            if(m_trtid->layer_or_wheel(id)) continue;
-            // store the trigger pll first time encountered
-            m_coll_pll = tb_rdo->getTrigType(); 
-          }
-       }
-    }
-
-    ATH_MSG_VERBOSE( " choose timepll for rdo collection: " << m_coll_pll);
-
-    bool reject_from_neighboring_BC = false;
     bool isArgonStraw = false;
+    bool isGasSet = false;
 
     // Loop through all RDOs in the collection
     //
     for(r=rb; r!=re; ++r) {
 
-      if (!*r) { 
-        ATH_MSG_ERROR(" No RDO pointer! ");
-	continue;
-      }
-
-      Identifier   id  = (*r)->identify();
-      int tdcvalue = (*r)->driftTimeBin(); 
-      int newtdcvalue  = tdcvalue;
-      unsigned int timepll = 0;
-
-      // Fix hardware bug in testbeam
-      if(m_driftFunctionTool->isTestBeamData()) {
-        const TRT_TB04_RawData* tb_rdo = dynamic_cast<const TRT_TB04_RawData*>(*r);
-        if(tb_rdo) timepll = tb_rdo->getTrigType();
-        if(m_coll_pll) {
-          newtdcvalue = tdcvalue - timepll/2 + m_coll_pll/2;
-        }
-        // Increase precision of timing
-        newtdcvalue=2*newtdcvalue+(m_coll_pll%2);
-      }
-
-      //
-      //Get straw status
+      // raw data
+      Identifier       id  = (*r)->identify();
+      int            LTbin = (*r)->driftTimeBin(); 
+      bool  isOK           =true;
+      double t0            =0.;
+      double rawTime       = m_driftFunctionTool->rawTime(LTbin);
+      unsigned int word    = (*r)->getWord(); 
 
-      int strawstat=1;
-
-      if(m_useConditionsStatus){
-         if((m_ConditionsSummary->getStatus(id) != TRTCond::StrawStatus::Good)
-            || (m_ConditionsSummary->getStatusPermanent(id))) {
-          strawstat = 0;
-        }
-      }
-      
-      if (m_useConditionsHTStatus) {
+      // Gas status - assumed same for all rdo's in the collection
+      if (m_useConditionsHTStatus && !isGasSet) {
          if (m_ConditionsSummary->getStatusHT(id) == TRTCond::StrawStatus::Argon ||
-	     m_ConditionsSummary->getStatusHT(id) == TRTCond::StrawStatus::Dead ) {
+             m_ConditionsSummary->getStatusHT(id) == TRTCond::StrawStatus::Dead) {
             isArgonStraw = true;
          }
+         isGasSet = true;
       }
 
-      bool  isOK=true;
-      double t0=0.;
-      double rawTime   = m_driftFunctionTool->rawTime(newtdcvalue);
-      unsigned int word = (*r)->getWord(); 
-            
+
+      // ToT and HT Corrections            
       if (m_useToTCorrection && !isArgonStraw) {
         rawTime -= m_driftFunctionTool->driftTimeToTCorrection((*r)->timeOverThreshold(), id);     
       }  
-      
-//      if (m_useHTCorrection && (*r)->highLevel()) {
       if (m_useHTCorrection && !isArgonStraw &&
           ((!m_mask_first_HT_bit &&  (word & 0x04000000)) ||
            (!m_mask_middle_HT_bit && (word & 0x00020000)) ||
            (!m_mask_last_HT_bit &&   (word & 0x00000100)))) {
          rawTime += m_driftFunctionTool->driftTimeHTCorrection(id);           
       }
-      
-      double radius    = 0.;
-      double driftTime = 0;
 
-      //make tube hit if first bin is high and no later LE appears (isOK false)
-      if( newtdcvalue==0 || newtdcvalue==24) {
+      // calibrated data
+      double radius    = 0.;
+      double driftTime = 0.;
+      if( LTbin==0 || LTbin==24) {
         isOK=false;
       } else {
         bool dummy=false;
         radius    = m_driftFunctionTool->driftRadius(rawTime,id,t0,dummy,word);
         driftTime = rawTime-t0;
       }
-
-
       if(!isOK) word &= 0xF7FFFFFF;
       else word |= 0x08000000;
 
+      // test validity gate
+      rawTime = (0.5+LTbin)*3.125;  //redefine rawTime in order to keep Tier0 frozen
       if (!isArgonStraw) {
-         if (m_mask_first_HT_bit) word &= 0xFBFFFFFF;
-         if (m_mask_middle_HT_bit) word &= 0xFFFDFFFF;
-         if (m_mask_last_HT_bit) word &= 0xFFFFFEFF;
-      }
-      else {
-         if (m_mask_first_HT_bit_argon) word &= 0xFBFFFFFF;
-         if (m_mask_middle_HT_bit_argon) word &= 0xFFFDFFFF;
-         if (m_mask_last_HT_bit_argon) word &= 0xFFFFFEFF;
+         if (m_out_of_time_supression) {
+            // reject if first bit true 
+            if ((word & 0x02000000) && m_reject_if_first_bit) continue;
+            // or if trailing edge (which is drift time + ToT) is less than min trailing edge
+            if ((rawTime + (*r)->timeOverThreshold()) < m_min_trailing_edge) continue;
+            // if leading edge is too large
+            if (rawTime > m_max_drift_time) continue;
+         }
+           
+         if (m_validity_gate_suppression) {
+	    if(!passValidityGate(word, m_low_gate, m_high_gate, t0)) continue;
+         }
+      } else { // is argon straw, in case we want to do anything different for argon straws
+         if (m_out_of_time_supression_argon) {
+           // reject if first bit true 
+           if ((word & 0x02000000) && m_reject_if_first_bit_argon) continue;
+           // or if trailing edge (which is drift time + ToT) is less than min trailing edge
+           if ((rawTime + (*r)->timeOverThreshold()) < m_min_trailing_edge_argon) continue;
+           // or if leading edge is too large
+           if (rawTime > m_max_drift_time_argon) continue;
+         }
+           
+         if (m_validity_gate_suppression_argon) {
+	    if(!passValidityGate(word, m_low_gate_argon, m_high_gate_argon, t0)) continue;
+         }
       }
 
-      
-      //      std::vector<Identifier>    dvi;  //we do not need the rdo list
-      double error=0;
-
-      if(Mode<2) error = m_driftFunctionTool->errorOfDriftRadius(driftTime,id,mu,word);
-
-      if( !isOK || (error==0.&&Mode<2) ) //Drifttime out of range. Make wirehit
-	{
-	  ATH_MSG_VERBOSE(" Making wirehit.");
-	  radius = 0.;
-	  error = 4./sqrt(12.);
-	}
 
-      //if(Mode<1) dvi.push_back(id);  //we do not need the rdo list 
+      //Require good straw status
+      if(getTRTBadChannel) {
+	if( m_ConditionsSummary->getStatus(id) != TRTCond::StrawStatus::Good) continue;
+      }
       
-     if(!getTRTBadChannel){
 
+      // Error on Drift Radius
+      double error=0;
+      // LE out of range. Make tube hit.
+      if( !isOK || Mode>1) {
+	 ATH_MSG_VERBOSE(" Making tube hit.");
+	 radius = 0.;
+	 error = 4./sqrt(12.);
+      } else {
+        error = m_driftFunctionTool->errorOfDriftRadius(driftTime,id,mu,word);
+      }
 
-        Amg::MatrixX* errmat = new Amg::MatrixX(1,1);
-        (*errmat)(0,0) = error*error;
-        Amg::Vector2D loc(radius,0.);
-        InDet::TRT_DriftCircle* tdc = new InDet::TRT_DriftCircle(id,loc,errmat,pE,word); 
-        if(tdc) {
-          // setting the index (via -> size) has to be done just before the push_back! (for safety)
+      // Fill the RIO collection with TRT_DriftCircle's
+      Amg::MatrixX* errmat = new Amg::MatrixX(1,1);
+      (*errmat)(0,0) = error*error;
+      Amg::Vector2D loc(radius,0.);
+      InDet::TRT_DriftCircle* tdc = new InDet::TRT_DriftCircle(id,loc,errmat,pE,word);
+      if(tdc) {
           tdc->setHashAndIndex(rio->identifyHash(), rio->size());
           rio->push_back(tdc);
-	}
-     }else{
-        reject_from_neighboring_BC = false;
-        
-        float rawdrifttime =  (0.5+(*r)->driftTimeBin())*3.125;
-        unsigned int theword = (*r)->getWord();
-
-        if (!isArgonStraw) {
-           if (m_out_of_time_supression) {
-              // reject if first bit true 
-              if ((theword & 0x02000000) && m_reject_if_first_bit) reject_from_neighboring_BC = true;
-              // or reject if trailing edge (which is drift time + ToT) is less than min trailing edge
-              if ((rawdrifttime + (*r)->timeOverThreshold()) < m_min_trailing_edge) reject_from_neighboring_BC = true;
-              // reject if leading edge is too large
-              if (rawdrifttime > m_max_drift_time) reject_from_neighboring_BC = true;
-           }
-           
-           if (m_validity_gate_suppression) {
-	     if(!passValidityGate(theword, m_low_gate, m_high_gate, t0)) reject_from_neighboring_BC = true;
-           }
-        } else { // is argon straw. I have separate loops in case we want to do anything different for argon straws
-           if (m_out_of_time_supression_argon) {
-              // reject if first bit true 
-              if ((theword & 0x02000000) && m_reject_if_first_bit_argon) reject_from_neighboring_BC = true;
-              // or reject if trailing edge (which is drift time + ToT) is less than min trailing edge
-              if ((rawdrifttime + (*r)->timeOverThreshold()) < m_min_trailing_edge_argon) reject_from_neighboring_BC = true;
-              // reject if leading edge is too large
-              if (rawdrifttime > m_max_drift_time_argon) reject_from_neighboring_BC = true;
-           }
-           
-           if (m_validity_gate_suppression_argon) {
-	     if(!passValidityGate(theword, m_low_gate_argon, m_high_gate_argon, t0)) reject_from_neighboring_BC = true;
-           }
-        }
 
-        ATH_MSG_VERBOSE(" Reject from neighboring BC = " << reject_from_neighboring_BC);
-        if(strawstat && (!reject_from_neighboring_BC)){
-
-           Amg::MatrixX* errmat = new Amg::MatrixX(1,1);
-           (*errmat)(0,0) = error*error;
-           Amg::Vector2D loc(radius,0.);
-           InDet::TRT_DriftCircle* tdc = new InDet::TRT_DriftCircle(id,loc,errmat,pE,word);
-           if(tdc) {
-             tdc->setHashAndIndex(rio->identifyHash(), rio->size());
-             rio->push_back(tdc);
-             ATH_MSG_VERBOSE( " accept hit id "
+           ATH_MSG_VERBOSE( " accept hit id "
   		  << m_trtid->barrel_ec(id) << " " 
                   << m_trtid->layer_or_wheel(id) << " "
                   << m_trtid->phi_module(id) << " "  
@@ -414,24 +339,17 @@ InDet::TRT_DriftCircleCollection* InDet::TRT_DriftCircleTool::convert(int Mode,c
                   << " radius " << radius
 			       << " err " << error);
 
-	     ATH_MSG_VERBOSE( " driftTime "
+	   ATH_MSG_VERBOSE( " driftTime "
                   << tdc->rawDriftTime() << " t0 " << t0
-                  << " raw time " << (0.5+tdcvalue)*3.125
+                  << " raw time " << (0.5+LTbin)*3.125
                   << " ToT " << tdc->timeOverThreshold()  
                   << " OK? " << isOK << " Noise? " 
 			      << tdc->isNoise() << " isArgon? " << isArgonStraw);
-	   } else{
-             ATH_MSG_ERROR("Could not create InDet::TRT_DriftCircle object !");
-           }
-
-        } else {
-	   // If the hit is from a bad channel or out of validity we do not create the tdc object
-	   // (before it was created and deleted afterwards)
-	   ATH_MSG_VERBOSE(" reject hit on bad channel or out of validity ");
+	} else{
+           ATH_MSG_ERROR("Could not create InDet::TRT_DriftCircle object !");
         }
-      }
-    }
-  }  
+    } // end loop over rdo's in the rdo collection
+
   return rio;
 }  
 
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h
index 67cd5d59672a21181e68cb9b3a195236a2c47175..d1410c8ed4bc068efe5cffaecc39fd62d6af3cc3 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h
@@ -52,11 +52,6 @@ class TrigTimer;
 class SCT_ID;
 class SCT_ChannelStatusAlg;
 
-
-namespace InDetDD {
-  class SiDetectorManager;
-}
-
 namespace InDet {
     
   class SCT_TrgClusterization : public HLT::FexAlgo {
@@ -105,13 +100,11 @@ namespace InDet {
     
     ToolHandle<ITrigRawDataProviderTool>    m_rawDataProvider;
     ToolHandle<ISCT_ClusteringTool> m_clusteringTool; //!<  clustering algorithm
-    std::string             m_managerName; //!< detector manager name in StoreGate
     std::string             m_clustersName; 
     std::string             m_flaggedCondDataName;
     const SCT_ID*           m_idHelper;
     
     SCT_ClusterContainer*   m_clusterContainer;
-    const InDetDD::SiDetectorManager* m_manager;
     
     // !<  Trigger part
     ServiceHandle<IRegSelSvc>    m_regionSelector; //!<  region selector service
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx
index 4c4bbbf9f82384865a59df398be29aab32130e2d..adf1d04fe54df106a08a001667cf606dc44ba126 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx
@@ -21,7 +21,6 @@
 #include "InDetRawData/SCT_RDORawData.h"
 #include "InDetRawData/InDetRawDataCLASS_DEF.h"
 
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "Identifier/Identifier.h"
 #include "AtlasDetDescr/AtlasDetectorID.h"    
@@ -54,12 +53,10 @@ namespace InDet{
     HLT::FexAlgo(name, pSvcLocator),
     m_rawDataProvider("InDet::TrigSCTRawDataProvider"),
     m_clusteringTool("InDet::SCT_ClusteringTool"),
-    m_managerName("SCT"),
     m_clustersName("SCT_TrigClusters"),
     m_flaggedCondDataName("SCT_FlaggedCondData_TRIG"),
     m_idHelper(0),
     m_clusterContainer(nullptr),
-    m_manager(nullptr),
     m_regionSelector("RegSelSvc", name),
     m_doFullScan(false),
     m_etaHalfWidth(0.1),
@@ -75,7 +72,6 @@ namespace InDet{
     m_timerDecoder(0)
   {  
     // Get parameter values from jobOptions file
-    declareProperty("DetectorManagerName", m_managerName);
     declareProperty("SCT_RDOContainerName",m_sctRDOContainerName);
     declareProperty("clusteringTool",      m_clusteringTool);
     declareProperty("ClustersName",        m_clustersName);
@@ -136,16 +132,6 @@ namespace InDet{
       return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
     }
     
-    
-    StatusCode sc = detStore()->retrieve(m_manager,m_managerName);
-    if (sc.isFailure()){
-      ATH_MSG_FATAL( "Cannot retrieve detector manager!" );
-      return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
-    } 
-    else{
-      ATH_MSG_VERBOSE( "Detector manager found !" );
-    }
-    
     const SCT_ID * IdHelper(0);
     if (detStore()->retrieve(IdHelper, "SCT_ID").isFailure()) {
       ATH_MSG_FATAL( "Could not get SCT ID helper" );
@@ -171,7 +157,7 @@ namespace InDet{
       }
     }
     else {    
-      sc = store()->retrieve(m_clusterContainer, m_clustersName);
+      StatusCode sc = store()->retrieve(m_clusterContainer, m_clustersName);
 
       if (sc.isFailure()) {
 	ATH_MSG_ERROR( "Failed to get Cluster Container" );
@@ -185,7 +171,7 @@ namespace InDet{
 
     //symlink the collection
     const SiClusterContainer* symSiContainer(0);
-    sc = store()->symLink(m_clusterContainer, symSiContainer);
+    StatusCode sc = store()->symLink(m_clusterContainer, symSiContainer);
     if (sc.isFailure()) {
       ATH_MSG_WARNING( "SCT clusters could not be symlinked in StoreGate !" );
     } 
@@ -450,7 +436,6 @@ namespace InDet{
 	  // Use one of the specific clustering AlgTools to make clusters
 	  
 	  m_clusterCollection =  m_clusteringTool->clusterize(*RDO_Collection,
-							      *m_manager,
 							      *m_idHelper);
 	  
 	  // -me- fix test
@@ -525,7 +510,6 @@ namespace InDet{
 	if (rdosize>0 && goodModule){
 	  // Use one of the specific clustering AlgTools to make clusters
 	  m_clusterCollection = m_clusteringTool->clusterize(*rd,
-							     *m_manager,
 							     *m_idHelper);
 
 
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h
index a56982ecb0e206b1c9eb21c7e155b5fda9c9272d..61745c60cda779106d541a61a9bd4bdb6483d7e2 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h
@@ -35,10 +35,6 @@ class SvcLocator;
 class StoreGateSvc;
 class SCT_NeighboursTable;
 
-namespace InDetDD{
-  class PixelDetectorManager;
-}
-
 class IInDetAlignHitQualSelTool; 
 
 namespace Trk {
@@ -107,8 +103,6 @@ namespace InDet
     ToolHandle<Trk::IResidualPullCalculator> m_residualPullCalculator;
     
     
-    const InDetDD::PixelDetectorManager   *m_Pixel_Manager{};
-
 
 
     ///// Biased Residuals and Pulls
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx
index a0c7bb10c3011c612b3d65eab6cccdddf6e27f99..f2a75605efae84dd8b4c0f4223c1b2dd8d0211d6 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx
@@ -24,8 +24,6 @@
 #include "InDetIdentifier/SiliconID.h"
 #include "InDetIdentifier/PixelID.h"
 #include "IdDictDetDescr/IdDictManager.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "TrkToolInterfaces/IUpdator.h"
 #include "TrkExInterfaces/IPropagator.h"
 #include "InDetAlignGenTools/IInDetAlignHitQualSelTool.h"
@@ -248,15 +246,6 @@ namespace InDet
     m_idHelperSCT = IdHelperSCT;
     
 
-    // Pixel Manager
-    if(detStore->retrieve(m_Pixel_Manager, "Pixel").isFailure()){
-      msg() << MSG::FATAL   << "Could not get Pixel_Manager !" << endmsg;
-    }
-    else{
-      msg() << MSG::DEBUG << "Pixel manager found !" << endmsg;
-    }
-    
-    
     //Get Updator
     if (m_updator.retrieve().isFailure()) {
       msg() << MSG::FATAL << "Can not retrieve Updator of type  " << m_updator.typeAndName() << endmsg;
@@ -567,7 +556,6 @@ namespace InDet
                 PropagatedPixelUnbiasedTrackParams = m_updator->removeFromState(*tsos->trackParameters(), 
                                 tsos->measurementOnTrack()->localParameters(), 
                                 tsos->measurementOnTrack()->localCovariance());
-                //  const Identifier& PixelID = m_Pixel_Manager->getDetectorElement(id)->identify();
                 const Trk::Surface* TempSurfacePixel = &(PixelSideHit->measurementOnTrack()->associatedSurface());
                 const Trk::MagneticFieldProperties* TempFieldPixel = 0;
         
diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h
index 08701da720eb7c5f040673e582c881a955e105d4..d2aef5faf9374df47227f548007528065b0e3cb6 100755
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h
@@ -26,21 +26,20 @@
 #ifndef SiTrigSpacePointFormation_SI_POINT_FINDER_H
 #define SiTrigSpacePointFormation_SI_POINT_FINDER_H
 
-//!< INCLUDES                                                    
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
-
+//!<  Trigger includes
+#include "TrigInterfaces/FexAlgo.h"
 
+//!< INCLUDES
 #include "Identifier/IdentifierHash.h"
 // typedef, cannot fwd declare
 #include "InDetPrepRawData/PixelClusterContainer.h"
 #include "InDetPrepRawData/SCT_ClusterContainer.h"
-
-#include "StoreGate/ReadCondHandleKey.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "SiSpacePointFormation/SiElementPropertiesTable.h"
+#include "StoreGate/ReadCondHandleKey.h"
 
-//!<  Trigger includes
-#include "TrigInterfaces/FexAlgo.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/ServiceHandle.h"
 
 #include <string>
 #include <vector>
@@ -51,10 +50,8 @@ class SpacePointCollection;
 class SpacePointContainer; 
 class SpacePointOverlapCollection;
 class IRegSelSvc;
-class PixelID;
 class TrigTimer;
 
-
 namespace InDet{
 
   class SiSpacePointMakerTool;
@@ -97,6 +94,7 @@ namespace InDet{
 
     SpacePointOverlapCollection*    m_spOverlapColl;     
 
+    SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
     SG::ReadCondHandleKey<InDet::SiElementPropertiesTable> m_SCTPropertiesKey{this, "SCTPropertiesKey",
         "SCT_ElementPropertiesTable", "Key of input SiElementPropertiesTable for SCT"};
 
diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SCT_TrigSpacePointTool.cxx b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SCT_TrigSpacePointTool.cxx
index b29a97ca5763bf4cc3a9ffac2b44615ded3651d7..ddf232f2e78fc6f36f06313d3426ab72f9929edc 100755
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SCT_TrigSpacePointTool.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SCT_TrigSpacePointTool.cxx
@@ -36,7 +36,6 @@ SCT_TrigSpacePointTool::SCT_TrigSpacePointTool(const std::string &type,
   m_overlapLimitEtaMax(3.0),   // high overlap limit for eta-neighbours.
   m_spacePointsOverlapName("OverlapSpacePoints"),
   m_SiSpacePointMakerToolName("InDet::SiSpacePointMakerTool"),
-  m_manager(0),
   m_idHelper(0),
   m_Sct_clcontainer{nullptr},
   m_SiSpacePointMakerTool(0),
@@ -79,20 +78,10 @@ SCT_TrigSpacePointTool::~SCT_TrigSpacePointTool()
 //--------------------------------------------------------------------------
 StatusCode SCT_TrigSpacePointTool::initialize()  {
   ATH_CHECK( AthAlgTool::initialize() );
-  ATH_CHECK( detStore()->retrieve(m_manager,"SCT") );
   ATH_CHECK( detStore()->retrieve(m_idHelper, "SCT_ID") );
 
   // Make a table of neighbours and widths of side 1 SCT wafers
   
-  InDetDD::SiDetectorElementCollection* elements;
-  elements = const_cast<InDetDD::SiDetectorElementCollection*>
-    (m_manager->getDetectorElementCollection());   
-  
-  if (!elements) {
-    ATH_MSG_FATAL( "Cannot retrieve detector elements" );
-    return StatusCode::FAILURE;
-  } 
-
   ATH_CHECK( toolSvc()->retrieveTool(m_SiSpacePointMakerToolName, 
                                      m_SiSpacePointMakerTool, this) );
 
@@ -110,22 +99,13 @@ StatusCode SCT_TrigSpacePointTool::finalize() {
 }
 
 
-//--------------------------------------------------------------------------
-void SCT_TrigSpacePointTool::
-addSCT_SpacePoints(const SCT_ClusterCollection* clusCollection, 
-                   const SCT_ClusterContainer* clusterContainer,
-                   const SiElementPropertiesTable* properties,
-                   SpacePointCollection* spacepointCollection) {
-
-  addSCT_SpacePoints(clusCollection, clusterContainer, properties, spacepointCollection, 0);
-}
-				
 //--------------------------------------------------------------------------
 
 void SCT_TrigSpacePointTool::
 addSCT_SpacePoints(const SCT_ClusterCollection* clusCollection, 
                    const SCT_ClusterContainer* clusterContainer,
                    const SiElementPropertiesTable* properties,
+                   const InDetDD::SiDetectorElementCollection* elements,
                    SpacePointCollection* spacepointCollection,
                    SpacePointOverlapCollection* overlapColl) {
 
@@ -149,11 +129,12 @@ addSCT_SpacePoints(const SCT_ClusterCollection* clusCollection,
   }
 
   // Do nothing unless this is a side 1 detector (strips of const phi).
+  IdentifierHash thisHash(clusCollection->identifyHash());
   Identifier thisID(clusCollection->identify());
-  
+
   // if it is not the stereo side
   const InDetDD::SiDetectorElement *element = 
-    m_manager->getDetectorElement(m_idHelper->wafer_id(thisID));
+    elements->getDetectorElement(thisHash);
 
   if (element && !(element->isStereo())){
     //if (m_idHelper->side(thisID)==1) {
@@ -165,8 +146,6 @@ addSCT_SpacePoints(const SCT_ClusterCollection* clusCollection,
     // "check1" is used for opposite and eta overlaps.
     // check2 for phi overlaps
 
-    IdentifierHash thisHash = m_idHelper->wafer_hash(thisID);
-
     const std::vector<IdentifierHash>* 
       others(properties->neighbours(thisHash));
     if (others==0 || others->empty() ) return;
@@ -175,6 +154,7 @@ addSCT_SpacePoints(const SCT_ClusterCollection* clusCollection,
     bool doOverlapColl = false;
     // check opposite wafer
     checkForSCT_Points(clusCollection, *otherHash, 
+                       elements,
 		       -m_overlapLimitOpposite, +m_overlapLimitOpposite,
 		       spacepointCollection,doOverlapColl);
     
@@ -193,11 +173,13 @@ addSCT_SpacePoints(const SCT_ClusterCollection* clusCollection,
     // half-width of wafer
     
     checkForSCT_Points(clusCollection, *otherHash, 
+                       elements,
 		       -hwidth, -hwidth+m_overlapLimitPhi, 
 		       +hwidth-m_overlapLimitPhi, +hwidth);
     ++otherHash;
     if (otherHash == others->end() )  return;
     checkForSCT_Points(clusCollection, *otherHash, 
+                       elements,
 		       +hwidth-m_overlapLimitPhi, +hwidth,
 		       -hwidth, -hwidth+m_overlapLimitPhi);
     
@@ -213,6 +195,7 @@ addSCT_SpacePoints(const SCT_ClusterCollection* clusCollection,
 	    m_idHelper->layer_disk(thisID)==2)
 	  {
 	    checkForSCT_Points(clusCollection, *otherHash, 
+                               elements,
 			       +m_overlapLimitEtaMin, 
 			       +m_overlapLimitEtaMax,
 			       spacepointCollection,doOverlapColl);
@@ -220,11 +203,13 @@ addSCT_SpacePoints(const SCT_ClusterCollection* clusCollection,
 	    if (otherHash == others->end() )  return;
 	    
 	    checkForSCT_Points(clusCollection, *otherHash, 
+                               elements,
 			       -m_overlapLimitEtaMax, 
 			       -m_overlapLimitEtaMin,
 			       spacepointCollection,doOverlapColl);
 	  }else{
 	    checkForSCT_Points(clusCollection, *otherHash, 
+                               elements,
 			       -m_overlapLimitEtaMax, 
 			       -m_overlapLimitEtaMin,
 			       spacepointCollection,doOverlapColl);
@@ -232,6 +217,7 @@ addSCT_SpacePoints(const SCT_ClusterCollection* clusCollection,
 	    if (otherHash == others->end() )  return;
 	     
 	    checkForSCT_Points(clusCollection, *otherHash, 
+                               elements,
 			       +m_overlapLimitEtaMin,
 			       +m_overlapLimitEtaMax,
 			       spacepointCollection,doOverlapColl);
@@ -246,7 +232,9 @@ addSCT_SpacePoints(const SCT_ClusterCollection* clusCollection,
 
 void SCT_TrigSpacePointTool::
 checkForSCT_Points(const SCT_ClusterCollection* clusters1,
-		   const IdentifierHash& id2, double min, double max,
+		   const IdentifierHash& id2,
+                   const InDetDD::SiDetectorElementCollection* elements,
+                   double min, double max,
 		   SpacePointCollection* spacepointCollection, 
 		   bool overlapColl) {
 
@@ -271,7 +259,7 @@ checkForSCT_Points(const SCT_ClusterCollection* clusters1,
   if (!overlapColl) {
     m_SiSpacePointMakerTool->
       fillSCT_SpacePointCollection(clusters1, clusters2,min, max, 
-				   m_allClusters, beampos, m_manager, 
+				   m_allClusters, beampos, elements,
 				   spacepointCollection);
   }
 
@@ -279,7 +267,7 @@ checkForSCT_Points(const SCT_ClusterCollection* clusters1,
     m_SiSpacePointMakerTool->
       fillSCT_SpacePointEtaOverlapCollection(clusters1, clusters2, min, max, 
 					     m_allClusters, beampos, 
-					     m_manager,
+					     elements,
 					     m_spacepointoverlapCollection);
   }
 }
@@ -288,6 +276,7 @@ checkForSCT_Points(const SCT_ClusterCollection* clusters1,
 void SCT_TrigSpacePointTool::
   checkForSCT_Points(const SCT_ClusterCollection* clusters1,
 		     const IdentifierHash& id2,
+                     const InDetDD::SiDetectorElementCollection* elements,
 		     double min1, double max1, double min2, double max2){
 
   // get the cluster collections for these two detectors. Clus1 must lie
@@ -312,7 +301,7 @@ void SCT_TrigSpacePointTool::
   m_SiSpacePointMakerTool->
     fillSCT_SpacePointPhiOverlapCollection(clusters1, clusters2, min1, max1, 
 					   min2, max2, m_allClusters, beampos,
-					   m_manager, 
+					   elements,
 					   m_spacepointoverlapCollection);
 
 }
diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SCT_TrigSpacePointTool.h b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SCT_TrigSpacePointTool.h
index a4711fa7304be3137369ace6695ac822a3317203..99ff1c4411cbd0b629679fc02cc32e9173a8ad90 100755
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SCT_TrigSpacePointTool.h
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SCT_TrigSpacePointTool.h
@@ -34,11 +34,7 @@
 #include "InDetTrigToolInterfaces/ITrigSCT_SpacePointTool.h"
 #include "SiSpacePointTool/SiSpacePointMakerTool.h"
 
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"  
-#include "InDetReadoutGeometry/PixelDetectorManager.h"  
 #include "InDetPrepRawData/SiClusterContainer.h"
-#include "InDetPrepRawData/PixelClusterContainer.h"
-#include "InDetPrepRawData/PixelClusterCollection.h"
 #include "InDetPrepRawData/SCT_ClusterCollection.h"
 
 #include <string>
@@ -53,6 +49,7 @@ class SCT_NeighboursTable;
 class IBeamCondSvc;
 
 namespace InDet { class SiElementPropertiesTable;}
+namespace InDetDD { class SiDetectorElementCollection; }
 typedef InDet::SCT_ClusterContainer SCT_ClusterContainer; 
 typedef InDet::SiClusterCollection SiClusterCollection; 
 typedef InDet::SiCluster SiCluster; 
@@ -84,25 +81,24 @@ namespace InDet {
     void addSCT_SpacePoints (const SCT_ClusterCollection* clusCollection,
                              const SCT_ClusterContainer* clusterContainer,
                              const SiElementPropertiesTable* properties,
+                             const InDetDD::SiDetectorElementCollection* elements,
                              SpacePointCollection* spacepointCollection,
                              SpacePointOverlapCollection* overlapColl);
 
-    void addSCT_SpacePoints (const SCT_ClusterCollection* clusCollection,
-                             const SCT_ClusterContainer* clusterContainer,
-                             const SiElementPropertiesTable* properties,
-                             SpacePointCollection* spacepointCollection);
-
-
     void checkForSCT_Points (const SCT_ClusterCollection* clusters1,
-			     const IdentifierHash& id2, double minDiff, 
-			     double maxDiff,
-			     SpacePointCollection* spacepointCollection, 
-			     bool overlapColl); 
+                             const IdentifierHash& id2,
+                             const InDetDD::SiDetectorElementCollection* elements,
+                             double minDiff,
+                             double maxDiff,
+                             SpacePointCollection* spacepointCollection,
+                             bool overlapColl);
 
-    void checkForSCT_Points (const SCT_ClusterCollection* clusters1, 
-			     const IdentifierHash& id2, double min1, 
-			     double max1,
-			     double min2, double max2);
+    void checkForSCT_Points (const SCT_ClusterCollection* clusters1,
+                             const IdentifierHash& id2,
+                             const InDetDD::SiDetectorElementCollection* elements,
+                             double min1,
+                             double max1,
+                             double min2, double max2);
 
 
   private:
@@ -121,7 +117,6 @@ namespace InDet {
     std::string m_SiSpacePointMakerToolName;
 
 
-    const InDetDD::SCT_DetectorManager *m_manager; 
     const SCT_ID* m_idHelper;
 
     const SCT_ClusterContainer* m_Sct_clcontainer;
diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx
index 6d271e8e1d664f4509a52ce9d58ec73d580a99ab..593154b775e69f89965f94e961d550f39dd6fcac 100755
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx
@@ -16,11 +16,8 @@ ATLAS Collaboration
 #include "InDetPrepRawData/PixelClusterCollection.h"
 #include "InDetPrepRawData/SCT_ClusterCollection.h"
 
-#include "GaudiKernel/ITHistSvc.h"
-
 #include "InDetReadoutGeometry/SiLocalPosition.h" 
 #include "InDetReadoutGeometry/SiDetectorElement.h" 
-#include "InDetReadoutGeometry/SiDetectorElementCollection.h" 
 
 // Space point Classes,
 #include "TrkSpacePoint/SpacePoint.h" 
@@ -30,12 +27,13 @@ ATLAS Collaboration
 #include "InDetIdentifier/PixelID.h"
 #include "InDetIdentifier/SCT_ID.h"
 
-
 // Trigger
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
 #include "IRegionSelector/IRegSelSvc.h"
 #include "TrigTimeAlgs/TrigTimer.h"
 
+#include "GaudiKernel/ITHistSvc.h"
+
 namespace InDet{
 
   //  using namespace Trk;
@@ -173,7 +171,6 @@ namespace InDet{
       ATH_MSG_FATAL( "Cannot retrieve SCT ID helper!" );
       return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
     } 
-  
 
     // register the IdentifiableContainer into StoreGate
     // ------------------------------------------------------
@@ -264,6 +261,10 @@ namespace InDet{
 
     if (m_selectSCTs) {
       // ReadCondHandleKey for SCT alignment conditions
+      if (m_SCTDetEleCollKey.initialize().isFailure()) {
+        ATH_MSG_FATAL( "Failed to initialize " << m_SCTDetEleCollKey.fullKey() );
+        return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
+      }
       if (m_SCTPropertiesKey.initialize().isFailure()) {
         ATH_MSG_FATAL( "Failed to initialize " << m_SCTPropertiesKey.fullKey() );
         return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
@@ -428,7 +429,13 @@ namespace InDet{
     }
 
     if (m_selectSCTs &&  doSCT ){ 
-
+      // ReadCondHandle for SCT alignment conditions
+      SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+      const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+      if (elements==nullptr) {
+        ATH_MSG_FATAL("Pointer of SiDetectorElementCollection (" << m_SCTDetEleCollKey.fullKey() << ") could not be retrieved");
+        return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP);
+      }
       SG::ReadCondHandle<SiElementPropertiesTable> sctProperties(m_SCTPropertiesKey);
       const SiElementPropertiesTable* properties(sctProperties.retrieve());
       if (properties==nullptr) {
@@ -486,6 +493,7 @@ namespace InDet{
 	    m_trigSpacePointTool->addSCT_SpacePoints(SCTClusterCollection,
 						     m_sctClusterContainer,
                                                      properties,
+                                                     elements,
 						     spacepointCollection,
 						     m_spOverlapColl);
 	  }
@@ -537,6 +545,7 @@ namespace InDet{
 	    m_trigSpacePointTool->addSCT_SpacePoints(colNext,
 						     m_sctClusterContainer,
                                                      properties,
+                                                     elements,
 						     spacepointCollection,
 						     m_spOverlapColl);
 	  }
diff --git a/InnerDetector/InDetTrigRecTools/InDetTrigToolInterfaces/InDetTrigToolInterfaces/ITrigSCT_SpacePointTool.h b/InnerDetector/InDetTrigRecTools/InDetTrigToolInterfaces/InDetTrigToolInterfaces/ITrigSCT_SpacePointTool.h
index 34996a91770d0a70841e195fb7a0b7bba32d7c90..76061f80a25da9e178d299f7ba586270792a278f 100644
--- a/InnerDetector/InDetTrigRecTools/InDetTrigToolInterfaces/InDetTrigToolInterfaces/ITrigSCT_SpacePointTool.h
+++ b/InnerDetector/InDetTrigRecTools/InDetTrigToolInterfaces/InDetTrigToolInterfaces/ITrigSCT_SpacePointTool.h
@@ -27,6 +27,9 @@
 //fwd decl
 class SpacePointCollection;
 class SpacePointOverlapCollection;
+namespace InDetDD {
+  class SiDetectorElementCollection;
+}
 
 namespace InDet {
   class SiElementPropertiesTable;
@@ -44,37 +47,31 @@ namespace InDet {
      * @param[in]  clusCollection        Cluster collection
      * @param[in]  clusterContainer      Cluster container
      * @param[in]  properties            SiElementPropertiesTable
-     * @param[out] spacepointCollection  SpacePoint collection
-     */
-    virtual void addSCT_SpacePoints (const SCT_ClusterCollection* clusCollection,
-                                     const SCT_ClusterContainer* clusterContainer,
-                                     const SiElementPropertiesTable* properties,
-                                     SpacePointCollection* spacepointCollection)=0;
-
-    /**
-     * Convert clusters to SpacePoints
-     * @param[in]  clusCollection        Cluster collection
-     * @param[in]  clusterContainer      Cluster container
-     * @param[in]  properties            SiElementPropertiesTable
+     * @param[in]  elements              SiDetectorElementCollection
      * @param[out] spacepointCollection  SpacePoint collection
      * @param      overlapColl           collection of SP with overlaps
      */
     virtual void addSCT_SpacePoints (const SCT_ClusterCollection* clusCollection,
                                      const SCT_ClusterContainer* clusterContainer,
                                      const SiElementPropertiesTable* properties,
+                                     const InDetDD::SiDetectorElementCollection* elements,
                                      SpacePointCollection* spacepointCollection,
                                      SpacePointOverlapCollection* overlapColl)=0;
 
     virtual void checkForSCT_Points (const SCT_ClusterCollection* clusters1,
-				     const IdentifierHash& id2, double minDiff, 
-				     double maxDiff,
-				     SpacePointCollection* spacepointCollection, 
-				     bool overlapColl) = 0;
+                                     const IdentifierHash& id2,
+                                     const InDetDD::SiDetectorElementCollection* elements,
+                                     double minDiff,
+                                     double maxDiff,
+                                     SpacePointCollection* spacepointCollection,
+                                     bool overlapColl) = 0;
 
     virtual void checkForSCT_Points (const SCT_ClusterCollection* clusters1, 
-				     const IdentifierHash& id2, double min1, 
-				     double max1,
-				     double min2, double max2) = 0;
+                                     const IdentifierHash& id2,
+                                     const InDetDD::SiDetectorElementCollection* elements,
+                                     double min1,
+                                     double max1,
+                                     double min2, double max2) = 0;
 
   };
 
diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/InDetPerformanceRTT/IDStandardPerformance.h b/InnerDetector/InDetValidation/InDetPerformanceRTT/InDetPerformanceRTT/IDStandardPerformance.h
index de260e4a2046f29bb86a7a10462c690363e4bf6c..1a753b1ea6f35575c284cfaf4c9c0cbe8cdd9541 100755
--- a/InnerDetector/InDetValidation/InDetPerformanceRTT/InDetPerformanceRTT/IDStandardPerformance.h
+++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/InDetPerformanceRTT/IDStandardPerformance.h
@@ -31,7 +31,6 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/TRT_ID.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/TRT_DetectorManager.h"
 
 #include "TrkTrack/TrackCollection.h"
@@ -40,11 +39,15 @@
 
 #include "StoreGate/ReadHandleKey.h"
 
+// // forward declarations
 namespace AlignMon {
   class TrackSelectionTool;
 }
 
-// // forward declarations
+namespace InDetDD {
+  class SCT_DetectorManager;
+}
+
 namespace Trk {
   class ITruthToTrack;
   class ITrackSummaryTool;
diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx b/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx
index 77b2e847842c9fdd5bf051cba5f1b72c370271a1..aca19cdd29d9246f6315ad3f9cb50093a2b9fed2 100755
--- a/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx
+++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx
@@ -29,6 +29,8 @@
 
 #include "IdDictDetDescr/IdDictManager.h"
 
+#include "InDetReadoutGeometry/SCT_DetectorManager.h"
+
 #include "TrkTruthData/TrackTruth.h"
 #include "TrkTruthData/TrackTruthCollection.h"
 #include "InDetRIO_OnTrack/SiClusterOnTrack.h"
@@ -4027,7 +4029,6 @@ void IDStandardPerformance::MakeHitPlots(const DataVector<Trk::Track>* trks){
 		  const InDet::SiCluster* sc = dynamic_cast<const InDet::SiCluster*>(prd);
 		  if (sc)
 		    element = sc->detectorElement();
-		  //element = m_SCT_Mgr->getDetectorElement(surfaceID);
 		}
 	      if (!element) msg(MSG::DEBUG) << "No element for track incidence angles!" << endmsg;
 	      float PixTrkAngle = -1000;
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/InDetPhysValMonitoringTool.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/InDetPhysValMonitoringTool.h
index bec80da88710e382f5bf72cc979c6e44b4fd2df6..699f2497d1a08bd373bad956032c838ddd2a6fae 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/InDetPhysValMonitoringTool.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/InDetPhysValMonitoringTool.h
@@ -36,7 +36,6 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/TRT_ID.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/TRT_DetectorManager.h"
 //STL includes
 #include <string>
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.cxx
index 6d77eb82c209fbf1abeae9a9dd9d30f0ec8726f7..f0a9ccc0deafc1d2c9c261195074222765d4a075 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.cxx
@@ -17,6 +17,6 @@ DummyTrackSlimmingTool::DummyTrackSlimmingTool(const std::string& type, const st
       configured
  */
 Trk::Track*
-DummyTrackSlimmingTool::slim(const Trk::Track& track) {
+DummyTrackSlimmingTool::slim(const Trk::Track& track) const {
   return new Trk::Track(track);
 }
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.h
index 61245643040186f434067c293c54a21d6a11ccca..aca9193bc4c0cd849aea1fdda14ca6b162f5162a 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.h
@@ -3,8 +3,8 @@
 */
 
 /* Dear emacs, this is -*-c++-*- */
-#ifndef _DummyTrackSlimmingTool_H_
-#define _DummyTrackSlimmingTool_H_
+#ifndef INDETPHYSVALMONITORING_DUMMYTRACKSLIMMINGTOOL_H
+#define INDETPHYSVALMONITORING_DUMMYTRACKSLIMMINGTOOL_H
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "TrkToolInterfaces/ITrackSlimmingTool.h"
@@ -35,7 +35,7 @@ public:
      @return A 'slimmed' version of 'track', where exactly what information is copied depends on how the tool is
         configured
    */
-  Trk::Track* slim(const Trk::Track& track);
+  virtual Trk::Track* slim(const Trk::Track& track) const override;
 private:
 };
 
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/src/SCT_ClusterValidationNtupleWriter.cxx b/InnerDetector/InDetValidation/InDetTrackValidation/src/SCT_ClusterValidationNtupleWriter.cxx
index def0d09dae46efba6f16ce9c5bf49895b80472c6..e2885b2027f0c3f82e4062a08958cc2a5e5efd0c 100755
--- a/InnerDetector/InDetValidation/InDetTrackValidation/src/SCT_ClusterValidationNtupleWriter.cxx
+++ b/InnerDetector/InDetValidation/InDetTrackValidation/src/SCT_ClusterValidationNtupleWriter.cxx
@@ -15,7 +15,6 @@
 //#include "TrkEventPrimitives/GlobalPosition.h"
 //#include "TrkEventPrimitives/LocalPosition.h"
 //#include "TrkEventPrimitives/ErrorMatrix.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetIdentifier/SCT_ID.h"
 //#include "InDetTrackValidation/SCT_ClusterStruct.h"
 #include "SCT_Cabling/ISCT_CablingSvc.h"
diff --git a/InnerDetector/InDetValidation/InDetVertexSplitter/share/VxSplitValTemplate.py b/InnerDetector/InDetValidation/InDetVertexSplitter/share/VxSplitValTemplate.py
index d64a2a15769d43e577e98b6c15c9d3d268148e52..770089071db337ff5207da4c723888342e5ac455 100644
--- a/InnerDetector/InDetValidation/InDetVertexSplitter/share/VxSplitValTemplate.py
+++ b/InnerDetector/InDetValidation/InDetVertexSplitter/share/VxSplitValTemplate.py
@@ -228,7 +228,7 @@ InDetHoleSearchTool = InDet__InDetTrackHoleSearchTool(name = "InDetHoleSearchToo
                                                       Extrapolator = InDetExtrapolator,
                                                       usePixel      = DetFlags.haveRIO.pixel_on(),
                                                       useSCT        = DetFlags.haveRIO.SCT_on())
-InDetHoleSearchTool.SctSummarySvc = None
+InDetHoleSearchTool.SctSummaryTool = None
   
 ToolSvc += InDetHoleSearchTool
 if InDetFlags.doPrintConfigurables: print      InDetHoleSearchTool
diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx
index 338c099b59a2b6a30c9224ae9a7df4e8beef32e8..edb8090312c5f701f03123a36bd24cbe5602cc12 100644
--- a/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx
+++ b/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx
@@ -27,7 +27,7 @@ StatusCode LArBadFebCondAlg::initialize() {
   // CondSvc
   ATH_CHECK( m_condSvc.retrieve() );
   // Read Handles
-  ATH_CHECK( m_BCInputKey.initialize() );
+  if(!m_BCInputKey.key().empty()) ATH_CHECK( m_BCInputKey.initialize() );
   ATH_CHECK( m_BCOutputKey.initialize() );
 
   // Register write handle
@@ -48,57 +48,65 @@ StatusCode LArBadFebCondAlg::execute() {
     return StatusCode::SUCCESS;
   }  
 
-  SG::ReadCondHandle<AthenaAttributeList> readHandle{m_BCInputKey};
-  const AthenaAttributeList* attrList{*readHandle};
+  std::unique_ptr<LArBadFebCont> badFebCont(new LArBadFebCont());
+  EventIDRange rangeW;
 
-  if (attrList==nullptr) {
-    msg(MSG::ERROR) << "Failed to retrieve CondAttributeListCollection with key " << m_BCInputKey.key() << endmsg;
-    return StatusCode::FAILURE;
-  }
+  if(!m_BCInputKey.key().empty()) {
 
-  std::unique_ptr<LArBadFebCont> badFebCont(new LArBadFebCont());
-  
-  const coral::Blob& blob = (*attrList)["Blob"].data<coral::Blob>();
-  unsigned int chanSize = (*attrList)["ChannelSize"].data<unsigned int>();
-  unsigned int stateSize = (*attrList)["StatusWordSize"].data<unsigned int>();
-  unsigned int endian = (*attrList)["Endianness"].data<unsigned int>();
-  unsigned int version = (*attrList)["Version"].data<unsigned int>();
+    SG::ReadCondHandle<AthenaAttributeList> readHandle{m_BCInputKey};
+    const AthenaAttributeList* attrList{*readHandle};
+
+    if (attrList==nullptr) {
+      msg(MSG::ERROR) << "Failed to retrieve CondAttributeListCollection with key " << m_BCInputKey.key() << endmsg;
+      return StatusCode::FAILURE;
+    }
+ 
     
-  std::vector<std::pair<HWIdentifier,LArBadFeb> > bcVec = 
-    LArBadChanBlobUtils::decodeBlob<LArBadFeb>( &blob, chanSize, stateSize, endian,
-						version, msg());
-   
-  for (auto& idBC : bcVec) {
-    badFebCont->add(idBC.first,idBC.second);
-  }
+    const coral::Blob& blob = (*attrList)["Blob"].data<coral::Blob>();
+    unsigned int chanSize = (*attrList)["ChannelSize"].data<unsigned int>();
+    unsigned int stateSize = (*attrList)["StatusWordSize"].data<unsigned int>();
+    unsigned int endian = (*attrList)["Endianness"].data<unsigned int>();
+    unsigned int version = (*attrList)["Version"].data<unsigned int>();
+      
+    std::vector<std::pair<HWIdentifier,LArBadFeb> > bcVec = 
+      LArBadChanBlobUtils::decodeBlob<LArBadFeb>( &blob, chanSize, stateSize, endian,
+          					version, msg());
+     
+    for (auto& idBC : bcVec) {
+      badFebCont->add(idBC.first,idBC.second);
+    }
+       
      
-   
-  if (m_inputFileName.size()) {//Read supplemental data from ASCII file (if required)
+    if (m_inputFileName.size()) {//Read supplemental data from ASCII file (if required)
+       
+       const LArOnlineID* onlineID;
+       ATH_CHECK(detStore()->retrieve(onlineID,"LArOnlineID"));	       
+       LArBadChannelDecoder decoder(&(*onlineID), msg());
+       std::vector<std::pair<HWIdentifier,LArBadFeb> > bcVec = decoder.readFebASCII(m_inputFileName);
+       for (auto& idBC : bcVec) {
+         badFebCont->add(idBC.first,idBC.second);
+       }
+     } //end if have ASCII filename
+ 
+ 
+ 
+     size_t nChanBeforeMege=badFebCont->size();
+     badFebCont->sort(); //Sorts vector of bad febs and merges duplicate entries
      
-     const LArOnlineID* onlineID;
-     ATH_CHECK(detStore()->retrieve(onlineID,"LArOnlineID"));	       
-     LArBadChannelDecoder decoder(&(*onlineID), msg());
-     std::vector<std::pair<HWIdentifier,LArBadFeb> > bcVec = decoder.readFebASCII(m_inputFileName);
-     for (auto& idBC : bcVec) {
-       badFebCont->add(idBC.first,idBC.second);
+     ATH_MSG_INFO("Read a total of " << badFebCont->size() << " problematic febs from database");
+     if (nChanBeforeMege!=badFebCont->size()) {
+       ATH_MSG_INFO("Merged " << nChanBeforeMege-badFebCont->size() << " duplicate entries");
      }
-   } //end if have ASCII filename
-
+ 
+    // Define validity of the output cond object and record it
+    if(!readHandle.range(rangeW)) {
+      ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandle.key());
+      return StatusCode::FAILURE;
+    }
+  } else {
 
+    rangeW=EventIDRange( EventIDBase(0,0), EventIDBase(std::numeric_limits<unsigned int>::max()-1,0)); 
 
-   size_t nChanBeforeMege=badFebCont->size();
-   badFebCont->sort(); //Sorts vector of bad febs and merges duplicate entries
-   
-   ATH_MSG_INFO("Read a total of " << badFebCont->size() << " problematic febs from database");
-   if (nChanBeforeMege!=badFebCont->size()) {
-     ATH_MSG_INFO("Merged " << nChanBeforeMege-badFebCont->size() << " duplicate entries");
-   }
-
-  // Define validity of the output cond object and record it
-  EventIDRange rangeW;
-  if(!readHandle.range(rangeW)) {
-    ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandle.key());
-    return StatusCode::FAILURE;
   }
 
   if(writeHandle.record(rangeW,badFebCont.release()).isFailure()) {
diff --git a/LArCalorimeter/LArCellRec/python/LArNoisyROFlags.py b/LArCalorimeter/LArCellRec/python/LArNoisyROFlags.py
index dafe32b758ad72449d62f405b39a7cfd4490094b..cbde33b9c7f5658fbf6c1541534931ed7681004e 100644
--- a/LArCalorimeter/LArCellRec/python/LArNoisyROFlags.py
+++ b/LArCalorimeter/LArCellRec/python/LArNoisyROFlags.py
@@ -33,26 +33,17 @@ class MNBLooseCut(JobProperty):
     pass
 
 class MNBTightCut(JobProperty):
-    #Number of channels to declare MNB-Loose
+    #Number of channels to declare MNB-Tight
     statusOn=True
     allowedTypes=['int']
     StoredValue=17
     pass
 
-class KnownMNBFEBs(JobProperty):
-    #Number of bad febs per partition 
+class MNBTight_PsVetoCut(JobProperty):
+    #Number of channels to declare MNB-Tight
     statusOn=True
     allowedTypes=['list']
-    StoredValue=[951255040, # EMBC FT 22 Slot 7
-                 953810944, # EMBC FT 27 Slot 5
-                 954105856, # EMBC FT 27 Slot 14
-                 961052672, # EMBA FT 9 Slot 2
-                 961839104, # EMBA FT 10 Slot 10
-                 961970176, # EMBA FT 10 Slot 14
-                 972980224, # EMBA FT 31 Slot 14
-                 961445888, # EMBA FT 9 Slot 14
-                 944144384  # EMBC FT 8 Slot 14 - added June 20 2017
-                 ]
+    StoredValue=[13,3]
     pass
 
 
@@ -67,6 +58,6 @@ jobproperties.LArNoisyROFlags.add_JobProperty(BadChanPerFEB)
 jobproperties.LArNoisyROFlags.add_JobProperty(BadFEBCut)
 jobproperties.LArNoisyROFlags.add_JobProperty(MNBLooseCut)
 jobproperties.LArNoisyROFlags.add_JobProperty(MNBTightCut)
-jobproperties.LArNoisyROFlags.add_JobProperty(KnownMNBFEBs)
+jobproperties.LArNoisyROFlags.add_JobProperty(MNBTight_PsVetoCut)
 
 larNoisyROFlags = jobproperties.LArNoisyROFlags
diff --git a/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py b/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py
index 1b7e5bf2aa34807f453b6732fbd422177a8c5f7b..b19724324853d66bbb547965137591fe9aa2707b 100755
--- a/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py
+++ b/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py
@@ -45,9 +45,9 @@ class LArNoisyROSummaryGetter ( Configured )  :
         theLArNoisyROTool=LArNoisyROTool(CellQualityCut=larNoisyROFlags.CellQualityCut(),
                                          BadChanPerFEB=larNoisyROFlags.BadChanPerFEB(),
                                          BadFEBCut=larNoisyROFlags.BadFEBCut(),
-                                         KnownMNBFEBs=larNoisyROFlags.KnownMNBFEBs(),
                                          MNBLooseCut=larNoisyROFlags.MNBLooseCut(),
-                                         MNBTightCut=larNoisyROFlags.MNBTightCut()
+                                         MNBTightCut=larNoisyROFlags.MNBTightCut(),
+                                         MNBTight_PsVetoCut=larNoisyROFlags.MNBTight_PsVetoCut()
                                          )
 
 
diff --git a/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.cxx b/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.cxx
index 142d68ab16e0dad5a1c7a7d6e901695facca1ca0..bb8b2cf3e47f562914938581fadb493887ffdec1 100644
--- a/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.cxx
+++ b/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.cxx
@@ -27,6 +27,9 @@ StatusCode LArNoisyROAlg::initialize() {
   ATH_CHECK(m_noisyROTool.retrieve());
   ATH_CHECK(m_CaloCellContainerName.initialize());
   ATH_CHECK(m_outputKey.initialize());
+  ATH_CHECK(m_eventInfoKey.initialize());
+  ATH_CHECK(m_knownBadFEBsVecKey.initialize() );
+  ATH_CHECK(m_knownMNBFEBsVecKey.initialize() );
   return StatusCode::SUCCESS;
 }
 
@@ -39,9 +42,38 @@ StatusCode LArNoisyROAlg::execute_r (const EventContext& ctx) const
     return StatusCode::FAILURE;      
   } 
   
+  std::set<unsigned int> bf;
+  std::vector<HWIdentifier> MNBfeb;
+  SG::ReadCondHandle<LArBadFebCont> badHdl(m_knownBadFEBsVecKey, ctx);
+  const LArBadFebCont* badCont=*badHdl;
+  if(badCont) {
+     for(LArBadFebCont::BadChanVec::const_iterator i = badCont->begin(); i!=badCont->end(); i++) {
+        bf.insert(i->first);
+     }
+     if(bf.size() == 0) {
+        ATH_MSG_WARNING("List of known Bad FEBs empty !? ");
+     }
+  }
+  
+  SG::ReadCondHandle<LArBadFebCont> MNBHdl(m_knownMNBFEBsVecKey, ctx);
+  const LArBadFebCont* MNBCont=*MNBHdl;
+  if(MNBCont) {
+     for(LArBadFebCont::BadChanVec::const_iterator i = MNBCont->begin(); i!=MNBCont->end(); i++) {
+        MNBfeb.push_back(HWIdentifier(i->first));
+     } 
+     if(MNBfeb.size() == 0) {
+        ATH_MSG_WARNING("List of known MNB FEBs empty !? ");
+     } 
+  }
+  const std::set<unsigned int> knownBadFEBs(bf);
+  ATH_MSG_DEBUG("Number of known Bad FEBs: "<<knownBadFEBs.size());
+  const std::vector<HWIdentifier> knownMNBFEBs(MNBfeb);
+  ATH_MSG_DEBUG("Number of known MNB FEBs: "<<knownMNBFEBs.size());
+
+
 
   SG::WriteHandle<LArNoisyROSummary> noisyRO(m_outputKey, ctx);
-  ATH_CHECK(noisyRO.record(m_noisyROTool->process(cellContainer.cptr())));
+  ATH_CHECK(noisyRO.record(m_noisyROTool->process(cellContainer.cptr(), &knownBadFEBs, &knownMNBFEBs)));
 
 
   bool badFEBFlag=noisyRO->BadFEBFlaggedPartitions();
@@ -49,8 +81,9 @@ StatusCode LArNoisyROAlg::execute_r (const EventContext& ctx) const
   bool badSaturatedTightCut=noisyRO->SatTightFlaggedPartitions();
   bool MNBLooseCut=noisyRO->MNBLooseFlaggedPartitions();
   bool MNBTightCut=noisyRO->MNBTightFlaggedPartitions();
+  bool MNBTight_PsVetoCut=noisyRO->MNBTight_PsVetoFlaggedPartitions();
   
-  if ( badFEBFlag || badFEBFlag_W || badSaturatedTightCut || MNBLooseCut || MNBTightCut) 
+  if ( badFEBFlag || badFEBFlag_W || badSaturatedTightCut || MNBLooseCut || MNBTightCut || MNBTight_PsVetoCut) 
   {
     // retrieve EventInfo
     SG::ReadHandle<xAOD::EventInfo> eventInfo (m_eventInfoKey); 
@@ -82,6 +115,12 @@ StatusCode LArNoisyROAlg::execute_r (const EventContext& ctx) const
       failSetWARNREASON |=(!eventInfo->updateEventFlagBit(xAOD::EventInfo::LAr,LArEventBitInfo::MININOISEBURSTTIGHT));
     }
 
+    if ( MNBTight_PsVetoCut ) {
+      failSetWARN |=(!eventInfo->updateErrorState(xAOD::EventInfo::LAr,xAOD::EventInfo::Warning));
+      // Set reason why event was flagged
+      failSetWARNREASON |=(!eventInfo->updateEventFlagBit(xAOD::EventInfo::LAr,LArEventBitInfo::MININOISEBURSTTIGHT_PSVETO));
+    }
+
     if ( MNBLooseCut ) { //FIXME Tight cut actually implies loose cut too
       failSetWARNREASON |=(!eventInfo->updateEventFlagBit(xAOD::EventInfo::LAr,LArEventBitInfo::MININOISEBURSTLOOSE));
     }
diff --git a/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.h b/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.h
index c14375fe263e5095f1ab45de9b1d5b95258c0242..6027c719409ca99ed8701e279fa685fa2c60852a 100644
--- a/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.h
+++ b/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.h
@@ -23,8 +23,9 @@
 #include "CaloInterface/ILArNoisyROTool.h"
 #include "StoreGate/ReadHandleKey.h"
 #include "StoreGate/WriteHandleKey.h"
-#include "xAODEventInfo/EventInfo.h"
+#include "LArRecConditions/LArBadChannelCont.h"
 #include "LArRecEvent/LArNoisyROSummary.h"
+#include "xAODEventInfo/EventInfo.h"
 
 class CaloCellContainer;
 
@@ -42,8 +43,10 @@ class LArNoisyROAlg : public AthReentrantAlgorithm
   ToolHandle<ILArNoisyROTool> m_noisyROTool;
  
   SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "eventInfoKey", "EventInfo", "Key for EventInfo object"};
-  SG::ReadHandleKey<CaloCellContainer> m_CaloCellContainerName{this, "CaloCellContainer", "AllCalo", "Name of input cell container"};
-  SG::WriteHandleKey<LArNoisyROSummary> m_outputKey{this, "OutputKey", "LArNoisyROSummary", "Output summary object name"};
+  SG::ReadHandleKey<CaloCellContainer> m_CaloCellContainerName {this, "CaloCellContainer", "AllCalo", "input cell container key"};
+  SG::WriteHandleKey<LArNoisyROSummary> m_outputKey {this, "OutputKey", "LArNoisyROSummary", "output object key"};
+  SG::ReadCondHandleKey<LArBadFebCont> m_knownBadFEBsVecKey {this, "BadFEBsKey", "LArKnownBadFEBs", "key to read the known Bad FEBs"};
+  SG::ReadCondHandleKey<LArBadFebCont> m_knownMNBFEBsVecKey {this, "MNBFEBsKey", "LArKnownMNBFEBs", "key to read the known MNB FEBs"};
 
 };
 
diff --git a/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx b/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx
index 9034ead574aa42e8a7508127c044f0e5573d1891..00f15048bfc62ce6f435c51b54236a631904ec20 100644
--- a/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx
+++ b/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx
@@ -1,7 +1,5 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // LArNoisyROTool.cxx 
@@ -24,7 +22,6 @@ LArNoisyROTool::LArNoisyROTool( const std::string& type,
 				const IInterface* parent ) : 
   ::AthAlgTool  ( type, name, parent   ),
   m_calo_id(0), m_onlineID(0), 
-  m_cablingKey("LArOnOffIdMap"),
   m_partitionMask({{LArNoisyROSummary::EMECAMask,LArNoisyROSummary::EMBAMask,LArNoisyROSummary::EMBCMask,LArNoisyROSummary::EMECCMask}}) //beware: The order matters! 
 {
   declareInterface<ILArNoisyROTool >(this);
@@ -33,37 +30,10 @@ LArNoisyROTool::LArNoisyROTool( const std::string& type,
   declareProperty( "IgnoreMaskedCells", m_ignore_masked_cells=false );
   declareProperty( "IgnoreFrontInnerWheelCells", m_ignore_front_innerwheel_cells=true );
   declareProperty( "BadFEBCut", m_MinBadFEB=3 );
-  declareProperty( "KnownBADFEBs", m_knownBadFEBsVec={0x3a188000, 0x3a480000, 0x3a490000, 0x3a498000, 0x3a790000, 0x3aa90000, 0x3aa98000, 0x3b108000, 0x3b110000, 0x3b118000, 0x3ba80000, 0x3ba88000, 0x3ba90000, 0x3ba98000, 0x3bb08000, 0x3bc00000});
-  // list agreed on LAr weekly meeting : https://indico.cern.ch/event/321653/
-  // 3a188000   EndcapCFT06LEMInner2        ECC06LEMI2       EndcapCFT03Slot02     [4.4.1.0.3.2]   
-  // 3a480000   EndcapCFT02RSpePresampler   ECC02RSpePs      EndcapCFT09Slot01     [4.4.1.0.9.1]   
-  // 3a490000   EndcapCFT02RSpeMiddle0      ECC02RSpeM0      EndcapCFT09Slot03     [4.4.1.0.9.3]   
-  // 3a498000   EndcapCFT02RSpeMiddle1      ECC02RSpeM1      EndcapCFT09Slot04     [4.4.1.0.9.4]   
-  // 3a790000   EndcapCFT12RSpeMiddle0      ECC12RSpeM0      EndcapCFT15Slot03     [4.4.1.0.15.3]  
-  // 3aa90000   EndcapCFT09RSpeMiddle0      ECC09RSpeM0      EndcapCFT21Slot03     [4.4.1.0.21.3]  
-  // 3aa98000   EndcapCFT09RSpeMiddle1      ECC09RSpeM1      EndcapCFT21Slot04     [4.4.1.0.21.4]  
-  // 3b108000   EndcapAFT02RSpeFront0       ECA02RSpeF0      EndcapAFT02Slot02     [4.4.1.1.2.2]   
-  // 3b110000   EndcapAFT02RSpeMiddle0      ECA02RSpeM0      EndcapAFT02Slot03     [4.4.1.1.2.3]   
-  // 3b118000   EndcapAFT02RSpeMiddle1      ECA02RSpeM1      EndcapAFT02Slot04     [4.4.1.1.2.4]   
-  // 3ba80000   EndcapAFT12RSpePresampler   ECA12RSpePs      EndcapAFT21Slot01     [4.4.1.1.21.1]  
-  // 3ba88000   EndcapAFT12RSpeFront0       ECA12RSpeF0      EndcapAFT21Slot02     [4.4.1.1.21.2]  
-  // 3ba90000   EndcapAFT12RSpeMiddle0      ECA12RSpeM0      EndcapAFT21Slot03     [4.4.1.1.21.3]  
-  // 3ba98000   EndcapAFT12RSpeMiddle1      ECA12RSpeM1      EndcapAFT21Slot04     [4.4.1.1.21.4]  
-  // 3bb08000   EndcapAFT12LEMInner2        ECA12LEMI2       EndcapAFT22Slot02     [4.4.1.1.22.2]  
-  // 3bc00000   EndcapAFT13LStdPresampler   ECA13LStdPs      EndcapAFT24Slot01     [4.4.1.1.24.1]  
-
-  declareProperty( "KnownMNBFEBs", m_knownMNBFEBsVec={951255040, // EMBC FT 22 Slot 7
-	                                              953810944, // EMBC FT 27 Slot 5
-       	                                              954105856, // EMBC FT 27 Slot 14
-	                                              961052672, // EMBA FT 9 Slot 2
-  	                                              961839104, // EMBA FT 10 Slot 10
-	                                              961970176, // EMBA FT 10 Slot 14
-	                                              972980224  // EMBA FT 31 Slot 14
-	                                             });
 
   declareProperty( "MNBLooseCut",m_MNBLooseCut=5,"Number of cells above CellQualityCut");
   declareProperty( "MNBTightCut",m_MNBTightCut=17,"Number of cells above CellQualityCut");
-
+  declareProperty( "MNBTight_PsVetoCut",m_MNBTight_PsVetoCut={13,3},"Number of cells above CellQualityCut");
   declareProperty( "SaturatedCellQualityCut", m_SaturatedCellQualityCut=65535);
   declareProperty( "SaturatedCellEnergyTightCut", m_SaturatedCellEnergyTightCut=1000.);
   declareProperty( "SaturatedCellTightCut", m_SaturatedCellTightCut=20);
@@ -92,18 +62,28 @@ StatusCode LArNoisyROTool::initialize() {
   ATH_CHECK(detStore()->retrieve(m_onlineID,"LArOnlineID"));
   ATH_CHECK( m_cablingKey.initialize() );
 
-  //convert std::vector (jobO) to std::set (internal representation)
-  m_knownBadFEBs.insert(m_knownBadFEBsVec.begin(),m_knownBadFEBsVec.end());
-
-  for (unsigned fID : m_knownMNBFEBsVec) 
-    m_knownMNBFEBs.insert(HWIdentifier(fID));
+  // Fill the map between any EMB FEB and the same FT PS FEB
+  // Filled only for EMB so far
+  for (std::vector<HWIdentifier>::const_iterator allFeb = m_onlineID->feb_begin(); 
+       allFeb != m_onlineID->feb_end(); ++allFeb) {
+    
+    HWIdentifier febid = HWIdentifier(*allFeb);    
+    int FEBIndex = febid.get_identifier32().get_compact();
+    int FEBIndex_PS = 0;
+    int barrel_ec = m_onlineID->barrel_ec(febid);
+    if (barrel_ec == 0){
+      int pos_neg   = m_onlineID->pos_neg(febid);
+      int ft        = m_onlineID->feedthrough(febid);
+      FEBIndex_PS = (m_onlineID->feb_Id(0,pos_neg,ft,1)).get_identifier32().get_compact();      
+    }
+    m_mapPSFEB[FEBIndex] = FEBIndex_PS;
+  }
 
   return StatusCode::SUCCESS;
 }
 
 
-
-std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContainer* cellContainer) const{
+std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContainer* cellContainer, const std::set<unsigned int>* knownBadFEBs, const std::vector<HWIdentifier>* knownMNBFEBs) const{
 
   std::unique_ptr<LArNoisyROSummary> noisyRO(new LArNoisyROSummary);
 
@@ -166,6 +146,7 @@ std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContain
     }
   }
 
+  // Store the Saturated flag per partition
   uint8_t SatTightPartitions = 0;
   if ( NsaturatedTightCutBarrelA >= m_SaturatedCellTightCut ) SatTightPartitions |= LArNoisyROSummary::EMBAMask;
   if ( NsaturatedTightCutBarrelC >= m_SaturatedCellTightCut ) SatTightPartitions |= LArNoisyROSummary::EMBCMask;
@@ -174,23 +155,32 @@ std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContain
   bool badSaturatedTightCut = (SatTightPartitions != 0);
   if ( badSaturatedTightCut ) noisyRO-> SetSatTightFlaggedPartitions(SatTightPartitions);
 
-  // are there any bad FEB or preamp ?
+  // loop on all FEBs and check whether FEB can be declared as bad for the different type of flags:
+  // regular noise burst, weighted noise burst, MNB tight and loose
   for ( FEBEvtStatMapCstIt it = FEBStats.begin(); it != FEBStats.end(); it++ ) {
     ATH_MSG_DEBUG(" bad FEB " << it->first << " with " << it->second.badChannels() << " bad channels");
     if ( it->second.badChannels() > m_BadChanPerFEB ) {
       noisyRO->add_noisy_feb(HWIdentifier(it->first));
     }
 
-    // Tight MNBs
-    if ( it->second.badChannels() > m_MNBTightCut ){
-       noisyRO->add_MNBTight_feb(HWIdentifier(it->first));
-    }
-
     // Loose MNBs
     if ( it->second.badChannels() > m_MNBLooseCut ){
        noisyRO->add_MNBLoose_feb(HWIdentifier(it->first));
+       // Tight_PsVeto MNBs
+       if ( it->second.badChannels() > m_MNBTight_PsVetoCut[0] ){
+         unsigned int associatedPSFEB = m_mapPSFEB.find(it->first)->second;
+         if (associatedPSFEB != 0){ // Check if a PS FEB is associated (TRUE only for EMB FEBs)
+           if (FEBStats.count(associatedPSFEB) == 0) noisyRO->add_MNBTight_PsVeto_feb(HWIdentifier(it->first));
+           else if (FEBStats[associatedPSFEB].badChannels() < m_MNBTight_PsVetoCut[1]) noisyRO->add_MNBTight_PsVeto_feb(HWIdentifier(it->first));
+         }
+       }
+       // Tight MNBs
+       if ( it->second.badChannels() > m_MNBTightCut ){
+          noisyRO->add_MNBTight_feb(HWIdentifier(it->first));
+       }
     }
  
+
 //  // Noisy preamp removed as no used currently
 //  // Kept here just in case we may want to revive it
 //    const unsigned int* PAcounters = it->second.PAcounters();
@@ -226,7 +216,7 @@ std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContain
     // If the FEB is known to be subject to noise burst (list defiend as property)
     // give a weight 2
     const unsigned int int_id =  febid.get_identifier32().get_compact();
-    if (m_knownBadFEBs.find(int_id)!=m_knownBadFEBs.end()) weight=2;
+    if (knownBadFEBs->find(int_id)!=knownBadFEBs->end()) weight=2;
 
     if ( m_onlineID->isEMBchannel(chanID) ) 
     {
@@ -272,15 +262,27 @@ std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContain
 
   //Check for Mini Noise Bursts:
   uint8_t MNBTightPartition=0;
+  uint8_t MNBTight_PsVetoPartition=0;
   uint8_t MNBLoosePartition=0;
   
   std::array<unsigned,5> nTightMNBFEBSperPartition({{0,0,0,0,0}});
+  std::array<unsigned,5> nTight_PsVetoMNBFEBSperPartition({{0,0,0,0,0}});
   std::array<unsigned,5> nLooseMNBFEBSperPartition({{0,0,0,0,0}});
-  for (HWIdentifier febid: m_knownMNBFEBs) { //Loop over known MNB FEBs
+  for (HWIdentifier febid: *knownMNBFEBs) { //Loop over known MNB FEBs
+    //FEBEvtStatMapCstIt statIt=FEBStats.find(febid.get_identifier32().get_compact());
     FEBEvtStatMapCstIt statIt=FEBStats.find(febid.get_identifier32().get_compact());
     if (statIt!=FEBStats.end()) {
       if (statIt->second.badChannels()>=m_MNBLooseCut) {
 	(nLooseMNBFEBSperPartition[partitionNumber(febid)])++;
+        // Tight_PsVeto MNBs
+	if ( statIt->second.badChannels() > m_MNBTight_PsVetoCut[0] ){
+	  unsigned int associatedPSFEB = m_mapPSFEB.find(statIt->first)->second;
+	  if (associatedPSFEB != 0){
+	    if (FEBStats.count(associatedPSFEB) == 0) (nTight_PsVetoMNBFEBSperPartition[partitionNumber(febid)])++;
+	    else if (FEBStats[associatedPSFEB].badChannels() < m_MNBTight_PsVetoCut[1]) (nTight_PsVetoMNBFEBSperPartition[partitionNumber(febid)])++;
+	  }
+	}
+	// Tight MNBs
 	if (statIt->second.badChannels()>=m_MNBTightCut)
 	  (nTightMNBFEBSperPartition[partitionNumber(febid)])++;
       }
@@ -293,9 +295,11 @@ std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContain
     ATH_MSG_DEBUG( "Partition " << iP << ": Found " << nTightMNBFEBSperPartition[iP] << " MNB FEBs with more than " <<  m_MNBTightCut << " bad-Q channels"  );
     if (nLooseMNBFEBSperPartition[iP]>0) MNBLoosePartition |= m_partitionMask[iP];
     if (nTightMNBFEBSperPartition[iP]>0) MNBTightPartition |= m_partitionMask[iP];
+    if (nTight_PsVetoMNBFEBSperPartition[iP]>0) MNBTight_PsVetoPartition |= m_partitionMask[iP];
   }// end loop over partitions      
   
   noisyRO->SetMNBTightFlaggedPartitions(MNBTightPartition);
+  noisyRO->SetMNBTight_PsVetoFlaggedPartitions(MNBTight_PsVetoPartition);
   noisyRO->SetMNBLooseFlaggedPartitions(MNBLoosePartition);
 
   return noisyRO;
diff --git a/LArCalorimeter/LArCellRec/src/LArNoisyROTool.h b/LArCalorimeter/LArCellRec/src/LArNoisyROTool.h
index 80d819a7ce1f84f7dfc751cfd62c800b13ebac3d..378418f1308ae4f40d18ad431f3cdec5837e26f4 100644
--- a/LArCalorimeter/LArCellRec/src/LArNoisyROTool.h
+++ b/LArCalorimeter/LArCellRec/src/LArNoisyROTool.h
@@ -59,7 +59,7 @@ class LArNoisyROTool:
   virtual StatusCode  finalize();
 
   virtual 
-  std::unique_ptr<LArNoisyROSummary> process(const CaloCellContainer*) const;
+  std::unique_ptr<LArNoisyROSummary> process(const CaloCellContainer*, const std::set<unsigned int>*, const std::vector<HWIdentifier>*) const;
 
  private: 
 
@@ -109,11 +109,13 @@ class LArNoisyROTool:
   typedef std::unordered_map<unsigned int, FEBEvtStat>::iterator FEBEvtStatMapIt;
   typedef std::unordered_map<unsigned int, FEBEvtStat>::const_iterator FEBEvtStatMapCstIt;
 
+  std::unordered_map<unsigned int,unsigned int> m_mapPSFEB;
+
  private: 
 
   const CaloCell_ID* m_calo_id;
   const LArOnlineID* m_onlineID;
-  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey;
+  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey {this, "CablingKey", "LArOnOffIdMap", "key to read OnOff mapping"};
 
   //** Qfactor value above which a channel is considered bad */
   unsigned int m_CellQualityCut;
@@ -133,22 +135,6 @@ class LArNoisyROTool:
   //** min number of bad FEB to put LAr warning in event info */
   unsigned int m_MinBadFEB;
 
-  //** list of FEBs known to be affected by NoiseBursts */
-  //** If the number of BAD FEBs (counted with this weight 2) is greater than the m_MinBadFEB, the */
-  //** flag BADFEBS_W is set to true */
-  //** Example with the (default) value of 5 (strictly greater than), the following combination will lead to a BADFEBS_W */
-  //** >=5 (including 1 known bad FEB), >=4 (including 2 known bad FEB), >=3 (including 3 known bad FEB). */
-  std::vector<unsigned int> m_knownBadFEBsVec;
-
-  //** Same as above but as set to increase search speed
-  std::set<unsigned int> m_knownBadFEBs;
-
-  //** List of FEBs known to be affected by mini Noise Bursts (jobO) */
-  std::vector<unsigned int> m_knownMNBFEBsVec;
-
-  //* List of FEBs known to be affected by mini Noise Bursts. Using a set to avoid duplication */
-  std::set<HWIdentifier> m_knownMNBFEBs;
-
   //** count bad FEB for job */
   //std::unordered_map<unsigned int, unsigned int> m_badFEB_counters;
 
@@ -167,8 +153,9 @@ class LArNoisyROTool:
   //** Count events with too many saturated Qfactor cells */
   unsigned int m_SaturatedCellTightCutEvents;
 
-  float m_MNBLooseCut;
-  float m_MNBTightCut;
+  unsigned int m_MNBLooseCut;
+  unsigned int m_MNBTightCut;
+  std::vector<unsigned int> m_MNBTight_PsVetoCut;
 
   std::array<uint8_t,4> m_partitionMask;
 
diff --git a/LArCalorimeter/LArCnv/LArTPCnv/LArTPCnv/LArNoisyROSummary_p5.h b/LArCalorimeter/LArCnv/LArTPCnv/LArTPCnv/LArNoisyROSummary_p5.h
index 003cfb7eee84ab97d9b5a7cb12134156a53ebeeb..54f685b549692a3e445e107944a69df6d108d3a5 100644
--- a/LArCalorimeter/LArCnv/LArTPCnv/LArTPCnv/LArNoisyROSummary_p5.h
+++ b/LArCalorimeter/LArCnv/LArTPCnv/LArTPCnv/LArNoisyROSummary_p5.h
@@ -27,7 +27,7 @@ class LArNoisyROSummary_p5
     m_SatTightFlaggedPartitions(0),
     m_MNBLooseFlaggedPartitions(0),
     m_MNBTightFlaggedPartitions(0),
-    m_MNBTightFlaggedPartitions_PsVeto(0)
+    m_MNBTight_PsVetoFlaggedPartitions(0)
   {};
 
  private:
@@ -41,7 +41,7 @@ class LArNoisyROSummary_p5
   uint8_t m_SatTightFlaggedPartitions;
   uint8_t m_MNBLooseFlaggedPartitions;
   uint8_t m_MNBTightFlaggedPartitions;
-  uint8_t m_MNBTightFlaggedPartitions_PsVeto;
+  uint8_t m_MNBTight_PsVetoFlaggedPartitions;
   
 };
 
diff --git a/LArCalorimeter/LArCnv/LArTPCnv/src/LArNoisyROSummaryCnv_p5.cxx b/LArCalorimeter/LArCnv/LArTPCnv/src/LArNoisyROSummaryCnv_p5.cxx
index b75181b41bb71ccb32a48c8b0694e31ba3948467..31f87e31c8b78dad030203e1547fd726471b7718 100644
--- a/LArCalorimeter/LArCnv/LArTPCnv/src/LArNoisyROSummaryCnv_p5.cxx
+++ b/LArCalorimeter/LArCnv/LArTPCnv/src/LArNoisyROSummaryCnv_p5.cxx
@@ -45,7 +45,7 @@ void LArNoisyROSummaryCnv_p5::transToPers(const LArNoisyROSummary* trans, LArNoi
   pers->m_BadFEB_WFlaggedPartitions = trans->BadFEB_WFlaggedPartitions() ;
   pers->m_MNBLooseFlaggedPartitions = trans->MNBLooseFlaggedPartitions();
   pers->m_MNBTightFlaggedPartitions = trans->MNBTightFlaggedPartitions();
-  pers->m_MNBTightFlaggedPartitions_PsVeto = trans->MNBTightFlaggedPartitions_PsVeto();
+  pers->m_MNBTight_PsVetoFlaggedPartitions = trans->MNBTight_PsVetoFlaggedPartitions();
   
 }
 
@@ -92,6 +92,6 @@ void LArNoisyROSummaryCnv_p5::persToTrans(const LArNoisyROSummary_p5* pers, LArN
   trans->SetBadFEB_WFlaggedPartitions (pers->m_BadFEB_WFlaggedPartitions);
   trans->SetMNBLooseFlaggedPartitions (pers->m_MNBLooseFlaggedPartitions);
   trans->SetMNBTightFlaggedPartitions (pers->m_MNBTightFlaggedPartitions);
-  trans->SetMNBTightFlaggedPartitions_PsVeto (pers->m_MNBTightFlaggedPartitions_PsVeto);
+  trans->SetMNBTight_PsVetoFlaggedPartitions (pers->m_MNBTight_PsVetoFlaggedPartitions);
 
 }
diff --git a/LArCalorimeter/LArCnv/LArTPCnv/test/LArNoisyROSummaryCnv_p5_test.cxx b/LArCalorimeter/LArCnv/LArTPCnv/test/LArNoisyROSummaryCnv_p5_test.cxx
index af022948634ca8bc2788223f3a4f15bcd0204e8b..1d334f5479af79b489029333fb072c78d81933ee 100644
--- a/LArCalorimeter/LArCnv/LArTPCnv/test/LArNoisyROSummaryCnv_p5_test.cxx
+++ b/LArCalorimeter/LArCnv/LArTPCnv/test/LArNoisyROSummaryCnv_p5_test.cxx
@@ -26,9 +26,9 @@ void compare (const LArNoisyROSummary& p1,
   assert (p1.BadFEB_WFlaggedPartitions() == p2.BadFEB_WFlaggedPartitions());
   assert (p1.SatMediumFlaggedPartitions() == p2.SatMediumFlaggedPartitions());
   assert (p1.SatTightFlaggedPartitions() == p2.SatTightFlaggedPartitions());
-  assert (p1.MNBTightFlaggedPartitions_PsVeto() == p2.MNBTightFlaggedPartitions_PsVeto());
   assert (p1.MNBLooseFlaggedPartitions() == p2.MNBLooseFlaggedPartitions());
   assert (p1.MNBTightFlaggedPartitions() == p2.MNBTightFlaggedPartitions());
+  assert (p1.MNBTight_PsVetoFlaggedPartitions() == p2.MNBTight_PsVetoFlaggedPartitions());
   assert (p1.get_MNBTight_febs() == p2.get_MNBTight_febs());
   assert (p1.get_MNBLoose_febs() == p2.get_MNBLoose_febs());
 }
@@ -61,9 +61,9 @@ void test1()
   trans1.SetBadFEB_WFlaggedPartitions (0x23);
   trans1.SetSatMediumFlaggedPartitions (0x34);
   trans1.SetSatTightFlaggedPartitions (0x45);
-  trans1.SetMNBTightFlaggedPartitions_PsVeto (0x48);
   trans1.SetMNBTightFlaggedPartitions (0x56);
   trans1.SetMNBLooseFlaggedPartitions (0x67);
+  trans1.SetMNBTight_PsVetoFlaggedPartitions (0x48);
   trans1.add_MNBTight_feb(HWIdentifier (0xF1234));
   trans1.add_MNBTight_feb(HWIdentifier (0xF1235));
   trans1.add_MNBLoose_feb(HWIdentifier (0xF4321));
diff --git a/LArCalorimeter/LArDigitization/CMakeLists.txt b/LArCalorimeter/LArDigitization/CMakeLists.txt
index 0343fdb4e11e2ea0400d6463d416a7d2292ace3f..9b3c45232fe45e799ceb60086519b1a3668cbd7a 100644
--- a/LArCalorimeter/LArDigitization/CMakeLists.txt
+++ b/LArCalorimeter/LArDigitization/CMakeLists.txt
@@ -24,6 +24,7 @@ atlas_depends_on_subdirs( PUBLIC
                           LArCalorimeter/LArRawEvent
                           LArCalorimeter/LArSimEvent
                           LArCalorimeter/LArRecConditions
+			  LArCalorimeter/LArRawConditions
                           PRIVATE
                           Generators/GeneratorObjects )
 
@@ -38,7 +39,7 @@ atlas_add_library( LArDigitizationLib
                    PUBLIC_HEADERS LArDigitization
                    PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES CaloIdentifier AthenaBaseComps AthenaKernel SGTools Identifier xAODEventInfo GaudiKernel LArIdentifier LArRawEvent LArSimEvent LArRecConditions CaloDetDescrLib PileUpToolsLib StoreGateLib SGtests LArCablingLib
+                   LINK_LIBRARIES CaloIdentifier AthenaBaseComps AthenaKernel SGTools Identifier xAODEventInfo GaudiKernel LArIdentifier LArRawEvent LArSimEvent LArRecConditions LArRawConditions CaloDetDescrLib PileUpToolsLib StoreGateLib SGtests LArCablingLib
                    PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} GeneratorObjects )
 
 atlas_add_component( LArDigitization
diff --git a/LArCalorimeter/LArDigitization/LArDigitization/LArPileUpTool.h b/LArCalorimeter/LArDigitization/LArDigitization/LArPileUpTool.h
index 594465b217a2c5e92af8a6b98ec5b6abaabd3982..77b56fa87479c29a9e42873a0aa636e86668d930 100755
--- a/LArCalorimeter/LArDigitization/LArDigitization/LArPileUpTool.h
+++ b/LArCalorimeter/LArDigitization/LArDigitization/LArPileUpTool.h
@@ -29,7 +29,7 @@
 #include "LArElecCalib/ILArfSampl.h"
 
 #include "LArRecConditions/ILArBadChannelMasker.h"
-#include "LArRecConditions/ILArBadChanTool.h"
+#include "LArRecConditions/LArBadChannelCont.h"
 
 #include "StoreGate/DataHandle.h"
 
@@ -39,6 +39,8 @@
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/Property.h"
+#include "StoreGate/ReadCondHandle.h"
+#include "LArRawConditions/LArADC2MeV.h"
 
 class StoreGateSvc;
 class PileUpMergeSvc;
@@ -196,10 +198,11 @@ class LArPileUpTool : virtual public ILArPileUpTool, public PileUpToolBase
   const DataHandle<ILArfSampl>    m_dd_fSampl;
   const DataHandle<ILArPedestal>  m_dd_pedestal;
   const DataHandle<ILArShape>     m_dd_shape;
-  ToolHandle<ILArADC2MeVTool>     m_adc2mevTool;
+  SG::ReadCondHandleKey<LArADC2MeV> m_adc2mevKey;
+
   ToolHandle<ILArAutoCorrNoiseTool> m_autoCorrNoiseTool;
   ToolHandle<ILArBadChannelMasker> m_maskingTool;
-  ToolHandle<ILArBadChanTool> m_badChannelTool;
+  SG::ReadCondHandleKey<LArBadFebCont> m_badFebKey;
   ToolHandle<ITriggerTime> m_triggerTimeTool;
 
   const LArEM_ID*        m_larem_id;
diff --git a/LArCalorimeter/LArDigitization/python/LArDigitizationConfig.py b/LArCalorimeter/LArDigitization/python/LArDigitizationConfig.py
index 28bde3ec44d9727dd60aff62508a7020affbce59..fa3066489d114acc670ca84c43e8432d50f005ea 100644
--- a/LArCalorimeter/LArDigitization/python/LArDigitizationConfig.py
+++ b/LArCalorimeter/LArDigitization/python/LArDigitizationConfig.py
@@ -117,31 +117,26 @@ def getLArPileUpTool(name='LArPileUpTool', **kwargs): ## useLArFloat()=True,isOv
     if  isOverlay() :
          kwargs.setdefault('RandomDigitContainer', 'LArDigitContainer_MC' )
 
-    # ADC2MeVTool
-    mlog.info(" ----  set LArADC2MeVToolDefault")
-    kwargs.setdefault('ADC2MeVTool', 'LArADC2MeVToolDefault')
+    # ADC2MeVCondAlgo
+    from LArRecUtils.LArADC2MeVCondAlgDefault import LArADC2MeVCondAlgDefault
+    LArADC2MeVCondAlgDefault()
 
     # Tool for noise autocorrelation generation
     kwargs.setdefault('AutoCorrNoiseTool', 'LArAutoCorrNoiseToolDefault')
 
     # bad channel masking
-    from LArBadChannelTool.LArBadChannelToolConf import LArBadChanTool
-    theLArBadChannelTool=LArBadChanTool()
-    from AthenaCommon.AppMgr import ToolSvc
-    ToolSvc+=theLArBadChannelTool
     from LArBadChannelTool.LArBadChannelToolConf import LArBadChannelMasker
     theLArRCBMasker=LArBadChannelMasker("LArRCBMasker")
     theLArRCBMasker.DoMasking=True
     theLArRCBMasker.ProblemsToMask=[
          "deadReadout","deadPhys"]
-    ToolSvc+=theLArRCBMasker
     kwargs.setdefault('MaskingTool', theLArRCBMasker )
-    kwargs.setdefault('BadChannelTool', theLArBadChannelTool )
-
+    
     # CosmicTriggerTimeTool for cosmics digitization
     from AthenaCommon.BeamFlags import jobproperties
     if jobproperties.Beam.beamType == "cosmics" :
         from CommissionUtils.CommissionUtilsConf import CosmicTriggerTimeTool
+        from AthenaCommon.AppMgr import ToolSvc
         theTriggerTimeTool = CosmicTriggerTimeTool()
         ToolSvc += theTriggerTimeTool
         kwargs.setdefault('UseTriggerTime', True )
diff --git a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
index 03745ef4fc2c1569af63eb40167fe838dbf0bcb0..efc329c689dcc7c282b9f0c2160372e82c0d66b8 100755
--- a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
+++ b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
@@ -46,10 +46,10 @@ LArPileUpTool::LArPileUpTool(const std::string& type, const std::string& name, c
   m_mergeSvc(0),
   m_hitmap(nullptr),
   m_DigitContainer(nullptr),
-  m_adc2mevTool("LArADC2MeVTool"),
+  m_adc2mevKey("LArADC2MeV"),
   m_autoCorrNoiseTool("LArAutoCorrNoiseTool"),
-  m_maskingTool("LArBadChannelMaskingTool"),
-  m_badChannelTool("LArBadChanTool"),
+  m_maskingTool(this,"LArBadChannelMaskingTool"),
+  m_badFebKey("LArBadFeb"),
   m_triggerTimeTool("CosmicTriggerTimeTool"),
   m_larem_id(nullptr),
   m_larhec_id(nullptr),
@@ -165,10 +165,10 @@ LArPileUpTool::LArPileUpTool(const std::string& type, const std::string& name, c
   declareProperty("UsePhase",m_usePhase,"use 1ns binned pulse shape (default=false)");
   declareProperty("RndmSvc",m_rndmSvc,"Random number service for LAr digitization");
   declareProperty("UseRndmEvtRun",m_rndmEvtRun,"Use Run and Event number to seed rndm number (default=false)");
-  declareProperty("ADC2MeVTool",m_adc2mevTool,"Tool handle for ADC2MeV");
+  declareProperty("ADC2MeVKey",m_adc2mevKey,"SG Key of ADC2MeV conditions object");
   declareProperty("AutoCorrNoiseTool",m_autoCorrNoiseTool,"Tool handle for electronic noise covariance");
   declareProperty("MaskingTool",m_maskingTool,"Tool handle for dead channel masking");
-  declareProperty("BadChannelTool",m_badChannelTool,"Tool handle for bad channel access");
+  declareProperty("BadFebKey",m_badFebKey,"Key of BadFeb object in ConditionsStore");
   declareProperty("RndmEvtOverlay",m_RndmEvtOverlay,"Pileup and/or noise added by overlaying random events (default=false)");
   declareProperty("isMcOverlay",m_isMcOverlay,"Is input Overlay from MC or data (default=false, from data)");
   declareProperty("RandomDigitContainer",m_RandomDigitContainer,"Name of random digit container");
@@ -364,12 +364,7 @@ StatusCode LArPileUpTool::initialize()
     return StatusCode::FAILURE;
   }
 
-  // retrieve ADC2MeVTool  (if using new classes)
-  if (m_adc2mevTool.retrieve().isFailure()) {
-      ATH_MSG_ERROR(" Unable to find tool LArADC2MEVTool");
-      return StatusCode::FAILURE;
-  }
-  ATH_MSG_INFO(" retrieved LArADC2MeVTool");
+  ATH_CHECK(m_adc2mevKey.initialize());
 
   // retrieve tool to compute sqrt of time correlation matrix
   if ( !m_RndmEvtOverlay  &&  m_NoiseOnOff) {
@@ -388,10 +383,7 @@ StatusCode LArPileUpTool::initialize()
       m_useBad=false;
   }
 
-  if (m_badChannelTool.retrieve().isFailure()) {
-      ATH_MSG_INFO(" No tool for bad channel ");
-      m_useBad=false;
-  }
+  ATH_CHECK(m_badFebKey.initialize());
 
   if (m_useTriggerTime) {
      if (m_triggerTimeTool.retrieve().isFailure()) {
@@ -872,6 +864,8 @@ StatusCode LArPileUpTool::processAllSubEvents()
 
 StatusCode LArPileUpTool::mergeEvent()
 {
+   SG::ReadCondHandle<LArBadFebCont> badFebHdl(m_badFebKey);
+   const LArBadFebCont* badFebs=*badFebHdl;
 
    int it,it_end;
    it =  0;
@@ -888,11 +882,8 @@ StatusCode LArPileUpTool::mergeEvent()
           if (TimeE->size() > 0 || m_NoiseOnOff || m_RndmEvtOverlay) {
             cellID = hitlist->getIdentifier();
             HWIdentifier ch_id = hitlist->getOnlineIdentifier();
-            bool missing=false;
-            if (m_useBad) {
-               HWIdentifier febId = m_laronline_id->feb_Id(ch_id);
-               missing = m_badChannelTool->febMissing(febId);
-            }
+	    HWIdentifier febId = m_laronline_id->feb_Id(ch_id);
+            bool missing=!(badFebs->status(febId).good());
             if (!missing) {
                const LArDigit * digit = 0 ;
                if(m_RndmEvtOverlay) digit = m_hitmap->GetDigit(it);
@@ -1903,6 +1894,10 @@ StatusCode LArPileUpTool::MakeDigit(const Identifier & cellId,
   float SigmaNoise;
   std::vector<float> rndm_energy_samples(m_NSamples) ;
 
+
+  SG::ReadCondHandle<LArADC2MeV> adc2mevHdl(m_adc2mevKey);
+  const LArADC2MeV* adc2MeVs=*adc2mevHdl;
+
   LArDigit *Digit;
 
 
@@ -1962,7 +1957,7 @@ StatusCode LArPileUpTool::MakeDigit(const Identifier & cellId,
  if(m_RndmEvtOverlay && rndmEvtDigit ) // no overlay if missing random digit
  {
   rndmGain= rndmEvtDigit->gain();
-  const std::vector<float>* polynom_adc2mev =&(m_adc2mevTool->ADC2MEV(cellId,rndmEvtDigit->gain()) );
+  const std::vector<float>* polynom_adc2mev =&(adc2MeVs->ADC2MEV(cellId,rndmEvtDigit->gain()) );
   if (polynom_adc2mev->size() > 1) {
      float adc2energy = SF * ((*polynom_adc2mev)[1]);
      const std::vector<short> & rndm_digit_samples = rndmEvtDigit->samples() ;
@@ -2027,7 +2022,7 @@ StatusCode LArPileUpTool::MakeDigit(const Identifier & cellId,
    ATH_MSG_DEBUG(" Pedestal not found for medium gain ,cellID " << cellId <<  " assume 1000 ");
    Pedestal=1000.;
   }
-  const std::vector<float>* polynom_adc2mev =&(m_adc2mevTool->ADC2MEV(cellId,CaloGain::LARMEDIUMGAIN));
+  const std::vector<float>* polynom_adc2mev =&(adc2MeVs->ADC2MEV(cellId,CaloGain::LARMEDIUMGAIN));
   if ( polynom_adc2mev->size() < 2) {
     ATH_MSG_WARNING(" No medium gain ramp found for cell " << m_larem_id->show_to_string(cellId) << " no digit produced...");
     return StatusCode::SUCCESS;
@@ -2112,7 +2107,7 @@ StatusCode LArPileUpTool::MakeDigit(const Identifier & cellId,
      ATH_MSG_WARNING(" pedestal not found for cellId " << cellId << " assume 1000" );
      Pedestal=1000.;
   }
-  polynom_adc2mev =&(m_adc2mevTool->ADC2MEV(cellId,igain));
+  polynom_adc2mev =&(adc2MeVs->ADC2MEV(cellId,igain));
   if (polynom_adc2mev->size() < 2) {
     ATH_MSG_WARNING(" No ramp found for requested gain " << igain << " for cell " << m_larem_id->show_to_string(cellId) << " no digit made...");
     return StatusCode::SUCCESS;
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBiasAverage.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBiasAverage.h
index dcdfd4d3c0ae4c9e2ab6de0639b1dd4c4b66938f..7faabc48046032ac28dbc7dc520aa6addf8f6d35 100755
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBiasAverage.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBiasAverage.h
@@ -33,7 +33,8 @@ class ILArMinBiasAverage {
 
   enum {ERRORCODE = LArElecCalib::ERRORCODE};  
 } ;
-
+#include "AthenaKernel/CondCont.h"
 CLASS_DEF( ILArMinBiasAverage, 112216056 ,1) 
+CLASS_DEF( CondCont<ILArMinBiasAverage>,56829592 , 1 )
 
 #endif 
diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_MC_jobOptions.py b/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_MC_jobOptions.py
index f89477a7ab6e0971deff99214fdf8168c7e93f9a..5bc9286529ac7f195b326c5d415ea95e23cc5aee 100755
--- a/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_MC_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_MC_jobOptions.py
@@ -34,18 +34,19 @@ if svcMgr.MessageSvc.OutputLevel <= DEBUG :
 
 from IOVDbSvc.CondDB import conddb
 
-larCondDBFolders = ["/LAR/ElecCalibMC/Ramp",
-                    "/LAR/ElecCalibMC/AutoCorr",
-                    "/LAR/ElecCalibMC/DAC2uA",
-                    "/LAR/ElecCalibMC/Pedestal",
-                    "/LAR/ElecCalibMC/Noise",
-                    "/LAR/ElecCalibMC/fSampl",
-                    "/LAR/ElecCalibMC/uA2MeV",
-                    "/LAR/ElecCalibMC/MinBias",
-                    "/LAR/ElecCalibMC/MinBiasAverage"]
+larCondDBFolders = [("LArRampMC","/LAR/ElecCalibMC/Ramp"),
+                    ("LArAutoCorrMC","/LAR/ElecCalibMC/AutoCorr"),
+                    ("LArDAC2uAMC","/LAR/ElecCalibMC/DAC2uA"),
+                    ("LArPedestalMC","/LAR/ElecCalibMC/Pedestal"),
+                    ("LArNoiseMC","/LAR/ElecCalibMC/Noise"),
+                    ("LArfSamplMC","/LAR/ElecCalibMC/fSampl"),
+                    ("LAruA2MeVMC","/LAR/ElecCalibMC/uA2MeV"),
+                    ("LArMinBiasMC","/LAR/ElecCalibMC/MinBias"),
+                    ("LArMinBiasAverageMC","/LAR/ElecCalibMC/MinBiasAverage")
+                    ]
 
 if larCondFlags.useMCShape():
-    larCondDBFolders += ["/LAR/ElecCalibMC/Shape"]
+    larCondDBFolders += [("LArShape32MC","/LAR/ElecCalibMC/Shape")]
 
 include( "LArConditionsCommon/LArIdMap_MC_jobOptions.py" )
 
@@ -55,9 +56,13 @@ condSeq+=LArBadChannelCondAlg(ReadKey="/LAR/BadChannels/BadChannels")
 larCondDBFolders += [("AthenaAttributeList","/LAR/BadChannels/MissingFEBs")]
 condSeq+=LArBadFebCondAlg(ReadKey="/LAR/BadChannels/MissingFEBs")
 
+condSeq+=LArBadFebCondAlg("LArKnownBadFebAlg",ReadKey="",WriteKey="LArKnownBadFEBs")
+condSeq+=LArBadFebCondAlg("LArKnownMNBFebAlg",ReadKey="",WriteKey="LArKnownMNBFEBs")
+
+
 ## these may be conditional. 
 if larCondFlags.hasMphys() :
-  larCondDBFolders += ["/LAR/ElecCalibMC/MphysOverMcal"]
+  larCondDBFolders += [("LArMphysOverMcalMC","/LAR/ElecCalibMC/MphysOverMcal")]
 
 # HV Scale Corr
 if larCondFlags.hasHVCorr() :
diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_comm_jobOptions.py b/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_comm_jobOptions.py
index e7428f7a9e953d858179fb3f1cb2301293e63b0f..9c4bf19e96b9108c8a4f50cb0fd729e7c82cb660 100755
--- a/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_comm_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_comm_jobOptions.py
@@ -55,6 +55,21 @@ conddb.addFolderSplitOnline("LAR","/LAR/BadChannels/MissingFEBs","/LAR/BadChanne
 from LArBadChannelTool.LArBadChannelToolConf import LArBadFebCondAlg
 condSeq+=LArBadFebCondAlg(ReadKey="/LAR/BadChannels/MissingFEBs")
 
+if (rec.doESD() or rec.doRDOTrigger()):
+   if 'COMP200' not in conddb.GetInstance():
+      rekeyBADF="<key>/LAR/BadChannels/KnownBADFEBs</key>"
+      rekeyMNBF="<key>/LAR/BadChannels/KnownMNBFEBs</key>"
+      conddb.addFolderSplitOnline("LAR","/LAR/BadChannels/KnownBADFEBs","/LAR/BadChannelsOfl/KnownBADFEBs"+forceRN+rekeyBADF,False,False,False,"AthenaAttributeList")
+      inkeyBad="/LAR/BadChannels/KnownBADFEBs"
+      conddb.addFolderSplitOnline("LAR","/LAR/BadChannels/KnownMNBFEBs","/LAR/BadChannelsOfl/KnownMNBFEBs"+forceRN+rekeyMNBF,False,False,False,"AthenaAttributeList")
+      inkeyMNB="/LAR/BadChannels/KnownMNBFEBs"
+   else:   
+      inkeyBad=""
+      inkeyMNB=""
+   pass
+
+   condSeq+=LArBadFebCondAlg("LArKnownBadFebAlg",ReadKey=inkeyBad,WriteKey="LArKnownBadFEBs")
+   condSeq+=LArBadFebCondAlg("LArKnownMNBFebAlg",ReadKey=inkeyMNB,WriteKey="LArKnownMNBFEBs")
 
 if not larCondFlags.LoadElecCalib.is_locked():
     larCondFlags.LoadElecCalib.set_Value(rec.readRDO()) 
diff --git a/LArCalorimeter/LArMonTools/share/LArNoisyROMon_jobOptions.py b/LArCalorimeter/LArMonTools/share/LArNoisyROMon_jobOptions.py
index 91e13153685f4bac94bc39efc12947a4717a47cc..b4df2a108e71e5339faaa7b2b9e0c70fc836b6dd 100644
--- a/LArCalorimeter/LArMonTools/share/LArNoisyROMon_jobOptions.py
+++ b/LArCalorimeter/LArMonTools/share/LArNoisyROMon_jobOptions.py
@@ -22,7 +22,7 @@ theLArNoisyROMon.ProcessNEvents= EventBlockSize
 theLArNoisyROMon.NoisyFEBDefStr =  '(>'+str(larNoisyROFlags.BadChanPerFEB())+' chan with Q>'+str(larNoisyROFlags.CellQualityCut())+')'
 theLArNoisyROMon.MNBLooseFEBDefStr =  '(>'+str(larNoisyROFlags.MNBLooseCut())+' chan with Q>'+str(larNoisyROFlags.CellQualityCut())+')'
 theLArNoisyROMon.MNBTightFEBDefStr =  '(>'+str(larNoisyROFlags.MNBTightCut())+' chan with Q>'+str(larNoisyROFlags.CellQualityCut())+')'
-theLArNoisyROMon.KnownMNBFEBs =  larNoisyROFlags.KnownMNBFEBs()
+theLArNoisyROMon.MNBTight_PsVetoFEBDefStr =  '(>'+str(larNoisyROFlags.MNBTight_PsVetoCut()[0])+' chan with Q>'+str(larNoisyROFlags.CellQualityCut())+') + PS veto (<'+str(larNoisyROFlags.MNBTight_PsVetoCut()[1])+' channels)'
 theLArNoisyROMon.BadFEBCut = larNoisyROFlags.BadFEBCut() 
 
 from RecExConfig.RecFlags import rec
diff --git a/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx
index cb390faa4641bbeb735024c2d6f00e074150938c..9eacace0a6ad90adad704ec3eaf4c102050db486 100644
--- a/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx
@@ -30,10 +30,11 @@ LArNoisyROMon::LArNoisyROMon(const std::string& type,
   declareProperty("IsOnline",       m_IsOnline=false);
   declareProperty("NoisyFEBDefStr", m_NoisyFEBDefStr="(unknown)");
   declareProperty("MNBTightFEBDefStr", m_MNBTightFEBDefStr="(unknown)");
+  declareProperty("MNBTight_PsVetoFEBDefStr", m_MNBTight_PsVetoFEBDefStr="(unknown)");
   declareProperty("MNBLooseFEBDefStr", m_MNBLooseFEBDefStr="(unknown)");
   declareProperty("BadFEBCut",  m_BadFEBCut=999999);
-  declareProperty("KnownMNBFEBs",   m_knownMNBFEBs={});
   declareProperty("doTrigger",       m_doTrigger=true);
+  declareProperty("storeLooseMNBFEBs", m_storeLooseMNBFEBs=false);
   declareProperty("EFNoiseBurstTriggers",m_EF_NoiseBurst_Triggers);
   declareProperty("L1NoiseBurstTriggers",m_L1_NoiseBurst_Triggers);
   declareProperty("m_lumi_blocks", m_lumi_blocks = 3000 );
@@ -47,8 +48,10 @@ LArNoisyROMon::LArNoisyROMon(const std::string& type,
   m_CandidateMNB.candidate_MNB_time = 0;
   m_CandidateMNB.candidate_MNB_time_ns = 0;
   m_CandidateMNB.n_candidate_MNBTight_FEB = 0;
+  m_CandidateMNB.n_candidate_MNBTight_PsVeto_FEB = 0;
   m_CandidateMNB.n_candidate_MNBLoose_FEB = 0;
   m_CandidateMNB.v_candidate_MNBTightFEB = new std::vector<int>;
+  m_CandidateMNB.v_candidate_MNBTight_PsVetoFEB = new std::vector<int>;
   m_CandidateMNB.v_candidate_MNBLooseFEB = new std::vector<int>;
 
   m_h_NoisyFEB			= NULL;
@@ -145,8 +148,10 @@ StatusCode LArNoisyROMon::bookHistograms()
     m_CandidateMNBTree->Branch("candidate_MNB_time",&m_CandidateMNB.candidate_MNB_time,"candidate_MNB_time/i");
     m_CandidateMNBTree->Branch("candidate_MNB_time_ns",&m_CandidateMNB.candidate_MNB_time_ns,"candidate_MNB_time_ns/i");
     m_CandidateMNBTree->Branch("n_candidate_MNBTight_FEB",&m_CandidateMNB.n_candidate_MNBTight_FEB,"n_candidate_MNBTight_FEB/i");
+    m_CandidateMNBTree->Branch("n_candidate_MNBTight_PsVeto_FEB",&m_CandidateMNB.n_candidate_MNBTight_PsVeto_FEB,"n_candidate_MNBTight_PsVeto_FEB/i");
     m_CandidateMNBTree->Branch("n_candidate_MNBLoose_FEB",&m_CandidateMNB.n_candidate_MNBLoose_FEB,"n_candidate_MNBLoose_FEB/i");
     m_CandidateMNBTree->Branch("v_candidate_MNBTightFEB", "vector<int>", &m_CandidateMNB.v_candidate_MNBTightFEB);
+    m_CandidateMNBTree->Branch("v_candidate_MNBTight_PsVeto_FEB", "vector<int>", &m_CandidateMNB.v_candidate_MNBTightFEB);
     m_CandidateMNBTree->Branch("v_candidate_MNBLooseFEB", "vector<int>", &m_CandidateMNB.v_candidate_MNBLooseFEB);
     overall.regTree(m_CandidateMNBTree).ignore();
     
@@ -184,17 +189,25 @@ StatusCode LArNoisyROMon::fillHistograms()
   m_CandidateMNB.candidate_MNB_time=eventInfo->timeStamp();
   m_CandidateMNB.candidate_MNB_time_ns=eventInfo->timeStampNSOffset();
   m_CandidateMNB.v_candidate_MNBTightFEB->clear();
+  m_CandidateMNB.v_candidate_MNBTight_PsVetoFEB->clear();
   m_CandidateMNB.v_candidate_MNBLooseFEB->clear();
   const std::vector<HWIdentifier>& mnbtightFEB = noisyRO->get_MNBTight_febs();  
+  const std::vector<HWIdentifier>& mnbtight_PsVetoFEB = noisyRO->get_MNBTight_PsVeto_febs();
   const std::vector<HWIdentifier>& mnblooseFEB = noisyRO->get_MNBLoose_febs();  
   m_CandidateMNB.n_candidate_MNBTight_FEB = mnbtightFEB.size();
+  m_CandidateMNB.n_candidate_MNBTight_PsVeto_FEB = mnbtightFEB.size();
   m_CandidateMNB.n_candidate_MNBLoose_FEB = mnblooseFEB.size();  
 
   for(unsigned int iFeb=0; iFeb<mnbtightFEB.size(); iFeb++) 
     m_CandidateMNB.v_candidate_MNBTightFEB->push_back(mnbtightFEB.at(iFeb).get_identifier32().get_compact());
 
-  for(unsigned int iFeb=0; iFeb<mnblooseFEB.size(); iFeb++)
-    m_CandidateMNB.v_candidate_MNBLooseFEB->push_back(mnblooseFEB.at(iFeb).get_identifier32().get_compact());
+  for(unsigned int iFeb=0; iFeb<mnbtight_PsVetoFEB.size(); iFeb++) 
+    m_CandidateMNB.v_candidate_MNBTight_PsVetoFEB->push_back(mnbtight_PsVetoFEB.at(iFeb).get_identifier32().get_compact());
+
+  if (m_storeLooseMNBFEBs){ // joboption - By default the FEB flagged as MNB-Loose are not stored in the TTree
+    for(unsigned int iFeb=0; iFeb<mnblooseFEB.size(); iFeb++)
+      m_CandidateMNB.v_candidate_MNBLooseFEB->push_back(mnblooseFEB.at(iFeb).get_identifier32().get_compact());
+  }
 
   if(m_CandidateMNB.v_candidate_MNBLooseFEB->size() > 0 || m_CandidateMNB.v_candidate_MNBTightFEB->size() > 0)
     m_CandidateMNBTree->Fill();
@@ -223,12 +236,16 @@ StatusCode LArNoisyROMon::fillHistograms()
   {
     m_NoiseTime.algo |= 0x20;
   }
+  if (eventInfo->isEventFlagBitSet(xAOD::EventInfo::LAr,LArEventBitInfo::MININOISEBURSTTIGHT_PSVETO))
+  {
+    m_NoiseTime.algo |= 0x40;
+  }
 
   if ( m_NoiseTime.algo != 0 ) 
   {
     if ( burstveto ) m_NoiseTime.algo |= 0x4;
-    unsigned uf=m_NoiseTime.algo;
-    std::cout<<"LArNoisyROMon flag: "<<uf<<std::endl;
+    //unsigned uf=m_NoiseTime.algo;
+    //std::cout<<"LArNoisyROMon flag: "<<uf<<std::endl;
     m_NoiseTimeTree->Fill();
   }  
 
@@ -305,6 +322,37 @@ StatusCode LArNoisyROMon::fillHistograms()
 
   }// End of loop on all MNB-Tight - noisy FEB
 
+  // Loop on all FEBs noisy in MNB-tight-PsVeto definition
+  // And fill the 2D maps of fraction of fraction of noisy events
+  // Fill two histograms with veto cut and all events
+  //  std::cout << "Nb of tight_PsVeto FEB" << mnbtightFEB.size() << std::endl;
+  for (size_t i = 0; i<mnbtight_PsVetoFEB.size(); i++)
+  {
+    const HWIdentifier& febid = mnbtight_PsVetoFEB[i];
+    HWIdentifier id = m_LArOnlineIDHelper->channel_Id(febid,0);
+    int FT = m_LArOnlineIDHelper->feedthrough(id);
+    int slot = m_LArOnlineIDHelper->slot(id);
+    int partition = partitionNumber(febid);
+//    std::cout << "MNBTight_PsVeto FEB " <<  mnbtight_PsVetoFEB[i].get_compact() << std::endl;
+//    std::cout << "Partitions : " << (noisyRO->MNBTight_PsVetoFlaggedPartitions() & partMask[partition]) << std::endl;
+
+    if (partition<4){
+      if (m_IsOnline)
+        {
+        m_partHistos[partition].h_CandidateMNBTight_PsVetoFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1);
+          if((noisyRO->MNBTight_PsVetoFlaggedPartitions() & partMask[partition]) != 0) 
+            m_partHistos[partition].h_MNBTight_PsVetoFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1);
+        }
+        else
+        {
+        m_partHistos[partition].h_CandidateMNBTight_PsVetoFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1);
+          if((noisyRO->MNBTight_PsVetoFlaggedPartitions() & partMask[partition]) != 0) 
+            m_partHistos[partition].h_MNBTight_PsVetoFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1);
+        }
+    }
+
+  }// End of loop on all MNB-Tight-PsVeto - noisy FEB
+
   // Loop on all FEBs noisy in MNB-loose definition
   // And fill the 2D maps of fraction of fraction of noisy events
   // Fill two histograms with veto cut and all events
@@ -335,7 +383,7 @@ StatusCode LArNoisyROMon::fillHistograms()
   }// End of loop on all MNB-Loose - noisy FEB
 
 
-  // End of 2D map of FEB found as noisy (in any definition : Std, MNB-Tight or MNB-Loose)
+  // End of 2D map of FEB found as noisy (in any definition : Std, MNB-Tight, MNB-Tight-PsVeto or MNB-Loose)
   // Now fill 1D histograms of fraction of events found as noisy vetoed or not
   m_h_LBN->Fill(LBN);  
   // Event found noisy by Std method
@@ -373,6 +421,17 @@ StatusCode LArNoisyROMon::fillHistograms()
     }
   } // End of test on MNB-Tight
 
+  // event flagged by tight-MNB-PsVeto
+  uint8_t MNBTight_PsVetoPartitions = noisyRO->MNBTight_PsVetoFlaggedPartitions();
+  if ( MNBTight_PsVetoPartitions != 0) {
+    for (int i= 0;i<4;i++){
+      if ( (MNBTight_PsVetoPartitions & partMask[i]) != 0 ) {
+      m_partHistos[i].h_MNBTight_PsVetoEvent->Fill(LBN);
+      if ( ! burstveto ) m_partHistos[i].h_MNBTight_PsVetoEventTimeVeto->Fill(LBN);
+      }
+    }
+  } // End of test on MNB-Tight-PsVeto
+
   // event flagged by loose-MNB
   uint8_t MNBLoosePartitions = noisyRO->MNBLooseFlaggedPartitions();
   if ( MNBLoosePartitions != 0) {
@@ -405,8 +464,10 @@ StatusCode LArNoisyROMon::procHistograms()
       for (int i=0;i<4;i++){
 	copyHisto(m_partHistos[i].h_NoisyFEBPerEvt,m_partHistos[i].h_NoisyFEBFracPerEvt);
 	copyHisto(m_partHistos[i].h_MNBTightFEBPerEvt,m_partHistos[i].h_MNBTightFEBFracPerEvt);
+        copyHisto(m_partHistos[i].h_MNBTight_PsVetoFEBPerEvt,m_partHistos[i].h_MNBTight_PsVetoFEBFracPerEvt);
 	copyHisto(m_partHistos[i].h_MNBLooseFEBPerEvt,m_partHistos[i].h_MNBLooseFEBFracPerEvt);
 	copyHisto(m_partHistos[i].h_CandidateMNBTightFEBPerEvt,m_partHistos[i].h_CandidateMNBTightFEBFracPerEvt);
+        copyHisto(m_partHistos[i].h_CandidateMNBTight_PsVetoFEBPerEvt,m_partHistos[i].h_CandidateMNBTight_PsVetoFEBFracPerEvt);
 	copyHisto(m_partHistos[i].h_CandidateMNBLooseFEBPerEvt,m_partHistos[i].h_CandidateMNBLooseFEBFracPerEvt);
       }
     }
@@ -419,10 +480,14 @@ StatusCode LArNoisyROMon::procHistograms()
 	m_partHistos[i].h_NoisyFEBFracPerEvt->SetEntries(m_eventCounter);
 	m_partHistos[i].h_MNBTightFEBFracPerEvt->scaleContentsAndErrors(scale);
 	m_partHistos[i].h_MNBTightFEBFracPerEvt->SetEntries(m_eventCounter);
+        m_partHistos[i].h_MNBTight_PsVetoFEBFracPerEvt->scaleContentsAndErrors(scale);
+        m_partHistos[i].h_MNBTight_PsVetoFEBFracPerEvt->SetEntries(m_eventCounter);
 	m_partHistos[i].h_MNBLooseFEBFracPerEvt->scaleContentsAndErrors(scale);
 	m_partHistos[i].h_MNBLooseFEBFracPerEvt->SetEntries(m_eventCounter);
 	m_partHistos[i].h_CandidateMNBTightFEBFracPerEvt->scaleContentsAndErrors(scale);
 	m_partHistos[i].h_CandidateMNBTightFEBFracPerEvt->SetEntries(m_eventCounter);
+        m_partHistos[i].h_CandidateMNBTight_PsVetoFEBFracPerEvt->scaleContentsAndErrors(scale);
+        m_partHistos[i].h_CandidateMNBTight_PsVetoFEBFracPerEvt->SetEntries(m_eventCounter);
 	m_partHistos[i].h_CandidateMNBLooseFEBFracPerEvt->scaleContentsAndErrors(scale);
 	m_partHistos[i].h_CandidateMNBLooseFEBFracPerEvt->SetEntries(m_eventCounter);
 	divideHisto(m_partHistos[i].h_NoisyEventFrac,m_partHistos[i].h_NoisyEvent,m_h_LBN);
@@ -431,6 +496,8 @@ StatusCode LArNoisyROMon::procHistograms()
 	m_partHistos[i].h_SaturatedNoisyEventFrac->SetEntries(m_eventCounter);
 	divideHisto(m_partHistos[i].h_MNBTightEventFrac,m_partHistos[i].h_MNBTightEvent,m_h_LBN);
 	m_partHistos[i].h_MNBTightEventFrac->SetEntries(m_eventCounter);
+        divideHisto(m_partHistos[i].h_MNBTight_PsVetoEventFrac,m_partHistos[i].h_MNBTight_PsVetoEvent,m_h_LBN);
+        m_partHistos[i].h_MNBTight_PsVetoEventFrac->SetEntries(m_eventCounter);
 	divideHisto(m_partHistos[i].h_MNBLooseEventFrac,m_partHistos[i].h_MNBLooseEvent,m_h_LBN);
 	m_partHistos[i].h_MNBLooseEventFrac->SetEntries(m_eventCounter);
 	divideHisto(m_partHistos[i].h_NoisyEventTimeVetoFrac,m_partHistos[i].h_NoisyEventTimeVeto,m_h_LBN);
@@ -439,6 +506,8 @@ StatusCode LArNoisyROMon::procHistograms()
 	m_partHistos[i].h_SaturatedNoisyEventTimeVetoFrac->SetEntries(m_eventCounter);
 	divideHisto(m_partHistos[i].h_MNBTightEventTimeVetoFrac,m_partHistos[i].h_MNBTightEventTimeVeto,m_h_LBN);
 	m_partHistos[i].h_MNBTightEventTimeVetoFrac->SetEntries(m_eventCounter);
+        divideHisto(m_partHistos[i].h_MNBTight_PsVetoEventTimeVetoFrac,m_partHistos[i].h_MNBTight_PsVetoEventTimeVeto,m_h_LBN);
+        m_partHistos[i].h_MNBTight_PsVetoEventTimeVetoFrac->SetEntries(m_eventCounter);
 	divideHisto(m_partHistos[i].h_MNBLooseEventTimeVetoFrac,m_partHistos[i].h_MNBLooseEventTimeVeto,m_h_LBN);
 	m_partHistos[i].h_MNBLooseEventTimeVetoFrac->SetEntries(m_eventCounter);
       }    
@@ -456,6 +525,8 @@ StatusCode LArNoisyROMon::procHistograms()
       if (m_partHistos[i].h_SaturatedNoisyEventTimeVeto) m_partHistos[i].h_SaturatedNoisyEventTimeVeto->Reset();
       if (m_partHistos[i].h_MNBTightEvent) m_partHistos[i].h_MNBTightEvent->Reset();
       if (m_partHistos[i].h_MNBTightEventTimeVeto) m_partHistos[i].h_MNBTightEventTimeVeto->Reset();
+      if (m_partHistos[i].h_MNBTight_PsVetoEvent) m_partHistos[i].h_MNBTight_PsVetoEvent->Reset();
+      if (m_partHistos[i].h_MNBTight_PsVetoEventTimeVeto) m_partHistos[i].h_MNBTight_PsVetoEventTimeVeto->Reset();
       if (m_partHistos[i].h_MNBLooseEvent) m_partHistos[i].h_MNBLooseEvent->Reset();
       if (m_partHistos[i].h_MNBLooseEventTimeVeto) m_partHistos[i].h_MNBLooseEventTimeVeto->Reset();
     }
@@ -571,6 +642,20 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s
     partition.h_MNBTightFEBPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up);
     group.regHist(partition.h_MNBTightFEBPerEvt).ignore();
   }
+
+  hName  = "MNBTight_PsVetoFEBFracPerEvt_"+name;
+  hTitle = "Yield of events with FEB MNB-Tight_PsVeto " + m_MNBTight_PsVetoFEBDefStr+ " - "+name+" (only vetoed events)";
+  partition.h_MNBTight_PsVetoFEBFracPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up);
+  partition.h_MNBTight_PsVetoFEBFracPerEvt->GetXaxis()->SetTitle("Slot");
+  partition.h_MNBTight_PsVetoFEBFracPerEvt->GetYaxis()->SetTitle("Feedthrough");
+  groupfrac.regHist(partition.h_MNBTight_PsVetoFEBFracPerEvt).ignore();  
+
+  if ( m_IsOnline )
+  {
+    hName="temp_"+hName;
+    partition.h_MNBTight_PsVetoFEBPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up);
+    group.regHist(partition.h_MNBTight_PsVetoFEBPerEvt).ignore();
+  }
       
   hName  = "MNBLooseFEBFracPerEvt_"+name;
   hTitle = "Yield of events with FEB MNB-Loose " + m_MNBLooseFEBDefStr + " - "+name+" (only vetoed events)";
@@ -599,6 +684,20 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s
     partition.h_CandidateMNBTightFEBPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up);
     group.regHist(partition.h_CandidateMNBTightFEBPerEvt).ignore();
   }
+
+   hName  = "CandidateMNBTight_PsVetoFEBFracPerEvt_"+name;
+  hTitle = "Yield of events with FEB MNB-Tight_PsVeto "+ m_MNBTight_PsVetoFEBDefStr+ " - "+name;
+  partition.h_CandidateMNBTight_PsVetoFEBFracPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up);
+  partition.h_CandidateMNBTight_PsVetoFEBFracPerEvt->GetXaxis()->SetTitle("Slot");
+  partition.h_CandidateMNBTight_PsVetoFEBFracPerEvt->GetYaxis()->SetTitle("Feedthrough");
+  groupfrac.regHist(partition.h_CandidateMNBTight_PsVetoFEBFracPerEvt).ignore();  
+
+  if ( m_IsOnline )
+  {
+    hName="temp_"+hName;
+    partition.h_CandidateMNBTight_PsVetoFEBPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up);
+    group.regHist(partition.h_CandidateMNBTight_PsVetoFEBPerEvt).ignore();
+  }
       
   hName  = "CandidateMNBLooseFEBFracPerEvt_"+name;
   hTitle = "Yield of events with FEB MNB-Loose " + m_MNBLooseFEBDefStr + " - "+name;
@@ -646,6 +745,16 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s
   partition.h_MNBTightEvent = TH1I_LW::create(hName.c_str(), hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5);
   partition.h_MNBTightEvent->GetXaxis()->SetTitle("Luminosity Block");
 
+  hName = "MNBTight_PsVetoEvent_"+name;
+  hTitle = "Yield of events flagged as MNB-Tight_PsVeto - "+name;
+  partition.h_MNBTight_PsVetoEventFrac = TH1F_LW::create(hName.c_str(),hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5);
+  partition.h_MNBTight_PsVetoEventFrac->GetXaxis()->SetTitle("Luminosity Block");
+  groupfracbin.regHist(partition.h_MNBTight_PsVetoEventFrac).ignore();  
+  // Histogram below is temporary. Normalized at the end of run to produce the above histograms
+  hName = "temp_MNBTight_PsVetoEvent_"+name;
+  partition.h_MNBTight_PsVetoEvent = TH1I_LW::create(hName.c_str(), hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5);
+  partition.h_MNBTight_PsVetoEvent->GetXaxis()->SetTitle("Luminosity Block");
+
   hName = "MNBLooseEvent_"+name;
   hTitle = "Yield of events flagged as MNB-Loose - "+name;
   partition.h_MNBLooseEventFrac = TH1F_LW::create(hName.c_str(),hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5);
@@ -697,6 +806,16 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s
   partition.h_MNBTightEventTimeVeto = TH1I_LW::create(hName.c_str(), hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5);
   partition.h_MNBTightEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block");
 
+  hName = "MNBTight_PsVetoEvent_TimeVeto_"+name;
+  hTitle =  "Yield of events flagged as MNB-Tight_PsVeto not vetoed by time window - " + name;
+  partition.h_MNBTight_PsVetoEventTimeVetoFrac = TH1F_LW::create(hName.c_str(),hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5);
+  partition.h_MNBTight_PsVetoEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block");
+  groupfracbin.regHist(partition.h_MNBTight_PsVetoEventTimeVetoFrac).ignore();    
+
+  hName = "temp_MNBTight_PsVetoEvent_TimeVeto_"+name;
+  partition.h_MNBTight_PsVetoEventTimeVeto = TH1I_LW::create(hName.c_str(), hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5);
+  partition.h_MNBTight_PsVetoEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block");
+
   hName = "MNBLooseEvent_TimeVeto_"+name;
   hTitle = "Yield of events flagged as MNB-Loose not vetoed by time window - " + name;
   partition.h_MNBLooseEventTimeVetoFrac = TH1F_LW::create(hName.c_str(),hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5);
@@ -804,6 +923,12 @@ StatusCode LArNoisyROMon::finalize()
      LWHist::safeDelete(m_partHistos[i].h_MNBTightEventTimeVeto); 
      m_partHistos[i].h_MNBTightEventTimeVeto = nullptr;
 
+     LWHist::safeDelete(m_partHistos[i].h_MNBTight_PsVetoEvent); 
+     m_partHistos[i].h_MNBTight_PsVetoEvent = nullptr;
+
+     LWHist::safeDelete(m_partHistos[i].h_MNBTight_PsVetoEventTimeVeto); 
+     m_partHistos[i].h_MNBTight_PsVetoEventTimeVeto = nullptr;
+
      LWHist::safeDelete(m_partHistos[i].h_MNBLooseEvent); 
      m_partHistos[i].h_MNBLooseEvent = nullptr;
 
diff --git a/LArCalorimeter/LArMonTools/src/LArNoisyROMon.h b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.h
index 414e5dcfe60b5e08761946477b874a23071f5a35..15ae55f7598edd571387f915c128e073629c9a78 100644
--- a/LArCalorimeter/LArMonTools/src/LArNoisyROMon.h
+++ b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.h
@@ -64,8 +64,10 @@ private:
     unsigned int candidate_MNB_time;
     unsigned int candidate_MNB_time_ns;
     int n_candidate_MNBTight_FEB;
+    int n_candidate_MNBTight_PsVeto_FEB;
     int n_candidate_MNBLoose_FEB;
     std::vector<int>* v_candidate_MNBTightFEB;
+    std::vector<int>* v_candidate_MNBTight_PsVetoFEB;
     std::vector<int>* v_candidate_MNBLooseFEB;
   };
   CandidateMNB m_CandidateMNB;
@@ -75,17 +77,21 @@ private:
   {      
     TH2F_LW* h_NoisyFEBFracPerEvt=nullptr;
     TH2F_LW* h_MNBTightFEBFracPerEvt=nullptr;
+    TH2F_LW* h_MNBTight_PsVetoFEBFracPerEvt=nullptr;
     TH2F_LW* h_MNBLooseFEBFracPerEvt=nullptr;
     TH2F_LW* h_CandidateMNBTightFEBFracPerEvt=nullptr;
+    TH2F_LW* h_CandidateMNBTight_PsVetoFEBFracPerEvt=nullptr;
     TH2F_LW* h_CandidateMNBLooseFEBFracPerEvt=nullptr;
     TH1F_LW* h_NoisyEventFrac=nullptr;
     TH1F_LW* h_SaturatedNoisyEventFrac=nullptr;
     TH1F_LW* h_MNBTightEventFrac=nullptr;
+    TH1F_LW* h_MNBTight_PsVetoEventFrac=nullptr;
     TH1F_LW* h_MNBLooseEventFrac=nullptr;
     //    TH1F_LW* h_NoisyWEventFrac=nullptr;
     TH1F_LW* h_NoisyEventTimeVetoFrac=nullptr;
     TH1F_LW* h_SaturatedNoisyEventTimeVetoFrac=nullptr;
     TH1F_LW* h_MNBTightEventTimeVetoFrac=nullptr;
+    TH1F_LW* h_MNBTight_PsVetoEventTimeVetoFrac=nullptr;
     TH1F_LW* h_MNBLooseEventTimeVetoFrac=nullptr;
     //    TH1F_LW* h_NoisyWEventTimeVetoFrac=nullptr;
     TH2I_LW* h_MNBKnownFEB=nullptr;
@@ -97,17 +103,21 @@ private:
     // histograms
     TH2F_LW* h_NoisyFEBPerEvt=nullptr;
     TH2F_LW* h_MNBTightFEBPerEvt=nullptr;
+    TH2F_LW* h_MNBTight_PsVetoFEBPerEvt=nullptr;
     TH2F_LW* h_MNBLooseFEBPerEvt=nullptr;
     TH2F_LW* h_CandidateMNBTightFEBPerEvt=nullptr;
     TH2F_LW* h_CandidateMNBLooseFEBPerEvt=nullptr;
     TH1I_LW* h_NoisyEvent=nullptr;
     TH1I_LW* h_SaturatedNoisyEvent=nullptr;
     TH1I_LW* h_MNBTightEvent=nullptr;
+    TH1I_LW* h_MNBTight_PsVetoEvent=nullptr;
+    TH2F_LW* h_CandidateMNBTight_PsVetoFEBPerEvt=nullptr;
     TH1I_LW* h_MNBLooseEvent=nullptr;
     //    TH1I_LW* h_NoisyWEvent=nullptr;
     TH1I_LW* h_NoisyEventTimeVeto=nullptr;
     TH1I_LW* h_SaturatedNoisyEventTimeVeto=nullptr;
     TH1I_LW* h_MNBTightEventTimeVeto=nullptr;
+    TH1I_LW* h_MNBTight_PsVetoEventTimeVeto=nullptr;
     TH1I_LW* h_MNBLooseEventTimeVeto=nullptr;
     //TH1I_LW* h_NoisyWEventTimeVeto=nullptr;
   };
@@ -128,6 +138,7 @@ private:
 
   bool m_IsOnline;
   bool m_doTrigger;
+  bool m_storeLooseMNBFEBs;
   unsigned int m_eventCounter;
 
   //  partitionHistos m_BarrelA, m_BarrelC, m_EMECA, m_EMECC;
@@ -141,6 +152,7 @@ private:
   
   std::string m_NoisyFEBDefStr;
   std::string m_MNBTightFEBDefStr;
+  std::string m_MNBTight_PsVetoFEBDefStr;
   std::string m_MNBLooseFEBDefStr;
   std::vector<unsigned int> m_knownMNBFEBs;
   unsigned int m_BadFEBCut;
diff --git a/LArCalorimeter/LArROD/LArROD/LArRawChannelBuilderAlg.h b/LArCalorimeter/LArROD/LArROD/LArRawChannelBuilderAlg.h
index c184ea79e15800210deebdf5b0f0bd35023d4b47..cc4921c3d9d6d675aa9d0c985d79e46abdd95c80 100644
--- a/LArCalorimeter/LArROD/LArROD/LArRawChannelBuilderAlg.h
+++ b/LArCalorimeter/LArROD/LArROD/LArRawChannelBuilderAlg.h
@@ -1,6 +1,6 @@
 //Dear emacs, this is -*-c++-*- 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef LARROD_LARRAWCHANNELBUILDERALG_H
@@ -39,7 +39,7 @@ class LArRawChannelBuilderAlg : public AthReentrantAlgorithm {
   SG::ReadHandleKey<LArDigitContainer> m_digitKey{this, "LArDigitKey","FREE",
       "SG Key of LArDigitContaiiner"};
   //Event output:
-  SG::WriteHandleKey<LArRawChannelContainer> m_rawChannelKey{this,"LArRawChannelKey","LArRawChanels",
+  SG::WriteHandleKey<LArRawChannelContainer> m_rawChannelKey{this,"LArRawChannelKey","LArRawChannels",
       "SG key of the LArRawChannelContainer"};
 
   //Conditions input:
@@ -52,9 +52,11 @@ class LArRawChannelBuilderAlg : public AthReentrantAlgorithm {
   SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
 
   //Other jobOptions:
-  Gaudi::Property<float> m_eCutForQ{this,"ECutForQ",250.0,"Q will be computed only for channels with E above this value"};
+  Gaudi::Property<float> m_eCutFortQ{this,"ECutFortQ",256.0,"Time and Quality will be computed only for channels with E above this value"};
   Gaudi::Property<bool> m_useShapeDer{this,"useShapeDer",true,"Use shape derivative in Q-factor computation"};
 
+  //The following matters only in the MC case, when we have a 32 sample shapes
+  Gaudi::Property<int> m_firstSample{this,"firstSample",0,"first of the 32 sampels of the MC shape to be used"};
 
   //Identifier helper
   const LArOnlineID* m_onlineId;
diff --git a/LArCalorimeter/LArROD/python/LArRODConfig.py b/LArCalorimeter/LArROD/python/LArRODConfig.py
index 7212e2c16a5a497796e5d8caac94efb4ead67d84..7524ad63fce68d72c2bae0b2d0241f3284e42dc5 100644
--- a/LArCalorimeter/LArROD/python/LArRODConfig.py
+++ b/LArCalorimeter/LArROD/python/LArRODConfig.py
@@ -1,30 +1,26 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
 
 def getLArRawChannelBuilder(name="LArRawChannelBuilder" , **kwargs):
-    # Currently just for the MC case, but could easily be extended to
-    # cover the data case.
-
+    
     from AthenaCommon.AppMgr import ToolSvc
 
-    kwargs.setdefault('LArRawChannelContainerName', "LArRawChannels")
-    kwargs.setdefault('UseOFCTool', True)
+    kwargs.setdefault('LArRawChannelKey', "LArRawChannels")
+    kwargs.setdefault('LArDigitKey', 'LArDigitContainer_MC')
 
-    # Turn off printing for LArRoI_Map
-    from LArRawUtils.LArRawUtilsConf import LArRoI_Map
-    LArRoI_Map = LArRoI_Map("LArRoI_Map")
-    ToolSvc += LArRoI_Map
-    LArRoI_Map.Print=False
-    from AthenaCommon.DetFlags import DetFlags
-    if DetFlags.digitize.LAr_on() :
-        kwargs.setdefault('DataLocation', 'LArDigitContainer_MC')
+    #Call required Cond-Algos:
+    from LArRecUtils.LArAutoCorrTotalCondAlgDefault import  LArAutoCorrTotalCondAlgDefault
+    from LArRecUtils.LArOFCCondAlgDefault import LArOFCCondAlgDefault
+    from LArRecUtils.LArADC2MeVCondAlgDefault import LArADC2MeVCondAlgDefault
 
-    kwargs.setdefault('ADC2MeVTool', 'LArADC2MeVToolDefault')
+    #The order matters when running w/o MT
+    LArADC2MeVCondAlgDefault()
+    LArAutoCorrTotalCondAlgDefault()
+    LArOFCCondAlgDefault()
 
-    kwargs.setdefault('OFCTool', 'LArOFCToolDefault')
 
     from LArROD.LArRODFlags import larRODFlags
     kwargs.setdefault('firstSample',larRODFlags.firstSample())
     
-    return CfgMgr.LArRawChannelBuilder(name, **kwargs)
+    return CfgMgr.LArRawChannelBuilderAlg(name, **kwargs)
diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderAlg.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderAlg.cxx
index 160477479e1a90028b12f5b9dd3f5963a9468904..6ab73f642d4093b263850027a95853fc5e340f3c 100644
--- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderAlg.cxx
+++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArROD/LArRawChannelBuilderAlg.h" 
@@ -61,6 +61,8 @@ StatusCode LArRawChannelBuilderAlg::execute_r(const EventContext& ctx) const {
     const HWIdentifier id=digit->hardwareID();
     const bool connected=(*cabling)->isOnlineConnected(id);
 
+    ATH_MSG_VERBOSE("Working on channel " << m_onlineId->channel_name(id));
+
     const std::vector<short>& samples=digit->samples();
     const size_t nSamples=samples.size();
     const int gain=digit->gain();
@@ -69,7 +71,6 @@ StatusCode LArRawChannelBuilderAlg::execute_r(const EventContext& ctx) const {
 
     //The following autos will resolve either into vectors or vector-proxies
     const auto& ofca=ofcs->OFC_a(id,gain);
-    const auto& ofcb=ofcs->OFC_b(id,gain);
     const auto& adc2mev=adc2MeVs->ADC2MEV(id,gain);
     
     //Sanity check on input conditions data:
@@ -95,44 +96,66 @@ StatusCode LArRawChannelBuilderAlg::execute_r(const EventContext& ctx) const {
     }
 
 
-    //Apply OFCs to get amplitude and time
+    //Apply OFCs to get amplitude
     float A=0;
-    float At=0;
     bool saturated=false;
     for (size_t i=0;i<nSamples;++i) {
       A+=(samples[i]-p)*ofca[i];
-      At+=(samples[i]-p)*ofcb[i];
       if (samples[i]==4096 || samples[i]==0) saturated=true;
     }
     
-    const float tau=(std::fabs(A)>1.0) ? At/A : 0.0;
-    
     //Apply Ramp
     const float E=adc2mev[0]+A*adc2mev[1];
     
     uint16_t iquaShort=0;
+    float tau=0;
+
 
     uint16_t prov=0xa5; //Means all constants from DB
     if (saturated) prov|=0x0400;
 
-    if (std::fabs(E)>m_eCutForQ) {
+    if (std::fabs(E)>m_eCutFortQ) {
+      ATH_MSG_VERBOSE("Channel " << m_onlineId->channel_name(id) << " gain " << gain << " above theshold for tQ computation");
       prov|=0x2000;
+
+      //Get time by applying OFC-b coefficients:
+      const auto& ofcb=ofcs->OFC_b(id,gain);
+      float At=0;
+      for (size_t i=0;i<nSamples;++i) {
+	At+=(samples[i]-p)*ofcb[i];
+      }
+      //Divide A*t/A to get time
+      tau=(std::fabs(A)>0.1) ? At/A : 0.0;
+      const auto& fullShape=shapes->Shape(id,gain);
+      
       //Get Q-factor
-      const auto& shape=shapes->Shape(id,gain);
-      if (ATH_UNLIKELY(shape.size()!=nSamples)) {
+      size_t firstSample=m_firstSample;
+      // fixing HEC to move +1 in case of 4 samples and firstSample 0 (copied from old LArRawChannelBuilder)
+      if (fullShape.size()>nSamples && nSamples==4 && m_firstSample==0) {
+	if (m_onlineId->isHECchannel(id)) {
+	  firstSample=1;
+	}
+      }
+
+      if (ATH_UNLIKELY(fullShape.size()<nSamples+firstSample)) {
+	if (!connected) continue; //No conditions for disconnected channel, who cares?
 	ATH_MSG_ERROR("No valid shape for channel " <<  m_onlineId->channel_name(id) 
 		      << " gain " << gain);
 	return StatusCode::FAILURE;
       }
 
+      const float* shape=&*fullShape.begin()+firstSample;
+
       float q=0;
       if (m_useShapeDer) {
-	const auto& shapeDer=shapes->ShapeDer(id,gain);
-	if (ATH_UNLIKELY(shapeDer.size()!=nSamples)) {
+	const auto& fullshapeDer=shapes->ShapeDer(id,gain);
+	if (ATH_UNLIKELY(fullshapeDer.size()<nSamples+firstSample)) {
 	  ATH_MSG_ERROR("No valid shape derivative for channel " <<  m_onlineId->channel_name(id) 
 			<< " gain " << gain);
 	  return StatusCode::FAILURE;
 	}
+
+	const float* shapeDer=&*fullshapeDer.begin()+firstSample;
 	for (size_t i=0;i<nSamples;++i) {
 	  q += std::pow((A*(shape[i]-tau*shapeDer[i])-(samples[i]-p)),2);
 	}
@@ -144,23 +167,18 @@ StatusCode LArRawChannelBuilderAlg::execute_r(const EventContext& ctx) const {
 	}
       }
 
-
-
       int iqua = static_cast<int>(q);
       if (iqua > 0xFFFF) iqua=0xFFFF;
       iquaShort = static_cast<uint16_t>(iqua & 0xFFFF);
-    }
-   
 
-    const float timeOffset = ofcs->timeOffset(id,gain);
-    
-    const float time=(tau-timeOffset)*(Gaudi::Units::nanosecond/
-				       Gaudi::Units::picosecond); //Convert time to ps
+      tau-=ofcs->timeOffset(id,gain);
+      tau*=(Gaudi::Units::nanosecond/Gaudi::Units::picosecond); //Convert time to ps
+    }//end if above cut
 
+   
     outputContainer->emplace_back(id,static_cast<int>(std::floor(E+0.5)),
-				  static_cast<int>(std::floor(time+0.5)),
+				  static_cast<int>(std::floor(tau+0.5)),
 				  iquaShort,prov,(CaloGain::CaloGain)gain);
-
   }
   return StatusCode::SUCCESS;
 }
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArADC2MeV.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArADC2MeV.h
index bbab2e5757dd52157da2b2ec7df0b35241ce39ab..6236728fb50088d837a4fe050ca2cb7fe4886edb 100644
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArADC2MeV.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArADC2MeV.h
@@ -31,6 +31,9 @@ class LArADC2MeV {
     return m_adc2MeV[gain][h];
   }
 
+  const std::vector<float>& ADC2MEV(const IdentifierHash& hid, int gain) const {
+    return m_adc2MeV[gain][hid];
+  }
 
   const std::vector<float>& ADC2MEV(const Identifier& offid, int gain) const {
     const HWIdentifier hwid=m_cabling->createSignalChannelID(offid);
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArAutoCorrMC.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArAutoCorrMC.h
index b831edf2101e93146554037833c6f25485dd3343..3d664022019d172964f37d97fb87b01cac121f9e 100755
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArAutoCorrMC.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArAutoCorrMC.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 //Dear emacs, this is -*-c++-*-
@@ -42,13 +42,12 @@ class LArAutoCorrMC: public LArAutoCorrComplete {
  protected:
 
   // helper for MC z-phi symmetry 
-  //  LArMCSym m_larmc;
   ToolHandle<ILArMCSymTool> m_larmcsym;
 
 
 };
 
-
+#include "AthenaKernel/CondCont.h"
 CLASS_DEF( LArAutoCorrMC, 217258659,1)
-SG_BASE(LArAutoCorrMC, LArAutoCorrComplete);
+CONDCONT_DEF(LArAutoCorrMC ,139308879 , ILArAutoCorr );
 #endif 
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArAutoCorrTotal.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArAutoCorrTotal.h
new file mode 100644
index 0000000000000000000000000000000000000000..46b055c0f5d37ce66c8262195d1255c82e0abe91
--- /dev/null
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArAutoCorrTotal.h
@@ -0,0 +1,78 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARRAWCONDITIONS_LARAUTOCORRTOTAL
+#define LARRAWCONDITIONS_LARAUTOCORRTOTAL
+
+#include "CaloIdentifier/CaloGain.h"
+#include "LArIdentifier/LArOnlineID_Base.h"
+#include "LArCabling/LArOnOffIdMapping.h"
+#include "Identifier/HWIdentifier.h"
+#include "Identifier/IdentifierHash.h"
+
+#include <vector>
+#include <array>
+
+class LArOnlineID_Base;
+
+class LArAutoCorrTotal {
+
+public:
+  LArAutoCorrTotal() = delete;
+  LArAutoCorrTotal(const LArOnlineID_Base *onlineID, const LArOnOffIdMapping *cabling, const size_t nGains);
+  ~LArAutoCorrTotal();
+
+  // FIXME: Tool implementation indexes float vector by an unsigned int id32
+  // derived from HWIdentifier
+  // here, IdentifierHash is used, which is certainly indexed from 0. This makes
+  // it possible to be used
+  // as the index for vecAutoCorrTotal.
+  // is id32 indexed from 0? if id32 is used, we may need to change the data
+  // structure.
+  // and modify the accessors.
+
+  bool set(const IdentifierHash &hid, const int gain,
+           std::vector<float> &autocorrtotal);
+
+  const std::vector<double> computeAutoCorr(const std::vector<float> terms,
+                                            float Nminbias) const;
+
+  const std::vector<double> autoCorrTotal(const IdentifierHash &hid, int gain,
+                                          float Nminbias) const;
+  const std::vector<double> autoCorrTotal(const HWIdentifier &hwid, int gain,
+                                          float Nminbias) const;
+  const std::vector<double> autoCorrTotal(const Identifier &offid, int gain,
+                                          float Nminbias) const;
+
+  const std::vector<double> computeRMS(const std::vector<float> terms,
+                                       float Nminbias) const;
+
+  const std::vector<double> samplRMS(const IdentifierHash &hid, int gain,
+                                     float Nminbias) const;
+  const std::vector<double> samplRMS(const HWIdentifier &hwid, int gain,
+                                     float Nminbias) const;
+  const std::vector<double> samplRMS(const Identifier &offid, int gain,
+                                     float Nminbias) const;
+
+private:
+  // dimensions n x m
+  // n: number of IDs
+  // m: number of possible non-trivial N(N-1)/2 terms of the autocorr matrix
+  typedef std::vector<std::vector<float> > vecAutoCorrTotal;
+
+  // dimensions k x (n x m)
+  // k: 3 (value of enum LARNGAIN)
+  std::array<vecAutoCorrTotal, CaloGain::LARNGAIN> m_AutoCorrTotal;
+
+  const LArOnlineID_Base *m_onlineID;
+  const LArOnOffIdMapping* m_cabling;
+  const size_t m_nGains;
+};
+
+#include "AthenaKernel/CLASS_DEF.h"
+CLASS_DEF(LArAutoCorrTotal, 204702932, 1)
+#include "AthenaKernel/CondCont.h"
+CONDCONT_DEF(LArAutoCorrTotal, 194641932);
+
+#endif
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasAverageMC.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasAverageMC.h
index 1da8ec3a6741b8215060bd8ee14ebb767abe19b0..be02402e29f9a7b47976476eff1378df8e1e6748 100755
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasAverageMC.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasAverageMC.h
@@ -44,6 +44,8 @@ class LArMinBiasAverageMC: public LArMinBiasAverageComplete {
 
 };
 
-
+#include "AthenaKernel/CondCont.h"
 CLASS_DEF( LArMinBiasAverageMC, 255615918, 1)
+CONDCONT_DEF( LArMinBiasAverageMC,157938128 , ILArMinBiasAverage );
+
 #endif 
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArMphysOverMcalMC.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArMphysOverMcalMC.h
index a14d63c22eccd474e01c6ef384e4fb81f358f449..398fbb76d7a0a10c06aac13cc99e693c36da241b 100755
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArMphysOverMcalMC.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArMphysOverMcalMC.h
@@ -46,6 +46,8 @@ class LArMphysOverMcalMC: public LArMphysOverMcalComplete {
   ToolHandle<ILArMCSymTool> m_larmcsym;
 
 };
-
+//ConditionsContainer clid for athenaMT
+#include "AthenaKernel/CondCont.h"
 CLASS_DEF( LArMphysOverMcalMC, 135003373,1)
+CONDCONT_DEF(LArMphysOverMcalMC,46372179,ILArMphysOverMcal);
 #endif 
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArOFC.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArOFC.h
new file mode 100644
index 0000000000000000000000000000000000000000..55ba49a148d64d44396ebc9a18f22fb3c4094e87
--- /dev/null
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArOFC.h
@@ -0,0 +1,75 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARRAWCONDITIONS_LAROFC
+#define LARRAWCONDITIONS_LAROFC
+
+#include "CaloIdentifier/CaloGain.h"
+#include "LArIdentifier/LArOnlineID_Base.h"
+#include "LArCabling/LArOnOffIdMapping.h"
+#include "Identifier/HWIdentifier.h"
+#include "Identifier/IdentifierHash.h"
+
+#include "LArElecCalib/ILArOFC.h"
+
+#include <vector>
+#include <array>
+
+class LArOFC : public ILArOFC {
+
+    public:
+        LArOFC(const LArOnlineID_Base* onlineID,
+               const LArOnOffIdMapping* cabling,
+	           const size_t nGains);
+
+        virtual ~LArOFC();
+
+        bool setOFC(const IdentifierHash& hid, const int gain, std::pair<std::vector<float>,std::vector<float>> ofcab);
+
+        virtual ILArOFC::OFCRef_t OFC_a(const HWIdentifier& id,
+                                        int gain,
+                                        int tbin=0) const;
+
+        virtual ILArOFC::OFCRef_t OFC_b(const HWIdentifier& id,
+                                        int gain,
+                                        int tbin=0) const;
+
+        virtual ILArOFC::OFCRef_t OFC_a(const Identifier& id,
+                                        int gain,
+                                        int tbin=0) const;
+        virtual ILArOFC::OFCRef_t OFC_b(const Identifier& id,
+                                        int gain,
+                                        int tbin=0) const;
+        //FIXME: is used, for data
+        virtual float timeOffset(const HWIdentifier& id, int gain) const;
+        virtual float timeOffset(const Identifier&  CellID, int gain) const;
+        virtual unsigned nTimeBins(const HWIdentifier& id, int gain) const;
+        virtual unsigned nTimeBins(const Identifier&  CellID, int gain) const;
+        virtual float timeBinWidth(const HWIdentifier& id, int gain) const;
+        virtual float timeBinWidth(const Identifier&  CellID, int gain) const;
+
+    private:
+        // dimensions n x m
+        // n: number of IDs
+        // m: number of OFCs
+        typedef std::vector<std::vector<float> > vecOFCa;
+        typedef std::vector<std::vector<float> > vecOFCb;
+
+        // dimensions k x (n x m)
+        // k: 3 (value of enum LARNGAIN)
+        std::array<vecOFCa, CaloGain::LARNGAIN> m_OFCa;
+        std::array<vecOFCa, CaloGain::LARNGAIN> m_OFCb;
+
+        const LArOnlineID_Base* m_onlineID;
+        const LArOnOffIdMapping* m_cabling;
+        const size_t m_nGains;
+
+};
+
+#include "AthenaKernel/CLASS_DEF.h"
+CLASS_DEF( LArOFC, 71011311, 1)
+#include "AthenaKernel/CondCont.h"
+CONDCONT_DEF (LArOFC, 50867161, ILArOFC);
+
+#endif
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArPedestalMC.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArPedestalMC.h
index 1843ef91b656320a696f17477fbbc8c0f98bdf6c..ea680b02b796ec5d27e2128efcc091c1bc5fb3c8 100755
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArPedestalMC.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArPedestalMC.h
@@ -51,5 +51,8 @@ class LArPedestalMC: public ILArPedestal {
   std::vector<float> m_vPedestal, m_vPedestalRMS;
 };
 
+#include "AthenaKernel/CondCont.h"
 CLASS_DEF( LArPedestalMC, 27770770,1)
+CONDCONT_DEF(LArPedestalMC,251521960, ILArPedestal);
+
 #endif 
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArRampMC.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArRampMC.h
index 363bcaffc7069ced7a26cd5f95ace0cb9bd2083a..550127482de9c5560fa4c54fe5423027b001ebe3 100755
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArRampMC.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArRampMC.h
@@ -51,6 +51,6 @@ class LArRampMC: public LArRampComplete {
 //ConditionsContainer clid for athenaMT
 #include "AthenaKernel/CondCont.h"
 CLASS_DEF( LArRampMC, 42062668,1)
-CONDCONT_DEF(  LArRampMC, 104173262 );
+CONDCONT_DEF(  LArRampMC, 104173262, ILArRamp );
 
 #endif 
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArShape32MC.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArShape32MC.h
index c07bd2fdb1efc76addddd429ac016beb62d4255e..45ae16d12faa6fed4cbbb4355f1440469f4598fb 100755
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArShape32MC.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArShape32MC.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef LARRAWCONDITIONS_LARSHAPE32MC_H
@@ -61,7 +61,9 @@ class LArShape32MC: public ILArShape,
 
 };
 
-
+#include "AthenaKernel/CondCont.h"
 CLASS_DEF( LArShape32MC,107446859,1)
-SG_BASE(LArShape32MC, ILArShape);
+CONDCONT_DEF(LArShape32MC, 27292873, ILArShape);
+
+
 #endif 
diff --git a/LArCalorimeter/LArRawConditions/src/LArAutoCorrTotal.cxx b/LArCalorimeter/LArRawConditions/src/LArAutoCorrTotal.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..6cb7b666f39ca0c9b4175e65a85ee0d1c2eb43ec
--- /dev/null
+++ b/LArCalorimeter/LArRawConditions/src/LArAutoCorrTotal.cxx
@@ -0,0 +1,104 @@
+#include "LArRawConditions/LArAutoCorrTotal.h"
+#include "LArIdentifier/LArOnlineID_Base.h"
+
+#include <cassert>
+
+LArAutoCorrTotal::LArAutoCorrTotal(const LArOnlineID_Base *onlineID, const LArOnOffIdMapping *cabling,
+                                   const size_t nGains)
+    : m_onlineID(onlineID), m_cabling(cabling), m_nGains(nGains) {
+
+  assert(m_onlineID);
+  assert(CaloGain::LARNGAIN <= 3 && nGains > 0);
+
+  for (size_t i = 0; i < nGains; ++i) {
+    m_AutoCorrTotal[i].resize(onlineID->channelHashMax());
+  }
+}
+
+LArAutoCorrTotal::~LArAutoCorrTotal() {}
+
+bool LArAutoCorrTotal::set(const IdentifierHash &hid, const int gain,
+                           std::vector<float> &autocorrtotal) {
+  if (gain >= CaloGain::LARNGAIN || hid >= m_AutoCorrTotal[gain].size()) {
+    return false;
+  }
+
+  m_AutoCorrTotal[gain][hid].swap(autocorrtotal);
+  return true;
+}
+
+// *** compute AutoCorrTotal (nsamples-1 coeffs) for a given cell ***
+const std::vector<double>
+LArAutoCorrTotal::computeAutoCorr(const std::vector<float> terms,
+                                  float Nminbias) const {
+
+  std::vector<double> vResult;
+  int tsize = int(sqrt(terms.size()));
+  int nsize_tot = (tsize - 1) * (tsize) / 2;
+  for (int i1 = 0; i1 < tsize - 1; i1++) {
+    for (int i2 = i1 + 1; i2 < tsize; i2++) {
+
+      int index = i1 * tsize - i1 * (i1 + 1) / 2 + i2 - (i1 + 1);
+
+      vResult.push_back((terms[index] + Nminbias * terms[nsize_tot + index]) /
+                        sqrt((1. + Nminbias * terms[2 * nsize_tot + i1]) *
+                             (1. + Nminbias * terms[2 * nsize_tot + i2])));
+    }
+  }
+  return (vResult);
+}
+
+// *** retrieve AutoCorrTotal (nsamples*(nsamples-1)/2 coeffs) for a given cell
+// ***
+const std::vector<double>
+LArAutoCorrTotal::autoCorrTotal(const IdentifierHash &hid, int gain,
+                                float Nminbias) const {
+    //FIXME we should check if the vector<float> of index "hid" exists before trying to compute it!
+    //but we already have resized the vector<vector<float>> to size channelHashMax in the ctor
+    
+  return (this->computeAutoCorr(m_AutoCorrTotal[gain][hid], Nminbias));
+}
+
+const std::vector<double> LArAutoCorrTotal::autoCorrTotal(const HWIdentifier &hwid, int gain, float Nminbias) const {
+    const IdentifierHash hid = m_onlineID->channel_Hash(hwid);
+    return this->autoCorrTotal(hid, gain, Nminbias);
+}
+
+const std::vector<double> LArAutoCorrTotal::autoCorrTotal(const Identifier &offid, int gain, float Nminbias) const {
+   const Identifier hwid = m_cabling->createSignalChannelID(offid); 
+   return this->autoCorrTotal(hwid, gain, Nminbias);
+}
+
+const std::vector<double>
+LArAutoCorrTotal::computeRMS(const std::vector<float> terms,
+                             float Nminbias) const {
+
+  std::vector<double> vResult;
+  int tsize = int(sqrt(terms.size()));
+  vResult.reserve(tsize);
+  int nsize_tot = (tsize - 1) * (tsize) / 2;
+  for (int i = 0; i < tsize; i++) {
+    vResult.push_back(sqrt(1. + Nminbias * terms[2 * nsize_tot + i]));
+  }
+  return (vResult);
+}
+
+const std::vector<double> LArAutoCorrTotal::samplRMS(const IdentifierHash &hid,
+                                                     int gain,
+                                                     float Nminbias) const {
+  return (this->computeRMS(m_AutoCorrTotal[gain][hid], Nminbias));
+}
+
+const std::vector<double> LArAutoCorrTotal::samplRMS(const HWIdentifier &hwid,
+                                                     int gain,
+                                                     float Nminbias) const {
+    const IdentifierHash hid = m_onlineID->channel_Hash(hwid);
+    return this->samplRMS(hid, gain, Nminbias);
+}
+
+const std::vector<double> LArAutoCorrTotal::samplRMS(const Identifier &offid,
+                                                     int gain,
+                                                     float Nminbias) const {
+  const Identifier hwid = m_cabling->createSignalChannelID(offid); 
+  return this->samplRMS(hwid, gain, Nminbias);
+}
diff --git a/LArCalorimeter/LArRawConditions/src/LArOFC.cxx b/LArCalorimeter/LArRawConditions/src/LArOFC.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..81e46c0ba4016cf85f9a23f63f8933978f16615f
--- /dev/null
+++ b/LArCalorimeter/LArRawConditions/src/LArOFC.cxx
@@ -0,0 +1,71 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArRawConditions/LArOFC.h"
+#include "LArIdentifier/LArOnlineID_Base.h"
+
+#include <cassert>
+
+LArOFC::LArOFC(const LArOnlineID_Base* onlineID, const LArOnOffIdMapping* cabling, const size_t nGains) :
+  m_onlineID(onlineID),
+  m_cabling(cabling),
+  m_nGains(nGains) {
+
+  assert(m_onlineID); 
+  assert(nGains<=CaloGain::LARNGAIN && nGains>0);
+
+  for (size_t i=0;i<nGains;++i) {
+    m_OFCa[i].resize(onlineID->channelHashMax());
+    m_OFCb[i].resize(onlineID->channelHashMax());
+  }
+
+}
+
+LArOFC::~LArOFC() {}
+
+bool LArOFC::setOFC(const IdentifierHash& hid, const int gain, std::pair<std::vector<float>,std::vector<float>> ofcab) {
+    if (gain >= CaloGain::LARNGAIN || hid >= m_OFCa[gain].size()) return false;
+    m_OFCa[gain][hid].swap(ofcab.first);
+    m_OFCb[gain][hid].swap(ofcab.second);
+    return true;
+}
+
+ILArOFC::OFCRef_t LArOFC::OFC_a(const HWIdentifier &hwid, int gain, int) const {
+    const IdentifierHash hid = m_onlineID->channel_Hash(hwid);
+    return m_OFCa[gain][hid];
+}
+
+ILArOFC::OFCRef_t LArOFC::OFC_a(const Identifier &id, int gain, int) const {
+    const Identifier hwid = m_cabling->createSignalChannelID(id);
+    return this->OFC_a(hwid, gain);
+}
+
+ILArOFC::OFCRef_t LArOFC::OFC_b(const HWIdentifier &hwid, int gain, int) const {
+    const IdentifierHash hid = m_onlineID->channel_Hash(hwid);
+    return m_OFCb[gain][hid];
+}
+
+ILArOFC::OFCRef_t LArOFC::OFC_b(const Identifier &id, int gain, int) const {
+    const Identifier hwid = m_cabling->createSignalChannelID(id);
+    return this->OFC_b(hwid, gain);
+}
+
+float LArOFC::timeOffset(const HWIdentifier&, int) const {
+    return 0;
+}
+float LArOFC::timeOffset(const Identifier&, int) const {
+    return 0;
+}
+unsigned LArOFC::nTimeBins(const HWIdentifier&, int) const {
+    return 1;
+}
+unsigned LArOFC::nTimeBins(const Identifier&, int) const {
+    return 1;
+}
+float LArOFC::timeBinWidth(const HWIdentifier&, int) const {
+    return 1;
+}
+float LArOFC::timeBinWidth(const Identifier&, int) const {
+    return 1;
+}
diff --git a/LArCalorimeter/LArRawUtils/CMakeLists.txt b/LArCalorimeter/LArRawUtils/CMakeLists.txt
index 6c50362e9210db794ebafff993864b00cc355252..5c672622a834872fc4b386260ccefa636dba2f13 100644
--- a/LArCalorimeter/LArRawUtils/CMakeLists.txt
+++ b/LArCalorimeter/LArRawUtils/CMakeLists.txt
@@ -16,8 +16,8 @@ atlas_depends_on_subdirs( PUBLIC
                           GaudiKernel
                           LArCalorimeter/LArIdentifier
                           LArCalorimeter/LArRawEvent
-                          PRIVATE
                           Calorimeter/CaloTriggerTool
+                          PRIVATE
                           DetectorDescription/AtlasDetDescr
                           LArCalorimeter/LArCabling )
 
diff --git a/LArCalorimeter/LArRecEvent/LArRecEvent/LArNoisyROSummary.h b/LArCalorimeter/LArRecEvent/LArRecEvent/LArNoisyROSummary.h
index 8936a4b15caee3ece8e0282655352febdd2bcbb4..46247e380a128b8b3a9a7784f4ef3e9347ce5d3b 100644
--- a/LArCalorimeter/LArRecEvent/LArRecEvent/LArNoisyROSummary.h
+++ b/LArCalorimeter/LArRecEvent/LArRecEvent/LArNoisyROSummary.h
@@ -52,6 +52,12 @@ class LArNoisyROSummary
   //** add an MNB Tight FEB to the bad FEB list */
   void add_MNBTight_feb(HWIdentifier febid);
 
+  //** Set the list of MNB Tight_PsVeto FEBs via the FEB HWIdentifiers */
+  void set_MNBTight_PsVeto_febs(const std::vector<HWIdentifier>& );
+
+  //** add an MNB Tight_PsVeto FEB to the bad FEB list */
+  void add_MNBTight_PsVeto_feb(HWIdentifier febid);
+
   //** Set the list of MNB Tight FEBs via the FEB HWIdentifiers */
   void set_MNBLoose_febs(const std::vector<HWIdentifier>& );
 
@@ -65,6 +71,7 @@ class LArNoisyROSummary
   void add_noisy_preamp(HWIdentifier febid, int channel);
 
 
+
   //** set Partition bit pattern for bad FEB flagging **//
   void SetBadFEBFlaggedPartitions(uint8_t bitpattern) { m_BadFEBFlaggedPartitions = bitpattern;}
 
@@ -84,8 +91,7 @@ class LArNoisyROSummary
   void SetMNBLooseFlaggedPartitions(uint8_t bitpattern) { m_MNBLooseFlaggedPartitions=bitpattern; }
 
   //** Set Partition bit pattern for mini-noise-burst flagging (tight_psveto) **/
-  void SetMNBTightFlaggedPartitions_PsVeto(uint8_t bitpattern) { m_MNBTightFlaggedPartitions_PsVeto=bitpattern; }
-
+  void SetMNBTight_PsVetoFlaggedPartitions(uint8_t bitpattern) { m_MNBTight_PsVetoFlaggedPartitions=bitpattern; }
 
   //** retrieve noisy FEBs by id */
   const std::vector<HWIdentifier>& get_noisy_febs() const;
@@ -93,6 +99,9 @@ class LArNoisyROSummary
   //** retrieve MNB Tight FEBs by id */
   const std::vector<HWIdentifier>& get_MNBTight_febs() const;
 
+  //** retrieve MNB Tight FEBs by id */
+  const std::vector<HWIdentifier>& get_MNBTight_PsVeto_febs() const;
+
   //** retrieve MNB Loose FEBs by id */
   const std::vector<HWIdentifier>& get_MNBLoose_febs() const;
 
@@ -118,7 +127,7 @@ class LArNoisyROSummary
   uint8_t MNBTightFlaggedPartitions() const {return m_MNBTightFlaggedPartitions;}
 
   //** Partition bit map for mini-noise-burst flagging (tight_psveto) **//
-  uint8_t MNBTightFlaggedPartitions_PsVeto() const {return m_MNBTightFlaggedPartitions_PsVeto;}
+  uint8_t MNBTight_PsVetoFlaggedPartitions() const {return m_MNBTight_PsVetoFlaggedPartitions;}
 
 
  private:
@@ -129,6 +138,9 @@ class LArNoisyROSummary
   //** List of MNB Tight FEBs */
   std::vector<HWIdentifier> m_MNBTight_febs;
 
+  //** List of MNB Tight FEBs */
+  std::vector<HWIdentifier> m_MNBTight_PsVeto_febs;
+
   //** List of MNB Loose FEBs */
   std::vector<HWIdentifier> m_MNBLoose_febs;
 
@@ -143,7 +155,7 @@ class LArNoisyROSummary
   //** Flags for Mini-noise-bursts */
   uint8_t m_MNBLooseFlaggedPartitions;
   uint8_t m_MNBTightFlaggedPartitions;
-  uint8_t m_MNBTightFlaggedPartitions_PsVeto;
+  uint8_t m_MNBTight_PsVetoFlaggedPartitions;
 
 };
 
diff --git a/LArCalorimeter/LArRecEvent/src/LArNoisyROSummary.cxx b/LArCalorimeter/LArRecEvent/src/LArNoisyROSummary.cxx
index 5a74183cbb5ad4560f4cda10247647ad61c5d341..01186904a84f2ba1bf8920831319d16bcf1c4bad 100644
--- a/LArCalorimeter/LArRecEvent/src/LArNoisyROSummary.cxx
+++ b/LArCalorimeter/LArRecEvent/src/LArNoisyROSummary.cxx
@@ -12,7 +12,7 @@ LArNoisyROSummary::LArNoisyROSummary():
   m_SatTightFlaggedPartitions(0),
   m_MNBLooseFlaggedPartitions(0),
   m_MNBTightFlaggedPartitions(0),
-  m_MNBTightFlaggedPartitions_PsVeto(0)
+   m_MNBTight_PsVetoFlaggedPartitions(0)
 {
 }
 
@@ -32,7 +32,7 @@ void LArNoisyROSummary::clear()
   m_SatTightFlaggedPartitions = 0;
   m_MNBLooseFlaggedPartitions = 0;
   m_MNBTightFlaggedPartitions = 0;
-  m_MNBTightFlaggedPartitions_PsVeto = 0;
+  m_MNBTight_PsVetoFlaggedPartitions = 0;
 }
 
 
@@ -57,6 +57,16 @@ void LArNoisyROSummary::add_MNBTight_feb(HWIdentifier febid)
      m_MNBTight_febs.push_back(febid);
 }
 
+void LArNoisyROSummary::set_MNBTight_PsVeto_febs(const std::vector<HWIdentifier>& badfebs)
+{
+     m_MNBTight_PsVeto_febs = badfebs;
+}
+
+void LArNoisyROSummary::add_MNBTight_PsVeto_feb(HWIdentifier febid)
+{
+     m_MNBTight_PsVeto_febs.push_back(febid);
+}
+
 void LArNoisyROSummary::set_MNBLoose_febs(const std::vector<HWIdentifier>& badfebs)
 {
      m_MNBLoose_febs = badfebs;
@@ -105,6 +115,11 @@ const std::vector<HWIdentifier>& LArNoisyROSummary::get_MNBTight_febs() const
      return m_MNBTight_febs;
 }
 
+const std::vector<HWIdentifier>& LArNoisyROSummary::get_MNBTight_PsVeto_febs() const
+{
+     return m_MNBTight_PsVeto_febs;
+}
+
 const std::vector<HWIdentifier>& LArNoisyROSummary::get_MNBLoose_febs() const
 {
      return m_MNBLoose_febs;
diff --git a/LArCalorimeter/LArRecUtils/CMakeLists.txt b/LArCalorimeter/LArRecUtils/CMakeLists.txt
index 5e11ebc443f6de0d5632899d89e48e73e73bc109..03853bd5174f3583c3b91b4d48c2f813e6084a90 100644
--- a/LArCalorimeter/LArRecUtils/CMakeLists.txt
+++ b/LArCalorimeter/LArRecUtils/CMakeLists.txt
@@ -38,6 +38,7 @@ atlas_depends_on_subdirs( PUBLIC
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
+find_package( Eigen )
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 
 # Component(s) in the package:
@@ -45,21 +46,21 @@ atlas_add_library( LArRecUtilsLib
                    src/*.cxx
                    PUBLIC_HEADERS LArRecUtils
                    INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CORAL_LIBRARIES} CaloEvent CaloIdentifier AthenaBaseComps AthenaKernel AthAllocators AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArRecEvent CaloDetDescrLib CaloUtilsLib StoreGateLib SGtests LArCablingLib LArRawUtilsLib LArRecConditions
-                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} TestTools CaloGeoHelpers SGTools xAODEventInfo LArCOOLConditions PathResolver )
+                   LINK_LIBRARIES ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} CaloEvent CaloIdentifier AthenaBaseComps AthenaKernel AthAllocators AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArRecEvent CaloDetDescrLib CaloUtilsLib StoreGateLib SGtests LArCablingLib LArRawUtilsLib LArRecConditions
+                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} TestTools CaloGeoHelpers SGTools xAODEventInfo LArCOOLConditions PathResolver )
 
 atlas_add_component( LArRecUtils
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} CaloDetDescrLib CaloEvent CaloIdentifier CaloUtilsLib AthenaBaseComps AthenaKernel AthAllocators StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArCablingLib LArIdentifier LArRawConditions LArRawEvent LArRecEvent TestTools CaloGeoHelpers SGTools xAODEventInfo LArCOOLConditions LArRawUtilsLib PathResolver LArRecUtilsLib LArRecConditions)
+                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} CaloDetDescrLib CaloEvent CaloIdentifier CaloUtilsLib AthenaBaseComps AthenaKernel AthAllocators StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArCablingLib LArIdentifier LArRawConditions LArRawEvent LArRecEvent TestTools CaloGeoHelpers SGTools xAODEventInfo LArCOOLConditions LArRawUtilsLib PathResolver LArRecUtilsLib LArRecConditions)
 
 atlas_add_test( dummy_test
                 SOURCES
                 test/dummy_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} CaloDetDescrLib CaloEvent CaloIdentifier CaloUtilsLib AthenaBaseComps AthenaKernel AthAllocators StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArCablingLib LArIdentifier LArRawConditions LArRawEvent LArRecEvent TestTools CaloGeoHelpers SGTools xAODEventInfo LArCOOLConditions LArRawUtilsLib PathResolver LArRecUtilsLib )
+                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
+                LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} CaloDetDescrLib CaloEvent CaloIdentifier CaloUtilsLib AthenaBaseComps AthenaKernel AthAllocators StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArCablingLib LArIdentifier LArRawConditions LArRawEvent LArRecEvent TestTools CaloGeoHelpers SGTools xAODEventInfo LArCOOLConditions LArRawUtilsLib PathResolver LArRecUtilsLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/LArCalorimeter/LArRecUtils/python/LArADC2MeVCondAlgDefault.py b/LArCalorimeter/LArRecUtils/python/LArADC2MeVCondAlgDefault.py
index 667f88318ca7cc581eafa53eadeb9116385a9b8c..fe409e34df6f904ea951eed671cf99d2e8983933 100644
--- a/LArCalorimeter/LArRecUtils/python/LArADC2MeVCondAlgDefault.py
+++ b/LArCalorimeter/LArRecUtils/python/LArADC2MeVCondAlgDefault.py
@@ -1,5 +1,12 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
 from AthenaCommon.Include import Include, IncludeError, include
-include("LArConditionsCommon/LArConditionsCommon_comm_jobOptions.py")
+from IOVDbSvc.CondDB import conddb
+
+if conddb.isMC:
+    include("LArConditionsCommon/LArConditionsCommon_MC_jobOptions.py")
+else:
+    include("LArConditionsCommon/LArConditionsCommon_comm_jobOptions.py")
 
 from LArRecUtils.LArRecUtilsConf import LArADC2MeVCondAlg 
 from AthenaCommon.AlgSequence import AthSequencer
@@ -15,8 +22,19 @@ def LArADC2MeVCondAlgDefault():
         return getattr(condSeq,"LArADC2MeVCondAlg")
 
     theADC2MeVCondAlg=LArADC2MeVCondAlg()
-    
-    from LArRecUtils.LArFEBConfigReaderDefault import LArFEBConfigReaderDefault
-    theADC2MeVCondAlg.FebConfigReader=LArFEBConfigReaderDefault()
+ 
+    if conddb.isMC:
+        from LArConditionsCommon.LArCondFlags import larCondFlags 
+        if not larCondFlags.hasMphys():
+            theADC2MeVCondAlg.LArMphysOverMcalKey="" #No MphysOVerMcal
+
+        if not larCondFlags.hasHVCorr():
+            theADC2MeVCondAlg.LArHVScaleCorrKey=""
+        theADC2MeVCondAlg.UseFEBGainTresholds=False
+    else: # not MC:
+        from LArRecUtils.LArFEBConfigReaderDefault import LArFEBConfigReaderDefault
+        theADC2MeVCondAlg.FebConfigReader=LArFEBConfigReaderDefault()
+
+
     condSeq+=theADC2MeVCondAlg
     return theADC2MeVCondAlg
diff --git a/LArCalorimeter/LArRecUtils/python/LArAutoCorrTotalCondAlgDefault.py b/LArCalorimeter/LArRecUtils/python/LArAutoCorrTotalCondAlgDefault.py
new file mode 100644
index 0000000000000000000000000000000000000000..ba1db56529143472d905bf4878346ffd60c0ff44
--- /dev/null
+++ b/LArCalorimeter/LArRecUtils/python/LArAutoCorrTotalCondAlgDefault.py
@@ -0,0 +1,28 @@
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+
+from AthenaCommon.Include import Include, IncludeError, include
+
+include("LArConditionsCommon/LArConditionsCommon_MC_jobOptions.py")
+
+
+
+from LArRecUtils.LArRecUtilsConf import LArAutoCorrTotalCondAlg 
+from AthenaCommon.AlgSequence import AthSequencer
+from LArCabling.LArCablingAccess import LArOnOffIdMapping
+condSeq = AthSequencer("AthCondSeq")
+
+
+def LArAutoCorrTotalCondAlgDefault():
+
+    LArOnOffIdMapping()
+    condSeq = AthSequencer("AthCondSeq")
+    if hasattr (condSeq,"LArAutoCorrTotalCondAlg"):
+        return getattr(condSeq,"LArAutoCorrTotalCondAlg")
+
+    theAutoCorrTotalCondAlg=LArAutoCorrTotalCondAlg()
+
+    from LArROD.LArRODFlags import larRODFlags
+    theAutoCorrTotalCondAlg.Nsamples = larRODFlags.nSamples()
+ 
+    condSeq+=theAutoCorrTotalCondAlg
+    return theAutoCorrTotalCondAlg
diff --git a/LArCalorimeter/LArRecUtils/python/LArOFCCondAlgDefault.py b/LArCalorimeter/LArRecUtils/python/LArOFCCondAlgDefault.py
new file mode 100644
index 0000000000000000000000000000000000000000..4b985dd352048caead12ad904ee44164def2baad
--- /dev/null
+++ b/LArCalorimeter/LArRecUtils/python/LArOFCCondAlgDefault.py
@@ -0,0 +1,61 @@
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+
+from AthenaCommon.Include import Include, IncludeError, include
+
+include("LArConditionsCommon/LArConditionsCommon_MC_jobOptions.py")
+from AthenaCommon.Logging import logging
+from LArRecUtils.LArRecUtilsConf import LArOFCCondAlg 
+from AthenaCommon.AlgSequence import AthSequencer
+from LArCabling.LArCablingAccess import LArOnOffIdMapping
+condSeq = AthSequencer("AthCondSeq")
+
+
+def LArOFCCondAlgDefault():
+
+    mlog = logging.getLogger('LArOFCCondAlg')
+    LArOnOffIdMapping()
+    condSeq = AthSequencer("AthCondSeq")
+    if hasattr (condSeq,"LArOFCCondAlg"):
+        return getattr(condSeq,"LArOFCCondAlg")
+
+    theOFCCondAlg=LArOFCCondAlg()
+    #theOFCCondAlg.MCSym = True
+    theOFCCondAlg.isMC  = True
+    from LArROD.LArRODFlags import larRODFlags
+
+    theOFCCondAlg.firstSample = larRODFlags.firstSample()
+    theOFCCondAlg.useHighestGainAutoCorr = larRODFlags.useHighestGainAutoCorr()
+      
+    if larRODFlags.doOFCMixedOptimization(): # kept for backward compatibility
+        theOFCCondAlg.UseDelta = 1 # only EMECIW/HEC/FCAL
+        from AthenaCommon.BeamFlags import jobproperties
+        theOFCCondAlg.DeltaBunch = int(jobproperties.Beam.bunchSpacing()/( 25.*ns)+0.5)
+        mlog.info("  OFC *MIXED* optimization")
+    else:
+        theOFCCondAlg.UseDelta = larRODFlags.UseDelta()
+        
+        if ( larRODFlags.UseDelta() == 0 ):
+            mlog.info("  Standard OFC optimization computation")
+
+        elif ( larRODFlags.UseDelta() == 1 ):
+            mlog.info("  OFC optimization asking for no average shift as extra constraint only in EMECIW/HEC/FCAL")
+            from AthenaCommon.BeamFlags import jobproperties
+            theOFCCondAlg.DeltaBunch = int(jobproperties.Beam.bunchSpacing()/( 25.*ns)+0.5)
+
+        elif ( larRODFlags.UseDelta() == 2 ):
+            mlog.info("  OFC optimization asking for no average shift as extra constraint everywhere")
+            from AthenaCommon.BeamFlags import jobproperties
+            theOFCCondAlg.DeltaBunch = int(jobproperties.Beam.bunchSpacing()/( 25.*ns)+0.5)
+
+        elif ( larRODFlags.UseDelta() == 3 ):
+            mlog.info("  OFC optimization asking for no average shift as extra constraint only in EMECIW/HEC/FCAL1+high eta FCAL2-3")
+            from AthenaCommon.BeamFlags import jobproperties
+            theOFCCondAlg.DeltaBunch = int(jobproperties.Beam.bunchSpacing()/( 25.*ns)+0.5)
+            
+        else:
+            theOFCCondAlg.UseDelta = 0 ### avoid unforseed options
+
+        pass
+    
+    condSeq+=theOFCCondAlg
+    return theOFCCondAlg
diff --git a/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.cxx
index 9299c40f58e02babae05bb039d6d885befa99e21..114ed041f49bb2c1e9cb653d941c343932452227 100644
--- a/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.cxx
+++ b/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.cxx
@@ -46,7 +46,7 @@ LArADC2MeVCondAlg::LArADC2MeVCondAlg(const std::string& name, ISvcLocator* pSvcL
   declareProperty("LArADC2MeVKey",m_ADC2MeVKey,"SG key of the resulting LArADC2MeV object");
   declareProperty("isSuperCell",m_isSuperCell,"switch to true to use the SuperCell Identfier helper");
   declareProperty("FebConfigReader",m_febCfgReader);
-
+  declareProperty("UseFEBGainTresholds",m_useFEBGainThresholds=true);
 }
 
 LArADC2MeVCondAlg::~LArADC2MeVCondAlg() {}
@@ -91,9 +91,11 @@ StatusCode LArADC2MeVCondAlg::initialize() {
     return StatusCode::FAILURE;
   }
 
-
-  ATH_CHECK(m_febCfgReader.retrieve());
-
+  if (m_useFEBGainThresholds) {
+    ATH_CHECK(m_febCfgReader.retrieve());
+  } else {
+    m_febCfgReader.disable();
+  }
   return StatusCode::SUCCESS;
 }
 
@@ -277,7 +279,7 @@ StatusCode LArADC2MeVCondAlg::execute() {
 	}
 
 	//Determine if the intercept is to be used:
-	if (igain==0 || (igain==1 && m_febCfgReader->lowerGainThreshold(chid)<5)) { 
+	if (igain==0 || (igain==1 && m_useFEBGainThresholds && m_febCfgReader->lowerGainThreshold(chid)<5)) { 
 	  //Don't use ramp intercept in high gain and in medium gain if the no high gain is used
 	  //(eg lowerGainThreshold is ~zero)
 	  ADC2MeV.push_back(0.);
diff --git a/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.h b/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.h
index 6a8a5c6808b68333cf56539b467959c592a9b433..2ad45971f321c7fa33c7dfa6890a02a9a56cee55 100644
--- a/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.h
+++ b/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.h
@@ -55,6 +55,7 @@ class LArADC2MeVCondAlg: public AthAlgorithm {
   //Its stored in 18 COOL folders, so waiting for ReadCondHandleArray for migrating to a cond-algo
   ToolHandle<ILArFEBConfigReader> m_febCfgReader;
 
+  bool m_useFEBGainThresholds;
   size_t m_nGains;
   bool m_isSuperCell;
 
diff --git a/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalCondAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalCondAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..9a35358bb17cabcb6152b44f09f3e01222537c7d
--- /dev/null
+++ b/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalCondAlg.cxx
@@ -0,0 +1,415 @@
+/*
+   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArAutoCorrTotalCondAlg.h"
+
+#include "LArElecCalib/LArConditionsException.h"
+
+#include "LArIdentifier/LArOnlineID.h"
+#include "LArIdentifier/LArOnline_SuperCellID.h"
+
+#include "GaudiKernel/EventIDRange.h"
+
+//#include <cmath>
+
+LArAutoCorrTotalCondAlg::LArAutoCorrTotalCondAlg(const std::string &name,
+                                                 ISvcLocator *pSvcLocator)
+    : ::AthAlgorithm(name, pSvcLocator),
+      m_LArADC2MeVObjKey("LArADC2MeV"),
+      m_LArOnOffIdMappingObjKey("LArOnOffIdMap"),
+      m_LArShapeObjKey("LArShape"),
+      m_LArAutoCorrObjKey("LArAutoCorr"),
+      m_LArNoiseObjKey("LArNoise"),
+      m_LArPedestalObjKey("LArPedestal"),
+      m_LArfSamplObjKey("LArfSampl"),
+      m_LArMinBiasObjKey("LArMinBias"),
+      m_LArAutoCorrTotalObjKey("LArAutoCorrTotal"),
+      m_condSvc("CondSvc", name), m_Nminbias(0), m_NoPile(false), m_isMC(true),
+      m_isSuperCell(false), m_useMixedOFCOpt(false), m_Nsamples(5),
+      m_firstSample(0), m_deltaBunch(1) {
+  declareProperty("LArADC2MeVObjKey", m_LArADC2MeVObjKey,
+                  "Key to read LArADC2MeV object");
+  declareProperty("LArOnOffIdMappingObjKey", m_LArOnOffIdMappingObjKey,
+                  "Key to read LArOnOffIdMapping object");
+  declareProperty("LArShapeObjKey", m_LArShapeObjKey,
+                  "Key to read LArShape object");
+  declareProperty("LArAutoCorrObjKey", m_LArAutoCorrObjKey,
+                  "Key to read LArAutoCorr object");
+  declareProperty("LArNoiseObjKey", m_LArNoiseObjKey,
+                  "Key to read LArNoise object");
+  declareProperty("LArPedestalObjKey", m_LArPedestalObjKey,
+                  "Key to read LArPedestal object");
+  declareProperty("LArfSamplObjKey", m_LArfSamplObjKey,
+                  "Key to read LArfSampl object");
+  declareProperty("LArMinBiasObjKey", m_LArMinBiasObjKey,
+                  "Key to read LArMinBias object");
+  declareProperty("LArAutoCorrTotalObjKey", m_LArAutoCorrTotalObjKey,
+                  "Key to write LArAutoCorrTotal object");
+  declareProperty("Nminbias", m_Nminbias);
+  declareProperty("NoPile", m_NoPile);
+  declareProperty("isMC", m_isMC);
+  declareProperty("isSuperCell", m_isSuperCell);
+  declareProperty("UseMixedOFCOpt", m_useMixedOFCOpt);
+  declareProperty("Nsamples", m_Nsamples, "Max number of samples to use");
+  declareProperty(
+      "firstSample", m_firstSample,
+      "First sample to use for in-time event on the full pulse shape");
+  declareProperty("deltaBunch", m_deltaBunch,
+                  "Delta between filled bunches in 25 ns units");
+}
+
+LArAutoCorrTotalCondAlg::~LArAutoCorrTotalCondAlg() {}
+
+StatusCode LArAutoCorrTotalCondAlg::initialize() {
+  ATH_MSG_DEBUG("initialize " << name());
+
+  // CondSvc
+  ATH_CHECK(m_condSvc.retrieve());
+
+  // ReadCondHandle initialization
+  ATH_CHECK(m_LArShapeObjKey.initialize());
+  ATH_CHECK(m_LArAutoCorrObjKey.initialize());
+  ATH_CHECK(m_LArOnOffIdMappingObjKey.initialize());
+  ATH_CHECK( m_LArADC2MeVObjKey.initialize());
+
+  ATH_CHECK(m_LArAutoCorrTotalObjKey.initialize());
+
+  m_NoPile = false;
+  if (m_Nminbias <= 0)
+    m_NoPile = true;
+
+  if (!m_NoPile) {
+    if (m_isMC) {
+      ATH_CHECK(m_LArNoiseObjKey.initialize());
+    } else {
+      ATH_CHECK(m_LArPedestalObjKey.initialize());
+    }
+    ATH_CHECK(m_LArfSamplObjKey.initialize());
+    ATH_CHECK(m_LArMinBiasObjKey.initialize());
+  }
+
+  // WriteCondHandle initialization
+  if (m_condSvc->regHandle(this, m_LArAutoCorrTotalObjKey).isFailure()) {
+    ATH_MSG_ERROR("Unable to register WriteCondHandle "
+                  << m_LArAutoCorrTotalObjKey.fullKey() << " with CondSvc");
+    return StatusCode::FAILURE;
+  }
+
+  // Number of gains (does this have to be in initialize now b/c of AthenaMT?)
+  // Copied from LArADC2MeVCondAlg.cxx
+  if (m_isSuperCell) {
+    m_nGains = 1;
+    // ATH_CHECK(m_larSCOnlineIDKey.initialize());
+  } else {
+    m_nGains = 3;
+    // ATH_CHECK(m_larOnlineIDKey.initialize());
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode LArAutoCorrTotalCondAlg::execute() {
+
+  // WriteHandle setup
+  SG::WriteCondHandle<LArAutoCorrTotal> writeHandle(m_LArAutoCorrTotalObjKey);
+  // So the following should not be called usually?!
+  if (writeHandle.isValid()) {
+    ATH_MSG_DEBUG(
+        "CondHandle "
+        << writeHandle.fullKey() << " is already valid.");
+    return StatusCode::SUCCESS;
+  }
+
+  // Identifier helper
+  // Copied from LArADC2MeVCondAlg.cxx
+  // need to understand casting dynamics here
+  const LArOnlineID_Base *larOnlineID = nullptr;
+  if (m_isSuperCell) {
+    // SG::ReadCondHandle<LArOnline_SuperCellID>
+    // larOnlineHdl{m_larSCOnlineIDKey}
+    const LArOnline_SuperCellID *scidhelper;
+    ATH_CHECK(detStore()->retrieve(scidhelper, "LArOnline_SuperCellID"));
+    larOnlineID = scidhelper; // cast to base-class
+  } else {                    // regular cells
+    // SG::ReadCondHandle<LArOnlineID> larOnlineHdl{m_larOnlineIDKey};
+    const LArOnlineID *idhelper;
+    ATH_CHECK(detStore()->retrieve(idhelper, "LArOnlineID"));
+    larOnlineID = idhelper; // cast to base-class
+  }
+  // Mapping helper
+  const LArOnOffIdMapping *larOnOffIdMapping = nullptr;
+  SG::ReadCondHandle<LArOnOffIdMapping> larOnOffIdMappingHdl{
+    m_LArOnOffIdMappingObjKey
+  };
+  larOnOffIdMapping = *larOnOffIdMappingHdl;
+  if (larOnOffIdMapping == nullptr) {
+    ATH_MSG_ERROR("Failed to retrieve LArOnOffIdMapping object");
+  }
+
+  // Get pointers to inputs
+  // Retrieve validity ranges and determine their intersection
+  // //FIXME use new style of intersection checking, see twiki
+  EventIDRange rangeShape, rangeAutoCorr;
+
+  SG::ReadCondHandle<ILArShape> ShapeHdl{ m_LArShapeObjKey };
+  // FIXME: should check if handle is properly created and/or check if handle is
+  // properly retrieved
+  // operator star of a ReadCondHandle returns a const pointer to type T
+  const ILArShape *larShape{ *ShapeHdl };
+  if (!ShapeHdl.range(rangeShape)) {
+    ATH_MSG_ERROR("Failed to retrieve validity range for " << ShapeHdl.key());
+  }
+
+  SG::ReadCondHandle<ILArAutoCorr> AutoCorrHdl{ m_LArAutoCorrObjKey };
+  const ILArAutoCorr *larAutoCorr{ *AutoCorrHdl };
+  if (!AutoCorrHdl.range(rangeAutoCorr)) {
+    ATH_MSG_ERROR("Failed to retrieve validity range for "
+                  << AutoCorrHdl.key());
+  }
+
+  SG::ReadCondHandle<LArADC2MeV> ADC2MeVHdl{ m_LArADC2MeVObjKey };
+  const LArADC2MeV *larADC2MeV = nullptr;
+  larADC2MeV = *ADC2MeVHdl;
+  if (larADC2MeV == nullptr) {
+    ATH_MSG_ERROR("Failed to retrieve LArADC2MeV object");
+  }
+
+  // Determine intersection of the two required objects
+  EventIDRange rangeIntersection =
+      EventIDRange::intersect(rangeShape, rangeAutoCorr);
+  // if ( rangeIntersection.start() > rangeIntersection.stop() ) {
+  // ATH_MSG_ERROR( "Invalid intersection range: " << rangeIntersection);
+  // return StatusCode::FAILURE;
+  //}
+
+  // Consider the determinstic objects
+  // checking isMC and NoPile again seems very clumsy. How to check if key has
+  // already been initialized?
+  const ILArNoise *larNoise = nullptr;
+  const ILArPedestal *larPedestal = nullptr;
+  const ILArfSampl *larfSampl = nullptr;
+  const ILArMinBias *larMinBias = nullptr;
+
+  if (!m_NoPile) {
+    if (m_isMC) {
+      EventIDRange rangeNoise;
+      SG::ReadCondHandle<ILArNoise> NoiseHdl{ m_LArNoiseObjKey };
+      larNoise = *NoiseHdl;
+      if (!NoiseHdl.range(rangeNoise)) {
+        ATH_MSG_ERROR("Failed to retrieve validity range for "
+                      << NoiseHdl.key());
+      }
+      rangeIntersection.intersect(rangeIntersection, rangeNoise);
+    } else {
+      EventIDRange rangePedestal;
+      SG::ReadCondHandle<ILArPedestal> PedestalHdl{ m_LArPedestalObjKey };
+      larPedestal = *PedestalHdl;
+      if (!PedestalHdl.range(rangePedestal)) {
+        ATH_MSG_ERROR("Failed to retrieve validity range for "
+                      << PedestalHdl.key());
+      }
+      rangeIntersection.intersect(rangeIntersection, rangePedestal);
+    }
+
+    EventIDRange rangefSampl;
+    SG::ReadCondHandle<ILArfSampl> fSamplHdl{ m_LArfSamplObjKey };
+    larfSampl = *fSamplHdl;
+    if (!fSamplHdl.range(rangefSampl)) {
+      ATH_MSG_ERROR("Failed to retrieve validity range for "
+                    << fSamplHdl.key());
+    }
+    rangeIntersection.intersect(rangeIntersection, rangefSampl);
+
+    EventIDRange rangeMinBias;
+    SG::ReadCondHandle<ILArMinBias> MinBiasHdl{ m_LArMinBiasObjKey };
+    larMinBias = *MinBiasHdl;
+    if (!MinBiasHdl.range(rangeMinBias)) {
+      ATH_MSG_ERROR("Failed to retrieve validity range for "
+                    << MinBiasHdl.key());
+    }
+    rangeIntersection.intersect(rangeIntersection, rangeMinBias);
+  }
+
+  // Check sanity of final range
+  if (rangeIntersection.start() > rangeIntersection.stop()) {
+    ATH_MSG_ERROR("Invalid intersection range: " << rangeIntersection);
+    return StatusCode::FAILURE;
+  }
+
+  ATH_MSG_INFO("IOV found from intersection for AutoCorrTotal object: "
+               << rangeIntersection);
+
+  // make output object
+  // dimensions: number of gains x number of channel IDs x elements of
+  // AutoCorrTotal
+  std::unique_ptr<LArAutoCorrTotal> larAutoCorrTotal =
+      std::make_unique<LArAutoCorrTotal>(larOnlineID, larOnOffIdMapping, m_nGains);
+
+  std::vector<HWIdentifier>::const_iterator it = larOnlineID->channel_begin();
+  std::vector<HWIdentifier>::const_iterator it_e = larOnlineID->channel_end();
+  int count = 0;
+  int count2 = 0;
+
+  for (; it != it_e; ++it) {
+    count++;
+    const HWIdentifier chid = *it;
+    const IdentifierHash hid = larOnlineID->channel_Hash(chid);
+    // const unsigned int id32 = chid.get_identifier32().get_compact();
+
+    if (larOnOffIdMapping->isOnlineConnected(chid)) {
+        count2++;
+
+      if (m_useMixedOFCOpt) {
+        const bool isEMB = larOnlineID->isEMBchannel(chid);
+        const bool isEMECOW = larOnlineID->isEMECOW(chid);
+        if (isEMB || isEMECOW) {
+          ATH_MSG_DEBUG("No Pileup AutoCorr for ChID 0x" << MSG::hex << chid
+                                                         << MSG::dec);
+          m_NoPile = true;
+        } else {
+          ATH_MSG_DEBUG("Using Pileup AutoCorr for ChID 0x" << MSG::hex << chid
+                                                            << MSG::dec);
+          m_NoPile = false;
+        }
+      }
+
+      for (size_t igain = 0; igain < m_nGains; igain++) {
+        const ILArShape::ShapeRef_t Shape = larShape->Shape(chid, igain);
+        const int nsamples_shape = static_cast<int>(Shape.size());
+
+        const ILArAutoCorr::AutoCorrRef_t AC =
+            larAutoCorr->autoCorr(chid, igain);
+
+        int nsamples_AC_OFC = AC.size() + 1;
+
+        if (nsamples_AC_OFC > m_Nsamples) {
+          nsamples_AC_OFC = m_Nsamples;
+        }
+
+        // fix HEC first sample +1 if the firstSample is 0 and nsamples 4
+        unsigned int ihecshift = 0;
+        if (larOnlineID->isHECchannel(chid) && nsamples_AC_OFC == 4 &&
+            m_firstSample == 0) {
+          ihecshift = 1;
+          // ATH_MSG_DEBUG( "Using firstSample +1 for HEC ChID 0x" << MSG::hex
+          // << id << MSG::dec  );
+        }
+
+        //:::::::::::::::::::::::::::::::
+        // NB:
+        // nsamples_shape    = number of samples of the Shape function (e.g 32)
+        // nsamples_AC_OFC = size of AC matrix & OFC vector (e.g 5 in Atlas)
+        //:::::::::::::::::::::::::::::::
+        float fSigma2 = 0.;
+        if (!m_NoPile) {
+          float SigmaNoise;
+          if (m_isMC)
+            SigmaNoise = larNoise->noise(chid, igain);
+          else {
+            float RMSpedestal = larPedestal->pedestalRMS(chid, igain);
+            if (RMSpedestal > (1.0 + LArElecCalib::ERRORCODE))
+              SigmaNoise = RMSpedestal;
+            else
+              SigmaNoise = 0.; //(we will have the ERROR message below)
+          }
+          float fSampl = larfSampl->FSAMPL(chid);
+          float MinBiasRMS = larMinBias->minBiasRMS(chid);
+          if (fSampl != 0)
+            MinBiasRMS /= fSampl;
+          const std::vector<float> polynom_adc2mev =
+              larADC2MeV->ADC2MEV(hid, igain);
+          float Adc2MeV = 0.;
+          if (polynom_adc2mev.size() > 0) {
+            Adc2MeV = (polynom_adc2mev)[1];
+          }
+          if (SigmaNoise != 0 && Adc2MeV != 0)
+            fSigma2 = pow(MinBiasRMS / (SigmaNoise * Adc2MeV), 2);
+
+          if (fSampl == 0 || SigmaNoise == 0 || Adc2MeV == 0) {
+            if (m_isMC) {
+              ATH_MSG_ERROR(larOnlineID->show_to_string(
+                                larOnOffIdMapping->cnvToIdentifier(chid))
+                            << "fSampl (" << fSampl << "), SigmaNoise ("
+                            << SigmaNoise << ") or Adc2MeV (" << Adc2MeV
+                            << ") null "
+                            << "=> AutoCorrTotal = only AutoCorr elect. part ");
+            }
+            fSigma2 = 0.;
+          }
+          // warning: MinBiasRMS is in MeV (at the scale of the hits)
+          //         SigmaNoise is in ADC counts
+          //  so MinBiasRMS/fScale and SigmaNoise*Adc2MeV are the same scale
+          //  (MeV at the scale of the cells)
+        } // end if m_NoPile
+
+        // get in vTerms all the possible non trivial N(N-1)/2 terms of the
+        // autocorrelation matrix
+        int nsize_tot = (nsamples_AC_OFC - 1) * (nsamples_AC_OFC) / 2;
+
+        std::vector<float> vTerms;
+
+        vTerms.resize(2 * nsize_tot + nsamples_AC_OFC, 0.);
+        //:::::::::::::::::::::::::::::::
+
+        for (int j1 = 0; j1 < nsamples_AC_OFC - 1; j1++) {
+          for (int j2 = j1 + 1; j2 < nsamples_AC_OFC; j2++) {
+            int l = abs(j2 - j1) - 1;
+            int index =
+                j1 * nsamples_AC_OFC - j1 * (j1 + 1) / 2 + j2 - (j1 + 1);
+            vTerms[index] = AC[l];
+          }
+        }
+
+        // 2nd terms :
+        for (int j1 = 0; j1 < nsamples_AC_OFC - 1; ++j1) {
+          for (int j2 = j1 + 1; j2 < nsamples_AC_OFC; j2++) {
+            int index =
+                j1 * nsamples_AC_OFC - j1 * (j1 + 1) / 2 + j2 - (j1 + 1);
+            float Rij = 0;
+            for (int k = 0; k < nsamples_shape; ++k) {
+              if ((j2 - j1 + k) >= 0 && (j2 - j1 + k) < nsamples_shape) {
+                int ibunch = 0;
+                if ((j1 + m_firstSample + ihecshift - k) % m_deltaBunch == 0)
+                  ibunch = 1;
+                Rij += Shape[k] * Shape[j2 - j1 + k] * ibunch;
+              }
+            }
+            vTerms[nsize_tot + index] = fSigma2 * Rij;
+          }
+        }
+
+        // 3rd term : RMS of pileup per samples (multiplied by fSigma2)
+        for (int j1 = 0; j1 < nsamples_AC_OFC; j1++) {
+          float Rms2i = 0;
+          for (int k = 0; k < nsamples_shape; ++k) {
+            int ibunch = 0;
+            if ((j1 + m_firstSample + ihecshift - k) % m_deltaBunch == 0)
+              ibunch = 1;
+            Rms2i += pow(Shape[k], 2) * ibunch;
+          }
+          vTerms[2 * nsize_tot + j1] = fSigma2 * Rms2i;
+        }
+
+        // storage
+        larAutoCorrTotal->set(hid, igain, vTerms);
+
+      } //(loop on gains)
+
+    } else // unconnected
+      for (unsigned int igain = 0; igain < 3; igain++) {
+        unsigned nsize_tot = (m_Nsamples - 1) * (m_Nsamples) + m_Nsamples;
+        std::vector<float> empty(nsize_tot, 0.);
+        larAutoCorrTotal->set(hid, igain, empty);
+      }
+  }
+
+
+  ATH_CHECK(writeHandle.record(rangeIntersection,larAutoCorrTotal.release()));
+
+  ATH_MSG_INFO("LArAutoCorrTotal Ncell " << count);
+  // ATH_MSG_INFO( "LArAutoCorrTotal Nsymcell " << count2  );
+  ATH_MSG_DEBUG("end of loop over cells ");
+
+  return StatusCode::SUCCESS;
+}
diff --git a/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalCondAlg.h b/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalCondAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..29c767f87c25f18d61997fc2992bfac59968b868
--- /dev/null
+++ b/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalCondAlg.h
@@ -0,0 +1,64 @@
+/*
+   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARAUTOCORRTOTALCONDALG_H
+#define LARAUTOCORRTOTALCONDALG_H
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/WriteCondHandleKey.h"
+#include "GaudiKernel/ICondSvc.h"
+
+#include "LArRawConditions/LArADC2MeV.h"
+#include "LArRawConditions/LArAutoCorrTotal.h"
+
+#include "LArCabling/LArOnOffIdMapping.h"
+
+#include "LArElecCalib/ILArShape.h"
+#include "LArElecCalib/ILArAutoCorr.h"
+#include "LArElecCalib/ILArNoise.h"
+#include "LArElecCalib/ILArPedestal.h"
+#include "LArElecCalib/ILArfSampl.h"
+#include "LArElecCalib/ILArMinBias.h"
+
+class LArAutoCorrTotal;
+
+class LArAutoCorrTotalCondAlg : public AthAlgorithm {
+public:
+  LArAutoCorrTotalCondAlg(const std::string &name, ISvcLocator *pSvcLocator);
+  virtual ~LArAutoCorrTotalCondAlg() override;
+
+  virtual StatusCode initialize() override;
+  virtual StatusCode execute() override;
+
+private:
+
+  SG::ReadCondHandleKey<LArADC2MeV> m_LArADC2MeVObjKey;
+
+  SG::ReadCondHandleKey<LArOnOffIdMapping> m_LArOnOffIdMappingObjKey;
+
+  SG::ReadCondHandleKey<ILArShape> m_LArShapeObjKey;
+  SG::ReadCondHandleKey<ILArAutoCorr> m_LArAutoCorrObjKey;
+  SG::ReadCondHandleKey<ILArNoise> m_LArNoiseObjKey;
+  SG::ReadCondHandleKey<ILArPedestal> m_LArPedestalObjKey;
+  SG::ReadCondHandleKey<ILArfSampl> m_LArfSamplObjKey;
+  SG::ReadCondHandleKey<ILArMinBias> m_LArMinBiasObjKey;
+
+  SG::WriteCondHandleKey<LArAutoCorrTotal> m_LArAutoCorrTotalObjKey;
+
+  ServiceHandle<ICondSvc> m_condSvc;
+
+  float m_Nminbias;
+  bool m_NoPile;
+  bool m_isMC;
+  bool m_isSuperCell;
+  bool m_useMixedOFCOpt;
+  int m_Nsamples;
+  unsigned int m_firstSample;
+  int m_deltaBunch;
+
+  size_t m_nGains;
+};
+
+#endif
diff --git a/LArCalorimeter/LArRecUtils/src/LArOFCCondAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArOFCCondAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..1a4aa81cd3c14fd715f5a5dc203623705423b856
--- /dev/null
+++ b/LArCalorimeter/LArRecUtils/src/LArOFCCondAlg.cxx
@@ -0,0 +1,597 @@
+/*
+   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+   */
+
+#include <cmath>
+
+//FIXME
+//are these threadsafe?
+#include "CaloDetDescr/CaloDetDescrManager.h"
+#include "CaloDetDescr/CaloDetDescrElement.h"
+#include "CaloIdentifier/CaloCell_ID.h"
+
+#include <Eigen/Dense>
+
+#include "LArOFCCondAlg.h"
+
+#include "LArElecCalib/LArConditionsException.h"
+
+#include "LArIdentifier/LArOnlineID.h"
+#include "LArIdentifier/LArOnline_SuperCellID.h"
+
+#include "GaudiKernel/EventIDRange.h"
+
+LArOFCCondAlg::LArOFCCondAlg(const std::string &name,
+        ISvcLocator *pSvcLocator)
+    : ::AthAlgorithm(name, pSvcLocator),
+    m_LArOnOffIdMappingObjKey("LArOnOffIdMap"),
+    m_LArShapeObjKey("LArShape"),
+    m_LArNoiseObjKey("LArNoise"),
+    m_LArPedestalObjKey("LArPedestal"),
+    m_LArAutoCorrTotalObjKey("LArAutoCorrTotal"),
+    m_LArOFCObjKey("LArOFC"),
+    m_condSvc("CondSvc", name), m_Nminbias(0), m_isMC(true),
+    m_isSuperCell(false), m_firstSample(0), m_useDelta(0),
+    m_deltaBunch(1), m_useHighestGainAutoCorr(false), m_Dump(false) {
+        declareProperty("LArOnOffIdMappingObjKey", m_LArOnOffIdMappingObjKey,
+                "Key to read LArOnOffIdMapping object");
+        declareProperty("LArShapeObjKey", m_LArShapeObjKey,
+                "Key to read LArShape object");
+        declareProperty("LArNoiseObjKey", m_LArNoiseObjKey,
+                "Key to read LArNoise object");
+        declareProperty("LArPedestalObjKey", m_LArPedestalObjKey,
+                "Key to read LArPedestal object");
+        declareProperty("LArAutoCorrTotalObjKey", m_LArAutoCorrTotalObjKey,
+                "Key to read LArAutoCorrTotal object");
+        declareProperty("LArOFCObjKey", m_LArOFCObjKey,
+                "Key to write LArOFC object");
+        declareProperty("Nminbias", m_Nminbias);
+        declareProperty("isMC", m_isMC);
+        declareProperty("isSuperCell", m_isSuperCell);
+        declareProperty(
+                "firstSample", m_firstSample,
+                "First sample to use for in-time event on the full pulse shape");
+        declareProperty("UseDelta",
+                m_useDelta,
+                "0 = not use Delta, 1 = only EMECIW/HEC/FCAL, 2 = all , 3 = only EMECIW/HEC/FCAL1+high eta FCAL2-3");
+        declareProperty("deltaBunch", m_deltaBunch,
+                "Delta between filled bunches in 25 ns units");
+        declareProperty("useHighestGainAutoCorr",m_useHighestGainAutoCorr);
+        declareProperty("DumpOFCCondAlg",m_Dump);
+    }
+
+LArOFCCondAlg::~LArOFCCondAlg() {}
+
+StatusCode LArOFCCondAlg::initialize() {
+    ATH_MSG_DEBUG("initialize " << name());
+
+    // CondSvc
+    ATH_CHECK(m_condSvc.retrieve());
+
+    // ReadCondHandle initialization
+    ATH_CHECK(m_LArShapeObjKey.initialize());
+
+    ATH_CHECK(m_LArAutoCorrTotalObjKey.initialize());
+    ATH_CHECK(m_LArOnOffIdMappingObjKey.initialize());
+
+    //WriteHandle initialization 
+    ATH_CHECK(m_LArOFCObjKey.initialize());
+
+    if (m_isMC) {
+        ATH_CHECK(m_LArNoiseObjKey.initialize());
+    } else {
+        ATH_CHECK(m_LArPedestalObjKey.initialize());
+    }
+
+    // WriteCondHandle initialization
+    if (m_condSvc->regHandle(this, m_LArOFCObjKey).isFailure()) {
+        ATH_MSG_ERROR("Unable to register WriteCondHandle "
+                << m_LArOFCObjKey.fullKey() << " with CondSvc");
+        return StatusCode::FAILURE;
+    }
+
+    // Number of gains (does this have to be in initialize now b/c of AthenaMT?)
+    // Copied from LArADC2MeVCondAlg.cxx
+    if (m_isSuperCell) {
+        m_nGains = 1;
+    } else {
+        m_nGains = 3;
+    }
+
+    return StatusCode::SUCCESS;
+}
+
+StatusCode LArOFCCondAlg::execute() {
+
+    // WriteHandle setup
+    SG::WriteCondHandle<LArOFC> writeHandle(m_LArOFCObjKey);
+    // So the following should not be called usually?!
+    if (writeHandle.isValid()) {
+        ATH_MSG_DEBUG(
+                "CondHandle "
+                << writeHandle.fullKey() << " is already valid.");
+        return StatusCode::SUCCESS;
+    }
+
+    // Identifier helper
+    // Copied from LArADC2MeVCondAlg.cxx
+    const LArOnlineID_Base *larOnlineID = nullptr;
+    if (m_isSuperCell) {
+        const LArOnline_SuperCellID *scidhelper;
+        ATH_CHECK(detStore()->retrieve(scidhelper, "LArOnline_SuperCellID"));
+        larOnlineID = scidhelper; // cast to base-class
+    } else {                    // regular cells
+        const LArOnlineID *idhelper;
+        ATH_CHECK(detStore()->retrieve(idhelper, "LArOnlineID"));
+        larOnlineID = idhelper; // cast to base-class
+    }
+
+    // retrieve CaloDetDescrManager only for m_delta=3
+    const CaloDetDescrManager_Base* caloDetDescrMan = nullptr;
+    if (m_useDelta == 3 ){
+        if ( m_isSuperCell ){
+            const CaloSuperCellDetDescrManager* cc;
+            ATH_CHECK(  detStore()->retrieve(cc) );
+            caloDetDescrMan = (const CaloDetDescrManager_Base*) cc;
+        }else{
+            const CaloDetDescrManager* cc;
+            ATH_CHECK(  detStore()->retrieve(cc) );
+            caloDetDescrMan = (const CaloDetDescrManager_Base*) cc;
+        }
+    }  
+
+
+    EventIDRange rangeMapping;
+    // Mapping helper
+    const LArOnOffIdMapping *larOnOffIdMapping = nullptr;
+    SG::ReadCondHandle<LArOnOffIdMapping> larOnOffIdMappingHdl{
+        m_LArOnOffIdMappingObjKey
+    };
+    larOnOffIdMapping = *larOnOffIdMappingHdl;
+    if (larOnOffIdMapping == nullptr) {
+        ATH_MSG_ERROR("Failed to retrieve LArOnOffIdMapping object");
+    } else if (!larOnOffIdMappingHdl.range(rangeMapping)) {
+        ATH_MSG_ERROR("Failed to retrieve validity range for LArOnOffIdMapping object with " <<  larOnOffIdMappingHdl.key());
+        return StatusCode::FAILURE;
+    }
+
+    // Get pointers to inputs
+    // Retrieve validity ranges and determine their intersection
+    EventIDRange rangeShape, rangeAutoCorrTotal;
+
+    SG::ReadCondHandle<ILArShape> ShapeHdl{ m_LArShapeObjKey };
+    // FIXME: should check if handle is properly created and/or check if handle is
+    // properly retrieved
+    // operator star of a ReadCondHandle returns a const pointer to type T
+    const ILArShape *larShape{ *ShapeHdl };
+    if (larShape == nullptr) {
+        ATH_MSG_ERROR("Failed to retrieve LArShape object");
+    } else if (!ShapeHdl.range(rangeShape)) {
+        ATH_MSG_ERROR("Failed to retrieve validity range for " << ShapeHdl.key());
+    }
+
+    SG::ReadCondHandle<LArAutoCorrTotal> AutoCorrTotalHdl{ m_LArAutoCorrTotalObjKey };
+    const LArAutoCorrTotal *larAutoCorrTotal = nullptr;
+    larAutoCorrTotal= *AutoCorrTotalHdl;
+    if (larAutoCorrTotal == nullptr) {
+        ATH_MSG_ERROR("Failed to retrieve LArADC2MeV object");
+    } else if (!AutoCorrTotalHdl.range(rangeAutoCorrTotal)) {
+        ATH_MSG_ERROR("Failed to retrieve validity range for " << AutoCorrTotalHdl.key());
+    }
+
+    // Determine intersection of the two required objects
+    EventIDRange rangeIntersection =
+        EventIDRange::intersect(rangeShape, rangeAutoCorrTotal);
+    // if ( rangeIntersection.start() > rangeIntersection.stop() ) {
+    // ATH_MSG_ERROR( "Invalid intersection range: " << rangeIntersection);
+    // return StatusCode::FAILURE;
+    //}
+
+    // Consider the determinstic objects
+    const ILArNoise *larNoise = nullptr;
+    const ILArPedestal *larPedestal = nullptr;
+
+    if (m_isMC) {
+        EventIDRange rangeNoise;
+        SG::ReadCondHandle<ILArNoise> NoiseHdl{ m_LArNoiseObjKey };
+        larNoise = *NoiseHdl;
+        if (larNoise == nullptr) {
+            ATH_MSG_ERROR("Failed to retrieve object LArNoise");
+        } else if (!NoiseHdl.range(rangeNoise)) {
+            ATH_MSG_ERROR("Failed to retrieve validity range for "
+                    << NoiseHdl.key());
+        }
+        rangeIntersection.intersect(rangeIntersection, rangeNoise);
+    } else {
+        EventIDRange rangePedestal;
+        SG::ReadCondHandle<ILArPedestal> PedestalHdl{ m_LArPedestalObjKey };
+        larPedestal = *PedestalHdl;
+        if (larPedestal == nullptr) {
+            ATH_MSG_ERROR("Failed to retrieve object LArPedestal");
+        } else if (!PedestalHdl.range(rangePedestal)) {
+            ATH_MSG_ERROR("Failed to retrieve validity range for "
+                    << PedestalHdl.key());
+        }
+        rangeIntersection.intersect(rangeIntersection, rangePedestal);
+    }
+
+    // Check sanity of final range
+    if (rangeIntersection.start() > rangeIntersection.stop()) {
+        ATH_MSG_ERROR("Invalid intersection range: " << rangeIntersection);
+        return StatusCode::FAILURE;
+    }
+
+    ATH_MSG_INFO("IOV found from intersection for AutoCorrTotal object: "
+            << rangeIntersection);
+
+    // make output object
+    // dimensions: number of gains x number of channel IDs x elements of
+    // OFC
+    std::unique_ptr<LArOFC> larOFC =
+        std::make_unique<LArOFC>(larOnlineID, larOnOffIdMapping, m_nGains);
+
+
+    ///////////////////////////////////////////////////
+    std::vector<HWIdentifier>::const_iterator it = larOnlineID->channel_begin();
+    std::vector<HWIdentifier>::const_iterator it_e = larOnlineID->channel_end();
+    int count = 0;
+    int count2 = 0;
+
+    for (; it != it_e; ++it) {
+        count++;
+        const HWIdentifier chid = *it;
+        const IdentifierHash hid = larOnlineID->channel_Hash(chid);
+
+        //if (!(larOnOffIdMapping->isOnlineConnected(chid))) continue;
+        if (larOnOffIdMapping->isOnlineConnected(chid)) {
+            count2++;
+            for (size_t igain = 0; igain < m_nGains; igain++) {
+
+                bool thisChan_useDelta = false;
+
+                std::vector<float> OFCa_tmp, OFCb_tmp;
+
+                if (m_useDelta==2) {
+                    thisChan_useDelta = true; 
+                }
+                else if (m_useDelta==1) { // only HEC/EMECIW/FCAL
+                    if (larOnlineID->isEMECIW(chid) || larOnlineID->isFCALchannel(chid) || larOnlineID->isHECchannel(chid)) {
+                        thisChan_useDelta = true; 
+                    }
+                }
+                else if (m_useDelta==3) { // only HEC/EMECIW/FCAL1 and high eta FCAL2-3 
+                    if (larOnlineID->isEMECIW(chid) ||  larOnlineID->isHECchannel(chid)) {
+                        thisChan_useDelta = true; 
+                    }
+                    else if (larOnlineID->isFCALchannel(chid) && caloDetDescrMan) {       
+                        Identifier ofl_id = larOnOffIdMapping->cnvToIdentifier(chid);
+                        const CaloDetDescrElement* dde = caloDetDescrMan->get_element(ofl_id);
+                        if (!dde) {
+                            ATH_MSG_ERROR( " dde = 0 , onl_id, ofl_id= "<< chid << " "<< ofl_id  );
+                            //return (m_OFCtmp);
+                        }
+                        CaloCell_ID::CaloSample sampling = dde->getSampling();
+                        float eta = dde->eta();
+                        if (sampling==CaloCell_ID::FCAL0){
+                            thisChan_useDelta = true;
+                        } else {
+                            if (fabs(eta)>4.0) {
+                                thisChan_useDelta = true;
+                            }
+                        }    
+                    }     
+                }
+
+                //:::::::::::::::::::::::::::::::
+                //retrieve the data
+                //:::::::::::::::::::::::::::::::
+                ILArShape::ShapeRef_t Shape = larShape->Shape(chid,igain);
+                unsigned int nsamples_shape = Shape.size();
+                ILArShape::ShapeRef_t ShapeDer = larShape->ShapeDer(chid,igain);
+                //:::::::::::::::::::::::::::::::
+
+                // get Noise autocorrelation for gain
+                int igain_autocorr=igain;
+                // to use only Autocorr fro highest gain in optimization: HEC/FCAL=> medium gain    EM=>high gain
+                if (m_useHighestGainAutoCorr) {
+                    if  (larOnlineID->isHECchannel(chid) || larOnlineID->isFCALchannel(chid) ) igain_autocorr=1;
+                    else igain_autocorr=0;
+                }
+
+                const std::vector<double> AutoCorr = 
+                    larAutoCorrTotal->autoCorrTotal(chid,igain_autocorr,m_Nminbias);
+                //unsigned int nsamples_AC_OFC=AutoCorr.size()+1;
+                unsigned int nsamples_AC_OFC = (1+((int)(sqrt(1+8*AutoCorr.size()))))/2;
+
+                const std::vector<double>& rmsSampl =
+                    larAutoCorrTotal->samplRMS(chid,igain_autocorr,m_Nminbias);
+                unsigned int nsamples2 = rmsSampl.size();
+                if (nsamples2 != nsamples_AC_OFC) {
+                    ATH_MSG_WARNING( " bad size for rmsSampl "  );
+                    //return (m_OFCtmp);  // return empty vector
+                }
+                //:::::::::::::::::::::::::::::::
+                //unsigned int iBeginOfNSamples=findTheNSamples(Shape,
+                //						    nsamples_AC_OFC,
+                //						    nsamples_shape); 
+                unsigned int firstSample = m_firstSample; 
+                if(larOnlineID->isHECchannel(chid) && m_firstSample == 0 && nsamples_AC_OFC==4){ 
+                    firstSample=1; 
+                } 
+                unsigned int iBeginOfNSamples = firstSample; 
+                if(nsamples_AC_OFC + iBeginOfNSamples > nsamples_shape) 
+                    iBeginOfNSamples=0;      
+                //:::::::::::::::::::::::::::::::
+
+                if(m_isMC) {
+                }
+                else          
+                {	 
+                    float RMSpedestal = larPedestal->pedestalRMS(chid,igain);
+                    if(RMSpedestal>= (1.0+LArElecCalib::ERRORCODE))
+                        ;
+                    else
+                    {
+                        ATH_MSG_WARNING(" PedestalRMS vector empty for "
+                                <<chid<<" at gain "<<igain );
+                    }	
+                }
+                //:::::::::::::::::::::::::::::::
+                //protection against missing data
+                //:::::::::::::::::::::::::::::::
+                if(Shape.size()==0 || ShapeDer.size()==0 || AutoCorr.size()==0)
+                {
+                    ATH_MSG_WARNING("Some data are missing -> OFC will be empty for "
+                            <<chid<<" at gain "<<igain );
+                    //return (m_OFCtmp);
+                    //returns an empty vector
+                }
+                //:::::::::::::::::::::::::::::::
+                unsigned int l,c,i; 
+                //:::::::::::::::::::::::::::::::
+                //calculations
+                //:::::::::::::::::::::::::::::::
+                // fill and inverrt AC matrix
+                //HepMatrix AC(nsamples_AC_OFC,nsamples_AC_OFC),
+                          //ACinv(nsamples_AC_OFC,nsamples_AC_OFC);    
+                Eigen::MatrixXf AC = Eigen::MatrixXf::Zero(nsamples_AC_OFC,nsamples_AC_OFC);
+                Eigen::MatrixXf ACinv = Eigen::MatrixXf::Zero(nsamples_AC_OFC,nsamples_AC_OFC);
+                for(l=0;l<nsamples_AC_OFC;++l) {  //  l=line c=column      	
+                    for(c=0;c<nsamples_AC_OFC;++c) {
+                        if (l==c) {
+                            AC(l,c)=1.;
+                        }
+                        else {
+                            int i1=std::min(l,c);
+                            int i2=std::max(l,c);
+                            int index = i1*nsamples_AC_OFC - i1*(i1+1)/2 -(i1+1) + i2;
+                            AC(l,c)=AutoCorr[index];
+                        }
+                        AC(l,c) = AC(l,c)*rmsSampl[l]*rmsSampl[c];
+                    }
+                }
+                ACinv=AC.inverse();
+                //:::::::::::::::::::::::::::::::           
+
+                if (!thisChan_useDelta) { // STANDARD CALCULATION
+
+                    float ACinv_PS[32];//ACinv_PS
+                    float ACinv_PSD[32]; //ACinv_PSD
+                    //Q1 Q2 Q3 DELTA
+                    float Q1=0.;
+                    float Q2=0.;
+                    float Q3=0.;
+
+                    for(l=0;l<nsamples_AC_OFC;++l)
+                    {
+                        ACinv_PS[l]=0.; ACinv_PSD[l]=0.;
+                        for(c=0;c<nsamples_AC_OFC;++c){
+                            ACinv_PS[l]+=ACinv(l,c)*Shape[c+iBeginOfNSamples];
+                            ACinv_PSD[l]+=ACinv(l,c)*ShapeDer[c+iBeginOfNSamples];
+                        }
+                        Q1+=Shape[l+iBeginOfNSamples]*ACinv_PS[l];
+                        Q2+=ShapeDer[l+iBeginOfNSamples]*ACinv_PSD[l];
+                        Q3+=ShapeDer[l+iBeginOfNSamples]*ACinv_PS[l];
+                    } 
+                    float DELTA=Q1*Q2-Q3*Q3;  
+                    //:::::::::::::::::::::::::::::::
+                    //OFCa  
+                    for(i=0;i<nsamples_AC_OFC;++i) 
+                        OFCa_tmp.push_back( (ACinv_PS[i]*Q2-ACinv_PSD[i]*Q3)/DELTA );
+                    //OFCb  
+                    for(i=0;i<nsamples_AC_OFC;++i) 
+                        OFCb_tmp.push_back( (ACinv_PS[i]*Q3-ACinv_PSD[i]*Q1)/DELTA ); 
+
+                    //for debugging only
+                    if(m_Dump)
+                    { 
+                        std::cout<<larOnlineID
+                            ->show_to_string(larOnOffIdMapping->cnvToIdentifier(chid))
+                            <<" gain="<<igain<<" Nminbias="<<m_Nminbias<<std::endl;
+                        std::cout<<"Shape: ";
+                        for(c=0;c<nsamples_shape;++c)
+                            std::cout<<Shape[c]<<" ";
+                        std::cout<<std::endl;
+                        std::cout<<"ShapeDer: ";
+                        for(c=0;c<nsamples_shape;++c)
+                            std::cout<<ShapeDer[c]<<" ";
+                        std::cout<<std::endl;
+                        for(c=0;c<nsamples_AC_OFC;++c)
+                            std::cout<<Shape[c+iBeginOfNSamples]<<" ";
+                        std::cout<<" <- "<<iBeginOfNSamples<<std::endl;
+                        for(i=0;i<nsamples_AC_OFC;++i) std::cout<<ACinv_PS[i]<<" ";
+                        std::cout<<std::endl;
+                        for(i=0;i<nsamples_AC_OFC;++i) std::cout<<ACinv_PSD[i]<<" ";
+                        std::cout<<std::endl;
+                        std::cout<<" Q1="<<Q1<<" Q2="<<Q2<<" Q3="<<Q3
+                            <<" DELTA="<<DELTA<<std::endl;
+                        std::cout << " OFCa: ";
+                        for(i=0;i<nsamples_AC_OFC;++i) 
+                            std::cout<<(ACinv_PS[i]*Q2-ACinv_PSD[i]*Q3)/DELTA<<" ";
+                        std::cout<<std::endl;
+                    }
+                } else { // OPTIMIZATION WRT NOISE AND PEDESTAL SHIFTS
+                    ATH_MSG_DEBUG( " Computing pulse averages for " 
+                            << chid << " at gain " << igain );
+
+                    std::vector<float> averages = getShapeAverages(nsamples_AC_OFC,m_deltaBunch,Shape.asVector(),firstSample);
+
+                    // Fill shape, derivative and delta vectors as HepVector
+                    //HepVector gResp(nsamples_AC_OFC);
+                    //HepVector gDerivResp(nsamples_AC_OFC);
+                    //HepVector gDelta(nsamples_AC_OFC);
+                    Eigen::VectorXf gResp = Eigen::VectorXf::Zero(nsamples_AC_OFC);
+                    Eigen::VectorXf gDerivResp = Eigen::VectorXf::Zero(nsamples_AC_OFC);
+                    Eigen::VectorXf gDelta = Eigen::VectorXf::Zero(nsamples_AC_OFC);
+                    for(c=0;c<nsamples_AC_OFC;++c){
+                        gResp(c)      = Shape[c+iBeginOfNSamples];
+                        gDerivResp(c) = ShapeDer[c+iBeginOfNSamples];
+                        gDelta(c)     = averages[c];
+                    }
+
+                    ATH_MSG_DEBUG( " Computing OFC optimized for noise and offsets for " 
+                            << chid << " at gain " << igain );
+
+                    //HepMatrix isol(3,3); 
+                    Eigen::Matrix3f isol = Eigen::Matrix3f::Zero(); 
+
+                    isol(0,0) = (gResp.transpose()*ACinv*gResp)(0);
+                    isol(0,1) = (gResp.transpose()*ACinv*gDerivResp)(0);
+                    isol(0,2) = (gResp.transpose()*ACinv*gDelta)(0);
+
+                    isol(1,0) = (gDerivResp.transpose()*ACinv*gResp)(0);
+                    isol(1,1) = (gDerivResp.transpose()*ACinv*gDerivResp)(0);
+                    isol(1,2) = (gDerivResp.transpose()*ACinv*gDelta)(0);
+
+                    isol(2,0) = (gDelta.transpose()*ACinv*gResp)(0);
+                    isol(2,1) = (gDelta.transpose()*ACinv*gDerivResp)(0);
+                    isol(2,2) = (gDelta.transpose()*ACinv*gDelta)(0);
+
+                    //int ifail;
+                    //HepMatrix isolInv = isol.inverse(ifail);
+                    Eigen::Matrix3f isolInv = isol.inverse();
+                    //if(ifail != 0) {
+                    // do something 
+                    //} 
+
+                    //for debugging only
+                    if(m_Dump)
+                    {
+                        std::cout<<larOnlineID
+                            ->show_to_string(larOnOffIdMapping->cnvToIdentifier(chid))
+                            <<" gain="<<igain<<" Nminbias="<<m_Nminbias<<std::endl;
+                        std::cout<<"Shape: ";
+                        for(c=0;c<nsamples_shape;++c)
+                            std::cout<<Shape[c]<<" ";
+                        std::cout<<std::endl;
+                        std::cout<<"ShapeDer: ";
+                        for(c=0;c<nsamples_shape;++c)
+                            std::cout<<ShapeDer[c]<<" ";
+                        std::cout<<std::endl;
+                        std::cout << " Shape for the n samples ";
+                        for(c=0;c<nsamples_AC_OFC;++c)
+                            std::cout<<Shape[c+iBeginOfNSamples]<<" ";
+                        std::cout<<" <- "<<iBeginOfNSamples<<std::endl;
+                        std::cout << " averages: ";
+                        for(i=0;i<nsamples_AC_OFC;++i)
+                            std::cout<<averages[i]<< " ";
+                        std::cout<<std::endl;
+                    }
+
+
+                    // OFCa 
+                    {
+                        //HepVector Amp(3); 
+                        Eigen::Vector3f Amp = Eigen::Vector3f::Zero(); 
+                        //HepVector Ktemp(3);
+                        Eigen::Vector3f Ktemp = Eigen::Vector3f::Zero();
+                        Ktemp(0) = 1.;
+                        Ktemp(1) = 0.;
+                        Ktemp(2) = 0.;
+                        Amp = isolInv*Ktemp;
+                        //HepVector OFCa_vec(nsamples_AC_OFC);
+                        Eigen::VectorXf OFCa_vec = Eigen::VectorXf::Zero(nsamples_AC_OFC);
+                        OFCa_vec = Amp(0)*ACinv*gResp + Amp(1)*ACinv*gDerivResp + Amp(2)*ACinv * gDelta;
+                        for(i=0;i<nsamples_AC_OFC;++i) {
+                            OFCa_tmp.push_back( OFCa_vec(i) );
+                        }
+                        if (m_Dump) {
+                            std::cout << "OFCa: ";
+                            for(i=0;i<nsamples_AC_OFC;++i) std::cout << OFCa_vec(i) << " ";
+                            std::cout << std::endl;
+                        }
+                    }
+
+                    // OFCb
+                    {
+                        //HepVector Atau(3);
+                        Eigen::Vector3f Atau = Eigen::Vector3f::Zero();
+                        //HepVector Ktemp(3);
+                        Eigen::Vector3f Ktemp = Eigen::Vector3f::Zero();
+                        Ktemp(0) = 0.; 
+                        Ktemp(1) = -1.;
+                        Ktemp(2) = 0.;
+                        Atau = isolInv*Ktemp;
+                        //HepVector OFCb_vec(nsamples_AC_OFC);
+                        Eigen::VectorXf OFCb_vec = Eigen::VectorXf::Zero(nsamples_AC_OFC);
+                        OFCb_vec = Atau(0)*ACinv*gResp + Atau(1)*ACinv*gDerivResp + Atau(2)*ACinv * gDelta  ;
+                        for(i=0;i<nsamples_AC_OFC;++i) 
+                            OFCb_tmp.push_back( OFCb_vec(i) );
+                    }
+                } // finish optimization wrt pedestal and noise
+                bool stat = larOFC->setOFC(hid, igain, std::make_pair(OFCa_tmp, OFCb_tmp));
+            	if (!stat) {
+	                msg(MSG::ERROR) << "LArOFC::setOFC fails for gain " << igain << ", hash " << hid << endmsg;
+                }
+	     } // end loop over gains
+        } else { // end loop over connected channels -- now, set empty for disc. chnanels
+            for (unsigned igain=0;igain<m_nGains;++igain) {
+                std::vector<float> empty;
+                bool stat = larOFC->setOFC(hid,igain, std::make_pair(empty, empty));
+            	if (!stat) {
+	                msg(MSG::ERROR) << "LArOFC::setOFC fails for gain " << igain << ", hash " << hid << endmsg;
+                }
+            } // end loop over gains of disconnected channels
+        } // end loop over disconnected channels
+
+    } // end loop over all channels
+
+
+    ATH_CHECK(writeHandle.record(rangeIntersection,larOFC.release()));
+    ATH_MSG_INFO("Wrote LArOFC obj to CondStore");
+    return StatusCode::SUCCESS;
+}
+
+std::vector<float> LArOFCCondAlg::getShapeAverages( const unsigned n_samples, 
+						 const unsigned n_deltaBunch, // in unit of 25 ns
+						 const std::vector<float>& shape, unsigned int firstSample ) const
+{
+  std::vector<float> averages(n_samples);
+  for (unsigned int i=0;i<n_samples;++i) {
+    float sumShape = 0.;
+    for (unsigned int j=0;j<shape.size();++j) {
+      int k=i-j+firstSample;
+      if (k%n_deltaBunch == 0 ) sumShape += shape[j];
+    }
+    averages[i] = sumShape;
+  }
+  return averages;
+}
+
+unsigned int LArOFCCondAlg::findTheNSamples(ILArShape::ShapeRef_t Shape,
+					 unsigned int nsamples_AC_OFC,
+					 unsigned int nsamples_shape) const
+{
+  unsigned int  i_ShapeMax=0;
+  double ShapeMax=0;
+  for(unsigned int i=0;i<nsamples_shape;++i)
+  {
+    double value=Shape[i];
+    if(value>ShapeMax) { ShapeMax=value; i_ShapeMax=i; }
+    else if(value<0 && i>3) break;//after the peak  
+  }
+  
+  unsigned int tmp=int(nsamples_AC_OFC/2.);
+  if(tmp>i_ShapeMax) return 0;
+  else               return i_ShapeMax-tmp;
+}
diff --git a/LArCalorimeter/LArRecUtils/src/LArOFCCondAlg.h b/LArCalorimeter/LArRecUtils/src/LArOFCCondAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..a7518cbc968cc603a8adcaef5c73b1c4d6271768
--- /dev/null
+++ b/LArCalorimeter/LArRecUtils/src/LArOFCCondAlg.h
@@ -0,0 +1,84 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+  /**
+   * (copied from LArOFCTool.h)
+   * AlgoTool to compute OFC on fly
+   *
+
+ - OFC are computed consistently with autocorrelation 
+   (by default (NMinBias=-1), these OFC are retrieved)
+
+ - possibility to retrieve OFC for a wanted luminosity (set by NMinBias, 
+   the number of minimum bias events per bunch-crossing)
+   but they won't be consistent with autocorrelation anymore.
+   slower since re-do calculation
+
+ - flag FromDB switches between 
+     "take OFC stored in DataBase" 
+    and 
+     "take OFC stored in datamembers (computed consistently from 
+      LArAutoCorrTotal) or recomputed for a wanted luminosity"
+
+   *
+   */
+#ifndef LAROFCCONDALG_H
+#define LAROFCCONDALG_H 
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/WriteCondHandleKey.h"
+#include "GaudiKernel/ICondSvc.h"
+
+#include "LArElecCalib/ILArShape.h"
+#include "LArElecCalib/ILArOFC.h"
+#include "LArElecCalib/ILArNoise.h"
+#include "LArElecCalib/ILArPedestal.h"
+
+#include "LArRawConditions/LArAutoCorrTotal.h"
+#include "LArRawConditions/LArOFC.h"
+
+#include "LArCabling/LArOnOffIdMapping.h"
+
+class LArOFCCondAlg : public AthAlgorithm {
+public:
+  LArOFCCondAlg(const std::string &name, ISvcLocator *pSvcLocator);
+  virtual ~LArOFCCondAlg() override;
+
+  virtual StatusCode initialize() override;
+  virtual StatusCode execute() override;
+
+private:
+  SG::ReadCondHandleKey<LArOnOffIdMapping> m_LArOnOffIdMappingObjKey;
+  SG::ReadCondHandleKey<ILArShape> m_LArShapeObjKey;
+  SG::ReadCondHandleKey<ILArNoise> m_LArNoiseObjKey;
+  SG::ReadCondHandleKey<ILArPedestal> m_LArPedestalObjKey;
+  SG::ReadCondHandleKey<LArAutoCorrTotal> m_LArAutoCorrTotalObjKey;
+
+  SG::WriteCondHandleKey<LArOFC> m_LArOFCObjKey;
+
+  ServiceHandle<ICondSvc> m_condSvc;
+
+  float m_Nminbias;
+  bool m_isMC;
+  bool m_isSuperCell;
+  unsigned int m_firstSample;
+  int m_useDelta;
+  unsigned int m_deltaBunch;
+  bool m_useHighestGainAutoCorr;
+
+  unsigned int findTheNSamples(ILArShape::ShapeRef_t Shape,
+                           unsigned int nsamples_AC_OFC,
+                                           unsigned int nsamples_shape) const;
+
+  std::vector<float> getShapeAverages( const unsigned n_samples, 
+				       const unsigned n_deltaBunch, // in unit of 25 ns
+				       const std::vector<float>& shape, unsigned int firstSample) const;
+
+  bool m_Dump;
+
+  size_t m_nGains;
+};
+
+#endif
diff --git a/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx b/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx
index 336b0aeb0527810b0fb8f735bd18d80caa6f4f95..832112e1a3adff04a5f7b1483c5cad0aee8b53a3 100644
--- a/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx
+++ b/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx
@@ -22,6 +22,9 @@
 #include "../LArSymConditionsAlg.h"
 #include "../LArMCSymCondAlg.h"
 #include "../LArADC2MeVCondAlg.h"
+#include "../LArAutoCorrTotalCondAlg.h"
+#include "../LArOFCCondAlg.h"
+
 
 DECLARE_COMPONENT( LArADC2MeVTool )
 DECLARE_COMPONENT( LArAutoCorrNoiseTool )
@@ -71,4 +74,6 @@ DECLARE_COMPONENT( LArfSamplSymCondAlg )
 DECLARE_COMPONENT( LArMinBiasSymCondAlg )
 DECLARE_COMPONENT( LArNoiseSymCondAlg )
 
+DECLARE_COMPONENT( LArAutoCorrTotalCondAlg )
 DECLARE_COMPONENT( LArADC2MeVCondAlg )
+DECLARE_COMPONENT( LArOFCCondAlg )
diff --git a/LArCalorimeter/LArTest/LArEventTest/LArEventTest/DumpLArRawChannels.h b/LArCalorimeter/LArTest/LArEventTest/LArEventTest/DumpLArRawChannels.h
index 0a607c604baeb023e3b7049b1001c5de1e52f1c6..151023254257caeaf7a60cc1ffc714b133710eba 100755
--- a/LArCalorimeter/LArTest/LArEventTest/LArEventTest/DumpLArRawChannels.h
+++ b/LArCalorimeter/LArTest/LArEventTest/LArEventTest/DumpLArRawChannels.h
@@ -10,6 +10,10 @@
 #include "CaloIdentifier/LArEM_ID.h"
 #include "LArIdentifier/LArOnlineID.h"
 
+#include "TTree.h"
+#include "GaudiKernel/ITHistSvc.h"
+
+
 //#include "LArDetDescr/LArDetDescrManager.h"
 #include <fstream>
 
@@ -33,6 +37,16 @@ class DumpLArRawChannels : public AthAlgorithm
   std::ofstream m_outfile;
   std::string m_key, m_FileName;
  private:
+
+  std::string m_ntup;
+  TTree* m_tree=nullptr;
+  int m_evt=0;
+  float m_e=0,m_t=0,m_Q=0;
+  unsigned m_gain=0;
+  unsigned m_id=0;
+
+  ServiceHandle<ITHistSvc> m_thistSvc;
+
   class mySort {
   public:
     bool operator()(const LArRawChannel* a, const LArRawChannel* b);
diff --git a/LArCalorimeter/LArTest/LArEventTest/src/DumpLArRawChannels.cxx b/LArCalorimeter/LArTest/LArEventTest/src/DumpLArRawChannels.cxx
index 5bfb75c7d621cb6a9f5f98cd5bb95246995d78a9..7617224388100485e7b0ba5cac750c522fd2a3b4 100755
--- a/LArCalorimeter/LArTest/LArEventTest/src/DumpLArRawChannels.cxx
+++ b/LArCalorimeter/LArTest/LArEventTest/src/DumpLArRawChannels.cxx
@@ -15,10 +15,12 @@ DumpLArRawChannels::DumpLArRawChannels(const std::string& name, ISvcLocator* pSv
     m_chan(0),
     m_onlineHelper(0),
     m_larCablingSvc(0),
-    m_emId(0)
+    m_emId(0),
+    m_thistSvc ("THistSvc",     name) 
 {m_count=0;
  declareProperty("LArRawChannelContainerName",m_key=""); 
  declareProperty("OutputFileName",m_FileName="LArRawChannels.txt");
+ declareProperty("NtupStream",m_ntup);
 }
 
 DumpLArRawChannels::~DumpLArRawChannels() 
@@ -47,6 +49,21 @@ StatusCode DumpLArRawChannels::initialize()
 
   m_outfile.open(m_FileName.c_str(),std::ios::out);
 
+  if (m_ntup.size()) {
+    m_tree= new TTree("RC","LArRawChannels");
+    const std::string ntupStream="/"+m_ntup+"/LArRawChanenls";
+    ATH_CHECK(m_thistSvc->regTree(ntupStream,m_tree));
+
+    m_tree->Branch("evt",&m_evt,"evt/I");
+    m_tree->Branch("e",&m_e,"e/F");
+    m_tree->Branch("t",&m_t,"t/F");
+    m_tree->Branch("Q",&m_Q,"q/F");
+    m_tree->Branch("gain",&m_gain,"gain/I");
+    m_tree->Branch("HWID",&m_id,"hwid/I");
+      
+  }
+
+
   ATH_MSG_INFO ( "======== test-stuff initialize successfully ========" );
   return StatusCode::SUCCESS;
 }
@@ -62,7 +79,8 @@ StatusCode DumpLArRawChannels::execute()
    ATH_MSG_WARNING ( "No EventInfo object found!" );
  else
    {
-   std::cout << "*** Event #" << std::dec << thisEventInfo->runNumber() << "/" << thisEventInfo->eventNumber() << std::endl;
+     std::cout << "*** Event #" << std::dec << thisEventInfo->runNumber() << "/" << thisEventInfo->eventNumber() << std::endl;
+     m_evt=thisEventInfo->eventNumber();
    }
 
  const DataHandle < LArRawChannelContainer > channel_cont;
@@ -142,6 +160,14 @@ StatusCode DumpLArRawChannels::execute()
     m_outfile << " E= " << (*vec_it)->energy() << " t= " << Time << " Q= " << (*vec_it)->quality() << " P=0x"
 	      << std::hex << (*vec_it)->provenance() << std::dec << " G=" << (*vec_it)->gain() << std::endl;
 
+    if (m_tree) {
+      m_e=(*vec_it)->energy();
+      m_t=(*vec_it)->time();
+      m_Q=(*vec_it)->quality();
+      m_gain=(*vec_it)->gain();
+      m_id=chid.get_identifier32().get_compact();
+      m_tree->Fill();
+    }
    }
  //std::cout << "Collection #" << ++nColl << " contains " << chan_coll->size() << " elementes." << std::endl;
  std::cout << "Event " << m_count << " contains " << m_chan << " (" <<channelVector.size() <<")  channels\n";
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonByteStream/CMakeLists.txt
index 89cfd019fc438b08759ad434446337cd1f507131..4274518522494530775d1ba16d8b53160a0c8b07 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStream/CMakeLists.txt
+++ b/MuonSpectrometer/MuonCnv/MuonByteStream/CMakeLists.txt
@@ -8,11 +8,13 @@ atlas_subdir( MuonByteStream )
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaBaseComps
+                          DetectorDescription/IRegionSelector
                           Event/ByteStreamCnvSvcBase
                           Event/ByteStreamData
                           GaudiKernel
                           MuonSpectrometer/MuonCnv/MuonCSC_CnvTools
                           MuonSpectrometer/MuonCnv/MuonCnvToolInterfaces
+                          Trigger/TrigEvent/TrigSteeringEvent
                           PRIVATE
                           Control/CLIDSvc
                           Control/SGTools
@@ -32,7 +34,7 @@ atlas_add_component( MuonByteStream
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel SGTools StoreGateLib SGtests CSCcablingLib RPCcablingInterfaceLib MuonIdHelpersLib MuonRDO )
+                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel SGTools StoreGateLib SGtests CSCcablingLib RPCcablingInterfaceLib MuonIdHelpersLib MuonRDO TrigSteeringEvent)
 
 # Install files from the package:
 atlas_install_headers( MuonByteStream )
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/RpcRawDataProvider.h b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/RpcRawDataProvider.h
index 3081659afc859af36c7e053dade0725e37a8be99..d0680fa8e91fd249e9db10e4638345feb0b0413a 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/RpcRawDataProvider.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/RpcRawDataProvider.h
@@ -10,6 +10,12 @@
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 
+// interface to region selector service
+#include "IRegionSelector/IRegSelSvc.h"
+
+// ROI Descriptor classes
+#include "TrigSteeringEvent/TrigRoiDescriptor.h"
+
 namespace Muon {
 class IMuonRawDataProviderTool;
 
@@ -35,7 +41,18 @@ public:
 
 private:
 
+  /// Tool handle for raw data provider tool
   ToolHandle<Muon::IMuonRawDataProviderTool>  m_rawDataTool;
+
+  /// Handle for region selector service
+  ServiceHandle<IRegSelSvc> m_regionSelector;
+
+  /// Property to decide whether or not to do RoI based decoding
+  Gaudi::Property< bool > m_seededDecoding { this, "DoSeededDecoding", false, "If true do decoding in RoIs"};
+
+  /// ReadHandle for the input RoIs
+  SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey{ this, "RoIs", "OutputRoIs",  "Name of RoI collection to read in" };
+
 };
 } // ns end
 
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/src/RpcRawDataProvider.cxx b/MuonSpectrometer/MuonCnv/MuonByteStream/src/RpcRawDataProvider.cxx
index fca06b685da12f1f6f7288da13cb80bf4c1026d3..6bb2ecdcf97ba41ad10aba7f8c5d001667d409a3 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStream/src/RpcRawDataProvider.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStream/src/RpcRawDataProvider.cxx
@@ -11,10 +11,12 @@
 Muon::RpcRawDataProvider::RpcRawDataProvider(const std::string& name,
                                       ISvcLocator* pSvcLocator) :
   AthAlgorithm(name, pSvcLocator),
-  m_rawDataTool     ("RpcRawDataProviderTool")
+  m_rawDataTool     ("RpcRawDataProviderTool"),
+  m_regionSelector  ("RegSelSvc",name) 
   //m_cablingSvc       ("IRPCcablingSvc", name) 
 {
   declareProperty ("ProviderTool", m_rawDataTool);
+  declareProperty ("RegionSelectionSvc", m_regionSelector, "Region Selector");
 }
 
 // Destructor
@@ -27,7 +29,19 @@ Muon::RpcRawDataProvider::~RpcRawDataProvider(){
 
 StatusCode Muon::RpcRawDataProvider::initialize() {
   ATH_MSG_INFO( "RpcRawDataProvider::initialize"  );
+  ATH_MSG_INFO( m_seededDecoding );
+
   ATH_CHECK( m_rawDataTool.retrieve() );
+  ATH_CHECK( m_roiCollectionKey.initialize(m_seededDecoding) );// pass the seeded decoding flag - this marks the RoI collection flag as not used for the case when we decode the full detector
+
+  if(m_seededDecoding) {
+    // We only need the region selector in RoI seeded mode
+    if (m_regionSelector.retrieve().isFailure()) {
+      ATH_MSG_FATAL("Unable to retrieve RegionSelector Svc");
+      return StatusCode::FAILURE;
+    }  
+  }//seededDecoding
+  
   return StatusCode::SUCCESS;
 }
 
@@ -40,9 +54,35 @@ StatusCode Muon::RpcRawDataProvider::finalize() {
 StatusCode Muon::RpcRawDataProvider::execute() {
   ATH_MSG_VERBOSE( "RpcRawDataProvider::execute"  );
 
-  // ask RpcRawDataProviderTool to decode it and to fill the IDC
-  if (m_rawDataTool->convert().isFailure())
-    ATH_MSG_ERROR( "BS conversion into RDOs failed"  );
+  if(m_seededDecoding) {
+    
+    // read in the RoIs to process
+    SG::ReadHandle<TrigRoiDescriptorCollection> muonRoI(m_roiCollectionKey);
+    if(!muonRoI.isValid()){
+      ATH_MSG_WARNING("Cannot retrieve muonRoI "<<m_roiCollectionKey.key());
+      return StatusCode::SUCCESS;
+    }
+
+    // loop on RoIs
+    std::vector<uint32_t> rpcrobs;
+    for(auto roi : *muonRoI){
+      ATH_MSG_DEBUG("Get ROBs for RoI " << *roi);
+      // get list of ROBs from region selector
+      m_regionSelector->DetROBIDListUint(RPC,*roi,rpcrobs);
+
+      // decode the ROBs
+      if(m_rawDataTool->convert(rpcrobs).isFailure()) {
+        ATH_MSG_ERROR( "RoI seeded BS conversion into RDOs failed"  );
+      }
+      // clear vector of ROB IDs ready for next RoI
+      rpcrobs.clear();
+    }
+
+    } else {
+      // ask RpcRawDataProviderTool to decode the event and to fill the IDC
+      if (m_rawDataTool->convert().isFailure())
+        ATH_MSG_ERROR( "BS conversion into RDOs failed"  );
+    }
 
   return StatusCode::SUCCESS;
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfig.py b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfig.py
index afc22f0ba9929c0979f56156071647b510a0d7ca..0ce76d65963e7de96a9b4d98ed49e0bc5ea89d0d 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfig.py
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfig.py
@@ -7,34 +7,49 @@ def getMdtRdoToMdtDigit(name="MdtRdoToMdtDigitOverlay", **kwargs):
     kwargs.setdefault("DecodeRpcRDO", False)
     kwargs.setdefault("DecodeTgcRDO", False)
     kwargs.setdefault("DecodeCscRDO", False)
-    kwargs.setdefault("RetrievePrivateCopy", True)
     from OverlayCommonAlgs.OverlayFlags import overlayFlags
+    kwargs.setdefault("RetrievePrivateCopy", not overlayFlags.isDataOverlay())
     kwargs.setdefault("EvtStore", overlayFlags.dataStore())
     return CfgMgr.MuonRdoToMuonDigitTool(name, **kwargs)
 
 
+def getMdtRdoToMdtDigitAlg(name="MdtRdoToMdtDigitOverlayAlg", **kwargs):
+    kwargs.setdefault("MuonRdoToMuonDigitTool", "MdtRdoToMdtDigitOverlay")
+    return CfgMgr.MuonRdoToMuonDigit(name, **kwargs)
+
+
 def getRpcRdoToRpcDigit(name="RpcRdoToRpcDigitOverlay", **kwargs):
     kwargs.setdefault("DecodeMdtRDO", False)
     kwargs.setdefault("DecodeRpcRDO", True)
     kwargs.setdefault("DecodeTgcRDO", False)
     kwargs.setdefault("DecodeCscRDO", False)
-    kwargs.setdefault("RetrievePrivateCopy", True)
     from OverlayCommonAlgs.OverlayFlags import overlayFlags
+    kwargs.setdefault("RetrievePrivateCopy", not overlayFlags.isDataOverlay())
     kwargs.setdefault("EvtStore", overlayFlags.dataStore())
     return CfgMgr.MuonRdoToMuonDigitTool(name, **kwargs)
 
 
+def getRpcRdoToRpcDigitAlg(name="RpcRdoToRpcDigitOverlayAlg", **kwargs):
+    kwargs.setdefault("MuonRdoToMuonDigitTool", "RpcRdoToRpcDigitOverlay")
+    return CfgMgr.MuonRdoToMuonDigit(name, **kwargs)
+
+
 def getTgcRdoToTgcDigit(name="TgcRdoToTgcDigitOverlay", **kwargs):
     kwargs.setdefault("DecodeMdtRDO", False)
     kwargs.setdefault("DecodeRpcRDO", False)
     kwargs.setdefault("DecodeTgcRDO", True)
     kwargs.setdefault("DecodeCscRDO", False)
-    kwargs.setdefault("RetrievePrivateCopy", True)
     from OverlayCommonAlgs.OverlayFlags import overlayFlags
+    kwargs.setdefault("RetrievePrivateCopy", not overlayFlags.isDataOverlay())
     kwargs.setdefault("EvtStore", overlayFlags.dataStore())
     return CfgMgr.MuonRdoToMuonDigitTool(name, **kwargs)
 
 
+def getTgcRdoToTgcDigitAlg(name="TgcRdoToTgcDigitOverlayAlg", **kwargs):
+    kwargs.setdefault("MuonRdoToMuonDigitTool", "TgcRdoToTgcDigitOverlay")
+    return CfgMgr.MuonRdoToMuonDigit(name, **kwargs)
+
+
 def getSigMdtDigitToMdtRDO(name="SigMdtDigitToMdtRDO", **kwargs):
     from OverlayCommonAlgs.OverlayFlags import overlayFlags
     kwargs.setdefault("InputObjectName",overlayFlags.evtStore()+"+MDT_DIGITS")
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfigDb.py b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfigDb.py
index 671cef55eadf61e2218790a217ede48c941f7c32..2e976381d2ba75b03741940ad95aec69c6caee89 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfigDb.py
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfigDb.py
@@ -5,6 +5,9 @@ from AthenaCommon.CfgGetter import addTool, addAlgorithm
 addTool("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getMdtRdoToMdtDigit", "MdtRdoToMdtDigitOverlay")
 addTool("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getRpcRdoToRpcDigit", "RpcRdoToRpcDigitOverlay")
 addTool("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getTgcRdoToTgcDigit", "TgcRdoToTgcDigitOverlay")
+addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getMdtRdoToMdtDigitAlg", "MdtRdoToMdtDigitOverlayAlg")
+addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getRpcRdoToRpcDigitAlg", "RpcRdoToRpcDigitOverlayAlg")
+addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getTgcRdoToTgcDigitAlg", "TgcRdoToTgcDigitOverlayAlg")
 
 addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getSigMdtDigitToMdtRDO" , "SigMdtDigitToMdtRDO")
 addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getSigRpcDigitToRpcRDO" , "SigRpcDigitToRpcRDO")
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_DigitToRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_DigitToRDO.cxx
index a19a419ab653052ae0780ede280e2f206f52b15a..9f3560d6fb994b8c12ca7f4661154ee177717d4d 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_DigitToRDO.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_DigitToRDO.cxx
@@ -31,17 +31,28 @@ StatusCode MM_DigitToRDO::initialize()
 
 StatusCode MM_DigitToRDO::execute()
 {  
+  
   using namespace Muon;
   ATH_MSG_DEBUG( "in execute()"  );
   SG::WriteHandle<MM_RawDataContainer> rdos (m_rdoContainer);
   SG::ReadHandle<MmDigitContainer> digits (m_digitContainer);
+
   ATH_CHECK( rdos.record(std::unique_ptr<MM_RawDataContainer>(new MM_RawDataContainer(m_idHelper->module_hash_max())) ) );
 
   if (digits.isValid()){
     for (const MmDigitCollection* digitColl : *digits ){
-    
-      // Making some assumptions here that digit hash == RDO hash. 
-      IdentifierHash hash = digitColl->identifierHash();
+
+      // the identifier of the digit collection is the detector element Id ( multilayer granularity )
+      Identifier digitId = digitColl->identify();
+
+      // get the hash of the RDO collection
+      IdentifierHash hash;
+      int getRdoCollHash = m_idHelper->get_module_hash(digitId,hash);
+      if ( getRdoCollHash!=0 ) {
+	ATH_MSG_ERROR("Could not get the module hash Id");
+	return StatusCode::FAILURE;
+      }
+
       MM_RawDataCollection* coll = new MM_RawDataCollection(hash);
       if (rdos->addCollection(coll,hash).isFailure() ){
         ATH_MSG_WARNING("Failed to add collection with hash " << (int)hash );
@@ -51,9 +62,24 @@ StatusCode MM_DigitToRDO::execute()
     
       for (const MmDigit* digit : *digitColl ){
         Identifier id = digit->identify();
-        MM_RawData* rdo = new MM_RawData(id);
-        coll->push_back(rdo);
+
+	// for now keep the digit structure as vector of firing strips
+	// (will have to be reviewed )
+	// number of strips
+	unsigned int nstrips = digit->stripResponsePosition().size();
+
+	for ( unsigned int i=0 ; i<nstrips ; ++i ) {
+
+	  MM_RawData* rdo = new MM_RawData(id,
+					   digit->stripResponsePosition().at(i),
+					   digit->stripResponseTime().at(i),
+					   digit->stripResponseCharge().at(i));
+
+	  coll->push_back(rdo);
+
+	}
       }
+
     }
   } else {
     ATH_MSG_WARNING("Unable to find MM digits");
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx
index 5a18c3ee1fa7b029da274a86f9164f9e2c4344b5..5f6ce979da6fd800733785a143f99db58d3c7f3f 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx
@@ -39,7 +39,9 @@ StatusCode MdtDigitToMdtRDO::initialize()
 {
   ATH_MSG_DEBUG( " in initialize()"  );
   ATH_CHECK( m_csmContainerKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_csmContainerKey );
   ATH_CHECK( m_digitContainerKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_digitContainerKey );
   ATH_CHECK( detStore()->retrieve(m_mdtIdHelper,"MDTIDHELPER") );
   ATH_CHECK( m_cabling.retrieve() );
 
@@ -77,10 +79,16 @@ StatusCode MdtDigitToMdtRDO::fill_MDTdata() const {
   // create an empty pad container and record it
   SG::WriteHandle<MdtCsmContainer> csmContainer(m_csmContainerKey);
   ATH_CHECK(csmContainer.record(std::make_unique<MdtCsmContainer>()));
+  ATH_MSG_DEBUG("Recorded MdtCsmContainer called " << csmContainer.name() << " in store " << csmContainer.store());
 
   IdContext mdtContext = m_mdtIdHelper->module_context();
 
   SG::ReadHandle<MdtDigitContainer> container (m_digitContainerKey);
+  if (!container.isValid()) {
+    ATH_MSG_ERROR("Could not find MdtDigitContainer called " << container.name() << " in store " << container.store());
+    return StatusCode::SUCCESS;
+  }
+  ATH_MSG_DEBUG("Found MdtDigitContainer called " << container.name() << " in store " << container.store());
 
   typedef MdtDigitContainer::const_iterator collection_iterator;
   typedef MdtDigitCollection::const_iterator digit_iterator;
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcDigitToRpcRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcDigitToRpcRDO.cxx
index aac22e84870161197cd47045d6a6148a991b1c03..3e17338099b58167341a88a971703001320a63d7 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcDigitToRpcRDO.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcDigitToRpcRDO.cxx
@@ -113,7 +113,9 @@ StatusCode RpcDigitToRpcRDO::initialize()
     // }
 
   ATH_CHECK( m_padContainerKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_padContainerKey );
   ATH_CHECK( m_digitContainerKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_digitContainerKey );
 
   return StatusCode::SUCCESS;
 }
@@ -131,6 +133,7 @@ StatusCode RpcDigitToRpcRDO::execute() {
   // create an empty pad container and record it
   SG::WriteHandle<RpcPadContainer> padContainer (m_padContainerKey);
   ATH_CHECK(padContainer.record((std::make_unique<RpcPadContainer>(600))));
+  ATH_MSG_DEBUG("Recorded RpcPadContainer called " << padContainer.name() << " in store " << padContainer.store());
 
   RPCsimuData data;         // instantiate the container for the RPC digits
 
@@ -225,6 +228,11 @@ StatusCode RpcDigitToRpcRDO::fill_RPCdata(RPCsimuData& data)  {
     typedef RpcDigitCollection::const_iterator digit_iterator;
 
   SG::ReadHandle<RpcDigitContainer> container (m_digitContainerKey);
+  if (!container.isValid()) {
+    ATH_MSG_ERROR("Could not find RpcDigitContainer called " << container.name() << " in store " << container.store());
+    return StatusCode::SUCCESS;
+  }
+  ATH_MSG_DEBUG("Found RpcDigitContainer called " << container.name() << " in store " << container.store());
 
     collection_iterator it1_coll= container->begin(); 
     collection_iterator it2_coll= container->end(); 
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.cxx
index 1b27b2035c749002a34310816588b178031d55df..85f7dabc32ebb4dc611b19ecbbdfc555c5053d08 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.cxx
@@ -19,6 +19,9 @@ STGC_DigitToRDO::STGC_DigitToRDO(const std::string& name, ISvcLocator* pSvcLocat
 
 StatusCode STGC_DigitToRDO::initialize()
 {
+  declareProperty("RDOContainerName", m_rdoContainer = "sTGCRDO");
+  declareProperty("DigitContainerName", m_digitContainer = "sTGC_DIGITS");
+  
   ATH_MSG_DEBUG( " in initialize()"  );
   ATH_CHECK( m_rdoContainer.initialize() );
   ATH_CHECK( m_digitContainer.initialize() );  
@@ -37,8 +40,17 @@ StatusCode STGC_DigitToRDO::execute()
 
   if (digits.isValid() ){
     for (const sTgcDigitCollection* digitColl : *digits ){
-      // Making some assumptions here that digit hash == RDO hash. 
-      IdentifierHash hash = digitColl->identifierHash();
+
+      // Transform the hash id ( digit collection use detector element ID hash, RDO's use 
+      // module Id hash
+      Identifier digitId = digitColl->identify();
+      IdentifierHash hash;
+      int getRdoCollHash = m_idHelper->get_module_hash(digitId,hash);
+      if ( getRdoCollHash !=0 ) {
+	ATH_MSG_ERROR("Could not get the module hash Id");
+	return StatusCode::FAILURE;
+      } 
+
       STGC_RawDataCollection* coll = new STGC_RawDataCollection(hash);
       if (rdos->addCollection(coll,hash).isFailure() ){
         ATH_MSG_WARNING("Failed to add collection with hash " << (int)hash );
@@ -48,7 +60,11 @@ StatusCode STGC_DigitToRDO::execute()
     
       for (const sTgcDigit* digit : *digitColl ){
         Identifier id = digit->identify();
-        STGC_RawData* rdo = new STGC_RawData(id);
+	uint16_t bcTag = digit->bcTag();
+	float time   = digit->time();
+	float charge = digit->charge();
+	bool isDead = digit->isDead();
+        STGC_RawData* rdo = new STGC_RawData(id, bcTag, time, charge, isDead);
         coll->push_back(rdo);
       }
     }
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.h
index 39d63181b1cf5d938a67f6cf6fc55272feb86ed8..d5a0a8bf1052857cedfd1c13de49ae42468d94f3 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.h
@@ -31,8 +31,8 @@ private:
 protected:
   
   const sTgcIdHelper*  m_idHelper;
-  SG::WriteHandleKey<Muon::STGC_RawDataContainer> m_rdoContainer{this,"RDOContainerName","sTGCRDO","STGC_RawDataContainer handle key"};
-  SG::ReadHandleKey<sTgcDigitContainer> m_digitContainer{this,"DigitContainerName","sTGC_DIGITS","sTgcDigitContainer handle key"};
+  SG::WriteHandleKey<Muon::STGC_RawDataContainer> m_rdoContainer;
+  SG::ReadHandleKey<sTgcDigitContainer> m_digitContainer;
 };
 
 #endif
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx
index 67e6812bf2e7f37ed623edf28c3e35848f400d3b..db906a51c503ce23b592e48129363783d2ef5b2f 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx
@@ -46,7 +46,9 @@ StatusCode TgcDigitToTgcRDO::initialize()
   }
 
   ATH_CHECK( m_rdoContainerKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_rdoContainerKey );
   ATH_CHECK( m_digitContainerKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_digitContainerKey );
 
   return StatusCode::SUCCESS;
 }
@@ -77,8 +79,14 @@ StatusCode TgcDigitToTgcRDO::fill_TGCdata()
   ATH_MSG_DEBUG( "fill_TGCdata"  );
 
   SG::WriteHandle<TgcRdoContainer> rdoContainer (m_rdoContainerKey);
-  SG::ReadHandle<TgcDigitContainer> container (m_digitContainerKey);
   ATH_CHECK(rdoContainer.record((std::make_unique<TgcRdoContainer>())));
+  ATH_MSG_DEBUG("Recorded TgcRdoContainer called " << rdoContainer.name() << " in store " << rdoContainer.store());
+  SG::ReadHandle<TgcDigitContainer> container (m_digitContainerKey);
+  if (!container.isValid()) {
+    ATH_MSG_ERROR("Could not find TgcDigitContainer called " << container.name() << " in store " << container.store());
+    return StatusCode::SUCCESS;
+  }
+  ATH_MSG_DEBUG("Found TgcDigitContainer called " << container.name() << " in store " << container.store());
 
  // init
   m_tgcRdoMap.clear();
diff --git a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.cxx b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..f19a01c4865d507a52f5e0b54b476ecc60363330
--- /dev/null
+++ b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.cxx
@@ -0,0 +1,445 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+///////////////////////////////////////////////////////////////////
+// MdtRdoToPrepDataTool.cxx, (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+
+#include "MmRdoToPrepDataTool.h"
+#include "GaudiKernel/MsgStream.h"
+#include "GaudiKernel/ISvcLocator.h"
+
+#include "StoreGate/StoreGateSvc.h"
+
+#include "MuonIdHelpers/MmIdHelper.h"
+#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/MuonIdHelper.h"
+#include "MuonReadoutGeometry/MuonStation.h"
+#include "MuonReadoutGeometry/MMReadoutElement.h"
+
+#include "MuonPrepRawData/MMPrepDataContainer.h"
+#include "TrkEventPrimitives/LocalDirection.h"
+
+// BS access
+#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
+#include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h"
+
+using namespace MuonGM;
+using namespace Trk;
+using namespace Muon;
+
+Muon::MmRdoToPrepDataTool::MmRdoToPrepDataTool(const std::string& t,
+					       const std::string& n,
+					       const IInterface*  p )
+  :
+  AthAlgTool(t,n,p),
+  m_muonMgr(0),
+  m_mmIdHelper(0),
+  m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool"),
+  m_fullEventDone(false),
+  m_mmPrepDataContainer(0) 
+{
+  declareInterface<Muon::IMuonRdoToPrepDataTool>(this);
+
+  //  template for property decalration
+  declareProperty("OutputCollection",    m_mmPrepDataContainerKey = std::string("MM_Measurements"),
+		  "Muon::MMPrepDataContainer to record");
+  declareProperty("InputCollection",    m_rdoContainerKey = std::string("MMRDO"),
+		  "Muon::MMPrepDataContainer to record");
+  
+  declareProperty("MergePrds", m_merge = true);
+}
+
+
+Muon::MmRdoToPrepDataTool::~MmRdoToPrepDataTool()
+{
+
+}
+
+StatusCode Muon::MmRdoToPrepDataTool::initialize()
+{  
+  ATH_MSG_DEBUG(" in initialize()");
+  
+  /// get the detector descriptor manager
+  StoreGateSvc* detStore=0;
+  StatusCode sc = serviceLocator()->service("DetectorStore", detStore);
+  
+  if (sc.isSuccess()) {
+    sc = detStore->retrieve( m_muonMgr );
+    if (sc.isFailure()) {
+      ATH_MSG_FATAL(" Cannot retrieve MuonReadoutGeometry ");
+      return sc;
+    }
+  } else {
+    ATH_MSG_ERROR("DetectorStore not found ");
+    return sc;
+  }
+  
+  m_mmIdHelper = m_muonMgr->mmIdHelper();
+  
+  ATH_CHECK( m_idHelperTool.retrieve() );
+
+  // check if the initialization of the data container is success
+  ATH_CHECK(m_mmPrepDataContainerKey.initialize());
+  ATH_CHECK(m_rdoContainerKey.initialize());
+
+  ATH_MSG_INFO("initialize() successful in " << name());
+  return StatusCode::SUCCESS;
+}
+
+StatusCode Muon::MmRdoToPrepDataTool::finalize()
+{
+  //  if (0 != m_mmPrepDataContainer) m_mmPrepDataContainer->release();
+  return StatusCode::SUCCESS;
+
+}
+
+StatusCode Muon::MmRdoToPrepDataTool::processCollection(const MM_RawDataCollection *rdoColl, 
+							std::vector<IdentifierHash>& idWithDataVect)
+{
+  ATH_MSG_DEBUG(" ***************** Start of process MM Collection");
+
+  const IdentifierHash hash = rdoColl->identifierHash();
+
+  MMPrepDataCollection* prdColl = nullptr;
+  
+  // check if the collection already exists, otherwise add it
+  if ( m_mmPrepDataContainer->indexFind(hash) != m_mmPrepDataContainer->end() ) {
+
+    ATH_MSG_DEBUG("In processCollection: collection already contained in the MM PrepData container");
+    return StatusCode::FAILURE;
+  } 
+  else {
+    prdColl = new MMPrepDataCollection(hash);
+    idWithDataVect.push_back(hash);
+    
+    // set the offline identifier of the collection Id
+    IdContext context = m_mmIdHelper->module_context();
+    Identifier moduleId;
+    int getId = m_mmIdHelper->get_id(hash,moduleId,&context);
+    if ( getId != 0 ) {
+      ATH_MSG_ERROR("Could not convert the hash Id: " << hash << " to identifier");
+    } 
+    else {
+      ATH_MSG_DEBUG(" dump moduleId " << moduleId );
+      prdColl->setIdentifier(moduleId);
+    }
+
+    if (StatusCode::SUCCESS != m_mmPrepDataContainer->addCollection(prdColl, hash)) {
+      ATH_MSG_DEBUG("In processCollection - Couldn't record in the Container MM Collection with hashID = "
+		    << (int)hash );
+      return StatusCode::FAILURE;
+    }
+
+  }
+
+  std::vector<MMPrepData> MMprds;
+  std::vector<int> MMflag;
+
+  // convert the RDO collection to a PRD collection
+  MM_RawDataCollection::const_iterator it = rdoColl->begin();
+  for ( ; it != rdoColl->end() ; ++it ) {
+
+    ATH_MSG_DEBUG("Adding a new MM PrepRawData");
+
+    const MM_RawData* rdo = *it;
+    const Identifier rdoId = rdo->identify();
+//    const Identifier elementId = m_mmIdHelper->elementID(rdoId);
+    ATH_MSG_DEBUG(" dump rdo " << m_idHelperTool->toString(rdoId ));
+    const int time = rdo->time();
+    const int charge = rdo->charge();
+    std::vector<Identifier> rdoList;
+    rdoList.push_back(rdoId);
+    Identifier parentID = m_mmIdHelper->parentID(rdoId);
+    Identifier layid = m_mmIdHelper->channelID(parentID, m_mmIdHelper->multilayer(rdoId), m_mmIdHelper->gasGap(rdoId),1);
+    // get the local and global positions
+    const MuonGM::MMReadoutElement* detEl = m_muonMgr->getMMReadoutElement(layid);
+    Amg::Vector2D localPos;
+
+    bool getLocalPos = detEl->stripPosition(rdoId,localPos);
+    if ( !getLocalPos ) {
+      ATH_MSG_ERROR("Could not get the local strip position for MM");
+      return StatusCode::FAILURE;
+    }
+    int stripNumberRDOId = detEl->stripNumber(localPos,layid);
+    ATH_MSG_DEBUG(" check strip nr RDOId " << stripNumberRDOId );
+    Amg::Vector3D globalPos;
+    bool getGlobalPos = detEl->stripGlobalPosition(rdoId,globalPos);
+    if ( !getGlobalPos ) {
+      ATH_MSG_ERROR("Could not get the global strip position for MM");
+      return StatusCode::FAILURE;
+    }
+
+//    const Trk::Surface& surf = detEl->surface(rdoId);
+//    const Amg::Vector3D* globalPos = surf.localToGlobal(localPos);
+    const Amg::Vector3D globalDir(globalPos.x(), globalPos.y(), globalPos.z());
+    Trk::LocalDirection localDir;
+    const Trk::PlaneSurface& psurf = detEl->surface(layid);
+    Amg::Vector2D lpos;
+    psurf.globalToLocal(globalPos,globalPos,lpos);
+    psurf.globalToLocalDirection(globalDir, localDir);
+    float inAngle_XZ = fabs( localDir.angleXZ() / CLHEP::degree);
+   
+    ATH_MSG_DEBUG(" Surface centre x " << psurf.center().x() << " y " << psurf.center().y() << " z " << psurf.center().z() );
+    ATH_MSG_DEBUG(" localPos x " << localPos.x() << " localPos y " << localPos.y() << " lpos recalculated 0 " << lpos[0] << " lpos y " << lpos[1]);
+
+    Amg::Vector3D  gdir = psurf.transform().linear()*Amg::Vector3D(0.,1.,0.);
+    ATH_MSG_DEBUG(" MM detector surface direction phi " << gdir.phi() << " global radius hit " << globalPos.perp() << " phi pos " << globalPos.phi() << " global z " << globalPos.z());      
+
+    // get for now a temporary error matrix -> to be fixed
+    double resolution = 0.07;
+    if (fabs(inAngle_XZ)>3) resolution = ( -.001/3.*fabs(inAngle_XZ) ) + .28/3.;
+    double errX = 0;
+    const MuonGM::MuonChannelDesign* design = detEl->getDesign(layid);
+    if( !design ){
+      ATH_MSG_WARNING("Failed to get design for " << m_idHelperTool->toString(layid) );
+    }else{
+      errX = fabs(design->inputPitch)/sqrt(12);
+      ATH_MSG_DEBUG(" strips inputPitch " << design->inputPitch << " error " << errX);
+    }
+// add strip width to error
+    resolution = sqrt(resolution*resolution+errX*errX);
+
+    Amg::MatrixX* cov = new Amg::MatrixX(1,1);
+    cov->setIdentity();
+    (*cov)(0,0) = resolution*resolution;  
+
+    if(!m_merge) {
+      prdColl->push_back(new MMPrepData(rdoId,hash,localPos,rdoList,cov,detEl,time,charge));
+    } else {
+       MMprds.push_back(MMPrepData(rdoId,hash,localPos,rdoList,cov,detEl,time,charge));
+       MMflag.push_back(0);
+    } 
+  }
+
+  if(m_merge) {
+     for (unsigned int i=0; i<MMprds.size(); ++i){
+         // skip the merged prds
+         if(MMflag[i]==1) continue;
+ 
+         bool merge = false;
+         unsigned int jmerge = -1;
+         Identifier id_prd = MMprds[i].identify();
+         int strip = m_mmIdHelper->channel(id_prd);
+         int gasGap  = m_mmIdHelper->gasGap(id_prd);
+         int layer   = m_mmIdHelper->multilayer(id_prd);
+         ATH_MSG_VERBOSE("  MMprds " <<  MMprds.size() <<" index "<< i << " strip " << strip << " gasGap " << gasGap << " layer " << layer << " z " << MMprds[i].globalPosition().z() );
+         for (unsigned int j=i+1; j<MMprds.size(); ++j){
+           Identifier id_prdN = MMprds[j].identify();
+           int stripN = m_mmIdHelper->channel(id_prdN);
+           int gasGapN  = m_mmIdHelper->gasGap(id_prdN);
+           int layerN   = m_mmIdHelper->multilayer(id_prdN);
+           if( gasGapN==gasGap && layerN==layer ) {
+             ATH_MSG_VERBOSE(" next MMprds strip same gasGap and layer index " << j << " strip " << stripN << " gasGap " << gasGapN << " layer " << layerN );
+             if(abs(strip-stripN)<2) {
+               merge = true;
+               jmerge = j;
+               break;
+             }
+           }
+         }
+ 
+         if(!merge) {
+           ATH_MSG_VERBOSE(" add isolated MMprds strip " << strip << " gasGap " << gasGap << " layer " << layer );
+           std::vector<Identifier> rdoList;
+           rdoList.push_back(id_prd);
+           double covX = MMprds[i].localCovariance()(Trk::locX,Trk::locX);
+           Amg::MatrixX* covN = new Amg::MatrixX(1,1);
+           covN->setIdentity();
+           (*covN)(0,0) = covX;
+           MMPrepData* prdN = new MMPrepData(id_prd, hash, MMprds[i].localPosition(), rdoList, covN, MMprds[i].detectorElement());
+           prdN->setHashAndIndex(prdColl->identifyHash(), prdColl->size());
+           prdColl->push_back(prdN);
+         } else {
+           unsigned int nmerge = 0;
+           std::vector<Identifier> rdoList;
+           std::vector<unsigned int> mergeIndices;
+           std::vector<int> mergeStrips;
+           rdoList.push_back(id_prd);
+           MMflag[i] = 1;
+           mergeIndices.push_back(i);
+           mergeStrips.push_back(strip);
+           unsigned int nmergeStrips = 1;
+           unsigned int nmergeStripsMax = 25;
+           for (unsigned int k=0; k < nmergeStripsMax; ++k) {
+             for (unsigned int j=jmerge; j<MMprds.size(); ++j){
+               if(MMflag[j] == 1) continue;
+               Identifier id_prdN = MMprds[j].identify();
+               int stripN = m_mmIdHelper->channel(id_prdN);
+               if( abs(mergeStrips[k]-stripN) <= 1 ) {
+                 int gasGapN  = m_mmIdHelper->gasGap(id_prdN);
+                 int layerN   = m_mmIdHelper->multilayer(id_prdN);
+                 if( gasGapN==gasGap && layerN==layer ) {
+                   if(mergeStrips[k]==stripN) {
+                     MMflag[j] = 1;
+                     continue;
+                   }
+                   nmerge++;
+                   rdoList.push_back(id_prdN);
+                   MMflag[j] = 1;
+                   mergeIndices.push_back(j);
+                   mergeStrips.push_back(stripN);
+                   nmergeStrips++;
+                 }
+               }
+             }
+             if(k>=nmergeStrips) break;
+           }
+           ATH_MSG_VERBOSE(" add merged MMprds nmerge " << nmerge << " strip " << strip << " gasGap " << gasGap << " layer " << layer );
+ 
+           // start off from strip in the middle
+           int stripSum = 0;
+           for (unsigned int k =0; k<mergeStrips.size(); ++k) {
+             stripSum += mergeStrips[k];
+           }
+           stripSum = stripSum/mergeStrips.size();
+ 
+           unsigned int j = jmerge;
+           for (unsigned int k =0; k<mergeStrips.size(); ++k) {
+             if(mergeStrips[k]==stripSum) j = mergeIndices[k];
+             ATH_MSG_VERBOSE(" merged strip nr " << k <<  " strip " << mergeStrips[k] << " index " << mergeIndices[k]);
+           }
+           ATH_MSG_VERBOSE(" Look for strip nr " << stripSum << " found at index " << j);
+ 
+           double covX = MMprds[j].localCovariance()(Trk::locX, Trk::locX);
+           Amg::MatrixX* covN = new Amg::MatrixX(1,1);
+           covN->setIdentity();
+           (*covN)(0,0) = 6.*(nmerge + 1.)*covX;
+           if(nmerge<=1) (*covN)(0,0) = covX;
+           ATH_MSG_VERBOSE(" make merged prepData at strip " << m_mmIdHelper->channel(MMprds[j].identify()) << " nmerge " << nmerge << " sqrt covX " << sqrt((*covN)(0,0)));
+
+           MMPrepData* prdN = new MMPrepData(MMprds[j].identify(), hash, MMprds[j].localPosition(), rdoList, covN, MMprds[j].detectorElement());
+           prdN->setHashAndIndex(prdColl->identifyHash(), prdColl->size());
+           prdColl->push_back(prdN);
+         }
+       } // end loop MMprds[i]
+     // clear vector and delete elements
+     MMflag.clear();
+     MMprds.clear();
+  }
+
+
+
+  return StatusCode::SUCCESS;
+}
+
+
+Muon::MmRdoToPrepDataTool::SetupMM_PrepDataContainerStatus Muon::MmRdoToPrepDataTool::setupMM_PrepDataContainer() 
+{
+
+  if(!evtStore()->contains<Muon::MMPrepDataContainer>(m_mmPrepDataContainerKey.key())){    
+    m_fullEventDone=false;
+    
+    SG::WriteHandle< Muon::MMPrepDataContainer > handle(m_mmPrepDataContainerKey);
+    StatusCode status = handle.record(std::make_unique<Muon::MMPrepDataContainer>(m_mmIdHelper->module_hash_max()));
+    
+    if (status.isFailure() || !handle.isValid() )   {
+      ATH_MSG_FATAL("Could not record container of MicroMega PrepData Container at " << m_mmPrepDataContainerKey.key()); 
+      return FAILED;
+    }
+    m_mmPrepDataContainer = handle.ptr();
+    return ADDED;
+  }
+  return ALREADYCONTAINED;
+}
+
+
+const MM_RawDataContainer* Muon::MmRdoToPrepDataTool::getRdoContainer() {
+
+  auto rdoContainerHandle  = SG::makeHandle(m_rdoContainerKey);
+  if(rdoContainerHandle.isValid()) {
+    ATH_MSG_DEBUG("MM_getRdoContainer success");
+    return rdoContainerHandle.cptr();  
+  }
+  ATH_MSG_WARNING("Retrieval of MM_RawDataContainer failed !");
+
+  return nullptr;
+}
+
+
+void Muon::MmRdoToPrepDataTool::processRDOContainer( std::vector<IdentifierHash>& idWithDataVect ) 
+{
+
+  ATH_MSG_DEBUG("In processRDOContainer");
+  const MM_RawDataContainer* rdoContainer = getRdoContainer();
+  if (!rdoContainer) {
+    return;
+  }
+  
+  // run in unseeded mode
+  for (MM_RawDataContainer::const_iterator it = rdoContainer->begin(); it != rdoContainer->end(); ++it ) {
+    
+    auto rdoColl = *it;
+    if (rdoColl->empty()) continue;
+    ATH_MSG_DEBUG("New RDO collection with " << rdoColl->size() << "MM Hits");
+    if(processCollection(rdoColl, idWithDataVect).isFailure()) {
+      ATH_MSG_DEBUG("processCsm returns a bad StatusCode - keep going for new data collections in this event");
+    }
+  } 
+  
+  
+  return;
+}
+
+
+// methods for ROB-based decoding
+StatusCode Muon::MmRdoToPrepDataTool::decode( std::vector<IdentifierHash>& idVect, 
+					       std::vector<IdentifierHash>& idWithDataVect )
+{
+  // clear the output vector of selected data
+  idWithDataVect.clear();
+  
+  //is idVect a right thing to use here? to be reviewed maybe
+  ATH_MSG_DEBUG("Size of the RDO container to be decoded: " << idVect.size() ); 
+
+  SetupMM_PrepDataContainerStatus containerRecordStatus = setupMM_PrepDataContainer();
+
+  if ( containerRecordStatus == FAILED ) {
+    return StatusCode::FAILURE;
+  } 
+
+  processRDOContainer(idWithDataVect);
+
+  // check if the full event has already been decoded
+  if ( m_fullEventDone ) {
+    ATH_MSG_DEBUG ("Full event dcoded, nothing to do");
+    return StatusCode::SUCCESS;
+  } 
+
+ 
+  return StatusCode::SUCCESS;
+} 
+
+StatusCode Muon::MmRdoToPrepDataTool::decode( const std::vector<uint32_t>& robIds, 
+					       const std::vector<IdentifierHash>& chamberHashInRobs )
+{
+  ATH_MSG_DEBUG("Size of the robIds" << robIds.size() );
+  ATH_MSG_DEBUG("Size of the chamberHash" << chamberHashInRobs.size() );
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode Muon::MmRdoToPrepDataTool::decode( const std::vector<uint32_t>& robIds )
+{
+
+  ATH_MSG_DEBUG("Size of the robIds" << robIds.size() );
+
+  return StatusCode::SUCCESS;
+}
+
+
+// printout methods
+void Muon::MmRdoToPrepDataTool::printInputRdo() {
+
+
+  return;
+}
+
+
+void Muon::MmRdoToPrepDataTool::printPrepData() {
+
+
+  return;
+}
+
diff --git a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.h b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..90a3d5666dac2129734a88298154d9d5a98eafee
--- /dev/null
+++ b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.h
@@ -0,0 +1,100 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+///////////////////////////////////////////////////////////////////
+// MmRdoToPrepDataTool.h, (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+
+#ifndef MUONMmRdoToPrepDataTool_H
+#define MUONMmRdoToPrepDataTool_H
+
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+
+#include "MuonCnvToolInterfaces/IMuonRdoToPrepDataTool.h"
+#include "MuonPrepRawData/MuonPrepDataContainer.h"
+#include "MuonPrepRawData/MMPrepDataContainer.h"
+#include "MuonRDO/MM_RawDataContainer.h"
+
+#include <string>
+#include <vector>
+class AtlasDetectorID;
+class Identifier;
+class MmIdHelper;
+class MuonIdHelper;
+class MM_RawDataCollection;
+class StoreGateSvc;
+
+namespace MuonGM
+{    
+    class MuonDetectorManager;
+    class MMReadoutElement;
+}
+
+
+namespace Muon 
+{
+
+  class IMuonRawDataProviderTool;
+  class MuonIdHelperTool;
+
+  class MmRdoToPrepDataTool : virtual public IMuonRdoToPrepDataTool, virtual public AthAlgTool
+  {
+  public:
+    MmRdoToPrepDataTool(const std::string&,const std::string&,const IInterface*);
+    
+    /** default destructor */
+    virtual ~MmRdoToPrepDataTool ();
+    
+    /** standard Athena-Algorithm method */
+    virtual StatusCode initialize();
+    
+    /** standard Athena-Algorithm method */
+    virtual StatusCode finalize();
+    
+    /** Decode method - declared in Muon::IMuonRdoToPrepDataTool*/
+    StatusCode decode( std::vector<IdentifierHash>& idVect, std::vector<IdentifierHash>& selectedIdVect );
+    //new decode methods for Rob based readout
+    StatusCode decode( const std::vector<uint32_t>& robIds, const std::vector<IdentifierHash>& chamberHashInRobs );
+    StatusCode decode( const std::vector<uint32_t>& robIds );
+    
+    StatusCode processCollection(const MM_RawDataCollection *rdoColl, 
+   				 std::vector<IdentifierHash>& idWithDataVect);
+
+    void printInputRdo();
+    void printPrepData();
+    
+  private:
+    
+    enum SetupMM_PrepDataContainerStatus {
+      FAILED = 0, ADDED, ALREADYCONTAINED
+    };
+
+    SetupMM_PrepDataContainerStatus setupMM_PrepDataContainer();
+
+    const MM_RawDataContainer* getRdoContainer();
+
+    void processRDOContainer( std::vector<IdentifierHash>& idWithDataVect );
+
+    /// Muon Detector Descriptor
+    const MuonGM::MuonDetectorManager * m_muonMgr;
+    
+    /// MM and muon identifier helper
+    const MmIdHelper * m_mmIdHelper;
+    ToolHandle <Muon::MuonIdHelperTool> m_idHelperTool; 
+    
+    bool m_fullEventDone;
+    
+    /// MdtPrepRawData containers
+    Muon::MMPrepDataContainer * m_mmPrepDataContainer;
+    SG::WriteHandleKey<Muon::MMPrepDataContainer> m_mmPrepDataContainerKey;
+    SG::ReadHandleKey< MM_RawDataContainer >         m_rdoContainerKey;
+
+    std::string m_outputCollectionLocation;            
+    bool m_merge; 
+  }; 
+} // end of namespace
+
+#endif 
diff --git a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/components/MuonMM_CnvTools_entries.cxx b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/components/MuonMM_CnvTools_entries.cxx
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2dc714e24d3e06527f551ccdfb7a8b9e5ec32844 100644
--- a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/components/MuonMM_CnvTools_entries.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/components/MuonMM_CnvTools_entries.cxx
@@ -0,0 +1,4 @@
+#include "../MmRdoToPrepDataTool.h"
+
+DECLARE_COMPONENT(Muon::MmRdoToPrepDataTool)
+
diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/MuonRdoToPrepData/MM_RdoToMM_PrepData.h b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/MuonRdoToPrepData/MM_RdoToMM_PrepData.h
index 9e17aa47a5ad3e68a7dcbc69f9ddaeddcd1d17f2..91aab06b0dcb70fc4126396b6a677296358f30c7 100755
--- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/MuonRdoToPrepData/MM_RdoToMM_PrepData.h
+++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/MuonRdoToPrepData/MM_RdoToMM_PrepData.h
@@ -1,12 +1,14 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef CSCRDOTOCSCPREPDATA_H
-#define CSCRDOTOCSCPREPDATA_H
+#ifndef MM_RDOTOMM_PREPDATA_H
+#define MM_RDOTOMM_PREPDATA_H
 
 #include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthAlgorithm.h"
+#include "MuonCnvToolInterfaces/IMuonRdoToPrepDataTool.h"
+
 
 class MM_RdoToMM_PrepData : public AthAlgorithm {
 
@@ -20,6 +22,11 @@ public:
 
 private:
 
+  ToolHandle< Muon::IMuonRdoToPrepDataTool >    m_tool; //!< Tool used to do actual decoding.
+  
+  bool                                    m_print_inputRdo; //!<< If true, will dump information about the input RDOs.
+  bool                                    m_print_prepData; //!<< If true, will dump information about the resulting PRDs.
+
 };
 
 #endif /// CSCRDOTOCSCPREPDATA_H
diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/MuonRdoToPrepData/StgcRdoToStgcPrepData.h b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/MuonRdoToPrepData/StgcRdoToStgcPrepData.h
index b401781ee636a281368e64a772eae5d3cafdfe83..62069a2079c6d3e976f2c7e40cad542db8834d62 100755
--- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/MuonRdoToPrepData/StgcRdoToStgcPrepData.h
+++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/MuonRdoToPrepData/StgcRdoToStgcPrepData.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef STGCRDOTOSTGCPREPDATA_H
@@ -9,8 +9,7 @@
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "MuonCnvToolInterfaces/IMuonRdoToPrepDataTool.h"
 
-#include "TrigSteeringEvent/TrigRoiDescriptor.h"
-#include "IRegionSelector/IRegSelSvc.h"
+#include "MuonPrepRawData/TgcPrepDataContainer.h"
 #include "MuonPrepRawData/sTgcPrepDataContainer.h"
 
 class StgcRdoToStgcPrepData : public AthAlgorithm {
@@ -25,10 +24,7 @@ public:
 
 private:
 
-  bool m_seededDecoding;
   ToolHandle< Muon::IMuonRdoToPrepDataTool >    m_decoderTool; //!< Tool used to do actual decoding.
-  SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey;
-  ServiceHandle<IRegSelSvc> m_regionSelector; //<! pointer to RegionSelectionSvc
   SG::WriteHandleKey<Muon::sTgcPrepDataContainer> m_prdContainer;
 };
 
diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MM_RdoToMM_PrepData.cxx b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MM_RdoToMM_PrepData.cxx
index 8e0ac7ecee27c617f635c76c213b2eaeb62a7d94..b77e77db3abe223e51569b4e8e2a1bf0d0664bd2 100755
--- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MM_RdoToMM_PrepData.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MM_RdoToMM_PrepData.cxx
@@ -1,8 +1,19 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
 #include "MuonRdoToPrepData/MM_RdoToMM_PrepData.h"
+#include "Identifier/IdentifierHash.h"
 
 MM_RdoToMM_PrepData::MM_RdoToMM_PrepData(const std::string& name, ISvcLocator* pSvcLocator) :
-    AthAlgorithm(name, pSvcLocator)
+  AthAlgorithm(name, pSvcLocator),
+  m_tool("Muon::MmRdoToPrepDataTool/MM_PrepDataProviderTool"),
+  m_print_inputRdo(false),
+  m_print_prepData(false)
 {
+  declareProperty("DecodingTool",       m_tool,       "mdt rdo to prep data conversion tool" );
+  declareProperty("PrintInputRdo",      m_print_inputRdo, "If true, will dump information about the input RDOs");
+  declareProperty("PrintPrepData",      m_print_prepData, "If true, will dump information about the resulting PRDs");
 }
 
 StatusCode MM_RdoToMM_PrepData::finalize() {
@@ -11,13 +22,27 @@ StatusCode MM_RdoToMM_PrepData::finalize() {
 }
 
 StatusCode MM_RdoToMM_PrepData::initialize(){
-    ATH_MSG_DEBUG(" in initialize()");
-    return StatusCode::SUCCESS;
+  ATH_MSG_DEBUG(" in initialize()");
+  
+  ATH_CHECK( m_tool.retrieve() );
+  ATH_MSG_INFO("Retrieved" << m_tool);
+
+  return StatusCode::SUCCESS;
 }
 
 StatusCode MM_RdoToMM_PrepData::execute() {
-    ATH_MSG_DEBUG( " *************** in MM_RdoToMM_PrepData::execute()");
-    return StatusCode::SUCCESS;
+
+  ATH_MSG_DEBUG( " *************** in MM_RdoToMM_PrepData::execute() **************************************");
+  
+  std::vector<IdentifierHash> myVector;
+  std::vector<IdentifierHash> myVectorWithData;
+  myVector.reserve(0); // empty vector 
+  ATH_CHECK(  m_tool->decode(myVector, myVectorWithData) );
+  
+  if (m_print_inputRdo) m_tool->printInputRdo();
+  if (m_print_prepData) m_tool->printPrepData();
+  
+  return StatusCode::SUCCESS;
 }
 
 
diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/StgcRdoToStgcPrepData.cxx b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/StgcRdoToStgcPrepData.cxx
index 269f03c43810da67b7ecb791d8e043508625753c..5eab23041a1e7cf27203165b33d2189767aabada 100755
--- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/StgcRdoToStgcPrepData.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/StgcRdoToStgcPrepData.cxx
@@ -1,22 +1,15 @@
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
+#include "MuonRdoToPrepData/StgcRdoToStgcPrepData.h"
 
-#include "StoreGate/DataHandle.h"
 #include "Identifier/IdentifierHash.h"
-#include "MuonRdoToPrepData/StgcRdoToStgcPrepData.h"
 
 StgcRdoToStgcPrepData::StgcRdoToStgcPrepData(const std::string& name, ISvcLocator* pSvcLocator) :
 AthAlgorithm(name, pSvcLocator),
-m_seededDecoding(false),
-m_decoderTool ("Muon::StgcRdoToStgcPrepDataTool/StgcRdoToStgcPrepDataTool"),
-m_roiCollectionKey("OutputRoIs"),
-m_regionSelector("RegSelSvc",name),
-m_prdContainer("sTGC_Measurements")
+m_decoderTool ("Muon::sTgcRdoToPrepDataTool/STGC_PrepDataProviderTool"),
+m_prdContainer("STGC_Measurements")
 {
-  declareProperty("DoSeededDecoding",   m_seededDecoding, "If true decode only in RoIs");
-  declareProperty("RoIs",               m_roiCollectionKey, "RoIs to read in");
-  declareProperty("RegionSelectionSvc", m_regionSelector, "Region Selector");
   declareProperty("OutputCollection",   m_prdContainer);
 }
 
@@ -28,62 +21,30 @@ StatusCode StgcRdoToStgcPrepData::finalize() {
 StatusCode StgcRdoToStgcPrepData::initialize(){
   ATH_MSG_DEBUG(" in initialize()");
 
-  //Nullify key from scheduler if not needed  
-  if(!m_seededDecoding){
-    m_roiCollectionKey = "";
-    m_prdContainer="";
-  }
-    
-  if(m_seededDecoding){
-    ATH_CHECK(m_roiCollectionKey.initialize());
-    ATH_CHECK(m_prdContainer.initialize());
-    if (m_regionSelector.retrieve().isFailure()) {
-      ATH_MSG_FATAL("Unable to retrieve RegionSelector Svc");
-      return StatusCode::FAILURE;
-    }
-  }
+  ATH_CHECK(m_prdContainer.initialize());
+
+  ATH_CHECK( m_decoderTool.retrieve() );
+  ATH_MSG_INFO("Retrieved" << m_decoderTool);
+
+
   return StatusCode::SUCCESS;
 }
 
 StatusCode StgcRdoToStgcPrepData::execute() {
   ATH_MSG_DEBUG( " *************** in StgcRdoToStgcPrepData::execute()");
 
-  /// process CSC RDO
+  /// process STGC RDO
   std::vector<IdentifierHash> givenIDs;
   std::vector<IdentifierHash> decodedIDs;
   StatusCode status = StatusCode::SUCCESS;
 
-  if(m_seededDecoding){
-    bool decoded=false;
-    SG::ReadHandle<TrigRoiDescriptorCollection> muonRoI(m_roiCollectionKey);
-    if(!muonRoI.isValid()){
-      ATH_MSG_WARNING("Cannot retrieve muonRoI "<<m_roiCollectionKey.key());
-      return StatusCode::SUCCESS;
-    }
-    else{
-      for(auto roi : *muonRoI){
-        m_regionSelector->DetHashIDList(CSC,*roi,givenIDs);
-        if(givenIDs.size()!=0){
-          status=m_decoderTool->decode(givenIDs, decodedIDs);
-          givenIDs.clear();
-          decoded=true;
-        }
-      }
-    }
-    if(!decoded){
-      //Need to store an empty prd container if we didn't decode anything
-      //as the container is expected to exist downstream
-      SG::WriteHandle<Muon::sTgcPrepDataContainer> prds (m_prdContainer);
-      ATH_CHECK(prds.record(std::make_unique<Muon::sTgcPrepDataContainer>(0)));
-    }
-  }
-  else{
-    // givenIDs size is zero so this invokes all the RDOs conversion to PrepData
-    status =   m_decoderTool->decode(givenIDs, decodedIDs);
-  }
+  // givenIDs size is zero so this invokes all the RDOs conversion to PrepData
+
+  givenIDs.reserve(0);
+  status =   m_decoderTool->decode(givenIDs, decodedIDs);
 
   if (status.isFailure()) {
-    ATH_MSG_ERROR("Unable to decode CSC RDO into CSC PrepRawData");
+    ATH_MSG_ERROR("Unable to decode STGC RDO into STGC PrepRawData");
     return status;
   }
 
diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/components/MuonRdoToPrepData_entries.cxx b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/components/MuonRdoToPrepData_entries.cxx
index a1907d7339434773fdfc77ee8cd2f4f9c21cee3d..25e287d3929f85280a5507415cbf00bf5385d694 100644
--- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/components/MuonRdoToPrepData_entries.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/components/MuonRdoToPrepData_entries.cxx
@@ -3,10 +3,12 @@
 #include "MuonRdoToPrepData/RpcRdoToRpcPrepData.h"
 #include "MuonRdoToPrepData/TgcRdoToTgcPrepData.h"
 #include "MuonRdoToPrepData/StgcRdoToStgcPrepData.h"
+#include "MuonRdoToPrepData/MM_RdoToMM_PrepData.h"
 
 DECLARE_COMPONENT( CscRdoToCscPrepData )
 DECLARE_COMPONENT( MdtRdoToMdtPrepData )
 DECLARE_COMPONENT( RpcRdoToRpcPrepData )
 DECLARE_COMPONENT( TgcRdoToTgcPrepData )
 DECLARE_COMPONENT( StgcRdoToStgcPrepData )
+DECLARE_COMPONENT( MM_RdoToMM_PrepData )
 
diff --git a/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/components/MuonSTGC_CnvTools_entries.cxx b/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/components/MuonSTGC_CnvTools_entries.cxx
index bb97cdbad288f51416fd5b24a008bc120fe81616..6eed8b31e1774d16f22b15e4612c37ef6f3aa610 100644
--- a/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/components/MuonSTGC_CnvTools_entries.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/components/MuonSTGC_CnvTools_entries.cxx
@@ -1,6 +1,5 @@
-#include "../STGC_RawDataToPrepDataTool.h"
+#include "../sTgcRdoToPrepDataTool.h"
 #include "../STGC_RawDataProviderTool.h"
 
-
-DECLARE_COMPONENT( Muon::STGC_RawDataToPrepDataTool )
+DECLARE_COMPONENT( Muon::sTgcRdoToPrepDataTool )
 DECLARE_COMPONENT( Muon::STGC_RawDataProviderTool )
diff --git a/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataTool.cxx b/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..f269fffc6ea3b2e924deafbaf28e29bb74faf992
--- /dev/null
+++ b/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataTool.cxx
@@ -0,0 +1,463 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+///////////////////////////////////////////////////////////////////
+// sTgcRdoToPrepDataTool.cxx, (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+
+#include "sTgcRdoToPrepDataTool.h"
+#include "GaudiKernel/MsgStream.h"
+#include "GaudiKernel/ISvcLocator.h"
+
+#include "StoreGate/StoreGateSvc.h"
+
+#include "MuonIdHelpers/sTgcIdHelper.h"
+#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/MuonIdHelper.h"
+#include "MuonReadoutGeometry/MuonStation.h"
+#include "MuonReadoutGeometry/sTgcReadoutElement.h"
+
+// BS access
+#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
+#include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h"
+
+using namespace MuonGM;
+using namespace Trk;
+using namespace Muon;
+
+Muon::sTgcRdoToPrepDataTool::sTgcRdoToPrepDataTool(const std::string& t,
+						   const std::string& n,
+						   const IInterface*  p )
+  :
+  AthAlgTool(t,n,p),
+  m_muonMgr(0),
+  m_stgcIdHelper(0),
+  m_muonIdHelper(0),
+  m_fullEventDone(false),
+  m_stgcPrepDataContainer(0)
+{
+  declareInterface<Muon::IMuonRdoToPrepDataTool>(this);
+  
+  //  template for property decalration
+  declareProperty("OutputCollection",    m_stgcPrepDataContainerKey = std::string("STGC_Measurements"),
+		  "Muon::sTgcPrepDataContainer to record");
+  declareProperty("InputCollection",    m_rdoContainerKey = std::string("sTGCRDO"),
+		  "RDO container to read");
+  declareProperty("Merge",  m_merge = true);
+  
+}
+
+
+Muon::sTgcRdoToPrepDataTool::~sTgcRdoToPrepDataTool()
+{
+
+}
+
+StatusCode Muon::sTgcRdoToPrepDataTool::initialize()
+{  
+  ATH_MSG_DEBUG(" in initialize()");
+  
+  /// get the detector descriptor manager
+  StoreGateSvc* detStore=0;
+  StatusCode sc = serviceLocator()->service("DetectorStore", detStore);
+  
+  if (sc.isSuccess()) {
+    sc = detStore->retrieve( m_muonMgr );
+    if (sc.isFailure()) {
+      ATH_MSG_FATAL(" Cannot retrieve MuonReadoutGeometry ");
+      return sc;
+    }
+  } else {
+    ATH_MSG_ERROR("DetectorStore not found ");
+    return sc;
+  }
+  
+  m_stgcIdHelper = m_muonMgr->stgcIdHelper();
+
+  // check if the initialization of the data container is success
+  ATH_CHECK(m_stgcPrepDataContainerKey.initialize());
+
+  ATH_CHECK(m_rdoContainerKey.initialize());
+
+
+  ATH_MSG_INFO("initialize() successful in " << name());
+  return StatusCode::SUCCESS;
+}
+
+StatusCode Muon::sTgcRdoToPrepDataTool::finalize()
+{
+  return StatusCode::SUCCESS;
+
+}
+
+StatusCode Muon::sTgcRdoToPrepDataTool::processCollection(const STGC_RawDataCollection *rdoColl, 
+							  std::vector<IdentifierHash>& idWithDataVect)
+{
+  ATH_MSG_DEBUG(" ***************** Start of process STGC Collection");
+
+  const IdentifierHash hash = rdoColl->identifyHash();
+
+  sTgcPrepDataCollection* prdColl = nullptr;
+  
+  // check if the collection already exists, otherwise add it
+  if ( m_stgcPrepDataContainer->indexFind(hash) != m_stgcPrepDataContainer->end() ) {
+
+    ATH_MSG_DEBUG("In processCollection: collection already contained in the MM PrepData container");
+    return StatusCode::FAILURE;
+  } 
+  else {
+    prdColl = new sTgcPrepDataCollection(hash);
+    idWithDataVect.push_back(hash);
+
+    // set the offline identifier of the collection Id
+    IdContext context = m_stgcIdHelper->module_context();
+    Identifier moduleId;
+    int getId = m_stgcIdHelper->get_id(hash,moduleId,&context);
+    if ( getId != 0 ) {
+      ATH_MSG_ERROR("Could not convert the hash Id: " << hash << " to identifier");
+    } 
+    else {
+      prdColl->setIdentifier(moduleId);
+    }
+
+    if (StatusCode::SUCCESS != m_stgcPrepDataContainer->addCollection(prdColl, hash)) {
+      ATH_MSG_DEBUG("In processCollection - Couldn't record in the Container MM Collection with hashID = "
+		    << (int)hash );
+      return StatusCode::FAILURE;
+    }
+
+  }
+
+  std::vector<sTgcPrepData> sTgcprds;
+  std::vector<int> sTgcflag;
+  std::vector<sTgcPrepData> sTgcWireprds;
+  // convert the RDO collection to a PRD collection
+  STGC_RawDataCollection::const_iterator it = rdoColl->begin();
+  for ( ; it != rdoColl->end() ; ++it ) {
+
+    ATH_MSG_DEBUG("Adding a new sTgc PrepRawData");
+
+    const STGC_RawData* rdo = *it;
+    const Identifier rdoId = rdo->identify();
+//    const Identifier elementId = m_stgcIdHelper->elementID(rdoId);
+    std::vector<Identifier> rdoList;
+    rdoList.push_back(rdoId);
+    
+    // get the local and global positions
+    const MuonGM::sTgcReadoutElement* detEl = m_muonMgr->getsTgcReadoutElement(rdoId);
+    Amg::Vector2D localPos;
+
+    bool getLocalPos = detEl->stripPosition(rdoId,localPos);
+    if ( !getLocalPos ) {
+      ATH_MSG_ERROR("Could not get the local strip position for sTgc");
+      return StatusCode::FAILURE;
+    } 
+
+    // get the resolution from strip width
+    const int gasGap  = m_stgcIdHelper->gasGap(rdoId);
+    const int channel = m_stgcIdHelper->channel(rdoId);
+
+    // to be fixed: for now do not set the resolution, it will be added in the 
+    // next update
+    double width = 0.;
+
+    int channelType = m_stgcIdHelper->channelType(rdoId);
+
+    ATH_MSG_DEBUG("Adding a new STGC PRD, gasGap: " << gasGap << " channel: " << channel 
+		  << " type: " << channelType );
+
+    if (channelType ==0) { // Pads
+      const MuonGM::MuonPadDesign* design = detEl->getPadDesign(rdoId);
+      if (!design) {
+        ATH_MSG_WARNING("Failed to get design for sTGC pad" );
+      } else {
+        double widthOLD = design->channelWidth(localPos,true);  //channelWidth returns the Phi Angle for pads, does not account for staggering.
+        width = design->inputPhiPitch*M_PI/180.*(detEl->globalPosition().perp());
+        ATH_MSG_DEBUG( " Pad old width " << widthOLD << " new width " << width); 
+      } 
+    } else if (channelType == 1) { // Strips 
+      const MuonGM::MuonChannelDesign* design = detEl->getDesign(rdoId);
+      if (!design) ATH_MSG_WARNING("Failed to get design for sTGC strip " );
+      else 
+        width = design->inputPitch;
+    } else if (channelType == 2) { // Wires
+      const MuonGM::MuonChannelDesign* design = detEl->getDesign(rdoId);
+      if (!design) {
+        ATH_MSG_WARNING("Failed to get design for sTGC wire" );
+      } else { 
+        double widthOLD = design->channelWidth(localPos);
+// scale error 
+        width = design->groupWidth*fabs(design->inputPitch);
+        ATH_MSG_DEBUG( " Wires old width " << widthOLD << " new width " << width); 
+      } 
+   }
+
+    else {
+       ATH_MSG_ERROR("Invalid channel Type for sTGC");
+       return StatusCode::FAILURE;
+    }
+
+    double resolution = width/sqrt(12.); 
+
+    Amg::MatrixX* cov = new Amg::MatrixX(1,1);
+    cov->setIdentity();
+    (*cov)(0,0) = resolution*resolution;  
+
+    ATH_MSG_DEBUG("Adding a new STGC PRD, gasGap: " << gasGap << " channel: " << channel << " type: " << channelType << " resolution " << resolution );
+
+    if(m_merge&&(channelType==1||channelType==2)) {
+// eta strips and wires
+      if(channelType==1) {
+        sTgcflag.push_back(0);
+        sTgcprds.push_back(sTgcPrepData(rdoId,hash,localPos,rdoList,cov,detEl));
+       } else { 
+        sTgcWireprds.push_back(sTgcPrepData(rdoId,hash,localPos,rdoList,cov,detEl));
+       }
+    } else {
+// Pads no merging
+      prdColl->push_back(new sTgcPrepData(rdoId,hash,localPos,rdoList,cov,detEl));
+    } 
+  } //end it = rdoColl
+
+  if(m_merge) {
+
+// merge the eta and phi prds that fire closeby strips
+
+    for (unsigned int j=0; j<2; ++j){
+// j == 0 loop over eta strips prds
+// j == 1 loop over phi wire prds 
+      if(j==1) {
+        sTgcprds.insert(sTgcprds.end(), sTgcWireprds.begin(), sTgcWireprds.end());
+        for (unsigned int i=0; i<sTgcWireprds.size(); ++i){
+          sTgcflag.push_back(0);
+//          sTgcprds.push_back(sTgcWireprds[i]);
+        }
+//      if(sTgcWireprds.size()>0) sTgcWireprds.clear();
+      }
+      for (unsigned int i=0; i<sTgcprds.size(); ++i){
+         // skip the merged prds
+         if(sTgcflag[i]==1) continue;
+ 
+         bool merge = false;
+         unsigned int jmerge = -1;
+         Identifier id_prd = sTgcprds[i].identify();
+         int strip = m_stgcIdHelper->channel(id_prd);
+         int gasGap  = m_stgcIdHelper->gasGap(id_prd);
+         int layer   = m_stgcIdHelper->multilayer(id_prd);
+         int channelType = m_stgcIdHelper->channelType(id_prd);
+         ATH_MSG_VERBOSE("  sTgcprds " <<  sTgcprds.size() <<" index "<< i << " strip " << strip << " gasGap " << gasGap << " layer " << layer << " channelType " << channelType);
+         for (unsigned int j=i+1; j<sTgcprds.size(); ++j){
+           Identifier id_prdN = sTgcprds[j].identify();
+           int stripN = m_stgcIdHelper->channel(id_prdN);
+           int gasGapN  = m_stgcIdHelper->gasGap(id_prdN);
+           int layerN   = m_stgcIdHelper->multilayer(id_prdN);
+           int channelTypeN = m_stgcIdHelper->channelType(id_prdN);
+           if( gasGapN==gasGap && layerN==layer && channelType == channelTypeN) {
+             ATH_MSG_VERBOSE(" next sTgcprds strip same gasGap and layer index " << j << " strip " << stripN << " gasGap " << gasGapN << " layer " << layerN );
+             if(abs(strip-stripN)<2) {
+               merge = true;
+               jmerge = j;
+               break;
+             }
+           }
+         }
+ 
+         if(!merge) {
+           ATH_MSG_VERBOSE(" add isolated sTgcprds strip " << strip << " gasGap " << gasGap << " layer " << layer << " channelType " << channelType);
+           std::vector<Identifier> rdoList;
+           rdoList.push_back(id_prd);
+           double covX = sTgcprds[i].localCovariance()(Trk::locX,Trk::locX);
+           Amg::MatrixX* covN = new Amg::MatrixX(1,1);
+           covN->setIdentity();
+           (*covN)(0,0) = covX;
+           sTgcPrepData* prdN = new sTgcPrepData(id_prd, hash, sTgcprds[i].localPosition(), rdoList, covN, sTgcprds[i].detectorElement(), sTgcprds[i].getBcBitMap());
+           prdN->setHashAndIndex(prdColl->identifyHash(), prdColl->size());
+           prdColl->push_back(prdN);
+         } else {
+           unsigned int nmerge = 0;
+           std::vector<Identifier> rdoList;
+           std::vector<unsigned int> mergeIndices;
+           std::vector<int> mergeStrips;
+           rdoList.push_back(id_prd);
+           sTgcflag[i] = 1;
+           mergeIndices.push_back(i);
+           mergeStrips.push_back(strip);
+           unsigned int nmergeStrips = 1;
+           unsigned int nmergeStripsMax = 25;
+           for (unsigned int k=0; k < nmergeStripsMax; ++k) {
+             for (unsigned int j=jmerge; j<sTgcprds.size(); ++j){
+               if(sTgcflag[j] == 1) continue;
+               Identifier id_prdN = sTgcprds[j].identify();
+               int stripN = m_stgcIdHelper->channel(id_prdN);
+               if( abs(mergeStrips[k]-stripN) <= 1 ) {
+                 int gasGapN  = m_stgcIdHelper->gasGap(id_prdN);
+                 int layerN   = m_stgcIdHelper->multilayer(id_prdN);
+                 int channelTypeN = m_stgcIdHelper->channelType(id_prdN);
+                 if( gasGapN==gasGap && layerN==layer && channelType==channelTypeN ) {
+                   if(mergeStrips[k]==stripN) {
+                     sTgcflag[j] = 1;
+                     continue;
+                   } 
+                   nmerge++;
+                   rdoList.push_back(id_prdN);
+                   sTgcflag[j] = 1;
+                   mergeIndices.push_back(j);
+                   mergeStrips.push_back(stripN);
+                   nmergeStrips++;
+                 }
+               }
+             }
+             if(k>=nmergeStrips) break;
+           }
+           ATH_MSG_VERBOSE(" add merged sTgcprds nmerge " << nmerge << " strip " << strip << " gasGap " << gasGap << " layer " << layer );
+ 
+           // start off from strip in the middle
+          int stripSum = 0;
+           for (unsigned int k =0; k<mergeStrips.size(); ++k) {
+             stripSum += mergeStrips[k];
+           }
+           stripSum = stripSum/mergeStrips.size();
+ 
+           unsigned int j = jmerge;
+           for (unsigned int k =0; k<mergeStrips.size(); ++k) {
+             if(mergeStrips[k]==stripSum) j = mergeIndices[k];
+             ATH_MSG_VERBOSE(" merged strip nr " << k <<  " strip " << mergeStrips[k] << " index " << mergeIndices[k]);
+           }
+           ATH_MSG_VERBOSE(" Look for strip nr " << stripSum << " found at index " << j);
+ 
+           double covX = sTgcprds[j].localCovariance()(Trk::locX, Trk::locX);
+           Amg::MatrixX* covN = new Amg::MatrixX(1,1);
+           covN->setIdentity();
+           (*covN)(0,0) = 6.*(nmerge + 1.)*covX;
+           if(nmerge<=1) (*covN)(0,0) = covX;
+           ATH_MSG_VERBOSE(" make merged prepData at strip " << m_stgcIdHelper->channel(sTgcprds[j].identify())  << " channelType " << channelType << " nmerge " << nmerge << " sqrt covX " << sqrt((*covN)(0,0)));
+ 
+           sTgcPrepData* prdN = new sTgcPrepData(sTgcprds[j].identify(), hash, sTgcprds[j].localPosition(), rdoList, covN, sTgcprds[j].detectorElement(), sTgcprds[j].getBcBitMap());
+           prdN->setHashAndIndex(prdColl->identifyHash(), prdColl->size());
+           prdColl->push_back(prdN);
+         }
+       } // end loop sTgcprds[i]
+       // clear vector and delete elements
+       sTgcflag.clear();
+       sTgcprds.clear();
+       sTgcWireprds.clear();
+     } // loop over eta and Wire prds
+  }
+
+
+  return StatusCode::SUCCESS;
+}
+
+
+Muon::sTgcRdoToPrepDataTool::SetupSTGC_PrepDataContainerStatus Muon::sTgcRdoToPrepDataTool::setupSTGC_PrepDataContainer() 
+{
+
+  if(!evtStore()->contains<Muon::sTgcPrepDataContainer>(m_stgcPrepDataContainerKey.key())){    
+    m_fullEventDone=false;
+    
+    SG::WriteHandle< Muon::sTgcPrepDataContainer > handle(m_stgcPrepDataContainerKey);
+    StatusCode status = handle.record(std::make_unique<Muon::sTgcPrepDataContainer>(m_stgcIdHelper->module_hash_max()));
+    
+    if (status.isFailure() || !handle.isValid() )   {
+      ATH_MSG_FATAL("Could not record container of STGC PrepData Container at " << m_stgcPrepDataContainerKey.key()); 
+      return FAILED;
+    }
+    m_stgcPrepDataContainer = handle.ptr();
+    return ADDED;
+    
+  }
+  return ALREADYCONTAINED;
+}
+
+
+const STGC_RawDataContainer* Muon::sTgcRdoToPrepDataTool::getRdoContainer() {
+
+  auto rdoContainerHandle  = SG::makeHandle(m_rdoContainerKey);
+  if(rdoContainerHandle.isValid()) {
+    ATH_MSG_DEBUG("STGC_getRdoContainer success");
+    return rdoContainerHandle.cptr();  
+  }
+  ATH_MSG_WARNING("Retrieval of STGC_RawDataContainer failed !");
+
+  return nullptr;
+}
+
+
+void Muon::sTgcRdoToPrepDataTool::processRDOContainer( std::vector<IdentifierHash>& idWithDataVect ) 
+{
+
+
+  ATH_MSG_DEBUG("In processRDOContainer");
+  const STGC_RawDataContainer* rdoContainer = getRdoContainer();
+  if (!rdoContainer) {
+    return;
+  }
+  
+  // run in unseeded mode
+  for (STGC_RawDataContainer::const_iterator it = rdoContainer->begin(); it != rdoContainer->end(); ++it ) {
+    
+    auto rdoColl = *it;
+    if (rdoColl->empty()) continue;
+    ATH_MSG_DEBUG("New RDO collection with " << rdoColl->size() << "STGC Hits");
+
+    if(processCollection(rdoColl, idWithDataVect).isFailure()) {
+      ATH_MSG_DEBUG("processCsm returns a bad StatusCode - keep going for new data collections in this event");
+    }
+  } 
+  
+  
+  return;
+}
+
+
+// methods for ROB-based decoding
+StatusCode Muon::sTgcRdoToPrepDataTool::decode( std::vector<IdentifierHash>& idVect, 
+						std::vector<IdentifierHash>& idWithDataVect )
+{
+
+  ATH_MSG_DEBUG("Size of the input hash id vector: " << idVect.size());
+
+  // clear the output vector of selected data
+  idWithDataVect.clear();
+  
+  SetupSTGC_PrepDataContainerStatus containerRecordStatus = setupSTGC_PrepDataContainer();
+
+  if ( containerRecordStatus == FAILED ) {
+    return StatusCode::FAILURE;
+  } 
+
+  processRDOContainer(idWithDataVect);
+
+  // check if the full event has already been decoded
+  if ( m_fullEventDone ) {
+    ATH_MSG_DEBUG ("Full event dcoded, nothing to do");
+    return StatusCode::SUCCESS;
+  } 
+
+
+  return StatusCode::SUCCESS;
+} 
+
+StatusCode Muon::sTgcRdoToPrepDataTool::decode( const std::vector<uint32_t>& robIds )
+{
+
+  ATH_MSG_DEBUG("Size of the robIds" << robIds.size() );
+
+  return StatusCode::SUCCESS;
+}
+
+// printout methods
+void Muon::sTgcRdoToPrepDataTool::printInputRdo() {
+
+
+  return;
+}
+
+
+void Muon::sTgcRdoToPrepDataTool::printPrepData() {
+
+
+  return;
+}
+
diff --git a/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataTool.h b/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..bdc8da118d6c3a1312249ec62e159b7ade4d15bb
--- /dev/null
+++ b/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataTool.h
@@ -0,0 +1,102 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+///////////////////////////////////////////////////////////////////
+// sTgcRdoToPrepDataTool.h, (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+#ifndef MUONTGC_CNVTOOLS_STGCRDOTOPREPDATATOOL
+#define MUONTGC_CNVTOOLS_STGCRDOTOPREPDATATOOL
+
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "MuonCnvToolInterfaces/IMuonRdoToPrepDataTool.h"
+#include <string>
+
+#include "GaudiKernel/ToolHandle.h"
+#include "MuonRDO/STGC_RawDataContainer.h"
+#include "MuonPrepRawData/sTgcPrepDataContainer.h"
+
+class AtlasDetectorID;
+class Identifier;
+
+class ITGCcablingSvc;
+class sTgcIdHelper;
+
+namespace MuonGM 
+{
+  class MuonDetectorManager;
+  class TgcReadoutElement; 
+}
+
+namespace Muon 
+{
+  class IMuonRawDataProviderTool;
+
+  /** @class STGC_RawDataToPrepDataTool 
+   *  This is the algorithm that convert STGC Raw data  To STGC PRD  as a tool.
+   */  
+
+  class sTgcRdoToPrepDataTool : virtual public IMuonRdoToPrepDataTool, virtual public AthAlgTool
+    {
+    public:
+      /** Constructor */
+      sTgcRdoToPrepDataTool(const std::string& t, const std::string& n, const IInterface* p);
+      
+      /** Destructor */
+      virtual ~sTgcRdoToPrepDataTool();
+      
+      /** Standard AthAlgTool initialize method */
+      virtual StatusCode initialize() override;
+      /** Standard AthAlgTool finalize method */
+      virtual StatusCode finalize() override;
+      
+      /** Decode RDO to PRD  
+       *  A vector of IdentifierHash are passed in, and the data corresponding to this list (i.e. in a Region of Interest) are converted.  
+       *  @param requestedIdHashVect          Vector of hashes to convert i.e. the hashes of ROD collections in a 'Region of Interest'  
+       *  @return selectedIdHashVect This is the subset of requestedIdVect which were actually found to contain data   
+       *  (i.e. if you want you can use this vector of hashes to optimise the retrieval of data in subsequent steps.) */ 
+      StatusCode decode(std::vector<IdentifierHash>& idVect, std::vector<IdentifierHash>& idWithDataVect);
+      StatusCode decode(const std::vector<uint32_t>& robIds);
+
+      
+      StatusCode processCollection(const STGC_RawDataCollection *rdoColl, 
+				   std::vector<IdentifierHash>& idWithDataVect);
+
+      virtual void printPrepData() override;
+      virtual void printInputRdo() override;
+
+      /** Resolve possible conflicts with IProperty::interfaceID() */
+      static const InterfaceID& interfaceID() { return IMuonRdoToPrepDataTool::interfaceID(); }
+      
+    private:
+      
+      enum SetupSTGC_PrepDataContainerStatus {
+	FAILED = 0, ADDED, ALREADYCONTAINED
+      };
+
+      SetupSTGC_PrepDataContainerStatus setupSTGC_PrepDataContainer();
+
+      const STGC_RawDataContainer* getRdoContainer();
+
+      void processRDOContainer(std::vector<IdentifierHash>& idWithDataVect);
+
+      /** muon detector manager */
+      const MuonGM::MuonDetectorManager * m_muonMgr;
+
+      /** TGC identifier helper */
+      const sTgcIdHelper* m_stgcIdHelper;
+      const MuonIdHelper* m_muonIdHelper;
+
+      bool m_fullEventDone;
+
+      /** TgcPrepRawData container key for current BC */ 
+      std::string m_outputCollectionLocation;      
+      Muon::sTgcPrepDataContainer* m_stgcPrepDataContainer;
+      SG::ReadHandleKey<STGC_RawDataContainer> m_rdoContainerKey;//"TGCRDO"
+      SG::WriteHandleKey<sTgcPrepDataContainer> m_stgcPrepDataContainerKey;
+      bool m_merge; // merge Prds
+
+   }; 
+} // end of namespace
+
+#endif // MUONTGC_CNVTOOLS_STGCRDOTOPREPDATATOOL_H
diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonChannelDesign.h b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonChannelDesign.h
index ebfc27c765ba19d1c12d9f2a052d65403d49dc62..0a71604a2308c5d08a9e55fc74f9ca49e523ff1e 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonChannelDesign.h
+++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonChannelDesign.h
@@ -146,7 +146,9 @@ namespace MuonGM {
         else chNum = -1;
       }
       else {
-        xMid = pos.x() - pos.y()*tan(sAngle);
+//        xMid = pos.x() - pos.y()*tan(sAngle);
+// For all MM planes the local position is already rotated
+        xMid = pos.x();
         chNum = int( cos(sAngle)*(xMid - xMfirst)/inputPitch+1.5 );
       }
       if (chNum<1) return -1;
@@ -248,7 +250,9 @@ namespace MuonGM {
 
     } else if ( type==MuonChannelDesign::etaStrip ) {
 
-      if (sAngle==0.) {
+      if (sAngle==0.||inputPitch<1.0) {
+
+// MM == inputPitch<1.0 always use same code to calculate strip position for layers with and without stereo angle
 
 	double x = firstPos + inputPitch*(st-1);
         if (inputPitch == 3.2) { // check if sTGC, preferably 2 unique values
diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MMReadoutElement.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MMReadoutElement.cxx
index 44c1bfd002e418fb6800f4bd28e57747d0215d8c..a860746fefe3a9c3c526b0d95f0ea56570049636 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MMReadoutElement.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MMReadoutElement.cxx
@@ -246,7 +246,7 @@ namespace MuonGM {
       m_nStrips.push_back(m_etaDesign[il].nch);
 
       reLog()<<MSG::DEBUG
-	     <<"initDesign:" << getStationName()<< " layer " << il << ", strip pitch " << m_etaDesign[il].inputPitch << ", nstrips " << m_etaDesign[il].nch << endmsg;
+	     <<"initDesign:" << getStationName()<< " layer " << il << ", strip pitch " << m_etaDesign[il].inputPitch << ", nstrips " << m_etaDesign[il].nch << " stereo " <<  m_etaDesign[il].sAngle << endmsg;
 
     }
 
@@ -270,16 +270,19 @@ namespace MuonGM {
       // move the readout plane to the sensitive volume boundary 
       double shift = 0.5*m_etaDesign[layer].thickness;
       double rox = ( layer==0 || layer==2) ? shift : -shift;
-
+      
+      double sAngle = m_etaDesign[layer].sAngle;
       // need to operate switch x<->z because of GeoTrd definition
       m_surfaceData->m_layerSurfaces.push_back( new Trk::PlaneSurface(*this, id) );
       m_surfaceData->m_layerTransforms.push_back(absTransform()*m_Xlg[layer]*Amg::Translation3D(rox,0.,0.)*
-						 Amg::AngleAxis3D(-90.*CLHEP::deg,Amg::Vector3D(0.,1.,0.)) );
+						 Amg::AngleAxis3D(-90.*CLHEP::deg,Amg::Vector3D(0.,1.,0.))*
+                                                 Amg::AngleAxis3D(-sAngle,Amg::Vector3D(0.,0.,1.)) );
 
       // surface info (center, normal) 
       m_surfaceData->m_layerCenters.push_back(m_surfaceData->m_layerTransforms.back().translation());
       m_surfaceData->m_layerNormals.push_back(m_surfaceData->m_layerTransforms.back().linear()*Amg::Vector3D(0.,0.,-1.));
-
+// get phi direction of MM eta strip 
+      *m_MsgStream << MSG::DEBUG << " MMReadoutElement layer " << layer << " sAngle " << sAngle << " phi direction MM eta strip " << (m_surfaceData->m_layerTransforms.back().linear()*Amg::Vector3D(0.,1.,0.)).phi() << endmsg; 
     }
   }
 
diff --git a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/CSC_RegionSelectorTable.cxx b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/CSC_RegionSelectorTable.cxx
index d1e97ea72341fae724bc02698ad16e6e7aad9e18..68b7d26d6b72dfd98024c4116457c7325745e0c6 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/CSC_RegionSelectorTable.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/CSC_RegionSelectorTable.cxx
@@ -82,7 +82,7 @@ StatusCode CSC_RegionSelectorTable::createTable() {
 
   const MuonGM::MuonDetectorManager*	p_MuonMgr = NULL;
   
-  StatusCode status = detStore()->retrieve( p_MuonMgr );
+  ATH_CHECK( detStore()->retrieve( p_MuonMgr ) );
   
   const CscIdHelper*  p_IdHelper = p_MuonMgr->cscIdHelper();
 
diff --git a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/MDT_RegionSelectorTable.cxx b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/MDT_RegionSelectorTable.cxx
index d1b2ab572e9c9e776eec63439016203563cf1123..17754e0a30562da60887e944c23dc80952272b04 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/MDT_RegionSelectorTable.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/MDT_RegionSelectorTable.cxx
@@ -85,7 +85,7 @@ StatusCode MDT_RegionSelectorTable::createTable() {
   
   const MuonGM::MuonDetectorManager*	p_MuonMgr = NULL;
   
-  StatusCode status = detStore()->retrieve( p_MuonMgr );
+  ATH_CHECK( detStore()->retrieve( p_MuonMgr ) );
   
   const MdtIdHelper*  p_IdHelper = p_MuonMgr->mdtIdHelper();
   
diff --git a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/TGC_RegionSelectorTable.cxx b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/TGC_RegionSelectorTable.cxx
index cbfdd5906e9cb621c714756f3f935fe950700d9b..91f8e6ae5e782127a760b8209172ce85273f6e4f 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/TGC_RegionSelectorTable.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/TGC_RegionSelectorTable.cxx
@@ -98,7 +98,7 @@ StatusCode TGC_RegionSelectorTable::createTable() {
 
   const MuonGM::MuonDetectorManager*	p_MuonMgr = NULL;
   
-  StatusCode status = detStore()->retrieve( p_MuonMgr );
+  ATH_CHECK( detStore()->retrieve( p_MuonMgr ) );
 	
   RegSelSiLUT* tgclut = new RegSelSiLUT();
 
diff --git a/MuonSpectrometer/MuonDigitization/CSC_Digitization/src/CscDigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/CSC_Digitization/src/CscDigitizationTool.cxx
index 575941bb8adb8562ca4768627e07f18bdfda089a..3b3f7bb4bb1c2e63374961f6d9f7c551797ecf14 100644
--- a/MuonSpectrometer/MuonDigitization/CSC_Digitization/src/CscDigitizationTool.cxx
+++ b/MuonSpectrometer/MuonDigitization/CSC_Digitization/src/CscDigitizationTool.cxx
@@ -219,7 +219,7 @@ StatusCode CscDigitizationTool::CoreDigitization(CscDigitContainer* cscDigits,Cs
   // get the iterator pairs for this DetEl
   //iterate over hits
   const EventInfo* pevt = 0;
-  StatusCode sc_ev = evtStore()->retrieve(pevt, "");
+  ATH_CHECK( evtStore()->retrieve(pevt, "") );
   m_evt = pevt->event_ID()->event_number();
   m_run = pevt->event_ID()->run_number();
   
diff --git a/MuonSpectrometer/MuonDigitization/MDT_Digitization/python/MDT_DigitizationConfigDb.py b/MuonSpectrometer/MuonDigitization/MDT_Digitization/python/MDT_DigitizationConfigDb.py
index 4756579b754da74efee92444696c638f021cca2f..8df8ca54fed057d79fc828c2e45d668fc501926e 100644
--- a/MuonSpectrometer/MuonDigitization/MDT_Digitization/python/MDT_DigitizationConfigDb.py
+++ b/MuonSpectrometer/MuonDigitization/MDT_Digitization/python/MDT_DigitizationConfigDb.py
@@ -1,11 +1,11 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from AthenaCommon.CfgGetter import addTool
+from AthenaCommon.CfgGetter import addTool, addAlgorithm
 
 addTool("MDT_Digitization.MdtDigitizationConfig.MdtDigitizationTool"     , "MdtDigitizationTool")
 addTool("MDT_Digitization.MdtDigitizationConfig.RT_Relation_DB_DigiTool" , "RT_Relation_DB_DigiTool")
 addTool("MDT_Digitization.MdtDigitizationConfig.MDT_Response_DigiTool"   , "MDT_Response_DigiTool")
 addTool("MDT_Digitization.MdtDigitizationConfig.getMdtRange"             , "MdtRange")
 addTool("MDT_Digitization.MdtDigitizationConfig.Mdt_OverlayDigitizationTool", "Mdt_OverlayDigitizationTool")
-
+addAlgorithm("MDT_Digitization.MdtDigitizationConfig.getMDT_OverlayDigitizer", "MDT_OverlayDigitizer")
 
diff --git a/MuonSpectrometer/MuonDigitization/MDT_Digitization/python/MdtDigitizationConfig.py b/MuonSpectrometer/MuonDigitization/MDT_Digitization/python/MdtDigitizationConfig.py
index 8e10b53ebedc1965bfd335137ce649ccdde6693c..06939434b75cdc4165c1a3d89b2bce76872b2f54 100644
--- a/MuonSpectrometer/MuonDigitization/MDT_Digitization/python/MdtDigitizationConfig.py
+++ b/MuonSpectrometer/MuonDigitization/MDT_Digitization/python/MdtDigitizationConfig.py
@@ -25,9 +25,9 @@ def MdtDigitizationTool(name="MdtDigitizationTool",**kwargs):
    kwargs.setdefault("MaskedStations", [])
    kwargs.setdefault("UseDeadChamberSvc", True)
    kwargs.setdefault("DiscardEarlyHits", True)
-   
+
    kwargs.setdefault("UseTof", jobproperties.Beam.beamType != "cosmics")
-   
+
    if 'RT_Relation_DB_DigiTool' in jobproperties.Digitization.experimentalDigi():
       kwargs.setdefault("DigitizationTool","RT_Relation_DB_DigiTool")
    else:
@@ -41,7 +41,7 @@ def MdtDigitizationTool(name="MdtDigitizationTool",**kwargs):
          kwargs.setdefault("DoQballCharge", False)
    else:
       kwargs.setdefault("DoQballCharge", False)
-   
+
    mdtRndm = kwargs.setdefault("RndmEngine","MDT_Digitization")
    mdtTwinRndm = kwargs.setdefault("TwinRndmEngine","MDT_DigitizationTwin")
    jobproperties.Digitization.rndmSeedList.addSeed(mdtRndm, 49261510, 105132394 )
@@ -75,14 +75,14 @@ def RT_Relation_DB_DigiTool(name="RT_Relation_DB_DigiTool",**kwargs):
    kwargs.setdefault("RndmSvc", jobproperties.Digitization.rndmSvc())
    mdtRndm = kwargs.setdefault("RndmEngine", "RTRelationDB")
    jobproperties.Digitization.rndmSeedList.addSeed(mdtRndm, 49261510,105132394 )
-   
+
    return CfgMgr.RT_Relation_DB_DigiTool(name,**kwargs)
 
 
 def MDT_Response_DigiTool(name="MDT_Response_DigiTool",**kwargs):
    kwargs.setdefault("RndmSvc", jobproperties.Digitization.rndmSvc())
    mdtRndm = kwargs.setdefault("RndmEngine", "MDTResponse")
-   
+
    if jobproperties.Digitization.specialConfiguration.statusOn:
       specialConfigDict = jobproperties.Digitization.specialConfiguration.get_Value()
       if 'MDT_QballConfig' in specialConfigDict.keys():
@@ -91,14 +91,18 @@ def MDT_Response_DigiTool(name="MDT_Response_DigiTool",**kwargs):
          kwargs.setdefault("DoQballGamma", False)
    else:
       kwargs.setdefault("DoQballGamma", False)
-   
+
    jobproperties.Digitization.rndmSeedList.addSeed(mdtRndm, 49261510,105132394 )
    return CfgMgr.MDT_Response_DigiTool(name,**kwargs)
-   
+
 def Mdt_OverlayDigitizationTool(name="Mdt_OverlayDigitizationTool",**kwargs):
     from OverlayCommonAlgs.OverlayFlags import overlayFlags
-    kwargs.setdefault("EvtStore", overlayFlags.evtStore())
     kwargs.setdefault("OutputObjectName",overlayFlags.evtStore()+"+MDT_DIGITS")
-    kwargs.setdefault("OutputSDOName",overlayFlags.evtStore()+"+MDT_SDO")
     kwargs.setdefault("GetT0FromBD", overlayFlags.isDataOverlay())
+    if not overlayFlags.isDataOverlay():
+        kwargs.setdefault("OutputSDOName",overlayFlags.evtStore()+"+MDT_SDO")
     return MdtDigitizationTool(name,**kwargs)
+
+def getMDT_OverlayDigitizer(name="MDT_OverlayDigitizer", **kwargs):
+    kwargs.setdefault("MDT_DigitizationTool","Mdt_OverlayDigitizationTool")
+    return CfgMgr.MDT_Digitizer(name,**kwargs)
diff --git a/MuonSpectrometer/MuonDigitization/MDT_Digitization/src/MdtDigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/MDT_Digitization/src/MdtDigitizationTool.cxx
index 6c37e78684046d79ae33c12c02d02df73930b463..c764603e6f17b2d6f83fd351d0088a69c8ad66ce 100644
--- a/MuonSpectrometer/MuonDigitization/MDT_Digitization/src/MdtDigitizationTool.cxx
+++ b/MuonSpectrometer/MuonDigitization/MDT_Digitization/src/MdtDigitizationTool.cxx
@@ -228,7 +228,9 @@ StatusCode MdtDigitizationTool::initialize() {
 
   //initialize the output WriteHandleKeys
   ATH_CHECK(m_outputObjectKey.initialize());
+  ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputObjectKey );
   ATH_CHECK(m_outputSDOKey.initialize());
+  ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputSDOKey );
   ATH_MSG_DEBUG ( "Output Digits: '" << m_outputObjectKey.key() << "'" );
 
   //simulation identifier helper	
@@ -428,12 +430,12 @@ StatusCode MdtDigitizationTool::mergeEvent() {
   // create and record the Digit container in StoreGate
   SG::WriteHandle<MdtDigitContainer> digitContainer(m_outputObjectKey);
   ATH_CHECK(digitContainer.record(std::make_unique<MdtDigitContainer>(m_idHelper->module_hash_max())));
-  ATH_MSG_DEBUG ( "MdtDigitContainer recorded in StoreGate." );
+  ATH_MSG_DEBUG("Recorded MdtDigitContainer called " << digitContainer.name() << " in store " << digitContainer.store());
 
   // create and record the SDO container in StoreGate
   SG::WriteHandle<MuonSimDataCollection> sdoContainer(m_outputSDOKey);
   ATH_CHECK(sdoContainer.record(std::make_unique<MuonSimDataCollection>()));
-  ATH_MSG_DEBUG ( "MdtSDOCollection recorded in StoreGate." );
+  ATH_MSG_DEBUG("Recorded MuonSimDataCollection called " << sdoContainer.name() << " in store " << sdoContainer.store());
 
   StatusCode status = doDigitization(digitContainer.ptr(), sdoContainer.ptr());
   if (status.isFailure())  {
@@ -465,12 +467,12 @@ StatusCode MdtDigitizationTool::processAllSubEvents() {
   // create and record the Digit container in StoreGate
   SG::WriteHandle<MdtDigitContainer> digitContainer(m_outputObjectKey);
   ATH_CHECK(digitContainer.record(std::make_unique<MdtDigitContainer>(m_idHelper->module_hash_max())));
-  ATH_MSG_DEBUG ( "MdtDigitContainer recorded in StoreGate." );
+  ATH_MSG_DEBUG("Recorded MdtDigitContainer called " << digitContainer.name() << " in store " << digitContainer.store());
 
   // create and record the SDO container in StoreGate
   SG::WriteHandle<MuonSimDataCollection> sdoContainer(m_outputSDOKey);
   ATH_CHECK(sdoContainer.record(std::make_unique<MuonSimDataCollection>()));
-  ATH_MSG_DEBUG ( "MdtSDOCollection recorded in StoreGate." );
+  ATH_MSG_DEBUG("Recorded MuonSimDataCollection called " << sdoContainer.name() << " in store " << sdoContainer.store());
 
   StatusCode status = StatusCode::SUCCESS;
   if (0 == m_thpcMDT ) {
diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfig.py b/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfig.py
index 95125facf2d4103ee4ee4e762a69712e89e22c01..e68d63f34850452c296d365932aa9aaca8684b34 100644
--- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfig.py
+++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfig.py
@@ -157,5 +157,10 @@ def Rpc_OverlayDigitizationTool(name="RpcDigitizationTool", **kwargs):
     from OverlayCommonAlgs.OverlayFlags import overlayFlags
     kwargs.setdefault("EvtStore", overlayFlags.evtStore())
     kwargs.setdefault("OutputObjectName",overlayFlags.evtStore()+"+RPC_DIGITS")
-    kwargs.setdefault("OutputSDOName",overlayFlags.evtStore()+"+RPC_SDO")
+    if not overlayFlags.isDataOverlay():
+        kwargs.setdefault("OutputSDOName",overlayFlags.evtStore()+"+RPC_SDO")
     return RpcDigitizationTool(name, **kwargs)
+
+def getRPC_OverlayDigitizer(name="RPC_OverlayDigitizer", **kwargs):
+    kwargs.setdefault("RPC_DigitizationTool","Rpc_OverlayDigitizationTool")
+    return CfgMgr.RPC_Digitizer(name,**kwargs)
diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfigDb.py b/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfigDb.py
index 03349e2b315319d7c583e6d2243c7044c23e582f..051c85e257b33c3c14af7342fd8fa850ff0a9961 100644
--- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfigDb.py
+++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfigDb.py
@@ -1,7 +1,8 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from AthenaCommon.CfgGetter import addTool
+from AthenaCommon.CfgGetter import addTool, addAlgorithm
 
-addTool("RPC_Digitization.RPC_DigitizationConfig.RpcDigitizationTool" , "RpcDigitizationTool") 
+addTool("RPC_Digitization.RPC_DigitizationConfig.RpcDigitizationTool" , "RpcDigitizationTool")
 addTool("RPC_Digitization.RPC_DigitizationConfig.getRpcRange"         , "RpcRange")
-addTool("RPC_Digitization.RPC_DigitizationConfig.Rpc_OverlayDigitizationTool" , "Rpc_OverlayDigitizationTool") 
+addTool("RPC_Digitization.RPC_DigitizationConfig.Rpc_OverlayDigitizationTool" , "Rpc_OverlayDigitizationTool")
+addAlgorithm("RPC_Digitization.RPC_DigitizationConfig.getRPC_OverlayDigitizer" , "RPC_OverlayDigitizer")
diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfig.py b/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfig.py
index 3c4b397d8b1b4cb46c5a8646a367dae4afaa7650..46859ce033d48ceee9e71730499535ba6390e068 100644
--- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfig.py
+++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfig.py
@@ -39,6 +39,11 @@ def getTgcRange(name="TgcRange", **kwargs):
 def Tgc_OverlayDigitizationTool(name="Tgc_OverlayDigitizationTool", **kwargs):
     from OverlayCommonAlgs.OverlayFlags import overlayFlags
     kwargs.setdefault("OutputObjectName",overlayFlags.evtStore()+"+TGC_DIGITS")
-    kwargs.setdefault("OutputSDOName",overlayFlags.evtStore()+"+TGC_SDO")
+    if not overlayFlags.isDataOverlay():
+        kwargs.setdefault("OutputSDOName",overlayFlags.evtStore()+"+TGC_SDO")
     kwargs.setdefault("EvtStore", overlayFlags.evtStore())
     return TgcDigitizationTool(name,**kwargs)
+
+def getTGC_OverlayDigitizer(name="TGC_OverlayDigitizer", **kwargs):
+    kwargs.setdefault("TGC_DigitizationTool","Tgc_OverlayDigitizationTool")
+    return CfgMgr.TGCDigitizer(name,**kwargs)
diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfigDb.py b/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfigDb.py
index 9f1a83a4aebb3109bc94c8176e1f1e886831a7e4..f82cf846cd338918493c3c4779c890fb46edaa54 100644
--- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfigDb.py
+++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfigDb.py
@@ -1,7 +1,8 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from AthenaCommon.CfgGetter import addTool
+from AthenaCommon.CfgGetter import addTool, addAlgorithm
 
-addTool("TGC_Digitization.TGC_DigitizationConfig.TgcDigitizationTool" , "TgcDigitizationTool") 
+addTool("TGC_Digitization.TGC_DigitizationConfig.TgcDigitizationTool" , "TgcDigitizationTool")
 addTool("TGC_Digitization.TGC_DigitizationConfig.getTgcRange"         , "TgcRange")
-addTool("TGC_Digitization.TGC_DigitizationConfig.Tgc_OverlayDigitizationTool" , "Tgc_OverlayDigitizationTool") 
+addTool("TGC_Digitization.TGC_DigitizationConfig.Tgc_OverlayDigitizationTool" , "Tgc_OverlayDigitizationTool")
+addAlgorithm("TGC_Digitization.TGC_DigitizationConfig.getTGC_OverlayDigitizer" , "TGC_OverlayDigitizer")
diff --git a/MuonSpectrometer/MuonOverlay/MdtOverlay/MdtOverlay/MdtOverlay.h b/MuonSpectrometer/MuonOverlay/MdtOverlay/MdtOverlay/MdtOverlay.h
index 55f6af61652e3b75c74a2c0394033974d1603319..1f659f59ac3fa5b9f331ad36dd017f64289468c9 100644
--- a/MuonSpectrometer/MuonOverlay/MdtOverlay/MdtOverlay/MdtOverlay.h
+++ b/MuonSpectrometer/MuonOverlay/MdtOverlay/MdtOverlay/MdtOverlay.h
@@ -17,46 +17,40 @@
 
 #include <string>
 
-#include "GaudiKernel/Algorithm.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/MsgStream.h"
-
 #include "MuonOverlayBase/MuonOverlayBase.h"
 #include "MuonDigitContainer/MdtDigitContainer.h"
-#include "MuonDigToolInterfaces/IMuonDigitizationTool.h"
 
 class MdtIdHelper;
 
 
 class MdtOverlay : public MuonOverlayBase  {
 public:
-  
+
   MdtOverlay(const std::string &name,ISvcLocator *pSvcLocator);
 
-  /** Framework implemenrtation for the event loop */  
+  /** Framework implemenrtation for the event loop */
   virtual StatusCode overlayInitialize();
   virtual StatusCode overlayExecute();
   virtual StatusCode overlayFinalize();
 
   float adcIntegrationWindow() const { return m_adcIntegrationWindow; }
-  
+
 private:
   // ----------------------------------------------------------------
 
-  ServiceHandle<StoreGateSvc> m_storeGateTemp;
-  ServiceHandle<StoreGateSvc> m_storeGateTempBkg;
   // jO controllable properties.
   // "Main" containers are read, have data from "overlay" containers added,
   // and written out with the original SG keys.
-  std::string m_mainInputMDT_Name;
-  std::string m_overlayInputMDT_Name;
-  std::string m_sdo;
- 
-  float m_adcIntegrationWindow;
-  const MdtIdHelper   * m_mdtHelper;
-  bool m_copySDO, m_clean_overlay_data, m_clean_overlay_signal;
-  ToolHandle<IMuonDigitizationTool> m_digTool;
-  ToolHandle<IMuonDigitizationTool> m_rdoTool;
+  SG::ReadHandleKey<MdtDigitContainer> m_mainInputDigitKey{this,"MainInputDigitKey","OriginalEvent_SG+MDT_DIGITS","ReadHandleKey for Main Input MdtDigitContainer"};
+  SG::ReadHandleKey<MdtDigitContainer> m_overlayInputDigitKey{this,"OverlayInputDigitKey","BkgEvent_0_SG+MDT_DIGITS","ReadHandleKey for Overlay Input MdtDigitContainer"};
+  SG::WriteHandleKey<MdtDigitContainer> m_outputDigitKey{this,"OutputDigitKey","StoreGateSvc+MDT_DIGITS","WriteHandleKey for Output MdtDigitContainer"};
+  std::string m_sdo{"MDT_SDO"};
+
+  float m_adcIntegrationWindow{20.0}; // in ns
+  const MdtIdHelper   * m_mdtHelper{nullptr};
+  bool m_copySDO{true};
+  bool m_clean_overlay_data{false};
+  bool m_clean_overlay_signal{false};
 };
 
 #endif/* MDTOVERLAY_H */
diff --git a/MuonSpectrometer/MuonOverlay/MdtOverlay/python/MdtOverlayConfig.py b/MuonSpectrometer/MuonOverlay/MdtOverlay/python/MdtOverlayConfig.py
index c9b4df57adadd98f46e1f6e3d6a2e828d1e07311..91b573e1d19088987c23418fd63f75ca0f2fe47e 100644
--- a/MuonSpectrometer/MuonOverlay/MdtOverlay/python/MdtOverlayConfig.py
+++ b/MuonSpectrometer/MuonOverlay/MdtOverlay/python/MdtOverlayConfig.py
@@ -3,14 +3,14 @@
 from AthenaCommon import CfgMgr
 
 def getMdtOverlay(name="MdtOverlay", **kwargs):
-    kwargs.setdefault("mainInputMDT_Name", "MDT_DIGITS")
-    kwargs.setdefault("overlayInputMDT_Name", "MDT_DIGITS")
-    kwargs.setdefault("IntegrationWindow", 20)
-    kwargs.setdefault("DigitizationTool", "Mdt_OverlayDigitizationTool")
-    kwargs.setdefault("ConvertRDOToDigitTool", "MdtRdoToMdtDigitOverlay")
     from OverlayCommonAlgs.OverlayFlags import overlayFlags
+    kwargs.setdefault("MainInputDigitKey",overlayFlags.dataStore()+"+MDT_DIGITS")
+    kwargs.setdefault("OverlayInputDigitKey",overlayFlags.evtStore()+"+MDT_DIGITS")
+    kwargs.setdefault("OutputDigitKey",overlayFlags.outputStore()+"+MDT_DIGITS")
+    kwargs.setdefault("IntegrationWindow", 20) # in ns
     kwargs.setdefault("MCStore",overlayFlags.evtStore())
     kwargs.setdefault("DataStore", overlayFlags.dataStore())
+    kwargs.setdefault("CopySDO",not overlayFlags.isDataOverlay())
     if overlayFlags.doSignal():
         kwargs.setdefault("CopyObject", True)
     return CfgMgr.MdtOverlay(name, **kwargs)
diff --git a/MuonSpectrometer/MuonOverlay/MdtOverlay/src/MdtOverlay.cxx b/MuonSpectrometer/MuonOverlay/MdtOverlay/src/MdtOverlay.cxx
index 13f0892bac7c9672a74c9ca050abe4c4fb69052c..67822b3b1f55f8b6ee2e13fd37b1e07bb00dc803 100644
--- a/MuonSpectrometer/MuonOverlay/MdtOverlay/src/MdtOverlay.cxx
+++ b/MuonSpectrometer/MuonOverlay/MdtOverlay/src/MdtOverlay.cxx
@@ -22,56 +22,54 @@
 #include "MuonIdHelpers/MdtIdHelper.h"
 #include "MuonDigitContainer/MdtDigitContainer.h"
 
-#include "MuonDigToolInterfaces/IMuonDigitizationTool.h"
-
 #include <iostream>
 #include <typeinfo>
 #include <stdexcept>
 
 //================================================================
 namespace Overlay {
-  /** template specialization function to add 2 MDT Digits - basically the operator+= 
+  /** template specialization function to add 2 MDT Digits - basically the operator+=
    * A declaration of the specialization must happen before the template is used from
    * the overlayContainer() method.  So we just put this implementation at the beginning
    * of this file.
    */
   template<> void mergeChannelData(MdtDigit& mainDigit, const MdtDigit& ovlDigit, IDC_OverlayBase *baseParent) {
     MdtOverlay* parent = dynamic_cast<MdtOverlay*>(baseParent);
-     if(!parent) {
+    if(!parent) {
       throw std::runtime_error("Overlay::mergeChannelData<MdtDigit>(): ERROR: calling alg is not MdtOverlay.");
     }
-    
+
     // ----------------------------------------------------------------
     // confirm that the specialization is being used by printing out...
     static bool first_time = true;
     if(first_time) {
       first_time = false;
       parent->msg(MSG::INFO)<<"Overlay::mergeChannelData<MdtDigit>(): "
-			    <<"MDT specific code is called for "
-			    <<typeid(MdtDigit).name()
-			    <<endmsg;
+                            <<"MDT specific code is called for "
+                            <<typeid(MdtDigit).name()
+                            <<endmsg;
     }
-    
+
     // ----------------------------------------------------------------
     // the real merging happens here
     int main_tdc = mainDigit.tdc();
     int ovl_tdc  = ovlDigit.tdc();
 
-    /** background masks Physics hit - no correction to the ADC 
+    /** background masks Physics hit - no correction to the ADC
         FIXME: Probably should return the maksed hit as well */
     if ( abs(main_tdc-ovl_tdc) > parent->adcIntegrationWindow() && main_tdc < ovl_tdc ) {
       // do nothing - keep mainDigit.
-    } 
-    /** Physics hit masks the background hit - no correct to the AOD 
-        FIXME: Probably should return the masked hit as well */ 
+    }
+    /** Physics hit masks the background hit - no correct to the AOD
+        FIXME: Probably should return the masked hit as well */
     else if ( abs(main_tdc-ovl_tdc) > parent->adcIntegrationWindow() && main_tdc > ovl_tdc ) {
       // Use ovlDigit as the final answer
       mainDigit = ovlDigit;
     }
     /** the 2 hits overlap withing the ADC integration window
         the ADC will add partially
-        the TDC is from the first hit that crosses the threshold 
-        FIXME: how to add partially for correct - for now just add the ADD total */   
+        the TDC is from the first hit that crosses the threshold
+        FIXME: how to add partially for correct - for now just add the ADD total */
     else if ( abs(main_tdc-ovl_tdc) < parent->adcIntegrationWindow() )  {
       int tdc = std::min( mainDigit.tdc(), ovlDigit.tdc() );
       int adc = mainDigit.adc() + ovlDigit.adc();
@@ -83,139 +81,76 @@ namespace Overlay {
 
 //================================================================
 MdtOverlay::MdtOverlay(const std::string &name, ISvcLocator *pSvcLocator) :
-  MuonOverlayBase(name, pSvcLocator),
-  m_storeGateTemp("StoreGateSvc/BkgEvent_1_SG", name),
-  m_storeGateTempBkg("StoreGateSvc/BkgEvent_2_SG", name),
-  m_mdtHelper(0),
-  m_digTool("MdtDigitizationTool", this ),
-  m_rdoTool("MuonRdoToMuonDigitTool", this )
+  MuonOverlayBase(name, pSvcLocator)
 {
-  
+
   /** modifiable properties in job options */
-  declareProperty("TempStore", m_storeGateTemp, "help");
-  declareProperty("TempBkgStore", m_storeGateTempBkg, "help");
-  declareProperty("mainInputMDT_Name", m_mainInputMDT_Name="MDT_DIGITS");
-  declareProperty("overlayInputMDT_Name", m_overlayInputMDT_Name="MDT_DIGITS");
-  declareProperty("IntegrationWindow", m_adcIntegrationWindow = 20.0 ); // in ns 
-  declareProperty("CopySDO", m_copySDO=true);
-  declareProperty("DigitizationTool", m_digTool);
-  declareProperty("ConvertRDOToDigitTool", m_rdoTool);
-  declareProperty("MDTSDO", m_sdo="MDT_SDO");
+  declareProperty("IntegrationWindow", m_adcIntegrationWindow); // in ns
+  declareProperty("CopySDO", m_copySDO);
+  declareProperty("MDTSDO", m_sdo);
   declareProperty("CopyObject", m_copyObjects=false);
-  declareProperty("CleanOverlayData", m_clean_overlay_data=false);//clean out the overlay data before doing overlay, so you only get MC hits in the output overlay
-  declareProperty("CleanOverlaySignal", m_clean_overlay_signal=false);//clean out the signal MC before doing overlay
+  declareProperty("CleanOverlayData", m_clean_overlay_data);//clean out the overlay data before doing overlay, so you only get MC hits in the output overlay
+  declareProperty("CleanOverlaySignal", m_clean_overlay_signal);//clean out the signal MC before doing overlay
 }
 
 //================================================================
 StatusCode MdtOverlay::overlayInitialize()
 {
-  msg(MSG::INFO) << "MdtOverlay initialized" << endmsg;
-
- if (m_storeGateTemp.retrieve().isFailure()) {
-     ATH_MSG_FATAL("MdtOverlay::initialize(): TempStore for signal not found !");
-     return StatusCode::FAILURE;
-  }
-
-  if (m_storeGateTempBkg.retrieve().isFailure()) {
-     ATH_MSG_FATAL("MdtOverlay::initialize(): TempStoreBkg not found !");
-     return StatusCode::FAILURE;
-     }
-
-  /** initialize the detectore store service */
-  StoreGateSvc* detStore=0;
-  StatusCode sc = serviceLocator()->service("DetectorStore", detStore);
-  if (sc.isFailure()) {
-    msg( MSG::FATAL ) << "DetectorStore service not found !" << endmsg;
-    return StatusCode::FAILURE;
-  }
+  ATH_MSG_INFO("MdtOverlay initialized");
 
-  /** access to the CSC Identifier helper */
-  sc = detStore->retrieve(m_mdtHelper, "MDTIDHELPER");
-  if (sc.isFailure()) {
-    msg( MSG::FATAL ) << "Could not get MdtIdHelper !" << endmsg;
-    return StatusCode::FAILURE;
-  } 
-  else {
-    msg( MSG::DEBUG ) << " Found the MdtIdHelper. " << endmsg;
-  }
+  ATH_CHECK(detStore()->retrieve(m_mdtHelper, "MDTIDHELPER"));
+  ATH_MSG_DEBUG(" Found the MdtIdHelper. ");
 
-  if (m_digTool.retrieve().isFailure()) {
-    msg( MSG::FATAL ) << "Could not retrieve MDT Digitization Tool!"
-                      << endmsg;
-    return StatusCode::FAILURE;
-  }
-  msg( MSG::DEBUG ) << "Retrieved MDT Digitization Tool." << endmsg;
-  
-  if (m_rdoTool.retrieve().isFailure()) {
-    msg( MSG::FATAL ) << "Could not retrieve MDT RDO -> Digit Tool!"
-                      << endmsg;
-    return StatusCode::FAILURE;
-  }
-  msg( MSG::DEBUG ) << "Retrieved MDT RDO -> Digit Tool." << endmsg;
+  ATH_CHECK(m_mainInputDigitKey.initialize());
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_mainInputDigitKey );
+  ATH_CHECK(m_overlayInputDigitKey.initialize());
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_overlayInputDigitKey );
+  ATH_CHECK(m_outputDigitKey.initialize());
+  ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputDigitKey );
 
   return StatusCode::SUCCESS;
 }
 
 //================================================================
-StatusCode MdtOverlay::overlayFinalize() 
+StatusCode MdtOverlay::overlayFinalize()
 {
-  msg( MSG::INFO ) << "MdtOverlay finalized" << endmsg;
+  ATH_MSG_INFO("MdtOverlay finalized");
   return StatusCode::SUCCESS;
 }
 
 //================================================================
 StatusCode MdtOverlay::overlayExecute() {
-  msg( MSG::DEBUG ) << "MdtOverlay::execute() begin"<< endmsg;
+  ATH_MSG_DEBUG("MdtOverlay::execute() begin");
 
   //----------------------------------------------------------------
-  msg( MSG::VERBOSE ) << "Retrieving data input MDT container" << endmsg;
+  ATH_MSG_VERBOSE("Retrieving data input MDT container");
 
-  /** In the real data stream, run RDO -> Digit converter to make Digit
-      this will be used in the overlay job */
-  if ( m_rdoTool->digitize().isFailure() ) {
-     msg( MSG::ERROR ) << "On the fly MDT RDO -> Digit failed " << endmsg;
-     return StatusCode::FAILURE;
+  SG::ReadHandle<MdtDigitContainer> dataContainer (m_mainInputDigitKey);
+  if (!dataContainer.isValid()) {
+    ATH_MSG_ERROR("Could not get data MDT container " << dataContainer.name() << " from store " << dataContainer.store());
+    return StatusCode::FAILURE;
   }
+  ATH_MSG_DEBUG("Found data MdtDigitContainer called " << dataContainer.name() << " in store " << dataContainer.store());
+  ATH_MSG_INFO("MDT Data     = "<<shortPrint(dataContainer.cptr()));
 
-  /** in the simulation stream, run digitization of the fly
-      and make Digit - this will be used as input to the overlay job */
-  if ( m_digTool->digitize().isFailure() ) {
-     msg( MSG::ERROR ) << "On the fly MDT digitization failed " << endmsg;
-     return StatusCode::FAILURE;
+  ATH_MSG_VERBOSE("Retrieving MC  input MDT container");
+  SG::ReadHandle<MdtDigitContainer> mcContainer(m_overlayInputDigitKey);
+  if(!mcContainer.isValid() ) {
+    ATH_MSG_ERROR("Could not get overlay MDT container " << mcContainer.name() << " from store " << mcContainer.store());
+    return StatusCode::FAILURE;
   }
+  ATH_MSG_DEBUG("Found overlay MdtDigitContainer called " << mcContainer.name() << " in store " << mcContainer.store());
+  ATH_MSG_INFO("MDT MC       = "<<shortPrint(mcContainer.cptr()));
 
-  /** save a copy of the MDT Digit Container in a temp store */
-  if ( m_copyObjects ) this->copyMuonIDCobject<MdtDigitContainer,MdtDigit>(&*m_storeGateMC,&*m_storeGateTemp);
-
-    SG::ReadHandle<MdtDigitContainer> dataContainer(m_mainInputMDT_Name, m_storeGateData->name());
-   if (!dataContainer.isValid()) {
-     msg( MSG::ERROR ) << "Could not get data MDT container " << m_mainInputMDT_Name << endmsg;
-     return StatusCode::FAILURE;
-     }
-   ATH_MSG_INFO("MDT Data   = "<<shortPrint(dataContainer.cptr()));
-
-   msg( MSG::VERBOSE ) << "Retrieving MC  input MDT container" << endmsg;
-   SG::ReadHandle<MdtDigitContainer> mcContainer(m_overlayInputMDT_Name,  m_storeGateMC->name());
-   if(!mcContainer.isValid() ) {
-     msg( MSG::ERROR ) << "Could not get overlay MDT container " << m_overlayInputMDT_Name << endmsg;
-     return StatusCode::FAILURE;
-   }
-   ATH_MSG_INFO("MDT MC   = "<<shortPrint(mcContainer.cptr()));
-   /*
-   MdtDigitContainer *mdt_temp_bkg = copyMuonDigitContainer<MdtDigitContainer,MdtDigit>(dataContainer.cptr());
-
-  if ( m_storeGateTempBkg->record(mdt_temp_bkg, m_mainInputMDT_Name).isFailure() ) {
-     msg( MSG::WARNING ) << "Failed to record background MdtDigitContainer to temporary background store " << endmsg;
-     }
-   */
-   msg( MSG::VERBOSE ) << "MDT data has digit_size "<<dataContainer->digit_size()<<endmsg;
+  ATH_MSG_VERBOSE("MDT data has digit_size "<<dataContainer->digit_size());
 
-  msg( MSG::VERBOSE ) << "MDT signal data has digit_size "<<mcContainer->digit_size()<<endmsg;
- 
-  SG::WriteHandle<MdtDigitContainer> outputContainer(m_mainInputMDT_Name, m_storeGateOutput->name());
-  outputContainer = CxxUtils::make_unique<MdtDigitContainer>(dataContainer->size());
+  ATH_MSG_VERBOSE("MDT signal data has digit_size "<<mcContainer->digit_size());
 
-  if(dataContainer.isValid() && mcContainer.isValid() && outputContainer.isValid()) { 
+  SG::WriteHandle<MdtDigitContainer> outputContainer(m_outputDigitKey);
+  ATH_CHECK(outputContainer.record(std::make_unique<MdtDigitContainer>(dataContainer->size())));
+  ATH_MSG_DEBUG("Recorded output MdtDigitContainer called " << outputContainer.name() << " in store " << outputContainer.store());
+
+  if(dataContainer.isValid() && mcContainer.isValid() && outputContainer.isValid()) {
     if(!m_clean_overlay_data && !m_clean_overlay_signal){
       //Do the actual overlay
       this->overlayContainer(dataContainer.cptr(), mcContainer.cptr(), outputContainer.ptr());
@@ -224,15 +159,15 @@ StatusCode MdtOverlay::overlayExecute() {
       MdtDigitContainer nobkg(0);
       this->overlayContainer(&nobkg , mcContainer.cptr() , outputContainer.ptr());
     }
-     else if (m_clean_overlay_signal) {
+    else if (m_clean_overlay_signal) {
       MdtDigitContainer nomc(0);
       this->overlayContainer(dataContainer.cptr(), &nomc , outputContainer.ptr());
-      }
+    }
   }
   ATH_MSG_INFO("MDT Result   = "<<shortPrint(outputContainer.cptr()));
 
   //----------------------------------------------------------------
-  msg( MSG::DEBUG ) <<"Processing MC truth data"<<endmsg;
+  ATH_MSG_DEBUG("Processing MC truth data");
 
   // Main stream is normally real data without any MC info.
   // In tests we may use a MC generated file instead of real data.
@@ -243,12 +178,12 @@ StatusCode MdtOverlay::overlayExecute() {
 
   // Now copy MDT-specific MC truth objects to the output.
   // Copy only if it is not already copied by one of other muon algorithms
-  if ( m_copySDO ) 
-     //this->copyAllObjectsOfType<MuonSimDataCollection>(&*m_storeGateOutput, &*m_storeGateMC);
-     this->copyMuonObjects<MuonSimDataCollection>(&*m_storeGateOutput, &*m_storeGateMC, m_sdo);
+  if ( m_copySDO )
+    //this->copyAllObjectsOfType<MuonSimDataCollection>(&*m_storeGateOutput, &*m_storeGateMC);
+    this->copyMuonObjects<MuonSimDataCollection>(&*m_storeGateOutput, &*m_storeGateMC, m_sdo);
 
   //----------------------------------------------------------------
-  msg( MSG::DEBUG ) << "MdtOverlay::execute() end"<< endmsg;
+  ATH_MSG_DEBUG("MdtOverlay::execute() end");
 
   return StatusCode::SUCCESS;
 }
diff --git a/MuonSpectrometer/MuonOverlay/RpcOverlay/RpcOverlay/RpcOverlay.h b/MuonSpectrometer/MuonOverlay/RpcOverlay/RpcOverlay/RpcOverlay.h
index 0cc849ca452e7e523b08aeb955f38837c864e3ca..f5992cef113afa1e8eb2218db90abbce7bb1fc5d 100644
--- a/MuonSpectrometer/MuonOverlay/RpcOverlay/RpcOverlay/RpcOverlay.h
+++ b/MuonSpectrometer/MuonOverlay/RpcOverlay/RpcOverlay/RpcOverlay.h
@@ -17,44 +17,34 @@
 
 #include <string>
 
-#include "GaudiKernel/Algorithm.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/MsgStream.h"
-
 #include "MuonOverlayBase/IDC_MultiHitOverlayBase.h"
 #include "MuonDigitContainer/RpcDigitContainer.h"
-#include "MuonDigToolInterfaces/IMuonDigitizationTool.h"
 
 class RpcIdHelper;
-// class IMuonDigitizationTool;
 
 class RpcOverlay : public IDC_MultiHitOverlayBase  {
 public:
-  
+
   RpcOverlay(const std::string &name,ISvcLocator *pSvcLocator);
 
-  /** Framework implemenrtation for the event loop */  
+  /** Framework implemenrtation for the event loop */
   virtual StatusCode overlayInitialize();
   virtual StatusCode overlayExecute();
   virtual StatusCode overlayFinalize();
 
 private:
   // ----------------------------------------------------------------
-  
-  ServiceHandle<StoreGateSvc> m_storeGateTemp;
-  ServiceHandle<StoreGateSvc> m_storeGateTempBkg;
+
   // jO controllable properties.
   // "Main" containers are read, have data from "overlay" containers added,
   // and written out with the original SG keys.
-  std::string m_mainInputRPC_Name;
-  std::string m_overlayInputRPC_Name;
-  std::string m_sdo;
-
-  const RpcIdHelper   * m_rpcHelper;
-  bool m_copySDO;
+  SG::ReadHandleKey<RpcDigitContainer> m_mainInputDigitKey{this,"MainInputDigitKey","OriginalEvent_SG+RPC_DIGITS","ReadHandleKey for Main Input RpcDigitContainer"};
+  SG::ReadHandleKey<RpcDigitContainer> m_overlayInputDigitKey{this,"OverlayInputDigitKey","BkgEvent_0_SG+RPC_DIGITS","ReadHandleKey for Overlay Input RpcDigitContainer"};
+  SG::WriteHandleKey<RpcDigitContainer> m_outputDigitKey{this,"OutputDigitKey","StoreGateSvc+RPC_DIGITS","WriteHandleKey for Output RpcDigitContainer"};
+  std::string m_sdo{"RPC_SDO"};
 
-  ToolHandle<IMuonDigitizationTool> m_digTool;
-  ToolHandle<IMuonDigitizationTool> m_rdoTool;
+  const RpcIdHelper   * m_rpcHelper{nullptr};
+  bool m_copySDO{true};
 
 };
 
diff --git a/MuonSpectrometer/MuonOverlay/RpcOverlay/python/RpcOverlayConfig.py b/MuonSpectrometer/MuonOverlay/RpcOverlay/python/RpcOverlayConfig.py
index fa229ec4c692585ff2b5b244a45c59efe9378f8d..2546c9be4d782df13bc04da19c35b6a306c779e3 100644
--- a/MuonSpectrometer/MuonOverlay/RpcOverlay/python/RpcOverlayConfig.py
+++ b/MuonSpectrometer/MuonOverlay/RpcOverlay/python/RpcOverlayConfig.py
@@ -3,13 +3,13 @@
 from AthenaCommon import CfgMgr
 
 def getRpcOverlay(name="RpcOverlay", **kwargs):
-    kwargs.setdefault("mainInputRPC_Name", "RPC_DIGITS")
-    kwargs.setdefault("overlayInputRPC_Name", "RPC_DIGITS")
-    kwargs.setdefault("DigitizationTool", "Rpc_OverlayDigitizationTool")
-    kwargs.setdefault("ConvertRDOToDigitTool", "RpcRdoToRpcDigitOverlay")
     from OverlayCommonAlgs.OverlayFlags import overlayFlags
+    kwargs.setdefault("MainInputDigitKey",overlayFlags.dataStore()+"+RPC_DIGITS")
+    kwargs.setdefault("OverlayInputDigitKey",overlayFlags.evtStore()+"+RPC_DIGITS")
+    kwargs.setdefault("OutputDigitKey",overlayFlags.outputStore()+"+RPC_DIGITS")
     kwargs.setdefault("MCStore",overlayFlags.evtStore())
     kwargs.setdefault("DataStore", overlayFlags.dataStore())
+    kwargs.setdefault("CopySDO",not overlayFlags.isDataOverlay())
     if overlayFlags.doSignal():
         kwargs.setdefault("CopyObject", True)
     return CfgMgr.RpcOverlay(name, **kwargs)
diff --git a/MuonSpectrometer/MuonOverlay/RpcOverlay/src/RpcOverlay.cxx b/MuonSpectrometer/MuonOverlay/RpcOverlay/src/RpcOverlay.cxx
index 0f1621c339612d86d02d41c5fd8149c41d332cfb..40610d25f3115e84b91971dd2b3bd8c1b802c8ef 100644
--- a/MuonSpectrometer/MuonOverlay/RpcOverlay/src/RpcOverlay.cxx
+++ b/MuonSpectrometer/MuonOverlay/RpcOverlay/src/RpcOverlay.cxx
@@ -14,7 +14,6 @@
 #include "StoreGate/DataHandle.h"
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/WriteHandle.h"
-#include "CxxUtils/make_unique.h"
 
 #include "GeneratorObjects/McEventCollection.h"
 #include "MuonSimData/MuonSimDataCollection.h"
@@ -22,146 +21,85 @@
 #include "MuonIdHelpers/RpcIdHelper.h"
 #include "MuonDigitContainer/RpcDigitContainer.h"
 
-#include "MuonDigToolInterfaces/IMuonDigitizationTool.h"
-
 #include <iostream>
 #include <typeinfo>
 
 
 //================================================================
 RpcOverlay::RpcOverlay(const std::string &name, ISvcLocator *pSvcLocator) :
-  IDC_MultiHitOverlayBase(name, pSvcLocator),
-  m_storeGateTemp("StoreGateSvc/BkgEvent_1_SG", name),
-  m_storeGateTempBkg("StoreGateSvc/BkgEvent_2_SG", name),
-  m_rpcHelper(0),
-  m_digTool("MdtDigitizationTool", this ),
-  m_rdoTool("MuonRdoToMuonDigitTool", this )
-
+  IDC_MultiHitOverlayBase(name, pSvcLocator)
 {
   /** modifiable properties in job options */
-  declareProperty("TempStore", m_storeGateTemp, "help");
-  declareProperty("TempBkgStore", m_storeGateTempBkg, "help");
-  declareProperty("mainInputRPC_Name", m_mainInputRPC_Name="rpc_digits");
-  declareProperty("overlayInputRPC_Name", m_overlayInputRPC_Name="rpc_digits");
-  declareProperty("CopySDO", m_copySDO=true);
-  declareProperty("DigitizationTool", m_digTool);
-  declareProperty("ConvertRDOToDigitTool", m_rdoTool);
-  declareProperty("RPC_SDO", m_sdo = "RPC_SDO");
+  declareProperty("CopySDO", m_copySDO);
+  declareProperty("RPC_SDO", m_sdo);
   declareProperty("CopyObject", m_copyObjects=false);
 }
 
 //================================================================
 StatusCode RpcOverlay::overlayInitialize()
 {
-  msg( MSG::INFO ) << "RpcOverlay initialized" << endmsg;
-
-  if (m_storeGateTemp.retrieve().isFailure()) {
-     ATH_MSG_FATAL("RpcOverlay::initialize(): TempStore for signal not found !");
-     return StatusCode::FAILURE;
-  }
-  
-  if (m_storeGateTempBkg.retrieve().isFailure()) {
-     ATH_MSG_FATAL("RpcOverlay::initialize(): TempStoreBkg not found !");
-     return StatusCode::FAILURE;
-  }
-
-  /** initialize the detectore store service */
-  StoreGateSvc* detStore=0;
-  StatusCode sc = serviceLocator()->service("DetectorStore", detStore);
-  if (sc.isFailure()) {
-    msg( MSG::FATAL ) << "DetectorStore service not found !" << endmsg;
-    return StatusCode::FAILURE;
-  }
+  ATH_MSG_INFO("RpcOverlay initialized");
 
   /** access to the CSC Identifier helper */
-  sc = detStore->retrieve(m_rpcHelper, "RPCIDHELPER");
-  if (sc.isFailure()) {
-    msg( MSG::FATAL ) << "Could not get RpcIdHelper !" << endmsg;
-    return StatusCode::FAILURE;
-  } 
-  else {
-    msg( MSG::DEBUG ) << " Found the RpcIdHelper. " << endmsg;
-  }
+  ATH_CHECK(detStore()->retrieve(m_rpcHelper, "RPCIDHELPER"));
+  ATH_MSG_DEBUG(" Found the RpcIdHelper. ");
 
-  if (m_digTool.retrieve().isFailure()) {
-    msg( MSG::FATAL ) << "Could not retrieve RPC Digitization Tool!"
-        << endmsg;
-    return StatusCode::FAILURE;
-  }
-  msg( MSG::DEBUG ) << "Retrieved RPC Digitization Tool." << endmsg;
-  
-  if (m_rdoTool.retrieve().isFailure()) {
-    msg( MSG::FATAL ) << "Could not retrieve RPC RDO -> Digit Tool!"
-                      << endmsg;
-    return StatusCode::FAILURE;
-  }
-  msg( MSG::DEBUG ) << "Retrieved RPC RDO -> Digit Tool." << endmsg;
+  ATH_CHECK(m_mainInputDigitKey.initialize());
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_mainInputDigitKey );
+  ATH_CHECK(m_overlayInputDigitKey.initialize());
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_overlayInputDigitKey );
+  ATH_CHECK(m_outputDigitKey.initialize());
+  ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputDigitKey );
 
   return StatusCode::SUCCESS;
 }
 
 //================================================================
-StatusCode RpcOverlay::overlayFinalize() 
+StatusCode RpcOverlay::overlayFinalize()
 {
-  msg( MSG::INFO ) << "RpcOverlay finalized" << endmsg;
+  ATH_MSG_INFO("RpcOverlay finalized");
   return StatusCode::SUCCESS;
 }
 
 //================================================================
 StatusCode RpcOverlay::overlayExecute() {
-  msg( MSG::DEBUG ) << "RpcOverlay::execute() begin"<< endmsg;
+  ATH_MSG_DEBUG("RpcOverlay::execute() begin");
 
   //----------------------------------------------------------------
 
-  /** In the real data stream, run RDO -> Digit converter to make Digit
-      this will be used in the overlay job */
-  if ( m_rdoTool->digitize().isFailure() ) {
-     msg( MSG::ERROR ) << "On the fly RPC RDO -> Digit failed " << endmsg;
-     return StatusCode::FAILURE;
-  }
-
-  /** in the simulation stream, run digitization of the fly
-      and make Digit - this will be used as input to the overlay job */
-  if ( m_digTool->digitize().isFailure() ) {
-     msg( MSG::ERROR ) << "On the fly RPC digitization failed " << endmsg;
-     return StatusCode::FAILURE;
-  }
-
-  /** save a copy of the RPC Digit Container in a temp store */
-  if ( m_copyObjects ) 
-     this->copyMuonIDCobject<RpcDigitContainer,RpcDigit>(&*m_storeGateMC,&*m_storeGateTemp);
-
-  SG::ReadHandle<RpcDigitContainer> dataContainer(m_mainInputRPC_Name, m_storeGateData->name());
-   if ( !dataContainer.isValid() ) {
-     msg( MSG::ERROR ) << "Could not get data RPC container " << m_mainInputRPC_Name << endmsg;
-     return StatusCode::FAILURE;
+  SG::ReadHandle<RpcDigitContainer> dataContainer (m_mainInputDigitKey);
+  if (!dataContainer.isValid()) {
+    ATH_MSG_ERROR("Could not get data RPC container " << dataContainer.name() << " from store " << dataContainer.store());
+    return StatusCode::FAILURE;
   }
-   ATH_MSG_INFO("RPC Data   = "<<shortPrint(dataContainer.cptr()));
+  ATH_MSG_DEBUG("Found data RpcDigitContainer called " << dataContainer.name() << " in store " << dataContainer.store());
+  ATH_MSG_INFO("RPC Data     = "<<shortPrint(dataContainer.cptr()));
 
-  msg( MSG::VERBOSE ) << "Retrieving MC input RPC container" << endmsg;
-  SG::ReadHandle<RpcDigitContainer> mcContainer(m_overlayInputRPC_Name, m_storeGateMC->name());
-  if(!mcContainer.isValid()) {
-    msg( MSG::ERROR ) << "Could not get overlay RPC container " << m_overlayInputRPC_Name << endmsg;
+  ATH_MSG_VERBOSE("Retrieving MC  input RPC container");
+  SG::ReadHandle<RpcDigitContainer> mcContainer(m_overlayInputDigitKey);
+  if(!mcContainer.isValid() ) {
+    ATH_MSG_ERROR("Could not get overlay RPC container " << mcContainer.name() << " from store " << mcContainer.store());
     return StatusCode::FAILURE;
   }
-  ATH_MSG_INFO("RPC MC   = "<<shortPrint(mcContainer.cptr()));
+  ATH_MSG_DEBUG("Found overlay RpcDigitContainer called " << mcContainer.name() << " in store " << mcContainer.store());
+  ATH_MSG_INFO("RPC MC       = "<<shortPrint(mcContainer.cptr()));
 
-  /* RpcDigitContainer *rpc_temp_bkg = copyMuonDigitContainer<RpcDigitContainer,RpcDigit>(dataContainer.cptr());
+  ATH_MSG_VERBOSE("RPC data has digit_size "<<dataContainer->digit_size());
 
-  if ( m_storeGateTempBkg->record(rpc_temp_bkg, m_mainInputRPC_Name).isFailure() ) {
-     msg( MSG::WARNING ) << "Failed to record background RpcDigitContainer to temporary background store " << endmsg;
-     }*/
+  ATH_MSG_VERBOSE("RPC signal data has digit_size "<<mcContainer->digit_size());
+
+  SG::WriteHandle<RpcDigitContainer> outputContainer(m_outputDigitKey);
+  ATH_CHECK(outputContainer.record(std::make_unique<RpcDigitContainer>(dataContainer->size())));
+  ATH_MSG_DEBUG("Recorded output RpcDigitContainer called " << outputContainer.name() << " in store " << outputContainer.store());
 
-  SG::WriteHandle<RpcDigitContainer> outputContainer(m_mainInputRPC_Name, m_storeGateOutput->name());
-  outputContainer = CxxUtils::make_unique<RpcDigitContainer>(dataContainer->size());
   //Do the actual overlay
-  if(dataContainer.isValid() && mcContainer.isValid() && outputContainer.isValid()) { 
+  if(dataContainer.isValid() && mcContainer.isValid() && outputContainer.isValid()) {
     this->overlayContainer(dataContainer.cptr(), mcContainer.cptr(), outputContainer.ptr());
   }
   ATH_MSG_INFO("RPC Result   = "<<shortPrint(outputContainer.cptr()));
 
   //----------------------------------------------------------------
-  msg( MSG::DEBUG ) <<"Processing MC truth data"<<endmsg;
+  ATH_MSG_DEBUG("Processing MC truth data");
 
   // Main stream is normally real data without any MC info.
   // In tests we may use a MC generated file instead of real data.
@@ -172,13 +110,12 @@ StatusCode RpcOverlay::overlayExecute() {
 
   // Now copy RPC-specific MC truth objects to the output.
   if ( m_copySDO )
-      this->copyObjects<MuonSimDataCollection>(&*m_storeGateOutput, &*m_storeGateMC, m_sdo);
+    this->copyObjects<MuonSimDataCollection>(&*m_storeGateOutput, &*m_storeGateMC, m_sdo);
 
   //----------------------------------------------------------------
-  msg( MSG::DEBUG ) << "RpcOverlay::execute() end"<< endmsg;
+  ATH_MSG_DEBUG("RpcOverlay::execute() end");
 
   return StatusCode::SUCCESS;
 }
 
 // EOF
-
diff --git a/MuonSpectrometer/MuonOverlay/TgcOverlay/TgcOverlay/TgcOverlay.h b/MuonSpectrometer/MuonOverlay/TgcOverlay/TgcOverlay/TgcOverlay.h
index 7de66532ef7c92d2a982cdbe690cd102b2386eb8..0c6d8108129ffc7e2a236a25121ff32523a2a043 100644
--- a/MuonSpectrometer/MuonOverlay/TgcOverlay/TgcOverlay/TgcOverlay.h
+++ b/MuonSpectrometer/MuonOverlay/TgcOverlay/TgcOverlay/TgcOverlay.h
@@ -17,22 +17,17 @@
 
 #include <string>
 
-#include "GaudiKernel/Algorithm.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/MsgStream.h"
-
 #include "MuonOverlayBase/IDC_MultiHitOverlayBase.h"
 #include "MuonDigitContainer/TgcDigitContainer.h"
-#include "MuonDigToolInterfaces/IMuonDigitizationTool.h"
 
 class TgcIdHelper;
 
 class TgcOverlay : public IDC_MultiHitOverlayBase  {
 public:
-  
+
   TgcOverlay(const std::string &name,ISvcLocator *pSvcLocator);
 
-  /** Framework implemenrtation for the event loop */  
+  /** Framework implemenrtation for the event loop */
   virtual StatusCode overlayInitialize();
   virtual StatusCode overlayExecute();
   virtual StatusCode overlayFinalize();
@@ -40,23 +35,17 @@ public:
 private:
   // ----------------------------------------------------------------
 
-  ServiceHandle<StoreGateSvc> m_storeGateTemp;
-  ServiceHandle<StoreGateSvc> m_storeGateTempBkg;
   // jO controllable properties.
   // "Main" containers are read, have data from "overlay" containers added,
   // and written out with the original SG keys.
-  std::string m_mainInputTGC_Name;
-  std::string m_overlayInputTGC_Name;
-  std::string m_sdo;
-
-  const TgcIdHelper   * m_tgcHelper;
-  bool m_copySDO;
+  SG::ReadHandleKey<TgcDigitContainer> m_mainInputDigitKey{this,"MainInputDigitKey","OriginalEvent_SG+TGC_DIGITS","ReadHandleKey for Main Input TgcDigitContainer"};
+  SG::ReadHandleKey<TgcDigitContainer> m_overlayInputDigitKey{this,"OverlayInputDigitKey","BkgEvent_0_SG+TGC_DIGITS","ReadHandleKey for Overlay Input TgcDigitContainer"};
+  SG::WriteHandleKey<TgcDigitContainer> m_outputDigitKey{this,"OutputDigitKey","StoreGateSvc+TGC_DIGITS","WriteHandleKey for Output TgcDigitContainer"};
+  std::string m_sdo{"TGC_SDO"};
 
-  ToolHandle<IMuonDigitizationTool> m_digTool;
-  ToolHandle<IMuonDigitizationTool> m_rdoTool;
+  const TgcIdHelper   * m_tgcHelper{nullptr};
+  bool m_copySDO{true};
 
 };
 
 #endif/* TGCOVERLAY_H */
-
-
diff --git a/MuonSpectrometer/MuonOverlay/TgcOverlay/python/TgcOverlayConfig.py b/MuonSpectrometer/MuonOverlay/TgcOverlay/python/TgcOverlayConfig.py
index 3dd150c6df82e152df4dcade5550fdbd4baedb1f..dd5518389e66d462edfd5c1d3da598fd08907ee2 100644
--- a/MuonSpectrometer/MuonOverlay/TgcOverlay/python/TgcOverlayConfig.py
+++ b/MuonSpectrometer/MuonOverlay/TgcOverlay/python/TgcOverlayConfig.py
@@ -3,13 +3,13 @@
 from AthenaCommon import CfgMgr
 
 def getTgcOverlay(name="TgcOverlay", **kwargs):
-    kwargs.setdefault("mainInputTGC_Name", "TGC_DIGITS")
-    kwargs.setdefault("overlayInputTGC_Name", "TGC_DIGITS")
-    kwargs.setdefault("DigitizationTool", "Tgc_OverlayDigitizationTool")
-    kwargs.setdefault("ConvertRDOToDigitTool", "TgcRdoToTgcDigitOverlay")
     from OverlayCommonAlgs.OverlayFlags import overlayFlags
+    kwargs.setdefault("MainInputDigitKey",overlayFlags.dataStore()+"+TGC_DIGITS")
+    kwargs.setdefault("OverlayInputDigitKey",overlayFlags.evtStore()+"+TGC_DIGITS")
+    kwargs.setdefault("OutputDigitKey",overlayFlags.outputStore()+"+TGC_DIGITS")
     kwargs.setdefault("MCStore",overlayFlags.evtStore())
     kwargs.setdefault("DataStore", overlayFlags.dataStore())
+    kwargs.setdefault("CopySDO",not overlayFlags.isDataOverlay())
     if overlayFlags.doSignal():
         kwargs.setdefault("CopyObject", True)
     return CfgMgr.TgcOverlay(name, **kwargs)
diff --git a/MuonSpectrometer/MuonOverlay/TgcOverlay/src/TgcOverlay.cxx b/MuonSpectrometer/MuonOverlay/TgcOverlay/src/TgcOverlay.cxx
index d3251c428b0090c1be252913adc2d9b09d8b9468..21ce5b68616c4386f70522e922ba423d59478233 100644
--- a/MuonSpectrometer/MuonOverlay/TgcOverlay/src/TgcOverlay.cxx
+++ b/MuonSpectrometer/MuonOverlay/TgcOverlay/src/TgcOverlay.cxx
@@ -14,7 +14,6 @@
 #include "StoreGate/DataHandle.h"
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/WriteHandle.h"
-#include "CxxUtils/make_unique.h"
 
 #include "GeneratorObjects/McEventCollection.h"
 #include "MuonSimData/MuonSimDataCollection.h"
@@ -22,148 +21,84 @@
 #include "MuonIdHelpers/TgcIdHelper.h"
 #include "MuonDigitContainer/TgcDigitContainer.h"
 
-#include "MuonDigToolInterfaces/IMuonDigitizationTool.h"
-
-#include "AthenaKernel/getMessageSvc.h"
-
 #include <iostream>
 #include <typeinfo>
 
 //================================================================
 TgcOverlay::TgcOverlay(const std::string &name, ISvcLocator *pSvcLocator) :
-  IDC_MultiHitOverlayBase(name, pSvcLocator),
-  m_storeGateTemp("StoreGateSvc/BkgEvent_1_SG", name),
-  m_storeGateTempBkg("StoreGateSvc/BkgEvent_2_SG", name),
-  m_tgcHelper(0),
-  m_digTool("MdtDigitizationTool", this ),
-  m_rdoTool("MuonRdoToMuonDigitTool", this )
+  IDC_MultiHitOverlayBase(name, pSvcLocator)
 {
-
   /** Modifiable properties in job options */
-  declareProperty("TempStore", m_storeGateTemp, "help");
-  declareProperty("TempBkgStore", m_storeGateTempBkg, "help");
-  declareProperty("mainInputTGC_Name", m_mainInputTGC_Name="tgc_digits");
-  declareProperty("overlayInputTGC_Name", m_overlayInputTGC_Name="tgc_digits");
-  declareProperty("CopySDO", m_copySDO=true);
-
-  declareProperty("DigitizationTool", m_digTool);
-  declareProperty("ConvertRDOToDigitTool", m_rdoTool);
-
-  declareProperty("TGCSDO", m_sdo = "TGC_SDO");
-
-  declareProperty("CopyObject", m_copyObjects=false); 
+  declareProperty("CopySDO", m_copySDO);
+  declareProperty("TGCSDO", m_sdo);
+  declareProperty("CopyObject", m_copyObjects=false);
 }
 
 //================================================================
 StatusCode TgcOverlay::overlayInitialize()
 {
-  msg( MSG::INFO ) << "TgcOverlay initialized" << endmsg;
-
-  if (m_storeGateTemp.retrieve().isFailure()) {
-     ATH_MSG_FATAL("TgcOverlay::initialize(): TempStore for signal not found !");
-     return StatusCode::FAILURE;
-  }
-
-  if (m_storeGateTempBkg.retrieve().isFailure()) {
-     ATH_MSG_FATAL("TgcOverlay::initialize(): TempStoreBkg not found !");
-     return StatusCode::FAILURE;
-  }
-
-  /** initialize the detectore store service */
-  StoreGateSvc* detStore=0;
-  StatusCode sc = serviceLocator()->service("DetectorStore", detStore);
-  if (sc.isFailure()) {
-    msg( MSG::FATAL ) << "DetectorStore service not found !" << endmsg;
-    return StatusCode::FAILURE;
-  }
+  ATH_MSG_INFO("TgcOverlay initialized");
 
   /** access to the TGC Identifier helper */
-  sc = detStore->retrieve(m_tgcHelper, "TGCIDHELPER");
-  if (sc.isFailure()) {
-    msg( MSG::FATAL ) << "Could not get TgcIdHelper !" << endmsg;
-    return StatusCode::FAILURE;
-  } 
-  else {
-    msg( MSG::DEBUG ) << " Found the TgcIdHelper. " << endmsg;
-  }
+  ATH_CHECK(detStore()->retrieve(m_tgcHelper, "TGCIDHELPER"));
+  ATH_MSG_DEBUG(" Found the TgcIdHelper. ");
 
-  if (m_digTool.retrieve().isFailure()) {
-    msg( MSG::FATAL ) << "Could not retrieve TGC Digitization Tool!"
-                      << endmsg;
-    return StatusCode::FAILURE;
-  }
-  msg( MSG::DEBUG ) << "Retrieved TGC Digitization Tool." << endmsg;
-  
-  if (m_rdoTool.retrieve().isFailure()) {
-    msg( MSG::FATAL ) << "Could not retrieve TGC RDO -> Digit Tool!"
-                      << endmsg;
-    return StatusCode::FAILURE;
-  }
-  msg( MSG::DEBUG ) << "Retrieved TGC RDO -> Digit Tool." << endmsg;
+  ATH_CHECK(m_mainInputDigitKey.initialize());
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_mainInputDigitKey );
+  ATH_CHECK(m_overlayInputDigitKey.initialize());
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_overlayInputDigitKey );
+  ATH_CHECK(m_outputDigitKey.initialize());
+  ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputDigitKey );
 
   return StatusCode::SUCCESS;
 }
 
 //================================================================
-StatusCode TgcOverlay::overlayFinalize() 
+StatusCode TgcOverlay::overlayFinalize()
 {
-  msg( MSG::INFO ) << "TgcOverlay finalized" << endmsg;
+  ATH_MSG_INFO("TgcOverlay finalized");
   return StatusCode::SUCCESS;
 }
 
 //================================================================
 StatusCode TgcOverlay::overlayExecute() {
-  msg( MSG::DEBUG ) << "TgcOverlay::execute() begin"<< endmsg;
+  ATH_MSG_DEBUG("TgcOverlay::execute() begin");
 
   //----------------------------------------------------------------
-  /** In the real data stream, run RDO -> Digit converter to make Digit
-      this will be used in the overlay job */
-  if ( m_rdoTool->digitize().isFailure() ) {
-    msg( MSG::ERROR ) << "On the fly TGC RDO -> Digit failed " << endmsg;
-    return StatusCode::FAILURE;
-  }
-
-  /** in the simulation stream, run digitization of the fly
-      and make Digit - this will be used as input to the overlay job */
-  if ( m_digTool->digitize().isFailure() ) {
-    msg( MSG::ERROR ) << "On the fly TGC digitization failed " << endmsg;
-    return StatusCode::FAILURE;
-  }
 
-  /** save a copy of the TGC Digit Container in a temp store */
-  if ( m_copyObjects )
-     this->copyMuonIDCobject<TgcDigitContainer,TgcDigit>(&*m_storeGateMC,&*m_storeGateTemp);
-
-  SG::ReadHandle<TgcDigitContainer> dataContainer(m_mainInputTGC_Name, m_storeGateData->name());
-  if ( !dataContainer.isValid() ) {
-    msg( MSG::ERROR ) << "Could not get data TGC container " << m_mainInputTGC_Name << endmsg;
+  SG::ReadHandle<TgcDigitContainer> dataContainer (m_mainInputDigitKey);
+  if (!dataContainer.isValid()) {
+    ATH_MSG_ERROR("Could not get data TGC container " << dataContainer.name() << " from store " << dataContainer.store());
     return StatusCode::FAILURE;
   }
-  ATH_MSG_INFO("TGC Data   = "<<shortPrint(dataContainer.cptr()));
+  ATH_MSG_DEBUG("Found data TgcDigitContainer called " << dataContainer.name() << " in store " << dataContainer.store());
+  ATH_MSG_INFO("TGC Data     = "<<shortPrint(dataContainer.cptr()));
 
-  msg( MSG::VERBOSE ) << "Retrieving MC input TGC container" << endmsg;
-  SG::ReadHandle<TgcDigitContainer> mcContainer(m_overlayInputTGC_Name, m_storeGateMC->name()); 
+  ATH_MSG_VERBOSE("Retrieving MC  input TGC container");
+  SG::ReadHandle<TgcDigitContainer> mcContainer(m_overlayInputDigitKey);
   if(!mcContainer.isValid() ) {
-    msg( MSG::ERROR ) << "Could not get overlay TGC container " << m_overlayInputTGC_Name << endmsg;
+    ATH_MSG_ERROR("Could not get overlay TGC container " << mcContainer.name() << " from store " << mcContainer.store());
     return StatusCode::FAILURE;
   }
-  ATH_MSG_INFO("TGC MC   = "<<shortPrint(mcContainer.cptr()));
+  ATH_MSG_DEBUG("Found overlay TgcDigitContainer called " << mcContainer.name() << " in store " << mcContainer.store());
+  ATH_MSG_INFO("TGC MC       = "<<shortPrint(mcContainer.cptr()));
+
+  ATH_MSG_VERBOSE("TGC data has digit_size "<<dataContainer->digit_size());
 
-  /*  TgcDigitContainer *tgc_temp_bkg = copyMuonDigitContainer<TgcDigitContainer,TgcDigit>(dataContainer.cptr());
-  if ( m_storeGateTempBkg->record(tgc_temp_bkg, m_mainInputTGC_Name).isFailure() ) {
-     msg( MSG::WARNING ) << "Failed to record background TgcDigitContainer to temporary background store " << endmsg;
-     }*/
+  ATH_MSG_VERBOSE("TGC signal data has digit_size "<<mcContainer->digit_size());
+
+  SG::WriteHandle<TgcDigitContainer> outputContainer(m_outputDigitKey);
+  ATH_CHECK(outputContainer.record(std::make_unique<TgcDigitContainer>(dataContainer->size())));
+  ATH_MSG_DEBUG("Recorded output TgcDigitContainer called " << outputContainer.name() << " in store " << outputContainer.store());
 
-  SG::WriteHandle<TgcDigitContainer> outputContainer(m_mainInputTGC_Name, m_storeGateOutput->name());
-  outputContainer = CxxUtils::make_unique<TgcDigitContainer>(dataContainer->size());
   //Do the actual overlay
-  if(dataContainer.isValid() && mcContainer.isValid() && outputContainer.isValid()) { 
+  if(dataContainer.isValid() && mcContainer.isValid() && outputContainer.isValid()) {
     this->overlayContainer(dataContainer.cptr(), mcContainer.cptr(), outputContainer.ptr());
   }
   ATH_MSG_INFO("TGC Result   = "<<shortPrint(outputContainer.cptr()));
 
   //----------------------------------------------------------------
-  msg(MSG::DEBUG ) <<"Processing MC truth data"<<endmsg;
+  ATH_MSG_DEBUG("Processing MC truth data");
 
   // Main stream is normally real data without any MC info.
   // In tests we may use a MC generated file instead of real data.
@@ -177,11 +112,9 @@ StatusCode TgcOverlay::overlayExecute() {
     this->copyObjects<MuonSimDataCollection>(&*m_storeGateOutput, &*m_storeGateMC, m_sdo);
 
   //----------------------------------------------------------------
-  msg( MSG::DEBUG ) << "TgcOverlay::execute() end"<< endmsg;
+  ATH_MSG_DEBUG("TgcOverlay::execute() end");
 
-  return StatusCode::SUCCESS; 
+  return StatusCode::SUCCESS;
 }
 
 // EOF
-
-  
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h
index 266e992b291e3c9554257237c660d84c08e12f6a..403b8f421b1b679271523cba3f9bab36b82f8c8c 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h
@@ -86,9 +86,6 @@ namespace Muon {
     // /////////////////////////////////////////////////////////////////
 
     ToolHandle<Muon::MuonIdHelperTool>   m_idHelper;
-    bool                                 m_scaleCscCov;
-    bool                                 m_scaleRpcCov;
-    bool                                 m_scaleTgcCov;
 
     bool                                 m_doCsc;
     bool                                 m_doRpc;
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx
index 19d277c9b50211bce3c7648477bd5b216f27bcea..b1bc051f9dd3af4714cc64e8a012ee8b6d284dd2 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx
@@ -59,7 +59,7 @@ namespace Muon {
     
   }
 
-  std::vector<const Muon::MuonSegment*>* MuonClusterSegmentFinderTool::find(std::vector< const Muon::MuonClusterOnTrack* >& muonClusters) {
+  std::vector<const Muon::MuonSegment*>* MuonClusterSegmentFinderTool::find(std::vector< const Muon::MuonClusterOnTrack* >& muonClusters) const {
     ATH_MSG_DEBUG("Entering MuonClusterSegmentFinderTool with " << muonClusters.size() << " clusters to be fit" );
     if(belowThreshold(muonClusters,4)) return 0;
     std::vector<const Muon::MuonSegment*>* segs = findPrecisionSegments(muonClusters);
@@ -613,7 +613,7 @@ namespace Muon {
 	  double dist = clusterDistanceToSeed( *cit, seed);
 	  double timedist = std::abs(clusterDistanceToSeed( *cit, seed)) + std::abs(tdrift*0.015); // std::abs(tdrift*0.015) is an ad hoc penalty factor, to be optimised when time resolution is known
 	  double error = Amg::error((*cit)->localCovariance(),Trk::locX);
-	  if (!tight) error += 1.;
+	  if (!tight) error += 15.;
 	  ATH_MSG_VERBOSE(" lay " << layer << " tdrift " << tdrift << " dist " << dist  << " timedist " << timedist << " pull " << dist/error
 			<< " cut " << m_maxClustDist << "  " << m_idHelperTool->toString((*cit)->identify()) );
 	  if( std::abs(dist/error) < m_maxClustDist) {
@@ -630,7 +630,7 @@ namespace Muon {
 	    double dist = clusterDistanceToSeed( *cit, seed);
 	    double window = std::abs(2.*5.*0.047 * ((*cit)->globalPosition().perp() / (*cit)->globalPosition().z()));  // all hits in the range [bestDist-window;bestDist-window] will be accepted; 2-safety factor; 5-time resolution; 0.047-drift velocity; (hardcoded values to be removed once time resolution model is known) 
 	    double error = Amg::error((*cit)->localCovariance(),Trk::locX);
-	    if (!tight) error += 1.;
+	    if (!tight) error += 15.;
 	    ATH_MSG_VERBOSE(" Current RIO : distance " << dist << " window " << window << " to be attached " << ( (std::abs(std::abs(dist)-bestDist) < window) && (std::abs(dist/error) < m_maxClustDist) ) );
 	    if( (std::abs(dist-bestDist) < window) && (std::abs(dist/error) < m_maxClustDist) ) {
 	      rios.push_back( (*cit) );
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.h
index 289d5f2fa7b94e9c84bdfbdd81c9a8b4a322f030..a44180d22bca7fbdae78b5b05829c44cccdb089f 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.h
@@ -43,8 +43,8 @@ namespace Muon {
         
     static const InterfaceID& interfaceID();
 
-    virtual StatusCode initialize(void);  
-    virtual StatusCode finalize(void);  
+    virtual StatusCode initialize(void) override;
+    virtual StatusCode finalize(void) override;
 
   private:
     ToolHandle<Trk::ITrackFitter>                 m_slTrackFitter;  //<! fitter, always use straightline
@@ -59,7 +59,7 @@ namespace Muon {
 
   public:
     //find segments given a list of MuonCluster
-    std::vector<const Muon::MuonSegment*>* find(std::vector< const Muon::MuonClusterOnTrack* >& clusters);
+    std::vector<const Muon::MuonSegment*>* find(std::vector< const Muon::MuonClusterOnTrack* >& clusters) const override;
     
   private:
     //reconstruct the segments in the precision (eta) plane
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMakerToolInterfaces/MuonSegmentMakerToolInterfaces/IMuonClusterSegmentFinderTool.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMakerToolInterfaces/MuonSegmentMakerToolInterfaces/IMuonClusterSegmentFinderTool.h
index 57914c3f3ca01adb3131d5d2959a0530306eb1bb..22fd2f50bb0e3166962b6e0c2eae82409354546c 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMakerToolInterfaces/MuonSegmentMakerToolInterfaces/IMuonClusterSegmentFinderTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMakerToolInterfaces/MuonSegmentMakerToolInterfaces/IMuonClusterSegmentFinderTool.h
@@ -25,7 +25,7 @@ namespace Muon {
     /** access to tool interface */
     static const InterfaceID& interfaceID();
 
-    virtual std::vector<const Muon::MuonSegment*>* find(std::vector< const Muon::MuonClusterOnTrack* >& clusters) = 0;
+    virtual std::vector<const Muon::MuonSegment*>* find(std::vector< const Muon::MuonClusterOnTrack* >& clusters) const = 0;
 
   };
   
diff --git a/PhysicsAnalysis/AnalysisCommon/PATCore/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/PATCore/CMakeLists.txt
index 5ccb157077d8737a05fcf4d66dd531c1efb1fc51..3d0362c4e26e1f515d127cdd04da8fb671d4f93c 100644
--- a/PhysicsAnalysis/AnalysisCommon/PATCore/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/PATCore/CMakeLists.txt
@@ -25,8 +25,8 @@ find_package( ROOT COMPONENTS Core )
 # In the standalone build create a "CINT dictionary":
 if( XAOD_STANDALONE )
    atlas_add_root_dictionary( PATCoreLib PATCoreLibDictSource
-      ROOT_HEADERS PATCore/TAccept.h PATCore/TResult.h
-      PATCore/TSelectorToolBase.h PATCore/TCalculatorToolBase.h Root/LinkDef.h
+      ROOT_HEADERS PATCore/TAccept.h 
+      PATCore/TSelectorToolBase.h Root/LinkDef.h
       EXTERNAL_PACKAGES ROOT )
 endif()
 
diff --git a/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/IAthCalculatorTool.h b/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/IAthCalculatorTool.h
deleted file mode 100644
index f6661f46fc81d85e17e28cf5d9b3958a75aa238f..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/IAthCalculatorTool.h
+++ /dev/null
@@ -1,81 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// IAthCalculatorTool.h 
-// Header file for class IAthCalculatorTool
-// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
-/////////////////////////////////////////////////////////////////// 
-#ifndef PATCORE_IATHCALCULATORTOOL_H
-#define PATCORE_IATHCALCULATORTOOL_H 1
-
-// STL includes
-
-// HepMC / CLHEP includes
-
-// FrameWork includes
-#include "GaudiKernel/IAlgTool.h"
-
-// Include the return object
-#include "PATCore/TResult.h"
-
-// Forward declaration
-class INavigable4Momentum;
-
-
-static const InterfaceID IID_IAthCalculatorTool("IAthCalculatorTool", 1, 0);
-
-
-class [[deprecated("do not use for multi-threaded code")]] IAthCalculatorTool
-  : virtual public ::IAlgTool
-{ 
-
-  /////////////////////////////////////////////////////////////////// 
-  // Public methods: 
-  /////////////////////////////////////////////////////////////////// 
- public: 
-
-  /** Destructor: 
-   */
-  //virtual ~IAthCalculatorTool(){};
-
-  /////////////////////////////////////////////////////////////////// 
-  // Const methods: 
-  ///////////////////////////////////////////////////////////////////
-  static const InterfaceID& interfaceID();
-
-
-  /** Method to get the plain TAccept */
-  virtual const Root::TResult& getTResult( ) = 0;
-
-
-  /** The main accept method: the actual cuts are applied here */
-  virtual const Root::TResult& calculate( const INavigable4Momentum* /*part*/ ) = 0;
-
-
-  /////////////////////////////////////////////////////////////////// 
-  // Non-const methods: 
-  /////////////////////////////////////////////////////////////////// 
-
-  /////////////////////////////////////////////////////////////////// 
-  // Protected data: 
-  /////////////////////////////////////////////////////////////////// 
- protected: 
-
-}; 
-
-/// I/O operators
-//////////////////////
-
-/////////////////////////////////////////////////////////////////// 
-/// Inline methods: 
-/////////////////////////////////////////////////////////////////// 
-inline const InterfaceID& IAthCalculatorTool::interfaceID() 
-{ 
-   return IID_IAthCalculatorTool; 
-}
-
-
-#endif //> !PATCORE_IATHSELECTORTOOL_H
diff --git a/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/PATCoreDict.h b/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/PATCoreDict.h
index 55a3d4a219123378f0a3a0e9af412c717ad6dd52..79c90fe3a62fb90c60c2f1cd8eaeec1c95dd84fe 100644
--- a/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/PATCoreDict.h
+++ b/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/PATCoreDict.h
@@ -21,14 +21,11 @@
 #include "PATCore/AcceptInfo.h"
 #include "PATCore/AcceptData.h"
 #include "PATCore/TSelectorToolBase.h"
-#include "PATCore/TResult.h"
-#include "PATCore/TCalculatorToolBase.h"
 #include "PATCore/IAsgSelectionTool.h"
 #include "PATCore/IAsgSelectionWithVertexTool.h"
 
 #ifndef ROOTCORE
 #include "PATCore/IAthSelectorTool.h"
-#include "PATCore/IAthCalculatorTool.h"
 #include "PATCore/IAthHistogramTool.h"
 #include "PATCore/IUserDataCalcTool.h"
 #endif
diff --git a/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/TCalculatorToolBase.h b/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/TCalculatorToolBase.h
deleted file mode 100644
index 7c2c4289b7adf27c1c6422d26fa73a16a08c1541..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/TCalculatorToolBase.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Dear emacs, this is -*-c++-*-
-
-#ifndef __TCALCULATORTOOLBASE__
-#define __TCALCULATORTOOLBASE__
-
-/**
-   @class TCalculatorToolBase
-   @brief Bsse class for tools to retrieve efficiencies, scale factors,... for objects in pure ROOT
-
-   @author Karsten Koeneke (CERN)
-   @date   October 2011
-*/
-
-// ROOT includes
-#include "TString.h"
-
-// Include the return object
-#include "TResult.h"
-
-
-namespace Root {
-  class [[deprecated("do not use for multi-threaded code")]] TCalculatorToolBase
-  {
-
-  public: 
-    /** Standard constructor */
-    TCalculatorToolBase(const char* name="TCalculatorToolBase") :
-      m_name(name),
-      m_result( Form("%s_TResult",name) )
-    {
-    }
-    
-    /** Standard destructor */
-    virtual ~TCalculatorToolBase(){}
-  
-
-    // Main methods
-  public:
-    /** Initialize this class */
-    virtual int initialize() = 0;
-
-    /** Finalize this class; everything that should be done after the event loop should go here */
-    virtual int finalize() = 0;
-
-
-    /** Get the name of the class instance */
-    inline const char* getName() const { return m_name; }
-
-
-    /** Method to get the plain TResult */
-    inline const Root::TResult& getTResult( ) const { return m_result; } 
-
-
-#ifdef ROOTCORE 
-    /** For convenient PROOF support */
-    ClassDef(TCalculatorToolBase,1); 
-#endif 
-
-
-    // Protected members
-  protected:
-    /** The name of the class instance */
-    TString m_name;
-
-    /** The return TResult object */
-    mutable TResult m_result;
-
-
-  }; // End: class definition
-
-
-} // End: namespace Root
-
-#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/TResult.h b/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/TResult.h
deleted file mode 100644
index 996a4cea3e1a74f25f5cef0f250bb61df2d55b32..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/TResult.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Dear emacs, this is -*-c++-*-
-
-#ifndef __TRESULT__
-#define __TRESULT__
-
-/**
-   @class TResult
-   @brief Object to encode the result of retrieving efficiencies, scale factors,...
-
-   @author Karsten Koeneke (CERN)
-   @date   April 2011
-
-*/
-
-#include <TString.h>
-#include <map>
-#include <vector>
-
-
-
-
-namespace Root {
-  class [[deprecated("do not use for multi-threaded code, use xAOD decorations instead")]] TResult
-  {
-
-  public: 
-    /** Standard constructor */
-    TResult(const char* name="TResult");
-
-    /** Standard copy constructor: DO NOT COPY IT! It is expensive to copy! */
-    TResult( const TResult& parent );
-  
-    /** Standard assignment operator: DO NOT COPY IT! It is expensive to copy! */
-    TResult& operator= ( const TResult& rhs );
-  
-    /** Standard destructor */
-    virtual ~TResult();
-  
-  public:
-    /** Overload the double operator; allows for:
-        double myScaleFactor = double(myTResult) */
-    inline operator double() const
-    {
-      return getNResults() >= 1 ? m_result[0] : m_defaultResult;
-    }
-
-
-    /** Overload the double operator; allows for:
-        std::pair<double,double> myScaleFactorAndUncertainty = std::pair<double,double>(myTResult) */
-    inline operator std::pair<double,double>() const
-    {
-      return getNResults() >= 2 ? std::make_pair( m_result[0], m_result[1] ) : std::make_pair( m_defaultResult, m_defaultResult );
-    }
-
-
-    /** Get the zeroth entry, by convention, this is the efficiency or scale factor or MVA response or... */
-    inline double getEfficiency() const { return double(*this); };
-
-    /** Get the zeroth entry, by convention, this is the efficiency or scale factor or MVA response or... */
-    inline double getScaleFactor() const { return double(*this); };
-
-    /** Get the zeroth entry, by convention, this is the efficiency or scale factor or MVA response or... */
-    inline double getMVAResponse() const { return double(*this); };
-
-    /** Get the first entry, by convention, this is the total uncertainty */
-    inline double getTotalUncertainty() const
-    {
-      return getNResults() >= 2 ? m_result[1] : m_defaultResult;
-    }
-
-
-
-    /** Get the name of the class instance */
-    inline const char* getName() const { return m_name; }
-
-
-    /** Clear all stored values (not the names and descriptions thought) and assign the default value for each result */
-    inline void clear() 
-    {
-      for ( unsigned int i=0; i < m_result.size(); i++ )
-        {
-          m_result[i] = m_defaultResult;
-        }
-    }
-
-
-
-    /** Get the number of results defined */
-    inline unsigned int getNResults() const { return m_resultMap.size(); }
-
-
-    /** Add a result; returning the result position */
-    int addResult( const TString& resultName, const TString& resultDescription );
-
-
-    /** Get the position of a result */
-    inline unsigned int getResultPosition( const TString& resultName ) const 
-     {
-      std::map< TString, std::pair< TString, unsigned int > >::const_iterator it = m_resultMap.find(resultName);
-      return (it != m_resultMap.end()) ? (it->second).second : 999999;
-    }
-
-
-    /** Get the name of a result, based on the result position (slow, avoid usage)*/
-    const TString& getResultName( unsigned int resultPosition ) const;
-
-
-    /** Get the description of a result, based on the result name */
-    inline const TString& getResultDescription( const TString& resultName ) const
-    {
-      std::map< TString, std::pair< TString, unsigned int > >::const_iterator it = m_resultMap.find(resultName);
-      return (it != m_resultMap.end()) ? (it->second).first : m_emptyString;
-    }
-
-    /** Get the description of a result, based on the result position */
-    const TString& getResultDescription( unsigned int resultPosition ) const;
-
-
-    /** Get a result, based on the result name (safer) */
-    inline double getResult( const TString& resultName ) const
-    {
-      unsigned int resultPosition = getResultPosition(resultName);
-      return getResult(resultPosition);
-    }
-
-    /** Get a result, based on the result position (faster) */
-    inline double getResult( unsigned int resultPosition ) const
-    {
-      return m_result[resultPosition];
-    }
-
-
-    /** Get the vector of results (Don't use this as it is slow) */
-    inline std::vector<double> getResults() const
-    {
-      return m_result;
-    }
-
-
-    /** Set a result, based on the result name (safer) */
-    inline void setResult( const TString& resultName, double resultResult )
-    {
-      unsigned int resultPosition = getResultPosition(resultName);
-      return setResult( resultPosition, resultResult );
-    }
-
-    /** Set a result, based on the result position (faster) */
-    inline void setResult( unsigned int resultPosition, double resultResult )
-    {
-      m_result[resultPosition] = resultResult;
-      return;
-    }
-
-
-    /** Set a result, based on the result name (safer) */
-    inline void setResultDescription( const TString& resultName, const TString& resultDescription )
-    {
-      unsigned int resultPosition = getResultPosition(resultName);
-      return setResultDescription( resultPosition, resultDescription );
-    }
-
-    /** Set a result, based on the result position (faster) */
-    void setResultDescription( unsigned int resultPosition, const TString& resultDescription );
-
-
-#ifdef ROOTCORE
-    /** For convenient PROOF support */
-    ClassDef(TResult,1);
-#endif
-
-
-    // Protected members
-  protected:
-    /** The name of the class instance */
-    TString m_name;
-
-
-    // Private members
-  private:
-    /** The default result value */
-    double m_defaultResult;
-
-    /** The results */
-    std::vector<double> m_result;
-
-    /** The map for mapping result names to their description and position */
-    std::map< TString, std::pair< TString, unsigned int > > m_resultMap;
-
-    /** An empty string as default return for some member methods */
-    TString m_emptyString;
-
-
-  }; // End: class definition
-
-} // End: namespace Root
-
-
-#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/selection.xml b/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/selection.xml
index cc4648751df25b60d614218ba6bfea9e19d57643..55d09eda23a9ac2542c93e4bc74f36ee048ad78e 100644
--- a/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/selection.xml
+++ b/PhysicsAnalysis/AnalysisCommon/PATCore/PATCore/selection.xml
@@ -5,9 +5,6 @@
     <!--<class name="std::bitset<32>" />-->
     <class name="Root::TSelectorToolBase" />
     <class name="IAthSelectorTool" />
-    <class name="Root::TResult" />
-    <class name="Root::TCalculatorToolBase" />
-    <class name="IAthCalculatorTool" />
     <class name="IUserDataCalcTool" />
     <class name="IAthHistogramTool" />
     <class name="IAsgSelectionTool" />
diff --git a/PhysicsAnalysis/AnalysisCommon/PATCore/Root/LinkDef.h b/PhysicsAnalysis/AnalysisCommon/PATCore/Root/LinkDef.h
index 9ec3a8ee547417af0f054e15ba533b8dcde616ac..b083fcac64fd42f25a4df4e147e5fdf0a77f526a 100644
--- a/PhysicsAnalysis/AnalysisCommon/PATCore/Root/LinkDef.h
+++ b/PhysicsAnalysis/AnalysisCommon/PATCore/Root/LinkDef.h
@@ -12,8 +12,6 @@
 #include "TString.h"
 #include "PATCore/TAccept.h"
 #include "PATCore/TSelectorToolBase.h"
-#include "PATCore/TResult.h"
-#include "PATCore/TCalculatorToolBase.h"
 
 #ifdef __CINT__
 
@@ -25,8 +23,6 @@
 
 #pragma link C++ class Root::TAccept+ ;
 #pragma link C++ class Root::TSelectorToolBase+ ;
-#pragma link C++ class Root::TResult+ ;
-#pragma link C++ class Root::TCalculatorToolBase+ ; 
 
 #endif
 
diff --git a/PhysicsAnalysis/AnalysisCommon/PATCore/Root/TResult.cxx b/PhysicsAnalysis/AnalysisCommon/PATCore/Root/TResult.cxx
deleted file mode 100644
index 79372a565e3fc7ab87da8d753f7af47b244e99a7..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/AnalysisCommon/PATCore/Root/TResult.cxx
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-/******************************************************************************
-Name:        TResult
-
-Author:      Karsten Koeneke (CERN)
-Created:     October 2011
-
-Description: Object to encode the result of efficiency/scale factor/resolution calculation
-******************************************************************************/
-
-#ifdef __GNUC__
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
-
-// This class' header
-#include "PATCore/TResult.h"
-
-
-// include math
-#include <math.h>
-#include <utility>
-#include <map>
-#include <iostream>
-
-// ROOT includes
-#include <TString.h>
-
-
-
-
-//=============================================================================
-// Constructor
-//=============================================================================
-Root::TResult::TResult(const char* name) :
-  m_name(name),
-  m_defaultResult(0.0),
-  m_result(),
-  m_resultMap(),
-  m_emptyString("")
-{
-}
-
-
-
-
-//=============================================================================
-// Copy Constructor: DO NOT COPY IT! It is expensive to copy!
-//=============================================================================
-Root::TResult::TResult(const TResult& parent) :
-  m_defaultResult( parent.m_defaultResult ),
-  m_result( parent.m_result ),
-  m_resultMap( parent.m_resultMap ),
-  m_emptyString( parent.m_emptyString )
-{
-}
-
-
-
-// Standard assignment operator: DO NOT COPY IT! It is expensive to copy!
-Root::TResult& Root::TResult::operator= ( const TResult& rhs )
-{
-  // check for self-assignment by comparing addresses
-  if (this == &rhs) return *this;
-
-  // do the copy
-  m_defaultResult = rhs.m_defaultResult;
-  m_result        = rhs.m_result;
-  m_resultMap     = rhs.m_resultMap;
-  m_emptyString   = rhs.m_emptyString;
-  
-  // return the existing object
-  return *this;
-}
-
-
-
-//=============================================================================
-// Destructor
-//=============================================================================
-Root::TResult::~TResult()
-{
-}
-
-
-
-
-//=============================================================================
-// Adding a result
-//=============================================================================
-int Root::TResult::addResult( const TString& resultName, const TString& resultDescription )
-{
-  // Add the result to the map
-  std::pair< TString, unsigned int > resultPair = std::make_pair( resultDescription, m_resultMap.size() );
-  m_resultMap.insert( std::make_pair( resultName, resultPair ) );
-
-  // Add the default result entry to the vector of results (doubles)
-  m_result.push_back( m_defaultResult );
-
-  // Return the position of the newly added result in the map
-  return (int)(m_resultMap.size() - 1);
-}
-
-
-
-
-//=============================================================================
-// Get the description of a result based on the result position
-//=============================================================================
-const TString& Root::TResult::getResultName( unsigned int resultPosition ) const
-{
-  // Make sure that this result doesn't exceed the number of defined results
-  if ( resultPosition >= m_resultMap.size() )
-    {
-      return m_emptyString;
-    }
-
-  // iterate over the map and find the right position
-  std::map< TString, std::pair< TString, unsigned int > >::const_iterator it    = m_resultMap.begin();
-  std::map< TString, std::pair< TString, unsigned int > >::const_iterator itEnd = m_resultMap.end();
-  for ( ; it != itEnd; ++it )
-    {
-      if ( (it->second).second == resultPosition )
-        {
-          return (it->first);
-        }
-    }
-
-  return m_emptyString;
-}
-
-
-
-
-//=============================================================================
-// Get the description of a result based on the result position
-//=============================================================================
-const TString& Root::TResult::getResultDescription( unsigned int resultPosition ) const
-{
-  // Make sure that this result doesn't exceed the number of defined results
-  if ( resultPosition >= m_resultMap.size() )
-    {
-      return m_emptyString;
-    }
-
-  // iterate over the map and find the right position
-  std::map< TString, std::pair< TString, unsigned int > >::const_iterator it    = m_resultMap.begin();
-  std::map< TString, std::pair< TString, unsigned int > >::const_iterator itEnd = m_resultMap.end();
-  for ( ; it != itEnd; ++it )
-    {
-      if ( (it->second).second == resultPosition )
-        {
-          return (it->second).first;
-        }
-    }
-
-  return m_emptyString;
-}
-
-
-
-
-
-//=============================================================================
-// Set the description of a result based on the result position
-//=============================================================================
-void Root::TResult::setResultDescription( const unsigned int resultPosition, const TString& resultDescription )
-{
-  // iterate over the map and find the right position
-  std::map< TString, std::pair< TString, unsigned int > >::iterator it    = m_resultMap.begin();
-  std::map< TString, std::pair< TString, unsigned int > >::iterator itEnd = m_resultMap.end();
-  for ( ; it != itEnd; ++it )
-    {
-      if ( (it->second).second == resultPosition )
-        {
-          ((it->second).first) = resultDescription;
-          return;
-        }
-    }
-
-  return;
-}
-
-
-
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetFlavourInfo.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetFlavourInfo.cxx
index 190608f4814e1b7ddea56cd9120972bbc6043a09..2db5790855321a1b1994f5c8132d5f1fe5a739c7 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetFlavourInfo.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/JetFlavourInfo.cxx
@@ -80,6 +80,16 @@ xAOD::ExclusiveConeHadronFlavourLabel (const xAOD::Jet* jet) {
   return label;
 }
 
+int
+xAOD::ExclusiveConeDoubleHadronFlavourLabel (const xAOD::Jet* jet) {
+  // default label means "invalid"
+  int label = -1;
+
+  // We don't check the return value, as we would not be able to handle it gracefully anyway
+  jet->getAttribute("HadronConeExclExtendedTruthLabelID",label);
+  return label;
+}
+
 int xAOD::jetFlavourLabel (const xAOD::Jet* jet, JetFlavourLabelType t) {
 
   switch (t) {
diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTByteStreamErrorFillerTool.h b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTByteStreamErrorFillerTool.h
index 9e7b23e0f5f51ad74b4a7613ef66ab2f3381b1b2..b7786d20a853e291eee96b2d0ef50ffa11c18399 100644
--- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTByteStreamErrorFillerTool.h
+++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTByteStreamErrorFillerTool.h
@@ -7,7 +7,6 @@
  
 
 #include "D3PDMakerUtils/BlockFillerTool.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetIdentifier/SCT_ID.h"
 #include "SCT_ConditionsTools/ISCT_ByteStreamErrorsTool.h"
 #include "SCT_Cabling/ISCT_CablingSvc.h"
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/EGammaPrepRawDataThinning.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/EGammaPrepRawDataThinning.h
index 5a1b7d13935415433b64f440b2116201352f3f7e..7a6347f514d9a661befc7600a257250e5a746731 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/EGammaPrepRawDataThinning.h
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/EGammaPrepRawDataThinning.h
@@ -21,7 +21,6 @@
 
 // Needed for the pixel clusters
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/TRT_DetectorManager.h"
 #include "InDetPrepRawData/PixelClusterContainer.h"
 #include "InDetPrepRawData/PixelClusterCollection.h"
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgDeadHVCellRemovalTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgDeadHVCellRemovalTool.h
deleted file mode 100644
index d3e957eb2f6c28c1737943702865ffbd72208aa6..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgDeadHVCellRemovalTool.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Dear emacs, this is -*-c++-*-
-#ifndef __IASGDEADHVCELLREMOVALTOOL__
-#define __IASGDEADHVCELLREMOVALTOOL__
-
-#include "EgammaAnalysisInterfaces/IAsgDeadHVCellRemovalTool.h"
-#pragma message "In the process of moving the Interface part under PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces"
-#pragma GCC warning "TODO: Use the headers from EgammaAnalysisInterfaces"
-
-#endif
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgEGammaIsEMSelector.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgEGammaIsEMSelector.h
deleted file mode 100644
index 243fc8e5b1b236b523070393eb2a3b6cc77c9f1d..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgEGammaIsEMSelector.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Dear emacs, this is -*-c++-*-
-
-#ifndef __IASGEGAMMAISEMSELECTOR__
-#define __IASGEGAMMAISEMSELECTOR__
-
-#include "EgammaAnalysisInterfaces/IAsgEGammaIsEMSelector.h"
-#pragma message "In the process of moving the Interface part under PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces"
-#pragma GCC warning "TODO: Use the headers from EgammaAnalysisInterfaces"
-
-#endif
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgElectronIsEMSelector.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgElectronIsEMSelector.h
deleted file mode 100644
index 7e7031ec70666fd22f5464fdcc931d935875c795..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgElectronIsEMSelector.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Dear emacs, this is -*-c++-*-
-
-#ifndef __IASGELECTRONISEMSELECTOR__
-#define __IASGELECTRONISEMSELECTOR__
-
-#include "EgammaAnalysisInterfaces/IAsgElectronIsEMSelector.h"
-#pragma message "In the process of moving the Interface part under PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces"
-#pragma GCC warning "TODO: Use the headers from EgammaAnalysisInterfaces"
-
-#endif
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgElectronLikelihoodTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgElectronLikelihoodTool.h
deleted file mode 100644
index fa06d6ec0e3fff7820a0b82637fa8174310cd20e..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgElectronLikelihoodTool.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef __IASGELECTRONLIKELIHOODSELECTOR__
-#define __IASGELECTRONLIKELIHOODSELECTOR__
-
-#include "EgammaAnalysisInterfaces/IAsgElectronLikelihoodTool.h"
-#pragma message "In the process of moving the Interface part under PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces"
-#pragma GCC warning "TODO: Use the headers from EgammaAnalysisInterfaces"
-
-#endif
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgElectronMultiLeptonSelector.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgElectronMultiLeptonSelector.h
deleted file mode 100644
index 22f2bcb572afcda682baac022aee29ce2c1b6889..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgElectronMultiLeptonSelector.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Dear emacs, this is -*-c++-*-
-
-#ifndef __IASGELECTRONMULTILEPTONSELECTOR__
-#define __IASGELECTRONMULTILEPTONSELECTOR__
-
-#include "EgammaAnalysisInterfaces/IAsgElectronMultiLeptonSelector.h"
-#pragma message "In the process of moving the Interface part under PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces"
-#pragma GCC warning "TODO: Use the headers from EgammaAnalysisInterfaces"
-
-#endif
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgForwardElectronIsEMSelector.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgForwardElectronIsEMSelector.h
deleted file mode 100644
index d6465bf66ee09b843a5fdb188b1bd3d037053d4e..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgForwardElectronIsEMSelector.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Dear emacs, this is -*-c++-*-
-
-#ifndef __IASGFORWARDELECTRONISEMSELECTOR__
-#define __IASGFORWARDELECTRONISEMSELECTOR__
-
-#include "EgammaAnalysisInterfaces/IAsgForwardElectronIsEMSelector.h"
-#pragma message "In the process of moving the Interface part under PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces"
-#pragma GCC warning "TODO: Use the headers from EgammaAnalysisInterfaces"
-
-#endif
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgPhotonIsEMSelector.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgPhotonIsEMSelector.h
deleted file mode 100644
index 1d9ffab8492032c0810080134e4f283316b34bff..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IAsgPhotonIsEMSelector.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Dear emacs, this is -*-c++-*-
-
-#ifndef __IASGPHOTONISEMSELECTOR__
-#define __IASGPHOTONISEMSELECTOR__
-
-#include "EgammaAnalysisInterfaces/IAsgPhotonIsEMSelector.h"
-#pragma message "In the process of moving the Interface part under PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces"
-#pragma GCC warning "TODO: Use the headers from EgammaAnalysisInterfaces"
-
-
-#endif
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IEGammaAmbiguityTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IEGammaAmbiguityTool.h
deleted file mode 100644
index 1b52f02bd2e5ad9235d1490aa6bf78ce6268c129..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/IEGammaAmbiguityTool.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef __IEGammaAmbiguityTool__
-#define __IEGammaAmbiguityTool__
-
-#include "EgammaAnalysisInterfaces/IEGammaAmbiguityTool.h"
-#pragma message "In the process of moving the Interface part under PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces"
-#pragma GCC warning "TODO: Use the headers from EgammaAnalysisInterfaces"
-
-#endif
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/PhotonSelectorHelpers.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/PhotonSelectorHelpers.h
deleted file mode 100644
index b2fd710af253f9e69f3addb4df231b9e4ac7fa75..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/PhotonSelectorHelpers.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Dear emacs, this is -*-c++-*-
-
-#ifndef __PHOTONSELECTORHELPERS__
-#define __PHOTONSELECTORHELPERS__
-
-// Atlas includes
-#include "xAODEgamma/Photon.h"
-#include <cstddef>
-
-namespace PhotonSelectorHelpers{
-  ///@brief return the number of Pixel hits plus dead sensors in the track particle
-  bool passOQquality(const xAOD::Photon *ph);
-  bool passOQqualitydelayed(const xAOD::Photon *ph);
-  
-}
-
-#endif
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/PhotonSelectorHelpers.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/PhotonSelectorHelpers.cxx
deleted file mode 100644
index 8e2be39c892cb7b0cb3d788437f930f0da1f3dd9..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/PhotonSelectorHelpers.cxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "ElectronPhotonSelectorTools/PhotonSelectorHelpers.h"
-#include "xAODEgamma/EgammaxAODHelpers.h"
-#include "xAODCaloEvent/CaloCluster.h"
-#include "xAODEgamma/Photon.h"
-#include "AsgTools/AsgMessaging.h"
-
-// ==================================================================
-
-bool PhotonSelectorHelpers::passOQquality(const xAOD::Photon *ph){
-
- // Define an AsgMessaging instance
-  static const asg::AsgMessaging msg("PhotonSelectorHelpers");
-
-  if(!ph){
-    msg.msg(MSG::WARNING) << "No photon found!" << endmsg;
-    return 0;
-  }
-  
-  if( !( ( ph->OQ() & 1073741824 )!=0 ||
-	 ( ( ph->OQ() & 134217728 )!=0 &&
-	   ( ph->showerShapeValue(xAOD::EgammaParameters::Reta) > 0.98
-	    || ph->showerShapeValue(xAOD::EgammaParameters::f1) > 0.4
-	    || (ph->OQ() & 67108864) !=0)
-	   ) ) ){
-    return true;
-  } 
-  
-  return false;
-}
-
-// ==================================================================
-bool PhotonSelectorHelpers::passOQqualitydelayed(const xAOD::Photon *ph){
-
-  // Define an AsgMessaging instance
-  static const asg::AsgMessaging msg("PhotonSelectorHelpers");
-
-  if(!ph){
-    msg.msg(MSG::WARNING) << "No photon found!" << endmsg;
-    return 0;
-  }
-  
-  if( !( ( ph->OQ() & 1073741824)!=0 ||
-	 ( ( ph->OQ() & 134217728)!=0 &&
-	   ( ph->showerShapeValue(xAOD::EgammaParameters::Reta) > 0.98
-	     || ph->showerShapeValue(xAOD::EgammaParameters::f1) > 0.4
-	     ) ) ) ) {
-    return true;
-  }
-   
-  return false;
-}
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx
index dc8390f2626cfbfaab96c099cd0a3e3b4f607c20..505fdfad8bf813df4f3c5395e4d809e0dbda696c 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx
@@ -474,8 +474,8 @@ Root::TElectronLikelihoodTool::accept( LikeEnum::LHAcceptVars_t& vars_struct ) c
   }
   
   double cutDiscriminant;
-  unsigned int ibin_combinedLH = etbinLH*10+etabin; // Must change if number of eta bins changes!. Also starts from 7-10 GeV bin.
-  unsigned int ibin_combinedOther = etbinOther*10+etabin; // Must change if number of eta bins changes!. Also starts from 7-10 GeV bin.
+  unsigned int ibin_combinedLH = etbinLH*s_fnEtaBins+etabin; // Must change if number of eta bins changes!. Also starts from 7-10 GeV bin.
+  unsigned int ibin_combinedOther = etbinOther*s_fnEtaBins+etabin; // Must change if number of eta bins changes!. Also starts from 7-10 GeV bin.
 
   if(m_cutLikelihood.size()){
     // To protect against a binning mismatch, which should never happen
@@ -785,7 +785,7 @@ double Root::TElectronLikelihoodTool::TransformLikelihoodOutput(double ps,double
       // default situation, in the case where 4-7 GeV bin is not defined
       if (et > 7000. || !m_discHardCutForPileupTransform4GeV.size()){
 	unsigned int etfinebinLH = getLikelihoodEtDiscBin(et,true);
-	unsigned int ibin_combined = etfinebinLH*10+etabin;
+	unsigned int ibin_combined = etfinebinLH*s_fnEtaBins+etabin;
 	disc_hard_cut_ref       = m_discHardCutForPileupTransform[ibin_combined];
 	disc_hard_cut_ref_slope = m_discHardCutSlopeForPileupTransform[ibin_combined];
 	if (m_doCentralityTransform) disc_hard_cut_ref_quad  = m_discHardCutQuadForPileupTransform[ibin_combined];
@@ -853,7 +853,7 @@ unsigned int Root::TElectronLikelihoodTool::getIpBin(double ip) const{
 //---------------------------------------------------------------------------------------
 // Gets the Eta bin [0-9] given the eta
 unsigned int Root::TElectronLikelihoodTool::getLikelihoodEtaBin(double eta) const{
-  const unsigned int nEtaBins = 10;
+  const unsigned int nEtaBins = s_fnEtaBins;
   const double etaBins[nEtaBins] = {0.1,0.6,0.8,1.15,1.37,1.52,1.81,2.01,2.37,2.47};
   
   for(unsigned int etaBin = 0; etaBin < nEtaBins; ++etaBin){
@@ -946,7 +946,7 @@ unsigned int Root::TElectronLikelihoodTool::getLikelihoodBitmask(std::string var
 double Root::TElectronLikelihoodTool::InterpolateCuts(const std::vector<double>& cuts,const std::vector<double>& cuts_4gev,double et,double eta) const{
   int etbinLH = getLikelihoodEtDiscBin(et,true);
   int etabin = getLikelihoodEtaBin(eta);
-  unsigned int ibin_combinedLH = etbinLH*10+etabin;
+  unsigned int ibin_combinedLH = etbinLH*s_fnEtaBins+etabin;
   double cut = cuts.at(ibin_combinedLH);
   if (cuts_4gev.size() && et < 7000.) {cut = cuts_4gev.at(etabin);}
   if (et > 47500.) {return cut;} // interpolation stops here.
@@ -960,12 +960,12 @@ double Root::TElectronLikelihoodTool::InterpolateCuts(const std::vector<double>&
   double bin_center = eTBins[etbinLH];
   if (et > bin_center) {
     double cut_next = cut;
-    if (etbinLH+1<=8) cut_next = cuts.at((etbinLH+1)*10+etabin);
+    if (etbinLH+1<=8) cut_next = cuts.at((etbinLH+1)*s_fnEtaBins+etabin);
     return cut+(cut_next-cut)*(et-bin_center)/(bin_width);
   }
   // or else if et < bin_center :
   double cut_before = cut;
-  if (etbinLH-1>=0) {cut_before = cuts.at((etbinLH-1)*10+etabin);}
+  if (etbinLH-1>=0) {cut_before = cuts.at((etbinLH-1)*s_fnEtaBins+etabin);}
   else if (etbinLH == 0 && cuts_4gev.size()){cut_before = cuts_4gev.at(etabin);}
 
   return cut-(cut-cut_before)*(bin_center-et)/(bin_width);
diff --git a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/PhotonEfficiencyCorrection/AsgPhotonEfficiencyCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/PhotonEfficiencyCorrection/AsgPhotonEfficiencyCorrectionTool.h
index df81c7b19cb15f5d307ad93c7a78de55a6786c0a..0470c719b17afe12e7092d30e83bcba73bcb633d 100644
--- a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/PhotonEfficiencyCorrection/AsgPhotonEfficiencyCorrectionTool.h
+++ b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/PhotonEfficiencyCorrection/AsgPhotonEfficiencyCorrectionTool.h
@@ -24,8 +24,6 @@
 // Utility includes
 #include "boost/algorithm/string.hpp" // this one to replace std::string names
 
-// Include the return object and the underlying ROOT tool
-#include "PATCore/TResult.h"
 
 //xAOD includes
 #include "AsgTools/AsgTool.h"
@@ -37,9 +35,6 @@
 
 #include "xAODEgamma/Egamma.h"
 
-
-
-
 class AsgPhotonEfficiencyCorrectionTool
   : virtual public IAsgPhotonEfficiencyCorrectionTool,
     virtual public CP::ISystematicsTool,
@@ -63,13 +58,15 @@ public:
   virtual StatusCode finalize();
 
 
-  // Main methods from IUserDataCalcTool
+
 public:
+  typedef Root::TPhotonEfficiencyCorrectionTool::Result Result;
   /// The main calculate method: the actual correction factors are determined here
-  const Root::TResult& calculate( const xAOD::IParticle* part ) const;
-  const Root::TResult& calculate( const xAOD::Egamma* egam ) const;
-  const Root::TResult& calculate( const xAOD::Egamma& egam ) const{  
- 		    return calculate(&egam);} // pass the Egamma obj by reference
+  const Result calculate( const xAOD::IParticle* part ) const;
+  const Result calculate( const xAOD::Egamma* egam ) const;
+  const Result calculate( const xAOD::Egamma& egam ) const{  
+ 		    return calculate(&egam);
+  } // pass the Egamma obj by reference
 
   ///Add some method for now as a first step to move the tool to then new interface 
   virtual CP::CorrectionCode getEfficiencyScaleFactor(const xAOD::Egamma& inputObject, double& efficiencyScaleFactor) const;
@@ -104,9 +101,6 @@ private:
   Root::TPhotonEfficiencyCorrectionTool* m_rootTool_unc;
   Root::TPhotonEfficiencyCorrectionTool* m_rootTool_con;
   
-  /// A dummy return TResult object
-  Root::TResult m_resultDummy;
-
   /// Systematics filter map
   std::unordered_map<CP::SystematicSet, CP::SystematicSet> m_systFilter;
   
diff --git a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/PhotonEfficiencyCorrection/TPhotonEfficiencyCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/PhotonEfficiencyCorrection/TPhotonEfficiencyCorrectionTool.h
index afcff03dba1906d4c12a87aefb85993f96571575..5d5efe7b1934120b6f149ce4c54b6a83f0a8f60f 100644
--- a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/PhotonEfficiencyCorrection/TPhotonEfficiencyCorrectionTool.h
+++ b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/PhotonEfficiencyCorrection/TPhotonEfficiencyCorrectionTool.h
@@ -18,64 +18,28 @@
   @date   January 2014
   */
 
-
-
-/* C.A 
- * Comments for possible migration away from TResult. 
- * This tool as mentioned in the comment above WAS inheriting publicly from the TElectronEfficiencyCorrectionTool.
- * Therefore, in pracices it WAS inheriting both the TCalculatorToolBase facilities/interface and the
- * TElectronEfficiencyCorrectionTool Implementation. This kind of header inheritance from different places
- * made this a tad bit convoluted to catch.
- *
- * The main issue is  due to AsgPhotonEfficiencyCorrectionTool having public
- * methods returning a TResult. The IAsgPhotonEfficiencyCorrectionTool does not advertise these methods but this
- * was enough to make me wonder . As I could imagine clients could exist? 
- * In general not sure why we have these methods around
- * in the "Asg" part at they do not follow 100% the Electron notation.
- * 
- * Anyhow, the TElectronEfficiencyCorrectionTool still provides the actual implementation.
- * One can not really use the TElectronEfficiencyTool polymorphically (does not seem to be done anywhere).
- * After its own cleanup away from TResult it does not have common variables with the TCalculatorToolBase.
- *
- * Needed to do the ctor/dtor and initialize / finalize (both bases have these)
- * And a calculate wraping the new one from TElectronEfficiencyCorrectionTool 
- * following the older convention i.e return TResult ref.
- *
- * Hopefully, someone with a more recent view could make a more informed decison  
- * on how to avoid the "mutable" from TSelectorToolBase also for the Photon tools. Migrate this package. 
- * My impression is that we could move away but need feedback.
- *
- * When done resolving the above please remove this comment !!!
- */
-
-#include <sstream>
 // STL includes
 #include <vector>
 #include <string>
-// ROOT includes
-#include <TString.h>
-#include "TKey.h"
-#include "TObjArray.h"
-#include "TH1.h"
-#include "TH2.h"
-#include "TRandom3.h"
 // Include the return object and the base class
-#include "PATCore/TResult.h"
-#include "PATCore/TCalculatorToolBase.h"
 #include "PATCore/PATCoreEnums.h"
 #include "ElectronEfficiencyCorrection/TElectronEfficiencyCorrectionTool.h"
 
 namespace Root {
-    class TPhotonEfficiencyCorrectionTool : public  Root::TCalculatorToolBase, 
-    public Root::TElectronEfficiencyCorrectionTool{
+    class TPhotonEfficiencyCorrectionTool : public Root::TElectronEfficiencyCorrectionTool{
     
     public:
+        struct Result{
+            double scaleFactor=-999.0;
+            double totalUncertainty=-999.0;
+        };
+
         TPhotonEfficiencyCorrectionTool(const char* name="TPhotonEfficiencyCorrectionTool");
         ~TPhotonEfficiencyCorrectionTool();
         int initialize();
         int finalize(); 
         // Additional public methods
-        const Root::TResult& calculate( const PATCore::ParticleDataType::DataType dataType,
+        const Result calculate( const PATCore::ParticleDataType::DataType dataType,
                 const unsigned int runnumber,
                 const double cluster_eta,
                 const double et /* in MeV */
diff --git a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx
index 8a1a69cb1bab71b6ba7926aedb19c941ef7b0f7d..f25b96cb412d433b911f829329ae1bce7e741300 100644
--- a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -20,7 +20,6 @@
 #include <limits.h>
 
 // Include the return object
-#include "PATCore/TResult.h"
 #include "PATCore/PATCoreEnums.h"
 
 // xAOD includes
@@ -29,10 +28,8 @@
 #include "xAODEgamma/EgammaxAODHelpers.h"
 #include "PathResolver/PathResolver.h"
 
-
 // ROOT includes
 #include "TSystem.h"
-
 #define MAXETA 2.47
 #define MIN_ET 10000.0
 #define MIN_ET_OF_SF 10000.0
@@ -42,6 +39,8 @@
 #define MAX_ET_Iso_SF 999999.99
 #define MAX_ET_Trig_SF 99999.99
 
+typedef Root::TPhotonEfficiencyCorrectionTool::Result Result;
+
 
 // =============================================================================
 // Standard constructor
@@ -175,8 +174,6 @@ StatusCode AsgPhotonEfficiencyCorrectionTool::initialize()
       return StatusCode::FAILURE;
     }
   
-  // Copy the now filled TResult to the dummy
-  m_resultDummy = m_rootTool_con->getTResult();  // do only for converted photons instance
 
   // Add the recommended systematics to the registry
   if ( registerSystematics() != CP::SystematicCode::Ok) {
@@ -205,19 +202,20 @@ StatusCode AsgPhotonEfficiencyCorrectionTool::finalize()
 // =============================================================================
 // The main accept method: the actual cuts are applied here 
 // =============================================================================
-const Root::TResult& AsgPhotonEfficiencyCorrectionTool::calculate( const xAOD::Egamma* egam ) const
+const Result AsgPhotonEfficiencyCorrectionTool::calculate( const xAOD::Egamma* egam ) const
 {
+  Result result;
   if ( !egam )
     {
       ATH_MSG_ERROR ( "Did NOT get a valid egamma pointer!" );
-      return m_resultDummy;
+      return result;
     }
   
    // Get the run number
   const xAOD::EventInfo* eventInfo = evtStore()->retrieve< const xAOD::EventInfo> ("EventInfo");
   if(!eventInfo){
     ATH_MSG_ERROR ( "Could not retrieve EventInfo object!" );
-    return m_resultDummy;
+    return result;
   }
 
   //Retrieve the proper random Run Number
@@ -226,7 +224,7 @@ const Root::TResult& AsgPhotonEfficiencyCorrectionTool::calculate( const xAOD::E
     static const SG::AuxElement::Accessor<unsigned int> randomrunnumber("RandomRunNumber");
         if (!randomrunnumber.isAvailable(*eventInfo)) {
           ATH_MSG_WARNING("Pileup tool not run before using PhotonEfficiencyTool! SFs do not reflect PU distribution in data");
-          return m_resultDummy;
+          return result;
         }
         runnumber = randomrunnumber(*(eventInfo));
   }
@@ -240,7 +238,7 @@ const Root::TResult& AsgPhotonEfficiencyCorrectionTool::calculate( const xAOD::E
   const xAOD::CaloCluster* cluster  = egam->caloCluster(); 
   if (!cluster){
         ATH_MSG_ERROR("ERROR no cluster associated to the Photon \n"); 
-        return m_resultDummy;
+        return result;
     }
   double eta2   = fabsf(cluster->etaBE(2));
   double et = egam->pt();
@@ -248,19 +246,19 @@ const Root::TResult& AsgPhotonEfficiencyCorrectionTool::calculate( const xAOD::E
   // Check if photon in the range to get the SF
   if(eta2>MAXETA) {
         ATH_MSG_WARNING( "No correction factor provided for eta "<<cluster->etaBE(2)<<" Returning SF = 1 + / - 1");
-        return m_resultDummy;
+        return result;
   }
   if(et<MIN_ET_OF_SF && m_sysSubstring=="ID_") {
         ATH_MSG_WARNING( "No ID scale factor uncertainty provided for et "<<et/1e3<<"GeV Returning SF = 1 + / - 1");
-        return m_resultDummy;
+        return result;
   }
   if(et<MIN_ET_Iso_SF && m_sysSubstring=="ISO_") {
         ATH_MSG_WARNING( "No isolation scale factor uncertainty provided for et "<<et/1e3<<"GeV Returning SF = 1 + / - 1");
-        return m_resultDummy;
+        return result;
   }
   if(et<MIN_ET_Trig_SF && m_sysSubstring=="TRIGGER_") {
         ATH_MSG_WARNING( "No trigger scale factor uncertainty provided for et "<<et/1e3<<"GeV Returning SF = 1 + / - 1");
-        return m_resultDummy;
+        return result;
   }
   if(et>MAX_ET_OF_SF && m_sysSubstring=="ID_") {
         ATH_MSG_WARNING( "No scale factor provided for et "<<et/1e3<<"GeV Returning SF for "<<MAX_ET_OF_SF/1e3<<"GeV");
@@ -290,7 +288,7 @@ const Root::TResult& AsgPhotonEfficiencyCorrectionTool::calculate( const xAOD::E
   
 }
 
-const Root::TResult& AsgPhotonEfficiencyCorrectionTool::calculate( const xAOD::IParticle *part ) const
+const Result AsgPhotonEfficiencyCorrectionTool::calculate( const xAOD::IParticle *part ) const
 {
   const xAOD::Egamma* egam = dynamic_cast<const xAOD::Egamma*>(part);
   if ( egam ){
@@ -298,7 +296,8 @@ const Root::TResult& AsgPhotonEfficiencyCorrectionTool::calculate( const xAOD::I
     } 
   else{
       ATH_MSG_ERROR ( " Could not cast to const egamma pointer!" );
-      return m_resultDummy;
+      Result dummy;
+      return dummy;
     }
 }
 
@@ -319,15 +318,14 @@ CP::CorrectionCode AsgPhotonEfficiencyCorrectionTool::getEfficiencyScaleFactor(c
   }
   
   if(m_appliedSystematics==nullptr){
-    efficiencyScaleFactor=calculate(&inputObject).getScaleFactor();
+    efficiencyScaleFactor=calculate(&inputObject).scaleFactor;
     return  CP::CorrectionCode::Ok;
   }
   
   //Get the result + the uncertainty
   float sigma(0);
   sigma=appliedSystematics().getParameterByBaseName("PH_EFF_"+m_sysSubstring+"Uncertainty");
-  efficiencyScaleFactor=calculate(&inputObject).getScaleFactor()+sigma*calculate(&inputObject).getTotalUncertainty();
-  
+  efficiencyScaleFactor=calculate(&inputObject).scaleFactor+sigma*calculate(&inputObject).totalUncertainty;
   return  CP::CorrectionCode::Ok;
 }
 
@@ -339,7 +337,7 @@ CP::CorrectionCode AsgPhotonEfficiencyCorrectionTool::getEfficiencyScaleFactorEr
 	return CP::CorrectionCode::OutOfValidityRange;
   }
   
-  efficiencyScaleFactorError=calculate(&inputObject).getTotalUncertainty();
+  efficiencyScaleFactorError=calculate(&inputObject).totalUncertainty;
   return  CP::CorrectionCode::Ok;
 }
 
@@ -354,11 +352,11 @@ CP::CorrectionCode AsgPhotonEfficiencyCorrectionTool::applyEfficiencyScaleFactor
   }
   
   float eff;
-  if(m_appliedSystematics==nullptr) eff  = calculate(&inputObject).getScaleFactor();
+  if(m_appliedSystematics==nullptr) eff  = calculate(&inputObject).scaleFactor;
   else{ // if SF is up or down varies by sigma
     float sigma(0);
 	sigma=appliedSystematics().getParameterByBaseName("PH_EFF_"+m_sysSubstring+"Uncertainty");
-	eff=calculate(&inputObject).getScaleFactor()+sigma*calculate(&inputObject).getTotalUncertainty();
+	eff=calculate(&inputObject).scaleFactor+sigma*calculate(&inputObject).totalUncertainty;
   }
   // decorate photon
   ATH_MSG_INFO("decorate object");
diff --git a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/TPhotonEfficiencyCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/TPhotonEfficiencyCorrectionTool.cxx
index 6204055a6cd236c576374cd1d473df9687fb9ceb..38946c5f516ee600699900f934109e52fc20ef86 100644
--- a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/TPhotonEfficiencyCorrectionTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/TPhotonEfficiencyCorrectionTool.cxx
@@ -14,20 +14,8 @@
 // This class header
 #include "PhotonEfficiencyCorrection/TPhotonEfficiencyCorrectionTool.h"
 
-// STL includes
-#include <iostream>
-#include <math.h>
-// ROOT includes
-#include "TString.h"
-#include "TSystem.h"
-#include "TObjString.h"
-#include "TROOT.h"
-#include "TFile.h"
-#include "TClass.h"
-#include "TMD5.h"
 
 Root::TPhotonEfficiencyCorrectionTool::TPhotonEfficiencyCorrectionTool(const char* name):
-    Root::TCalculatorToolBase(name),
     Root::TElectronEfficiencyCorrectionTool(name){
     }
 
@@ -36,18 +24,15 @@ Root::TPhotonEfficiencyCorrectionTool::~TPhotonEfficiencyCorrectionTool(){
 
 int Root::TPhotonEfficiencyCorrectionTool::initialize(){
     //Apparently the TResult needs a "specific convention" for the 1st  2
-    m_result.addResult("efficiency_SF", "efficiency scale factor");
-    m_result.addResult("efficiency_SF_err", "efficiency scale factor uncertainty");
-    m_result.setResult(0, -999.0);
-    m_result.setResult(1, 1.0);
-    return Root::TElectronEfficiencyCorrectionTool::initialize();
+   return Root::TElectronEfficiencyCorrectionTool::initialize();
 }
 
 int Root::TPhotonEfficiencyCorrectionTool::finalize(){
     return Root::TElectronEfficiencyCorrectionTool::finalize();
 }
 
-const Root::TResult& Root::TPhotonEfficiencyCorrectionTool::calculate( const PATCore::ParticleDataType::DataType dataType,
+typedef Root::TPhotonEfficiencyCorrectionTool::Result Result;
+const Result Root::TPhotonEfficiencyCorrectionTool::calculate( const PATCore::ParticleDataType::DataType dataType,
                                   const unsigned int runnumber,
                                   const double cluster_eta,
                                   const double et /* in MeV */
@@ -64,15 +49,8 @@ const Root::TResult& Root::TPhotonEfficiencyCorrectionTool::calculate( const PAT
             MCToysIndex
             );
 
-    // Write the retrieved values into the return object
-    /*
-     * From the TResult comments
-     * Get the zeroth entry, by convention, this is the efficiency or scale factor or MVA response or..
-     * Get the first entry, by convention, this is the total uncertainty
-     */
-    if(result.size()>static_cast<size_t>(Root::TElectronEfficiencyCorrectionTool::Position::Total)){
-        m_result.setResult(0, result[static_cast<size_t>(Root::TElectronEfficiencyCorrectionTool::Position::SF)]);
-        m_result.setResult(1, result[static_cast<size_t>(Root::TElectronEfficiencyCorrectionTool::Position::Total)]);
-    }
-    return m_result;
+    Result output;
+    output.scaleFactor= result[static_cast<size_t>(Root::TElectronEfficiencyCorrectionTool::Position::SF)];
+    output.totalUncertainty=result[static_cast<size_t>(Root::TElectronEfficiencyCorrectionTool::Position::Total)];
+    return output;
 }
diff --git a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/util/PrintPhotonSF.cxx b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/util/PrintPhotonSF.cxx
index 102f2764a41a1afebfb1cff70a122f022f6d6d40..4d11decf5596be45999568ce47acb66a4f2de2ae 100644
--- a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/util/PrintPhotonSF.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/util/PrintPhotonSF.cxx
@@ -7,11 +7,12 @@
 #include <iostream>
 #include <boost/filesystem.hpp>
 
-// ROOT include(s):
+// ROOT ide(s):
 #include "TFile.h"
 #include "TString.h"
 #include "TList.h"
 #include "TKey.h"
+#include "TH2F.h"
 
 // Local include(s):
 #include "PhotonEfficiencyCorrection/TPhotonEfficiencyCorrectionTool.h"
@@ -106,7 +107,7 @@ else if(pt<TEV) printf("|%2.0f - %2.0f\t\t|",pTbounds[i-1]/GEV,pTbounds[i]/GEV);
 else printf("|%2.0f-%2.0f\t\t|",pTbounds[i-1]/GEV,pTbounds[i]/GEV);
 for(int j=1;j<=nEtabins;j++){
 eta=0.5*(Etabounds[j-1]+Etabounds[j]);
-printf("%2.2f+/-%2.4f\t|",tool_SF.calculate(datatype,run_number,eta,pt).getScaleFactor(),tool_SF.calculate(datatype,run_number,eta,pt).getTotalUncertainty());
+printf("%2.2f+/-%2.4f\t|",tool_SF.calculate(datatype,run_number,eta,pt).scaleFactor,tool_SF.calculate(datatype,run_number,eta,pt).totalUncertainty);
 } cout << endl;
 }
 cout << dash_line.Data() <<endl;
diff --git a/PhysicsAnalysis/JetTagging/JetTagEvent/JetTagEvent/ISvxAssociation.h b/PhysicsAnalysis/JetTagging/JetTagEvent/JetTagEvent/ISvxAssociation.h
index 550960a6fc606d661d2d2389c1feb9e009bb53bc..5cc9ba3009da0566885619728a18bbd80ab705a2 100644
--- a/PhysicsAnalysis/JetTagging/JetTagEvent/JetTagEvent/ISvxAssociation.h
+++ b/PhysicsAnalysis/JetTagging/JetTagEvent/JetTagEvent/ISvxAssociation.h
@@ -42,8 +42,8 @@ namespace Analysis
 
     public:
       ISvxAssociation() ;      //!< constructor
-      ISvxAssociation(NameType& name) ;      //!< constructor
-      ISvxAssociation(NameType& name,const ISvxAssociation & rhs);
+      ISvxAssociation(const NameType& name) ;      //!< constructor
+      ISvxAssociation(const NameType& name,const ISvxAssociation & rhs);
       ISvxAssociation(const ISvxAssociation & rhs);
       ~ISvxAssociation() ;      //!< destructor
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagEvent/JetTagEvent/TrackAssociation.h b/PhysicsAnalysis/JetTagging/JetTagEvent/JetTagEvent/TrackAssociation.h
index 8b47f0f0c244f215644df1cd62b659256dea1295..a9715d93cd9da15000b5f845c2357976e49c2704 100755
--- a/PhysicsAnalysis/JetTagging/JetTagEvent/JetTagEvent/TrackAssociation.h
+++ b/PhysicsAnalysis/JetTagging/JetTagEvent/JetTagEvent/TrackAssociation.h
@@ -24,7 +24,7 @@ namespace Analysis
       
     public:
       TrackAssociation() ;      //!< constructor
-      TrackAssociation(NameType& name);      //!< constructor
+      TrackAssociation(const NameType& name);      //!< constructor
       ~TrackAssociation() ;      //!< destructor
       
       typedef Navigable<Rec::TrackParticleContainer,double>::object_iter  iterator;
@@ -38,7 +38,7 @@ namespace Analysis
       
       double getTrackWeight(const Rec::TrackParticle* ) const;
       
-      double getTrackWeight(const Rec::TrackParticleContainer*, index_type& ) const;
+      double getTrackWeight(const Rec::TrackParticleContainer*, const index_type& ) const;
       
       //////////////////////
       // Set Methods
@@ -54,7 +54,7 @@ namespace Analysis
       /** set method for tracks.  By default, navigable weight = 0 which
 	  reflects that the tracks do not contribute to the kinematics.   */
       void set_track(const Rec::TrackParticleContainer*,
-		     index_type&,
+		     const index_type&,
 		     double weight=0.);
       
       //compromise for above... use concrete container, but common name for templated methods
@@ -62,7 +62,7 @@ namespace Analysis
 			   const Rec::TrackParticle*, 
 			   double weight=0.);
       void set_association(const Rec::TrackParticleContainer*,
-			   index_type&,
+			   const index_type&,
 			   double weight=0.);
             
     };
diff --git a/PhysicsAnalysis/JetTagging/JetTagEvent/src/ISvxAssociation.cxx b/PhysicsAnalysis/JetTagging/JetTagEvent/src/ISvxAssociation.cxx
index a4745cd36ebcaac9f27ac8fab1075cd56a81a9b5..01cc75c008ed9a770b3f9ca01317c2f2417d1c6c 100644
--- a/PhysicsAnalysis/JetTagging/JetTagEvent/src/ISvxAssociation.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagEvent/src/ISvxAssociation.cxx
@@ -24,7 +24,7 @@ namespace Analysis
   ISvxAssociation::ISvxAssociation():
     m_vertexInfo(0) {}
 
-  ISvxAssociation::ISvxAssociation(NameType& name):
+  ISvxAssociation::ISvxAssociation(const NameType& name):
     m_vertexInfo(0)
   { this->setName(name); }  
   
@@ -44,7 +44,7 @@ namespace Analysis
     m_vertexInfo(rhs.m_vertexInfo!=0 ? rhs.m_vertexInfo->clone() : 0)
   { }
 
-  ISvxAssociation::ISvxAssociation(NameType& name,const ISvxAssociation & rhs):
+  ISvxAssociation::ISvxAssociation(const NameType& name,const ISvxAssociation & rhs):
     JetAssociationBase(rhs),
     m_vertexInfo(rhs.m_vertexInfo!=0 ? rhs.m_vertexInfo->clone() : 0)
   { this->setName(name); }
diff --git a/PhysicsAnalysis/JetTagging/JetTagEvent/src/TrackAssociation.cxx b/PhysicsAnalysis/JetTagging/JetTagEvent/src/TrackAssociation.cxx
index bcf5435b3ba371db8478a2499d762c4747b17103..e232fa143baed8d34048c8709868998e4df674a5 100755
--- a/PhysicsAnalysis/JetTagging/JetTagEvent/src/TrackAssociation.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagEvent/src/TrackAssociation.cxx
@@ -12,7 +12,7 @@ namespace Analysis
   TrackAssociation::TrackAssociation()
   { }  
   
-  TrackAssociation::TrackAssociation(NameType& name)
+  TrackAssociation::TrackAssociation(const NameType& name)
   {  this->setName(name); }  
   
   TrackAssociation::~TrackAssociation()
@@ -41,7 +41,7 @@ namespace Analysis
   }
   
   void TrackAssociation::set_track(const Rec::TrackParticleContainer* theContainer, 
-				   index_type& theIndex, double weight)
+				   const index_type& theIndex, double weight)
   {
     double newWeight = weight;
     // track already in collection
@@ -64,7 +64,7 @@ namespace Analysis
   }
   
   void TrackAssociation::set_association(const Rec::TrackParticleContainer* theContainer, 
-					 index_type& theIndex, double weight)
+					 const index_type& theIndex, double weight)
   {
     this->set_track(theContainer, theIndex, weight);
   }
@@ -78,7 +78,7 @@ namespace Analysis
   }
   
   double TrackAssociation::getTrackWeight(const Rec::TrackParticleContainer* theContainer,
-					  index_type& theIndex) const
+					  const index_type& theIndex) const
   {
     // from Navigable
     return (this->contains(theContainer,theIndex))
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/CMakeLists.txt b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/CMakeLists.txt
index edf2e846b6aec0061a868fa61a6f2221e05f8100..d8b70b8184a88d76e697c08d248131f542975299 100644
--- a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/CMakeLists.txt
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/CMakeLists.txt
@@ -21,7 +21,10 @@ atlas_depends_on_subdirs( PUBLIC
                           Reconstruction/egamma/egammaEvent
                           Tracking/TrkEvent/VxVertex
                           Tracking/TrkEventCnv/TrkEventTPCnv
-                          Control/CxxUtils )
+                          Control/CxxUtils
+                          PRIVATE
+                          Control/SGTools
+                          AtlasTest/TestTools )
 
 # External dependencies:
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
@@ -46,3 +49,27 @@ atlas_add_dictionary( ARA_JetTagInfoTPCnvDict
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                       LINK_LIBRARIES ${ROOT_LIBRARIES} DataModelAthenaPoolLib AthenaPoolCnvSvcLib AthenaPoolUtilities EventPrimitives GaudiKernel JetTagEvent JetTagInfo MuonIDEvent JetEvent JetEventTPCnv Particle egammaEvent VxVertex TrkEventTPCnv CxxUtils JetTagInfoTPCnv )
 
+set( _jobOPath "${CMAKE_CURRENT_SOURCE_DIR}/share" )
+set( _jobOPath "${_jobOPath}:${CMAKE_JOBOPT_OUTPUT_DIRECTORY}" )
+set( _jobOPath "${_jobOPath}:$ENV{JOBOPTSEARCHPATH}" )
+                    
+foreach( test AtlfInfoCnv_p1 BaseTagInfoCnv_p1 ElectronAssociationCnv_p1 
+              GbbNNTagInfoCnv_p1 IPInfoBaseCnv_p1 IPInfoPlusCnv_p1
+              IPTrackInfoCnv_p1 ISvxAssociationCnv_p1 JetFitterTagInfoCnv_p1
+              JetProbInfoBaseCnv_p1 LifetimeInfoCnv_p1
+              MSVVtxInfoCnv_p1 MSVVtxInfoCnv_p2 MultiSVInfoPlusCnv_p1
+              MuonAssociationCnv_p1 PhotonAssociationCnv_p1
+              SecVtxInfoCnv_p1 SETrackInfoCnv_p1 SLTrueInfoCnv_p1
+              SMTrackInfoCnv_p1 SoftElectronInfoCnv_p1
+              SoftLeptonTruthInfoCnv_p1 SoftMuonInfoCnv_p1
+              SVInfoBaseCnv_p1 SVInfoPlusCnv_p1 SvxSummaryCnv_p1
+              TrackAssociationCnv_p1 TrackCountingInfoCnv_p1 TruthInfoCnv_p1 )
+  atlas_add_test( ${test}_test
+                  SOURCES
+                  test/${test}_test.cxx
+                  INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                  LINK_LIBRARIES ${ROOT_LIBRARIES} JetTagInfoTPCnv AthenaPoolUtilities EventPrimitives GaudiKernel JetTagEvent JetTagInfo MuonIDEvent JetEvent JetEventTPCnv Particle egammaEvent VxVertex TrkEventTPCnv DataModelAthenaPoolLib AthenaPoolCnvSvcLib CxxUtils TestTools SGTools
+                  ENVIRONMENT "JOBOPTSEARCHPATH=${_jobOPath}" )
+endforeach()
+              
+
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/JetTagInfoTPCnv/SETrackInfo_p1.h b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/JetTagInfoTPCnv/SETrackInfo_p1.h
index 194fb11b2867b820558f8f2dec1d943e6de71d06..5b7b8de30ee6b12e3b9ab238d7b4a8a60bef7ae1 100644
--- a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/JetTagInfoTPCnv/SETrackInfo_p1.h
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/JetTagInfoTPCnv/SETrackInfo_p1.h
@@ -8,10 +8,11 @@
 #include "DataModelAthenaPool/ElementLink_p1.h"
 
 ///
-/// Persitent class for the truth info
+/// Persistent class for the truth info
 ///
 
 #include <string>
+#include <vector>
 
 namespace Analysis {
   class SETrackInfoCnv_p1;
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/JetTagInfoTPCnv/SMTrackInfo_p1.h b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/JetTagInfoTPCnv/SMTrackInfo_p1.h
index a3329ce2e92fd59d826770ea215904e2769a3bf6..2518465be2d4a4e98edb7df053e76d18046c8766 100644
--- a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/JetTagInfoTPCnv/SMTrackInfo_p1.h
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/JetTagInfoTPCnv/SMTrackInfo_p1.h
@@ -8,10 +8,11 @@
 #include "DataModelAthenaPool/ElementLink_p1.h"
 
 ///
-/// Persitent class for the truth info
+/// Persistent class for the truth info
 ///
 
 #include <string>
+#include <vector>
 
 namespace Analysis {
   class SMTrackInfoCnv_p1;
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/AtlfInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/AtlfInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..834e500bcb69d9e0e7a142b6fbe44971f90b74e3
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/AtlfInfoCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/AtlfInfoCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/BaseTagInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/BaseTagInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..70b1938d239a48d4aee6e78e4fdff906eed97d27
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/BaseTagInfoCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/BaseTagInfoCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/ElectronAssociationCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/ElectronAssociationCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..02cb099d21b58aa88bfec1caa67aaed22ea5f441
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/ElectronAssociationCnv_p1_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/ElectronAssociationCnv_p1_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/GbbNNTagInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/GbbNNTagInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..b4517a754a34462e3a4ff7132a805db1e82f83b5
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/GbbNNTagInfoCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/GbbNNTagInfoCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/IPInfoBaseCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/IPInfoBaseCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..1f9e867d9002851dc3c4389e0685ad5f7d608716
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/IPInfoBaseCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/IPInfoBaseCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/IPInfoPlusCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/IPInfoPlusCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..4d92c8d5cb7d655b88e6c612d0f23af283b6f772
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/IPInfoPlusCnv_p1_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/IPInfoPlusCnv_p1_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/IPTrackInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/IPTrackInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..5086e78990f43512172e1ae4352e6a68638f5879
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/IPTrackInfoCnv_p1_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/IPTrackInfoCnv_p1_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/ISvxAssociationCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/ISvxAssociationCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..2a0d8160f1a931186d8c3cd129e17ba6c489130c
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/ISvxAssociationCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/ISvxAssociationCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/JetFitterTagInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/JetFitterTagInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..e3d1075d5895bae188277e516bdb7843ef47f60a
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/JetFitterTagInfoCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/JetFitterTagInfoCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/JetProbInfoBaseCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/JetProbInfoBaseCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..5ee71965025504fd0e1e5698cfbeade069e69f74
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/JetProbInfoBaseCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/JetProbInfoBaseCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/LifetimeInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/LifetimeInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..c580b23063da9a0718fe3c4a73e6293401e696b8
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/LifetimeInfoCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/LifetimeInfoCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/MSVVtxInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/MSVVtxInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..98f7b9e926b848c25c545597125227815fcbbea4
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/MSVVtxInfoCnv_p1_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/MSVVtxInfoCnv_p1_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/MSVVtxInfoCnv_p2_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/MSVVtxInfoCnv_p2_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..e2895ed8a9a5a212ee2bd8fc419f4f2846c74296
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/MSVVtxInfoCnv_p2_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/MSVVtxInfoCnv_p2_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/MultiSVInfoPlusCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/MultiSVInfoPlusCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..61af6cbc693911d7ae687f93fb0fe200fdccfe24
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/MultiSVInfoPlusCnv_p1_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/MultiSVInfoPlusCnv_p1_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/MuonAssociationCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/MuonAssociationCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..05e266d9c907f4da440e1013b5c9daad5c4c661f
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/MuonAssociationCnv_p1_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/MuonAssociationCnv_p1_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/PhotonAssociationCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/PhotonAssociationCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..2ea4c85a9de9cf6350aa098d1c854be3c3a62719
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/PhotonAssociationCnv_p1_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/PhotonAssociationCnv_p1_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SETrackInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SETrackInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..c3c8e84b442c97c6a79ca27666216b7c43e0420c
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SETrackInfoCnv_p1_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/SETrackInfoCnv_p1_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SLTrueInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SLTrueInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..b2f8e54e714611b7a624282dd68e1a73a545a91a
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SLTrueInfoCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/SLTrueInfoCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SMTrackInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SMTrackInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..c06ce06ea17f3bfbbb29979db8f7753a27f87fb2
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SMTrackInfoCnv_p1_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/SMTrackInfoCnv_p1_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SVInfoBaseCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SVInfoBaseCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..221974f5e1ad30923d94ddd37ce5c79759504587
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SVInfoBaseCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/SVInfoBaseCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SVInfoPlusCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SVInfoPlusCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..69b7468d8d2cd424e11dd63b68f4dfe0b291dfd4
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SVInfoPlusCnv_p1_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/SVInfoPlusCnv_p1_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SecVtxInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SecVtxInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..ed7c41f29df4e33c8f1173f0247f27f15a501b98
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SecVtxInfoCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/SecVtxInfoCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SoftElectronInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SoftElectronInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..d874663c30139b6188c223c1bd2da0a817f1d131
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SoftElectronInfoCnv_p1_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/SoftElectronInfoCnv_p1_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SoftLeptonTruthInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SoftLeptonTruthInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..497b406bbc13373bd9755d2ae0836620a92d0bab
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SoftLeptonTruthInfoCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/SoftLeptonTruthInfoCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SoftMuonInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SoftMuonInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..cb977bfd7bb6835af03cf71c8c4155b13651c771
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SoftMuonInfoCnv_p1_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/SoftMuonInfoCnv_p1_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SvxSummaryCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SvxSummaryCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..99807fe9dd44a6cd731ba6ba3127bc55b08a4794
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/SvxSummaryCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/SvxSummaryCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/TrackAssociationCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/TrackAssociationCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..97632ea0ad1ca81907804cc25358e11ea793254e
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/TrackAssociationCnv_p1_test.ref
@@ -0,0 +1,3 @@
+JetTagInfoTPCnv/TrackAssociationCnv_p1_test
+test1
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/TrackCountingInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/TrackCountingInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..65fece56d9d21f87a480e320ba0754ee06e3942c
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/TrackCountingInfoCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/TrackCountingInfoCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/TruthInfoCnv_p1_test.ref b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/TruthInfoCnv_p1_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..83b7524f0dc50447569c353efd987c7464addb66
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/share/TruthInfoCnv_p1_test.ref
@@ -0,0 +1,2 @@
+JetTagInfoTPCnv/TruthInfoCnv_p1_test
+test1
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/src/SETrackInfoCnv_p1.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/src/SETrackInfoCnv_p1.cxx
index 204627108cb46bb72853ba22c0a8e439ca6a17ce..eec2db305c73a7970f27115ffddc10c3a79e68e4 100644
--- a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/src/SETrackInfoCnv_p1.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/src/SETrackInfoCnv_p1.cxx
@@ -18,7 +18,7 @@ namespace Analysis {
     pb->m_tagLikelihood.assign(pa->tagLikelihood().begin(),
                                pa->tagLikelihood().end());
 
-    if (pa->isPhoton()) {
+    if (!pa->isPhoton()) {
       m_eleElementLinkCnv.transToPers(&pa->electronLink(), &pb->m_electron, msg);
     }
     else {
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/AtlfInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/AtlfInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..2ba94b1ca25ed6eb2aa844f0789ecd9989ce9492
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/AtlfInfoCnv_p1_test.cxx
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/AtlfInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/AtlfInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Analysis::AtlfInfo& p1,
+              const Analysis::AtlfInfo& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.isBTagged() == p2.isBTagged());
+  assert (p1.isTauTagged() == p2.isTauTagged());
+  assert (p1.isTau1PTagged() == p2.isTau1PTagged());
+  assert (p1.isTau3PTagged() == p2.isTau3PTagged());
+  assert (p1.LightHypoCalFactor() == p2.LightHypoCalFactor());
+  assert (p1.TauHypoCalFactor() == p2.TauHypoCalFactor());
+  assert (p1.Tau1P3PHypoCalFactor() == p2.Tau1P3PHypoCalFactor());
+  assert (p1.Tau1P3PHypoCalFactor() == p2.Tau1P3PHypoCalFactor());
+  assert (p1.BHypoCalFactor() == p2.BHypoCalFactor());
+  assert (p1.deltaRMinTo("B") == p2.deltaRMinTo("B"));
+  assert (p1.deltaRMinTo("C") == p2.deltaRMinTo("C"));
+  assert (p1.deltaRMinTo("T") == p2.deltaRMinTo("T"));
+}
+
+
+void testit (const Analysis::AtlfInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::AtlfInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::AtlfInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::AtlfInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Analysis::AtlfInfo trans1 ("typ1");
+  testit (trans1);
+
+  Analysis::AtlfInfo trans2 ("typ2");
+  trans2.setWeight (1.5);
+  trans2.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans2.isBTagged (true);
+  trans2.isTau1PTagged (true);
+  trans2.LightHypoCalFactor (5.5);
+  trans2.TauHypoCalFactor (6.5);
+  trans2.Tau1P3PHypoCalFactor (7.5);
+  trans2.BHypoCalFactor (8.5);
+  trans2.deltaRMinTo ("B", 9.5);
+  trans2.deltaRMinTo ("C", 10.5);
+  trans2.deltaRMinTo ("T", 11.5);
+  trans2.makeValid();
+  testit (trans2);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/AtlfInfoCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/BaseTagInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/BaseTagInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..677185530eb15c960d2d843d28a765dfd2e3d7ca
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/BaseTagInfoCnv_p1_test.cxx
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/BaseTagInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/BaseTagInfoCnv_p1.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void testit (const Analysis::BaseTagInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::BaseTagInfoCnv_p1 cnv;
+  Analysis::BaseTagInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::BaseTagInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Analysis::BaseTagInfo trans1 ("typ1");
+  testit (trans1);
+
+  Analysis::BaseTagInfo trans2 ("typ2");
+  trans2.setWeight (1.5);
+  trans2.setTagLikelihood ({2.5, 3.5, 4.5});
+  testit (trans2);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/BaseTagInfoCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/ElectronAssociationCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/ElectronAssociationCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..c7f0a38ee9fc5b8c170afebbda1402b96cd44d95
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/ElectronAssociationCnv_p1_test.cxx
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/ElectronAssociationCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/ElectronAssociationCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const JetAssociationBase& p1,
+              const JetAssociationBase& p2)
+{
+  assert (p1.name() == p2.name());
+  assert (p1.keyIndex() == p2.keyIndex());
+}
+
+
+void compare (const Analysis::ElectronAssociation& p1,
+              const Analysis::ElectronAssociation& p2)
+{
+  compare (static_cast<const JetAssociationBase&>(p1),
+           static_cast<const JetAssociationBase&>(p2));
+  assert (p1.electron() == p2.electron());
+}
+
+
+void testit (const Analysis::ElectronAssociation& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::ElectronAssociationCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::NavAssociationCommon_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::ElectronAssociation trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1 (SGTest::TestStore* store)
+{
+  std::cout << "test1\n";
+  Analysis::ElectronAssociation trans0a ("name0");
+  Analysis::ElectronAssociation trans0b ("name1");
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+  auto c_up = std::make_unique<ElectronContainer>();
+  c_up->push_back (new Analysis::Electron);
+  ElectronContainer* c = c_up.get();
+  store->record (std::move(c_up), "c");
+
+  Athena_test::Leakcheck check;
+
+  Analysis::ElectronAssociation trans1 ("name1");
+  testit (trans1);
+
+  Analysis::ElectronAssociation trans2 ("name1");
+  trans2.set_electron (c, size_t(0), 2.5);
+  testit (trans2);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/ElectronAssociationCnv_p1_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1 (testStore.get());
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/GbbNNTagInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/GbbNNTagInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..15f2a2f597dba650715c66cbb3d4c9ec0229669c
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/GbbNNTagInfoCnv_p1_test.cxx
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/GbbNNTagInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/GbbNNTagInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Analysis::GbbNNTagInfo& p1,
+              const Analysis::GbbNNTagInfo& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.nMatchingTracks() == p2.nMatchingTracks());
+  assert (p1.trkJetWidth() == p2.trkJetWidth());
+  assert (p1.trkJetMaxDeltaR() == p2.trkJetMaxDeltaR());
+}
+
+
+void testit (const Analysis::GbbNNTagInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::GbbNNTagInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::GbbNNTagInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::GbbNNTagInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Analysis::GbbNNTagInfo trans1 ("typ");
+  trans1.setnMatchingTracks (2);
+  trans1.settrkJetWidth (2.5);
+  trans1.settrkJetMaxDeltaR (3.5);
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/GbbNNTagInfoCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/IPInfoBaseCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/IPInfoBaseCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..cf9e1a4d16b34321ea50b65245ec9b204d5cbe99
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/IPInfoBaseCnv_p1_test.cxx
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/IPInfoBaseCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/IPInfoBaseCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Analysis::IPInfoBase& p1,
+              const Analysis::IPInfoBase& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.nbTracks() == p2.nbTracks());
+}
+
+
+void testit (const Analysis::IPInfoBase& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::IPInfoBaseCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::IPInfoBase_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::IPInfoBase trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Analysis::IPInfoBase trans1 ("typ");
+  trans1.nbTracks (3);
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/IPInfoBaseCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/IPInfoPlusCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/IPInfoPlusCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..52bd57aeb242d9b4aa04606caf7f4a4080d1cc56
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/IPInfoPlusCnv_p1_test.cxx
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/IPInfoPlusCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/IPInfoPlusCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Analysis::TrackGrade& p1,
+              const Analysis::TrackGrade& p2)
+{
+  assert (p1.gradeNumber() == p2.gradeNumber());
+  assert (p1.gradeString() == p2.gradeString());
+}
+
+
+void compare (const Analysis::IPTrackInfo& p1,
+              const Analysis::IPTrackInfo& p2)
+{
+  assert (p1.trackLink() == p2.trackLink());
+  compare (p1.trackGrade(), p2.trackGrade());
+  assert (p1.isFromV0() == p2.isFromV0());
+  assert (p1.d0Value() == p2.d0Value());
+  assert (p1.d0Significance() == p2.d0Significance());
+  assert (p1.z0Value() == p2.z0Value());
+  assert (p1.z0Significance() == p2.z0Significance());
+  assert (p1.trackWeight2D() == p2.trackWeight2D());
+  assert (p1.trackWeight3D() == p2.trackWeight3D());
+  assert (p1.trackProbJP() == p2.trackProbJP());
+  assert (p1.trackProbJPneg() == p2.trackProbJPneg());
+}
+
+
+void compare (const Analysis::IPInfoPlus& p1,
+              const Analysis::IPInfoPlus& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.numTrackInfo() == p2.numTrackInfo());
+  for (int i = 0; i < p1.numTrackInfo(); i++) {
+    compare (p1.getTrackInfo(i), p2.getTrackInfo(i));
+  }
+}
+
+
+void testit (const Analysis::IPInfoPlus& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::IPInfoPlusCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::IPInfoPlus_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::IPInfoPlus trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+  ElementLink<Rec::TrackParticleContainer> el1 ("c1", 2);
+  ElementLink<Rec::TrackParticleContainer> el2 ("c1", 4);
+
+  Athena_test::Leakcheck check;
+
+  Analysis::IPInfoPlus trans1 ("typ");
+  trans1.setWeight (1.5);
+  trans1.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans1.makeValid();
+
+  Analysis::IPTrackInfo ti1 (el1,
+                             Analysis::TrackGrade (11, "grade1"),
+                             true, 1.5, 2.5, 3.5, 4.5);
+  ti1.setTrackWeight2D (5.5);
+  ti1.setTrackWeight3D (5.5);
+  ti1.setTrackProbJP (6.5);
+  ti1.setTrackProbJPneg (7.5);
+  trans1.addTrackInfo (ti1);
+
+  Analysis::IPTrackInfo ti2 (el2,
+                             Analysis::TrackGrade (12, "grade2"),
+                             false, 11.5, 12.5, 13.5, 14.5);
+  ti2.setTrackWeight2D (15.5);
+  ti2.setTrackWeight3D (15.5);
+  ti2.setTrackProbJP (16.5);
+  ti2.setTrackProbJPneg (17.5);
+  trans1.addTrackInfo (ti2);
+
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/IPInfoPlusCnv_p1_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/IPTrackInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/IPTrackInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..58be62bd9348ff9b513a39b9a30aab7271c3566f
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/IPTrackInfoCnv_p1_test.cxx
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/IPTrackInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/IPTrackInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::TrackGrade& p1,
+              const Analysis::TrackGrade& p2)
+{
+  assert (p1.gradeNumber() == p2.gradeNumber());
+  assert (p1.gradeString() == p2.gradeString());
+}
+
+
+void compare (const Analysis::IPTrackInfo& p1,
+              const Analysis::IPTrackInfo& p2)
+{
+  assert (p1.trackLink() == p2.trackLink());
+  compare (p1.trackGrade(), p2.trackGrade());
+  assert (p1.isFromV0() == p2.isFromV0());
+  assert (p1.d0Value() == p2.d0Value());
+  assert (p1.d0Significance() == p2.d0Significance());
+  assert (p1.z0Value() == p2.z0Value());
+  assert (p1.z0Significance() == p2.z0Significance());
+  assert (p1.trackWeight2D() == p2.trackWeight2D());
+  assert (p1.trackWeight3D() == p2.trackWeight3D());
+  assert (p1.trackProbJP() == p2.trackProbJP());
+  assert (p1.trackProbJPneg() == p2.trackProbJPneg());
+}
+
+
+void testit (const Analysis::IPTrackInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::IPTrackInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::IPTrackInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::IPTrackInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+  ElementLink<Rec::TrackParticleContainer> el1 ("c1", 2);
+  ElementLink<Rec::TrackParticleContainer> el2 ("c1", 4);
+
+  Athena_test::Leakcheck check;
+
+  Analysis::IPTrackInfo trans1 (el1,
+                                Analysis::TrackGrade (11, "grade1"),
+                                true, 1.5, 2.5, 3.5, 4.5);
+  trans1.setTrackWeight2D (5.5);
+  trans1.setTrackWeight3D (5.5);
+  trans1.setTrackProbJP (6.5);
+  trans1.setTrackProbJPneg (7.5);
+  testit (trans1);
+
+  Analysis::IPTrackInfo trans2 (el2,
+                                Analysis::TrackGrade (12, "grade2"),
+                                false, 11.5, 12.5, 13.5, 14.5);
+  trans2.setTrackWeight2D (15.5);
+  trans2.setTrackWeight3D (15.5);
+  trans2.setTrackProbJP (16.5);
+  trans2.setTrackProbJPneg (17.5);
+  testit (trans2);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/IPTrackInfoCnv_p1_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/ISvxAssociationCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/ISvxAssociationCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..5309a6bc92810681410e50cde525334baa0d597e
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/ISvxAssociationCnv_p1_test.cxx
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/ISvxAssociationCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/ISvxAssociationCnv_p1.h"
+#include "JetTagInfoTPCnv/ISvxAssociation_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "TestTools/initGaudi.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const JetAssociationBase& p1,
+              const JetAssociationBase& p2)
+{
+  assert (p1.name() == p2.name());
+  assert (p1.keyIndex() == p2.keyIndex());
+}
+
+
+void compare (const Analysis::ISvxAssociation& p1,
+              const Analysis::ISvxAssociation& p2)
+{
+  compare (static_cast<const JetAssociationBase&>(p1),
+           static_cast<const JetAssociationBase&>(p2));
+  // Not saved.
+  assert (p2.vertexInfo() == nullptr);
+}
+
+
+void testit (const Analysis::ISvxAssociation& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::ISvxAssociationCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::ISvxAssociation_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::ISvxAssociation trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Analysis::ElectronAssociation trans0b ("name1");
+
+  Athena_test::Leakcheck check;
+
+  Analysis::ISvxAssociation trans1 ("name1");
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/ISvxAssociationCnv_p1_test\n";
+
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/JetFitterTagInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/JetFitterTagInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..f6ecba71db62bd177d17ece1290ac5776d34256c
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/JetFitterTagInfoCnv_p1_test.cxx
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/JetFitterTagInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/JetFitterTagInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Analysis::JetFitterTagInfo& p1,
+              const Analysis::JetFitterTagInfo& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.nVTX() == p2.nVTX());
+  assert (p1.nSingleTracks() == p2.nSingleTracks());
+  assert (p1.nTracksAtVtx() == p2.nTracksAtVtx());
+  assert (p1.mass() == p2.mass());
+  assert (p1.energyFraction() == p2.energyFraction());
+  assert (p1.significance3d() == p2.significance3d());
+  assert (p1.deltaeta() == p2.deltaeta());
+  assert (p1.deltaphi() == p2.deltaphi());
+}
+
+
+void testit (const Analysis::JetFitterTagInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::JetFitterTagInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::JetFitterTagInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::JetFitterTagInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Analysis::JetFitterTagInfo trans1 ("typ");
+  trans1.setWeight (1.5);
+  trans1.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans1.makeValid();
+  trans1.setnVTX (10);
+  trans1.setnSingleTracks (11);
+  trans1.setnTracksAtVtx (11);
+  trans1.setMass (5.5);
+  trans1.setEnergyFraction (6.5);
+  trans1.setSignificance3d (7.5);
+  trans1.setDeltaeta (8.5);
+  trans1.setDeltaphi (9.5);
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/JetFitterTagInfoCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/JetProbInfoBaseCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/JetProbInfoBaseCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..58c12889d4d49bbc305b65fecc018eb5c8cdabc4
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/JetProbInfoBaseCnv_p1_test.cxx
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/JetProbInfoBaseCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/JetProbInfoBaseCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Analysis::JetProbInfoBase& p1,
+              const Analysis::JetProbInfoBase& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.nbTracks() == p2.nbTracks());
+}
+
+
+void testit (const Analysis::JetProbInfoBase& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::JetProbInfoBaseCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::JetProbInfoBase_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::JetProbInfoBase trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Analysis::JetProbInfoBase trans1 ("typ");
+  trans1.setWeight (1.5);
+  trans1.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans1.makeValid();
+  trans1.nbTracks (11);
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/JetProbInfoBaseCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/LifetimeInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/LifetimeInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..5c3b41851fc700d86a5a191c451ae61e929806f5
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/LifetimeInfoCnv_p1_test.cxx
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/LifetimeInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/LifetimeInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Analysis::LifetimeInfo& p1,
+              const Analysis::LifetimeInfo& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.signedIP() == p2.signedIP());
+  assert (p1.significance() == p2.significance());
+  assert (p1.vectorTrackProb() == p2.vectorTrackProb());
+  assert (p1.nTrackProb() == p2.nTrackProb());
+}
+
+
+void testit (const Analysis::LifetimeInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::LifetimeInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::LifetimeInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::LifetimeInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Analysis::LifetimeInfo trans1 ("typ");
+  trans1.setWeight (1.5);
+  trans1.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans1.setIP ({5.5, 6.5});
+  trans1.setSignificance ({7.5, 8.5, 9.5});
+  trans1.setTrackProb ({10.5, 11.5, 12.5, 13.5});
+  trans1.setNTrackProb (14.5);
+  trans1.makeValid();
+  
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/LifetimeInfoCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/MSVVtxInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/MSVVtxInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..56b2ed16dda6ab8c8fdaebdaaa8bc4cf6d44d5aa
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/MSVVtxInfoCnv_p1_test.cxx
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/MSVVtxInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/MSVVtxInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp2.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Trk::Vertex& p1,
+              const Trk::Vertex& p2)
+{
+  assert (p1.position() == p2.position());
+}
+
+
+void compare (const Trk::FitQuality& p1,
+              const Trk::FitQuality& p2)
+{
+  assert (p1.chiSquared() == p2.chiSquared());
+  assert (p1.numberDoF()  == p2.numberDoF());
+}
+
+
+void compare (const Trk::RecVertex& p1,
+              const Trk::RecVertex& p2)
+{
+  compare (static_cast<const Trk::Vertex&>(p1),
+           static_cast<const Trk::Vertex&>(p2));
+  assert (p1.covariancePosition() == p2.covariancePosition());
+  compare (p1.fitQuality(), p2.fitQuality());
+}
+
+
+void compare (const Analysis::SVTrackInfo& p1,
+              const Analysis::SVTrackInfo& p2)
+{
+  assert (p1.trackLink() == p2.trackLink());
+}
+
+
+void compare (const Analysis::MSVVtxInfo& p1,
+              const Analysis::MSVVtxInfo& p2)
+{
+  compare (p1.getRecSvx(), p2.getRecSvx());
+  assert (p1.getMass() == p2.getMass());
+  assert (p1.getEnergyFraction() == p2.getEnergyFraction());
+  assert (p1.getNormDist() == p2.getNormDist());
+  assert (p1.numTrackInfo() == p2.numTrackInfo());
+  for (int i=0; i < p1.numTrackInfo(); i++) {
+    compare (p1.getTrackInfo(i), p2.getTrackInfo(i));
+  }
+}
+
+
+void testit (const Analysis::MSVVtxInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::MSVVtxInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp2 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::MSVVtxInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::MSVVtxInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+  ElementLink<Rec::TrackParticleContainer> el1 ("c1", 2);
+  ElementLink<Rec::TrackParticleContainer> el2 ("c1", 4);
+
+  Athena_test::Leakcheck check;
+
+  Analysis::MSVVtxInfo trans1;
+  Amg::Vector3D pos (10.5, 11.5, 12.5);
+  AmgSymMatrix(3) cov;
+  for (int i=0; i < 3; i++) {
+    for (int j=0; j<3; j++) {
+      cov(i,j) = 100*(i+1)*(j+1);
+    }
+  }
+  Trk::RecVertex rv (pos, cov, 21.5, 22.5);
+  trans1.setRecSvx (rv);
+  trans1.setMass (1.5);
+  trans1.setPt (2.5);
+  trans1.setEta (3.5);
+  trans1.setPhi (4.5);
+  trans1.setEnergyFraction (5.5);
+  trans1.setNormDist (6.5);
+  trans1.addTrackInfo (Analysis::SVTrackInfo (el1));
+  trans1.addTrackInfo (Analysis::SVTrackInfo (el2));
+  
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/MSVVtxInfoCnv_p1_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/MSVVtxInfoCnv_p2_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/MSVVtxInfoCnv_p2_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..6c44fb39e7c05f8af4cb4a357a5ec2221b557104
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/MSVVtxInfoCnv_p2_test.cxx
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/MSVVtxInfoCnv_p2_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/MSVVtxInfoCnv_p2.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Trk::Vertex& p1,
+              const Trk::Vertex& p2)
+{
+  assert (p1.position() == p2.position());
+}
+
+
+void compare (const Trk::FitQuality& p1,
+              const Trk::FitQuality& p2)
+{
+  assert (p1.chiSquared() == p2.chiSquared());
+  assert (p1.numberDoF()  == p2.numberDoF());
+}
+
+
+void compare (const Trk::RecVertex& p1,
+              const Trk::RecVertex& p2)
+{
+  compare (static_cast<const Trk::Vertex&>(p1),
+           static_cast<const Trk::Vertex&>(p2));
+  assert (p1.covariancePosition() == p2.covariancePosition());
+  compare (p1.fitQuality(), p2.fitQuality());
+}
+
+
+void compare (const Analysis::SVTrackInfo& p1,
+              const Analysis::SVTrackInfo& p2)
+{
+  assert (p1.trackLink() == p2.trackLink());
+}
+
+
+void compare (const Analysis::MSVVtxInfo& p1,
+              const Analysis::MSVVtxInfo& p2)
+{
+  compare (p1.getRecSvx(), p2.getRecSvx());
+  assert (p1.getMass() == p2.getMass());
+  assert (p1.getPt()   == p2.getPt());
+  assert (p1.getEta()  == p2.getEta());
+  assert (p1.getPhi()  == p2.getPhi());
+  assert (p1.getEnergyFraction() == p2.getEnergyFraction());
+  assert (p1.getNormDist() == p2.getNormDist());
+  assert (p1.numTrackInfo() == p2.numTrackInfo());
+  for (int i=0; i < p1.numTrackInfo(); i++) {
+    compare (p1.getTrackInfo(i), p2.getTrackInfo(i));
+  }
+}
+
+
+void testit (const Analysis::MSVVtxInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::MSVVtxInfoCnv_p2 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::MSVVtxInfo_p2 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::MSVVtxInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+  ElementLink<Rec::TrackParticleContainer> el1 ("c1", 2);
+  ElementLink<Rec::TrackParticleContainer> el2 ("c1", 4);
+
+  Athena_test::Leakcheck check;
+
+  Analysis::MSVVtxInfo trans1;
+  Amg::Vector3D pos (10.5, 11.5, 12.5);
+  AmgSymMatrix(3) cov;
+  for (int i=0; i < 3; i++) {
+    for (int j=0; j<3; j++) {
+      cov(i,j) = 100*(i+1)*(j+1);
+    }
+  }
+  Trk::RecVertex rv (pos, cov, 21.5, 22.5);
+  trans1.setRecSvx (rv);
+  trans1.setMass (1.5);
+  trans1.setPt (2.5);
+  trans1.setEta (3.5);
+  trans1.setPhi (4.5);
+  trans1.setEnergyFraction (5.5);
+  trans1.setNormDist (6.5);
+  trans1.addTrackInfo (Analysis::SVTrackInfo (el1));
+  trans1.addTrackInfo (Analysis::SVTrackInfo (el2));
+  
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/MSVVtxInfoCnv_p2_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/MultiSVInfoPlusCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/MultiSVInfoPlusCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..38d7bac4b57e40056b33b8fb7cc1970cb9313906
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/MultiSVInfoPlusCnv_p1_test.cxx
@@ -0,0 +1,182 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/MultiSVInfoPlusCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/MultiSVInfoPlusCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Trk::Vertex& p1,
+              const Trk::Vertex& p2)
+{
+  assert (p1.position() == p2.position());
+}
+
+
+void compare (const Trk::FitQuality& p1,
+              const Trk::FitQuality& p2)
+{
+  assert (p1.chiSquared() == p2.chiSquared());
+  assert (p1.numberDoF()  == p2.numberDoF());
+}
+
+
+void compare (const Trk::RecVertex& p1,
+              const Trk::RecVertex& p2)
+{
+  compare (static_cast<const Trk::Vertex&>(p1),
+           static_cast<const Trk::Vertex&>(p2));
+  assert (p1.covariancePosition() == p2.covariancePosition());
+  compare (p1.fitQuality(), p2.fitQuality());
+}
+
+
+void compare (const Analysis::SVTrackInfo& p1,
+              const Analysis::SVTrackInfo& p2)
+{
+  assert (p1.trackLink() == p2.trackLink());
+}
+
+
+void compare (const Analysis::MSVVtxInfo& p1,
+              const Analysis::MSVVtxInfo& p2)
+{
+  compare (p1.getRecSvx(), p2.getRecSvx());
+  assert (p1.getMass() == p2.getMass());
+  assert (p1.getPt()   == p2.getPt());
+  assert (p1.getEta()  == p2.getEta());
+  assert (p1.getPhi()  == p2.getPhi());
+  assert (p1.getEnergyFraction() == p2.getEnergyFraction());
+  assert (p1.getNormDist() == p2.getNormDist());
+  assert (p1.numTrackInfo() == p2.numTrackInfo());
+  for (int i=0; i < p1.numTrackInfo(); i++) {
+    compare (p1.getTrackInfo(i), p2.getTrackInfo(i));
+  }
+}
+
+
+void compare (const Analysis::MultiSVInfoPlus& p1,
+              const Analysis::MultiSVInfoPlus& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.getNGTrackInJet() == p2.getNGTrackInJet());
+  assert (p1.getNGTrackInSvx() == p2.getNGTrackInSvx());
+  assert (p1.getN2T() == p2.getN2T());
+  assert (p1.getNormDist() == p2.getNormDist());
+  assert (p1.numVtxInfo() == p2.numVtxInfo());
+  for (int i=0; i < p1.numVtxInfo(); i++) {
+    compare (*p1.getVtxInfo(i), *p2.getVtxInfo(i));
+  }
+}
+
+
+void testit (const Analysis::MultiSVInfoPlus& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::MultiSVInfoPlusCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::MultiSVInfoPlus_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::MultiSVInfoPlus trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+  ElementLink<Rec::TrackParticleContainer> el1 ("c1", 2);
+  ElementLink<Rec::TrackParticleContainer> el2 ("c1", 4);
+  ElementLink<Rec::TrackParticleContainer> el3 ("c1", 5);
+  ElementLink<Rec::TrackParticleContainer> el4 ("c1", 9);
+
+  Athena_test::Leakcheck check;
+
+  Analysis::MultiSVInfoPlus trans1;
+  trans1.setWeight (1.5);
+  trans1.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans1.makeValid();
+  trans1.setNGTrackInJet (10);
+  trans1.setNGTrackInSvx (11);
+  trans1.setN2T (12);
+  trans1.setNormDist (13.5);
+
+  auto vi = std::make_unique<Analysis::MSVVtxInfo>();
+  Amg::Vector3D pos1 (10.5, 11.5, 12.5);
+  AmgSymMatrix(3) cov1;
+  for (int i=0; i < 3; i++) {
+    for (int j=0; j<3; j++) {
+      cov1(i,j) = 100*(i+1)*(j+1);
+    }
+  }
+  Trk::RecVertex rv1 (pos1, cov1, 21.5, 22.5);
+  vi->setRecSvx (rv1);
+  vi->setMass (1.5);
+  vi->setPt (2.5);
+  vi->setEta (3.5);
+  vi->setPhi (4.5);
+  vi->setEnergyFraction (5.5);
+  vi->setNormDist (6.5);
+  vi->addTrackInfo (Analysis::SVTrackInfo (el1));
+  vi->addTrackInfo (Analysis::SVTrackInfo (el2));
+  trans1.addVtxInfo (std::move (vi));
+  
+  vi = std::make_unique<Analysis::MSVVtxInfo>();
+  Amg::Vector3D pos2 (20.5, 21.5, 22.5);
+  AmgSymMatrix(3) cov2;
+  for (int i=0; i < 3; i++) {
+    for (int j=0; j<3; j++) {
+      cov2(i,j) = 200*(i+1)*(j+1);
+    }
+  }
+  Trk::RecVertex rv2 (pos2, cov2, 31.5, 32.5);
+  vi->setRecSvx (rv2);
+  vi->setMass (11.5);
+  vi->setPt (12.5);
+  vi->setEta (13.5);
+  vi->setPhi (14.5);
+  vi->setEnergyFraction (15.5);
+  vi->setNormDist (16.5);
+  vi->addTrackInfo (Analysis::SVTrackInfo (el3));
+  vi->addTrackInfo (Analysis::SVTrackInfo (el4));
+  trans1.addVtxInfo (std::move (vi));
+
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/MultiSVInfoPlusCnv_p1_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/MuonAssociationCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/MuonAssociationCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..1f1be6a06da3d5b73f08134e8ea3c35761ab5083
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/MuonAssociationCnv_p1_test.cxx
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/MuonAssociationCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/MuonAssociationCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const JetAssociationBase& p1,
+              const JetAssociationBase& p2)
+{
+  assert (p1.name() == p2.name());
+  assert (p1.keyIndex() == p2.keyIndex());
+}
+
+
+void compare (const Analysis::MuonAssociation& p1,
+              const Analysis::MuonAssociation& p2)
+{
+  compare (static_cast<const JetAssociationBase&>(p1),
+           static_cast<const JetAssociationBase&>(p2));
+  assert (p1.muon() == p2.muon());
+}
+
+
+void testit (const Analysis::MuonAssociation& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::MuonAssociationCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::NavAssociationCommon_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::MuonAssociation trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1 (SGTest::TestStore* store)
+{
+  std::cout << "test1\n";
+  Analysis::MuonAssociation trans0a ("name0");
+  Analysis::MuonAssociation trans0b ("name1");
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+  auto c_up = std::make_unique<Analysis::MuonContainer>();
+  c_up->push_back (new Analysis::Muon);
+  Analysis::MuonContainer* c = c_up.get();
+  store->record (std::move(c_up), "c");
+
+  Athena_test::Leakcheck check;
+
+  Analysis::MuonAssociation trans1 ("name1");
+  testit (trans1);
+
+  Analysis::MuonAssociation trans2 ("name1");
+  trans2.set_muon (c, size_t(0), 2.5);
+  testit (trans2);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/MuonAssociationCnv_p1_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1 (testStore.get());
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/PhotonAssociationCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/PhotonAssociationCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b37cf790c72047c9a91c98cf0fafd5dde5d2bc63
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/PhotonAssociationCnv_p1_test.cxx
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/PhotonAssociationCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/PhotonAssociationCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const JetAssociationBase& p1,
+              const JetAssociationBase& p2)
+{
+  assert (p1.name() == p2.name());
+  assert (p1.keyIndex() == p2.keyIndex());
+}
+
+
+void compare (const Analysis::PhotonAssociation& p1,
+              const Analysis::PhotonAssociation& p2)
+{
+  compare (static_cast<const JetAssociationBase&>(p1),
+           static_cast<const JetAssociationBase&>(p2));
+  assert (p1.photon() == p2.photon());
+}
+
+
+void testit (const Analysis::PhotonAssociation& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::PhotonAssociationCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::NavAssociationCommon_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::PhotonAssociation trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1 (SGTest::TestStore* store)
+{
+  std::cout << "test1\n";
+  Analysis::PhotonAssociation trans0a ("name0");
+  Analysis::PhotonAssociation trans0b ("name1");
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+  auto c_up = std::make_unique<PhotonContainer>();
+  c_up->push_back (new Analysis::Photon);
+  PhotonContainer* c = c_up.get();
+  store->record (std::move(c_up), "c");
+
+  Athena_test::Leakcheck check;
+
+  Analysis::PhotonAssociation trans1 ("name1");
+  testit (trans1);
+
+  Analysis::PhotonAssociation trans2 ("name1");
+  trans2.set_photon (c, size_t(0), 2.5);
+  testit (trans2);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/PhotonAssociationCnv_p1_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1 (testStore.get());
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SETrackInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SETrackInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..76c98d91e160a2a2fb1f9c2d245b1de5a36ca715
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SETrackInfoCnv_p1_test.cxx
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/SETrackInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/SETrackInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::SETrackInfo& p1,
+              const Analysis::SETrackInfo& p2)
+{
+  assert (p1.electronLink() == p2.electronLink());
+  assert (p1.photonLink() == p2.photonLink());
+  assert (p1.d0Value() == p2.d0Value());
+  assert (p1.pTrel() == p2.pTrel());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+}
+
+
+void testit (const Analysis::SETrackInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::SETrackInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::SETrackInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::SETrackInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1 (SGTest::TestStore* store)
+{
+  std::cout << "test1\n";
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+
+  auto ele = std::make_unique<ElectronContainer>();
+  ele->push_back (new Analysis::Electron);
+  ele->push_back (new Analysis::Electron);
+  ele->push_back (new Analysis::Electron);
+  ele->push_back (new Analysis::Electron);
+  store->record (std::move(ele), "c1");
+
+  auto pho = std::make_unique<PhotonContainer>();
+  pho->push_back (new Analysis::Photon);
+  pho->push_back (new Analysis::Photon);
+  pho->push_back (new Analysis::Photon);
+  pho->push_back (new Analysis::Photon);
+  store->record (std::move(pho), "c2");
+
+  ElementLink<ElectronContainer> el1 ("c1", 1);
+  ElementLink<PhotonContainer> el2 ("c2", 3);
+
+  Athena_test::Leakcheck check;
+
+  Analysis::SETrackInfo trans1 (el1, 1.5, 2.5, {3.5, 4.5, 5.5});
+  testit (trans1);
+
+  Analysis::SETrackInfo trans2 (el2, 11.5, 12.5, {13.5, 14.5});
+  testit (trans2);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/SETrackInfoCnv_p1_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1 (testStore.get());
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SLTrueInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SLTrueInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..ba32eacffe3839d49790fa602bd3a00f3c7d2c1d
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SLTrueInfoCnv_p1_test.cxx
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/SLTrueInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/SLTrueInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::SLTrueInfo& p1,
+              const Analysis::SLTrueInfo& p2)
+{
+  assert (p1.barcode() == p2.barcode());
+  assert (p1.pdgId() == p2.pdgId());
+  assert (p1.pdgIdMother() == p2.pdgIdMother());
+  assert (p1.FromB() == p2.FromB());
+  assert (p1.FromD() == p2.FromD());
+  assert (p1.FromGH() == p2.FromGH());
+  assert (p1.momentum() == p2.momentum());
+  assert (p1.prodvtx() == p2.prodvtx());
+}
+
+
+void testit (const Analysis::SLTrueInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::SLTrueInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::SLTrueInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::SLTrueInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Eigen::Vector3d mom { 1.5, 2.5, 3.5 };
+  Eigen::Vector3d vpos { 11.5, 12.5, 13.5 };
+  Analysis::SLTrueInfo trans1 (123, 321, 322,
+                               true, false, true,
+                               mom, vpos);
+  testit (trans1);
+
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/SLTrueInfoCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SMTrackInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SMTrackInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..11035cb6b02f13ced2716c43049920781a732378
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SMTrackInfoCnv_p1_test.cxx
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/SMTrackInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/SMTrackInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::SMTrackInfo& p1,
+              const Analysis::SMTrackInfo& p2)
+{
+  assert (p1.muonLink() == p2.muonLink());
+  assert (p1.d0Value() == p2.d0Value());
+  assert (p1.pTrel() == p2.pTrel());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+}
+
+
+void testit (const Analysis::SMTrackInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::SMTrackInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::SMTrackInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::SMTrackInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+  ElementLink<Analysis::MuonContainer> el1 ("c1", 2);
+
+  Athena_test::Leakcheck check;
+
+  Analysis::SMTrackInfo trans1 (el1, 1.5, 2.5, {3.5, 4.5, 5.5});
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/SMTrackInfoCnv_p1_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SVInfoBaseCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SVInfoBaseCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..e5edf9c06e5feeee12c03dc21b630733c7106cd4
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SVInfoBaseCnv_p1_test.cxx
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/SVInfoBaseCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/SVInfoBaseCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Analysis::SVInfoBase& p1,
+              const Analysis::SVInfoBase& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+}
+
+
+void testit (const Analysis::SVInfoBase& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::SVInfoBaseCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::SVInfoBase_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::SVInfoBase trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Analysis::SVInfoBase trans1 ("typ");
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/SVInfoBaseCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SVInfoPlusCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SVInfoPlusCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..6f76f03c3664e3da8f4efbb369cb1722eee70549
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SVInfoPlusCnv_p1_test.cxx
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/SVInfoPlusCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/SVInfoPlusCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Trk::Vertex& p1,
+              const Trk::Vertex& p2)
+{
+  assert (p1.position() == p2.position());
+}
+
+
+void compare (const Trk::FitQuality& p1,
+              const Trk::FitQuality& p2)
+{
+  assert (p1.chiSquared() == p2.chiSquared());
+  assert (p1.numberDoF()  == p2.numberDoF());
+}
+
+
+void compare (const Trk::RecVertex& p1,
+              const Trk::RecVertex& p2)
+{
+  compare (static_cast<const Trk::Vertex&>(p1),
+           static_cast<const Trk::Vertex&>(p2));
+  assert (p1.covariancePosition() == p2.covariancePosition());
+  compare (p1.fitQuality(), p2.fitQuality());
+}
+
+
+void compare (const Analysis::SVTrackInfo& p1,
+              const Analysis::SVTrackInfo& p2)
+{
+  assert (p1.trackLink() == p2.trackLink());
+}
+
+
+void compare (const Analysis::SVInfoPlus& p1,
+              const Analysis::SVInfoPlus& p2)
+{
+  compare (p1.getRecSvx(), p2.getRecSvx());
+  assert (p1.getNGTrackInJet() == p2.getNGTrackInJet());
+  assert (p1.getNGTrackInSvx() == p2.getNGTrackInSvx());
+  assert (p1.getN2T() == p2.getN2T());
+  assert (p1.getMass() == p2.getMass());
+  assert (p1.getEnergyFraction() == p2.getEnergyFraction());
+  assert (p1.getNormDist() == p2.getNormDist());
+  assert (p1.numTrackInfo() == p2.numTrackInfo());
+  for (int i=0; i < p1.numTrackInfo(); i++) {
+    compare (p1.getTrackInfo(i), p2.getTrackInfo(i));
+  }
+}
+
+
+void testit (const Analysis::SVInfoPlus& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::SVInfoPlusCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::SVInfoPlus_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::SVInfoPlus trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+  ElementLink<Rec::TrackParticleContainer> el1 ("c1", 2);
+  ElementLink<Rec::TrackParticleContainer> el2 ("c1", 4);
+
+  Athena_test::Leakcheck check;
+
+  Analysis::SVInfoPlus trans1 ("typ");
+  trans1.setWeight (1.5);
+  trans1.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans1.makeValid();
+  trans1.setNGTrackInJet (10);
+  trans1.setNGTrackInSvx (11);
+  trans1.setN2T (12);
+  trans1.setMass (1.5);
+  trans1.setEnergyFraction (5.5);
+  trans1.setNormDist (13.5);
+
+  Amg::Vector3D pos1 (10.5, 11.5, 12.5);
+  AmgSymMatrix(3) cov1;
+  for (int i=0; i < 3; i++) {
+    for (int j=0; j<3; j++) {
+      cov1(i,j) = 100*(i+1)*(j+1);
+    }
+  }
+  Trk::RecVertex rv1 (pos1, cov1, 21.5, 22.5);
+  trans1.setRecSvx (rv1);
+
+  trans1.addTrackInfo (Analysis::SVTrackInfo (el1));
+  trans1.addTrackInfo (Analysis::SVTrackInfo (el2));
+
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/SVInfoPlusCnv_p1_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SecVtxInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SecVtxInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..550ee6d57c7a98c7a1615bb853cea2104494cda2
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SecVtxInfoCnv_p1_test.cxx
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/SecVtxInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/SecVtxInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Trk::Vertex& p1,
+              const Trk::Vertex& p2)
+{
+  assert (p1.position() == p2.position());
+}
+
+
+void compare (const Trk::FitQuality& p1,
+              const Trk::FitQuality& p2)
+{
+  assert (p1.chiSquared() == p2.chiSquared());
+  assert (p1.numberDoF()  == p2.numberDoF());
+}
+
+
+void compare (const Trk::RecVertex& p1,
+              const Trk::RecVertex& p2)
+{
+  compare (static_cast<const Trk::Vertex&>(p1),
+           static_cast<const Trk::Vertex&>(p2));
+  assert (p1.covariancePosition() == p2.covariancePosition());
+  compare (p1.fitQuality(), p2.fitQuality());
+}
+
+
+void compare (const Analysis::SecVtxInfo& p1,
+              const Analysis::SecVtxInfo& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.distance() == p2.distance());
+  assert (p1.rphidistance() == p2.rphidistance());
+  assert (p1.probability() == p2.probability());
+  assert (p1.mass() == p2.mass());
+  assert (p1.energyFraction() == p2.energyFraction());
+  assert (p1.mult() == p2.mult());
+  assert (p1.fitType() == p2.fitType());
+  compare (p1.secVertexPos(), p2.secVertexPos()); // RecVertex
+  assert (p1.NumberOfG2TrackVertices() == p2.NumberOfG2TrackVertices());
+}
+
+
+void testit (const Analysis::SecVtxInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::SecVtxInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::SecVtxInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::SecVtxInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Analysis::SecVtxInfo trans1 ("typ1");
+  trans1.setWeight (1.5);
+  trans1.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans1.makeValid();
+  trans1.setNumSelTracksForFit (11);
+  trans1.setDist (12.5);
+  trans1.setRPhiDist (13.5);
+  trans1.setMass (14.5);
+  trans1.setEnergyFraction (15.5);
+  trans1.setMult (16);
+  trans1.setNumberOfG2TrackVertices (17);
+  trans1.setFitType (Analysis::SecVtxInfo::BuildUp);
+
+  Amg::Vector3D pos1 (10.5, 11.5, 12.5);
+  AmgSymMatrix(3) cov1;
+  for (int i=0; i < 3; i++) {
+    for (int j=0; j<3; j++) {
+      cov1(i,j) = 100*(i+1)*(j+1);
+    }
+  }
+  Trk::RecVertex rv1 (pos1, cov1, 21.5, 22.5);
+  trans1.setSecVtx (rv1, 20.5, {});
+
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/SecVtxInfoCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SoftElectronInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SoftElectronInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..5197e3c31505b62e27ee83db923a0769f530d844
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SoftElectronInfoCnv_p1_test.cxx
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/SoftElectronInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/SoftElectronInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::SETrackInfo& p1,
+              const Analysis::SETrackInfo& p2)
+{
+  assert (p1.electronLink() == p2.electronLink());
+  assert (p1.photonLink() == p2.photonLink());
+  assert (p1.d0Value() == p2.d0Value());
+  assert (p1.pTrel() == p2.pTrel());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+}
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Analysis::SoftElectronInfo& p1,
+              const Analysis::SoftElectronInfo& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.vectorTrackProb() == p2.vectorTrackProb());
+  assert (p1.nTrackProb() == p2.nTrackProb());
+  assert (p1.numTrackInfo() == p2.numTrackInfo());
+  for (int i=0; i < p1.numTrackInfo(); i++) {
+    compare (p1.getTrackInfo(i), p2.getTrackInfo(i));
+  }
+}
+
+
+void testit (const Analysis::SoftElectronInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::SoftElectronInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::SoftElectronInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::SoftElectronInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1 (SGTest::TestStore* store)
+{
+  std::cout << "test1\n";
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+
+  auto ele = std::make_unique<ElectronContainer>();
+  ele->push_back (new Analysis::Electron);
+  ele->push_back (new Analysis::Electron);
+  ele->push_back (new Analysis::Electron);
+  ele->push_back (new Analysis::Electron);
+  store->record (std::move(ele), "c1");
+
+  auto pho = std::make_unique<PhotonContainer>();
+  pho->push_back (new Analysis::Photon);
+  pho->push_back (new Analysis::Photon);
+  pho->push_back (new Analysis::Photon);
+  pho->push_back (new Analysis::Photon);
+  store->record (std::move(pho), "c2");
+
+  ElementLink<ElectronContainer> el1 ("c1", 1);
+  ElementLink<PhotonContainer> el2 ("c2", 3);
+
+  Athena_test::Leakcheck check;
+
+  Analysis::SoftElectronInfo trans1 ("typ");
+  trans1.setWeight (1.5);
+  trans1.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans1.makeValid();
+  trans1.setTrackProb ({5.5, 6.5});
+  trans1.setNTrackProb (7.5);
+  trans1.addTrackInfo (Analysis::SETrackInfo (el1, 1.5, 2.5, {3.5, 4.5, 5.5}));
+  trans1.addTrackInfo (Analysis::SETrackInfo (el2, 11.5, 12.5, {13.5, 14.5}));
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/SoftElectronInfoCnv_p1_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1 (testStore.get());
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SoftLeptonTruthInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SoftLeptonTruthInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..9eba3e7b2b796ba0023198b752dcbce2a157f286
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SoftLeptonTruthInfoCnv_p1_test.cxx
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/SoftLeptonTruthInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/SoftLeptonTruthInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Analysis::SLTrueInfo& p1,
+              const Analysis::SLTrueInfo& p2)
+{
+  assert (p1.barcode() == p2.barcode());
+  assert (p1.pdgId() == p2.pdgId());
+  assert (p1.pdgIdMother() == p2.pdgIdMother());
+  assert (p1.FromB() == p2.FromB());
+  assert (p1.FromD() == p2.FromD());
+  assert (p1.FromGH() == p2.FromGH());
+  assert (p1.momentum() == p2.momentum());
+  assert (p1.prodvtx() == p2.prodvtx());
+}
+
+
+void compare (const Analysis::SoftLeptonTruthInfo& p1,
+              const Analysis::SoftLeptonTruthInfo& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.numSLTrueInfo() == p2.numSLTrueInfo());
+  for (int i=0; i < p1.numSLTrueInfo(); i++) {
+    compare (p1.getSLTrueInfo(i), p2.getSLTrueInfo(i));
+  }
+}
+
+
+void testit (const Analysis::SoftLeptonTruthInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::SoftLeptonTruthInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::SoftLeptonTruthInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::SoftLeptonTruthInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Analysis::SoftLeptonTruthInfo trans1 ("typ");
+  trans1.setWeight (1.5);
+  trans1.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans1.makeValid();
+
+  Eigen::Vector3d mom1 { 1.5, 2.5, 3.5 };
+  Eigen::Vector3d vpos1 { 11.5, 12.5, 13.5 };
+  Analysis::SLTrueInfo ti1 (123, 321, 322,
+                            true, false, true,
+                            mom1, vpos1);
+  trans1.addSLTrueInfo (ti1);
+
+  Eigen::Vector3d mom2 { 21.5, 22.5, 23.5 };
+  Eigen::Vector3d vpos2 { 31.5, 32.5, 33.5 };
+  Analysis::SLTrueInfo ti2 (223, 221, 222,
+                            false, true, false,
+                            mom2, vpos2);
+  trans1.addSLTrueInfo (ti2);
+  
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/SoftLeptonTruthInfoCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SoftMuonInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SoftMuonInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..03af68ee9c9e61d187339894230dfff830b03d63
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SoftMuonInfoCnv_p1_test.cxx
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/SoftMuonInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/SoftMuonInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::SETrackInfo& p1,
+              const Analysis::SETrackInfo& p2)
+{
+  assert (p1.electronLink() == p2.electronLink());
+  assert (p1.photonLink() == p2.photonLink());
+  assert (p1.d0Value() == p2.d0Value());
+  assert (p1.pTrel() == p2.pTrel());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+}
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Analysis::SMTrackInfo& p1,
+              const Analysis::SMTrackInfo& p2)
+{
+  assert (p1.muonLink() == p2.muonLink());
+  assert (p1.d0Value() == p2.d0Value());
+  assert (p1.pTrel() == p2.pTrel());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+}
+
+
+void compare (const Analysis::SoftMuonInfo& p1,
+              const Analysis::SoftMuonInfo& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.numTrackInfo() == p2.numTrackInfo());
+  for (int i=0; i < p1.numTrackInfo(); i++) {
+    compare (p1.getTrackInfo(i), p2.getTrackInfo(i));
+  }
+}
+
+
+void testit (const Analysis::SoftMuonInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::SoftMuonInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::SoftMuonInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::SoftMuonInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+
+  ElementLink<Analysis::MuonContainer> el1 ("c1", 2);
+  ElementLink<Analysis::MuonContainer> el2 ("c2", 4);
+
+  Athena_test::Leakcheck check;
+
+  Analysis::SoftMuonInfo trans1 ("typ");
+  trans1.setWeight (1.5);
+  trans1.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans1.makeValid();
+  trans1.addTrackInfo (Analysis::SMTrackInfo (el1, 1.5, 2.5, {3.5, 4.5, 5.5}));
+  trans1.addTrackInfo (Analysis::SMTrackInfo (el2, 11.5, 12.5, {13.5, 14.5}));
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/SoftMuonInfoCnv_p1_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SvxSummaryCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SvxSummaryCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..3a58020a3e8fb5c78ac25b19fc1285528acf1e2d
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/SvxSummaryCnv_p1_test.cxx
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/SvxSummaryCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/SvxSummaryCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Trk::Vertex& p1,
+              const Trk::Vertex& p2)
+{
+  assert (p1.position() == p2.position());
+}
+
+
+void compare (const Trk::FitQuality& p1,
+              const Trk::FitQuality& p2)
+{
+  assert (p1.chiSquared() == p2.chiSquared());
+  assert (p1.numberDoF()  == p2.numberDoF());
+}
+
+
+void compare (const Trk::RecVertex& p1,
+              const Trk::RecVertex& p2)
+{
+  compare (static_cast<const Trk::Vertex&>(p1),
+           static_cast<const Trk::Vertex&>(p2));
+  // SvxSummaryCnv_p1 saves only the the Trk::Vertex part.
+  //assert (p1.covariancePosition() == p2.covariancePosition());
+  //compare (p1.fitQuality(), p2.fitQuality());
+}
+
+
+void compare (const Analysis::SvxSummary& p1,
+              const Analysis::SvxSummary& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  compare (p1.Svx(), p2.Svx());
+  assert (p1.Results() == p2.Results());
+  assert (p1.TrkInSvx().size() == p2.TrkInSvx().size());
+}
+
+
+void testit (const Analysis::SvxSummary& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::SvxSummaryCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::SvxSummary_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::SvxSummary trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Analysis::SvxSummary trans1 ("typ");
+  trans1.setWeight (1.5);
+  trans1.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans1.makeValid();
+
+  trans1.Results ({2.5, 7.5});
+  
+  Amg::Vector3D pos1 (10.5, 11.5, 12.5);
+  AmgSymMatrix(3) cov1;
+  for (int i=0; i < 3; i++) {
+    for (int j=0; j<3; j++) {
+      cov1(i,j) = 100*(i+1)*(j+1);
+    }
+  }
+  Trk::RecVertex rv1 (pos1, cov1, 21.5, 22.5);
+  trans1.Svx (rv1);
+
+  // Don't test the TrackParticle parts.  That's buggy and will leak memory,
+  // and doesn't actually appear to be used in any case.
+
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/SvxSummaryCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/TrackAssociationCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/TrackAssociationCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..1df31c769be571f2adc0487c2d3565f67eb56ad4
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/TrackAssociationCnv_p1_test.cxx
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/TrackAssociationCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/TrackAssociationCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "SGTools/TestStore.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const JetAssociationBase& p1,
+              const JetAssociationBase& p2)
+{
+  assert (p1.name() == p2.name());
+  assert (p1.keyIndex() == p2.keyIndex());
+}
+
+
+void compare (const Analysis::TrackAssociation& p1,
+              const Analysis::TrackAssociation& p2)
+{
+  compare (static_cast<const JetAssociationBase&>(p1),
+           static_cast<const JetAssociationBase&>(p2));
+  assert (p1.size() == p2.size());
+  std::unique_ptr<std::vector<const Rec::TrackParticle*> > v1 { p1.tracks() };
+  std::unique_ptr<std::vector<const Rec::TrackParticle*> > v2 { p2.tracks() };
+  for (size_t i = 0; i < v1->size(); i++) {
+    assert ((*v1)[i] == (*v2)[i]);
+    assert (p1.getTrackWeight((*v1)[i]) == p2.getTrackWeight((*v2)[i]));
+  }
+}
+
+
+void testit (const Analysis::TrackAssociation& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::TrackAssociationCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::NavAssociationCommon_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::TrackAssociation trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1 (SGTest::TestStore* store)
+{
+  std::cout << "test1\n";
+  Analysis::TrackAssociation trans0a ("name0");
+  Analysis::TrackAssociation trans0b ("name1");
+  Athena::getMessageSvc();
+  // Get proxies created outside of leak checking.
+  auto c_up = std::make_unique<Rec::TrackParticleContainer>();
+  c_up->push_back (new Rec::TrackParticle);
+  c_up->push_back (new Rec::TrackParticle);
+  Rec::TrackParticleContainer* c = c_up.get();
+  store->record (std::move(c_up), "c");
+
+  Athena_test::Leakcheck check;
+
+  Analysis::TrackAssociation trans1 ("name1");
+  testit (trans1);
+
+  Analysis::TrackAssociation trans2 ("name1");
+  trans2.set_track (c, size_t(0), 2.5);
+  trans2.set_track (c, size_t(1), 3.5);
+  testit (trans2);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/TrackAssociationCnv_p1_test\n";
+
+  std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
+  test1 (testStore.get());
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/TrackCountingInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/TrackCountingInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b228b730cb593cdc4d484cd747e9f53488054486
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/TrackCountingInfoCnv_p1_test.cxx
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/TrackCountingInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/TrackCountingInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Analysis::TrackCountingInfo& p1,
+              const Analysis::TrackCountingInfo& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.nTracks() == p2.nTracks());
+  assert (p1.d0sig_2nd() == p2.d0sig_2nd());
+  assert (p1.d0sig_abs_2nd() == p2.d0sig_abs_2nd());
+  assert (p1.d0sig_3rd() == p2.d0sig_3rd());
+  assert (p1.d0sig_abs_3rd() == p2.d0sig_abs_3rd());
+}
+
+
+void testit (const Analysis::TrackCountingInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::TrackCountingInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::TrackCountingInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::TrackCountingInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Analysis::TrackCountingInfo trans1 ("typ");
+  trans1.setWeight (1.5);
+  trans1.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans1.makeValid();
+  trans1.setnTracks (11);
+  trans1.setd0sig_2nd (20.5);
+  trans1.setd0sig_abs_2nd (21.5);
+  trans1.setd0sig_3rd (22.5);
+  trans1.setd0sig_abs_3rd (23.5);
+  
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/TrackCountingInfoCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/TruthInfoCnv_p1_test.cxx b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/TruthInfoCnv_p1_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..e83d28d90a1b6ab052290909c1659a1de073230f
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/test/TruthInfoCnv_p1_test.cxx
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file JetTagInfoTPCnv/test/TruthInfoCnv_p1_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2018
+ * @brief Regression tests.
+ */
+
+#undef NDEBUG
+#include "JetTagInfoTPCnv/TruthInfoCnv_p1.h"
+#include "JetTagInfoTPCnv/JetTagInfoCnv_tlp3.h"
+#include "TestTools/leakcheck.h"
+#include "GaudiKernel/MsgStream.h"
+#include <cassert>
+#include <iostream>
+
+
+void compare (const Analysis::BaseTagInfo& p1,
+              const Analysis::BaseTagInfo& p2)
+{
+  assert (p1.isValid() == p2.isValid());
+  assert (p1.tagLikelihood() == p2.tagLikelihood());
+  assert (p1.weight() == p2.weight());
+  assert (p1.infoType() == p2.infoType());
+}
+
+
+void compare (const Analysis::TruthInfo& p1,
+              const Analysis::TruthInfo& p2)
+{
+  compare (static_cast<const Analysis::BaseTagInfo&>(p1),
+           static_cast<const Analysis::BaseTagInfo&>(p2));
+  assert (p1.jetTruthLabel() == p2.jetTruthLabel());
+  assert (p1.deltaRMinTo("B") == p2.deltaRMinTo("B"));
+  assert (p1.deltaRMinTo("C") == p2.deltaRMinTo("C"));
+  assert (p1.deltaRMinTo("T") == p2.deltaRMinTo("T"));
+  assert (p1.BDecayVertex() == p2.BDecayVertex());
+  assert (p1.BHadronPdg() == p2.BHadronPdg());
+}
+
+
+void testit (const Analysis::TruthInfo& trans1)
+{
+  MsgStream log (0, "test");
+  Analysis::TruthInfoCnv_p1 cnv;
+  Analysis::JetTagInfoCnv_tlp3 tlcnv;
+  cnv.setTopConverter (&tlcnv, TPObjRef::typeID_t());
+  Analysis::TruthInfo_p1 pers;
+  cnv.transToPers (&trans1, &pers, log);
+  Analysis::TruthInfo trans2;
+  cnv.persToTrans (&pers, &trans2, log);
+  compare (trans1, trans2);
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  Athena_test::Leakcheck check;
+
+  Analysis::TruthInfo trans1 ("typ");
+  trans1.setWeight (1.5);
+  trans1.setTagLikelihood ({2.5, 3.5, 4.5});
+  trans1.makeValid();
+  trans1.setJetTruthLabel ("lab");
+  trans1.deltaRMinTo ("B", 7.5);
+  trans1.deltaRMinTo ("C", 8.5);
+  trans1.deltaRMinTo ("T", 9.5);
+  trans1.BDecayVertex ({10.5, 11.5, 12.5});
+  trans1.BHadronPdg (17);
+  
+  testit (trans1);
+}
+
+
+int main()
+{
+  std::cout << "JetTagInfoTPCnv/TruthInfoCnv_p1_test\n";
+  test1();
+  return 0;
+}
diff --git a/PhysicsAnalysis/MuonID/MuonIDEvent/MuonIDEvent/MuonAssociation.h b/PhysicsAnalysis/MuonID/MuonIDEvent/MuonIDEvent/MuonAssociation.h
index 9e33df008cfd0f44e97700aad29ecb4e3be94060..f89fa0e9cd8a9c6ef1e6b8180c4f80c612e72546 100755
--- a/PhysicsAnalysis/MuonID/MuonIDEvent/MuonIDEvent/MuonAssociation.h
+++ b/PhysicsAnalysis/MuonID/MuonIDEvent/MuonIDEvent/MuonAssociation.h
@@ -30,7 +30,7 @@ namespace Analysis
       
     public:
       MuonAssociation() ;      //!< constructor
-      MuonAssociation(NameType& name) ;      //!< constructor
+      MuonAssociation(const NameType& name) ;      //!< constructor
       ~MuonAssociation() ;      //!< destructor
       
       virtual JetAssociationBase* clone() const; 
@@ -47,7 +47,7 @@ namespace Analysis
 		    const Muon* the_muon,  double weight=1);
       
       void set_muon(const MuonContainer* theContainer,
-		    index_type& theIndex,   double weight=1);
+		    const index_type& theIndex,   double weight=1);
       
       void set_association(const MuonContainer* theContainer,
 			   const Muon* the_muon,  double weight=1) 
@@ -56,7 +56,7 @@ namespace Analysis
 	}
       
       void set_association(const MuonContainer* theContainer,
-			   index_type& theIndex,   double weight=1)
+			   const index_type& theIndex,   double weight=1)
 	{
 	  set_muon(theContainer, theIndex, weight);
 	}
@@ -64,7 +64,7 @@ namespace Analysis
       double getMuonWeight(const Muon* the_muon) const ;
       
       double getMuonWeight(const MuonContainer* theContainer,
-			   index_type& theIndex) const;
+			   const index_type& theIndex) const;
       
     };
   
diff --git a/PhysicsAnalysis/MuonID/MuonIDEvent/src/MuonAssociation.cxx b/PhysicsAnalysis/MuonID/MuonIDEvent/src/MuonAssociation.cxx
index c2002f85336825929aba69147a61828d9e800ad2..64cfd45336e8eed99356f486758001ab13ea463e 100755
--- a/PhysicsAnalysis/MuonID/MuonIDEvent/src/MuonAssociation.cxx
+++ b/PhysicsAnalysis/MuonID/MuonIDEvent/src/MuonAssociation.cxx
@@ -12,7 +12,7 @@ namespace Analysis
   MuonAssociation::MuonAssociation()
   {  } 
   
-  MuonAssociation::MuonAssociation(NameType& name)
+  MuonAssociation::MuonAssociation(const NameType& name)
   { this->setName(name); }  
   
   MuonAssociation::~MuonAssociation()
@@ -53,7 +53,7 @@ namespace Analysis
   }
   
   void  MuonAssociation::set_muon(const MuonContainer* theContainer,
-		       index_type& theIndex,
+		       const index_type& theIndex,
 		       double weight)
   {
     double newWeight = weight;
@@ -80,7 +80,7 @@ namespace Analysis
   }
   
   double MuonAssociation::getMuonWeight(const MuonContainer* theContainer,
-				      index_type& theIndex) const
+                                        const index_type& theIndex) const
   {
     // from Navigable
     return (this->contains(theContainer,theIndex))
diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/src/TrkAndVtxPlots.cxx b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/src/TrkAndVtxPlots.cxx
index 11a970c0835eaed0741ccf354c3c710836cb541c..11dfad4d021127dfa21283116076614629a36281 100644
--- a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/src/TrkAndVtxPlots.cxx
+++ b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/src/TrkAndVtxPlots.cxx
@@ -19,7 +19,7 @@ void TrkAndVtxPlots::initializePlots(){
   vtx_y  = Book1D("y", "Vertex y; y ;Events", 300, -1.5, 1.5);
   vtx_z  = Book1D("z", "Vertex z; z ;Events", 200, -250., 250);
 
-  mu  = Book1D("mu", "Pileup; mu ;Events", 50, 0., 50);
+  mu  = Book1D("mu", "Pileup; mu ;Events", 120, 0., 120);
 }
 
 void TrkAndVtxPlots::fill(const xAOD::Vertex* vtx){
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/python/PrimaryDPDFlags.py b/PhysicsAnalysis/PrimaryDPDMaker/python/PrimaryDPDFlags.py
index 50926eeeeac167199c16efb4ab3323fcb8b1ccfe..1811c336106a26f883b42623123fc6bdf11a8fa3 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/python/PrimaryDPDFlags.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/python/PrimaryDPDFlags.py
@@ -435,19 +435,6 @@ listRAWtoDPD.append(WriteDRAW_TOPSLMU.StreamName)
 ## Skimmed ESD
 ##--------------------------------------------
 
-class WriteDAOD_RPVLLStream(JobProperty):
-    """ Produce the xAOD for DPD RPVLL and UEH groups searches """
-    statusOn     = True
-    allowedTypes = ['bool']
-    StoredValue  = False
-    StreamName   = "StreamDAOD_RPVLL"
-    FileName     = ""
-    isVirtual      = False
-    DPDMakerScript = "LongLivedParticleDPDMaker/DAOD_RPVLL.py"
-    pass
-jobproperties.PrimaryDPDFlags.add_JobProperty(WriteDAOD_RPVLLStream)
-listESDtoDPD.append(WriteDAOD_RPVLLStream.StreamName)
-
 class WriteDAOD_IDNCBStream(JobProperty):
     """ Produce the DPD for DAOD_IDNCB - AOD with PrepRawData """
     statusOn     = True
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/src/ThinContainers.cxx b/PhysicsAnalysis/PrimaryDPDMaker/src/ThinContainers.cxx
index 7d7d0ddd22c924dae208b97bac7d3cfab584b773..2d7f9ccb06dc556ddf026f3622adb8130a537735 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/src/ThinContainers.cxx
+++ b/PhysicsAnalysis/PrimaryDPDMaker/src/ThinContainers.cxx
@@ -54,7 +54,6 @@
 
 // Needed for the pixel clusters
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/TRT_DetectorManager.h"
 //
 #include "InDetPrepRawData/PixelClusterCollection.h"
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/DAOD_RPVLL.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/DAOD_RPVLL.py
deleted file mode 100644
index 8ade9573f73e6336e6086b8695342ce58efd7137..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/DAOD_RPVLL.py
+++ /dev/null
@@ -1,147 +0,0 @@
-##-----------------------------------------------------------
-## Name: DAOD_RPVLL.py
-##
-## Author: Jordi Duarte-Campderros (Tel Aviv University)
-## Email: jorge.duarte.campderros@cern.ch
-## 
-## Description: This defines and creates the final Derived 
-## Physics Data (DPD) in xAOD format, to be used for several
-## analysis within the SUSY-RPVLL and Exotics UEH groups. 
-## This script is intended to be used after the aplication
-## of the DESDM_RPVLL filter (see the PhysDRAW_RPVLL.py file)
-##
-## Called by PrimaryDPDFlags.WriteDAOD_RPVLLStream 
-
-#if this file is already included, don't include it again
-include.block("LongLivedParticleDPDMaker/DAOD_RPVLL.py")
-
-## for messaging
-from AthenaCommon.Logging import logging
-DAOD_RPVLLStream_msg = logging.getLogger( 'DAOD_RPVLLStream' )
-
-    
-## This handles multiple output streams
-from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-
-## Include the job property flags for this package and from RecExCommon
-from PrimaryDPDMaker.PrimaryDPDFlags import primDPD
-from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
-#---------------------------------------------------
-# Add the containers to the output stream
-#---------------------------------------------------
-streamName = primDPD.WriteDAOD_RPVLLStream.StreamName 
-fileName   = buildFileName( primDPD.WriteDAOD_RPVLLStream )
-
-# activating the relevant collection
-from ParticleBuilderOptions.AODFlags import AODFlags
-AODFlags.Electron = True
-AODFlags.FastSimulation = False
-AODFlags.FastTrackParticle = True
-AODFlags.JetTag = False
-AODFlags.McEventKeyStr = 'TruthEvent'
-AODFlags.MissingEtTruth = False
-AODFlags.Muon = True
-AODFlags.MuonTrackSlimmer = False
-AODFlags.ParticleJet = True
-AODFlags.Photon = True
-AODFlags.SpclMC = True
-AODFlags.Streaming = False
-AODFlags.Tau = True
-AODFlags.Tau1p3p = True
-AODFlags.TauRec = True
-AODFlags.TauTrackSlimmer = False
-AODFlags.TrackParticleLastHitAndPerigeeSlimmer = False
-AODFlags.TrackParticleSlimmer = True
-AODFlags.Trigger = True
-AODFlags.TruthParticleJet = True
-AODFlags.egammaTrackSlimmer = True
-
-# Need to be activated because of the use of the 
-# "RecExPers/RecoOutputAODList_jobOptions.py" file
-rec.doWriteAOD = True 
-
-## Mimicking RecExample/RecExCommon/share/RecExCommon_topOptions.py
-## See from line 1305
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-from AthenaServices.Configurables import ThinningSvc
-if not hasattr(svcMgr, 'ThinningSvc'):
-    svcMgr += ThinningSvc(OutputLevel=INFO)
-    svcMgr.ThinningSvc.Streams += [streamName]
-    
-# cannot redo the slimming if readAOD and writeAOD
-if not rec.readAOD():
-    if rec.doEgamma() and (AODFlags.Photon or AODFlags.Electron):
-        doEgammaPhoton = AODFlags.Photon
-        doEgammaElectron= AODFlags.Electron
-        from egammaRec.egammaAODGetter import egammaAODGetter
-        egammaAODGetter()
-        if AODFlags.egammaTrackSlimmer:
-            from egammaRec.egammaTrackSlimmer import egammaTrackSlimmer
-            egammaTrackSlimmer()
-        if AODFlags.TauTrackSlimmer:
-            protectedInclude("tauRec/tauMerged_trackslim_jobOptions.py")
-
-pdr.flag_domain('output')
-
-##====================================================================
-## Define the DAOD RPVLL output stream
-##====================================================================
-if primDPD.isVirtual() == False:
-    DAOD_RPVLLStream_Augmented=MSMgr.NewPoolStream( streamName, fileName,asAlg = True )
-if primDPD.isVirtual() == True:
-    DAOD_RPVLLStream_Augmented=MSMgr.NewVirtualStream( streamName, fileName )
-
-if rec.doFileMetaData():
-    # Trigger tool
-    if not hasattr(ToolSvc,"xAODMaker__TriggerMenuMetaDataTool/TriggerMenuMetaDataTool"):
-        ToolSvc += CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool")
-    svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.TriggerMenuMetaDataTool ]
-    # EventFormat tool
-    if not hasattr(ToolSvc,"xAODMaker__EventFormatMetaDataTool/EventFormatMetaDataTool"):
-        ToolSvc += CfgMgr.xAODMaker__EventFormatMetaDataTool( "EventFormatMetaDataTool")
-    svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.EventFormatMetaDataTool ]
-    # Put MetaData in AOD stream via AugmentedPoolStream_
-    # Write all meta data containers
-    DAOD_RPVLLStream_Augmented.AddMetaDataItem(dfMetadataItemList())
-    # Metadata declared by the sub-systems:
-    DAOD_RPVLLStream_Augmented.AddMetaDataItem( objKeyStore._store.metaData() )
-
-## This line provides the 'old' StreamDAOD_RPVLL (which is the Event Stream only)
-## for backward compatibility
-DAOD_RPVLLStream=DAOD_RPVLLStream_Augmented.GetEventStream()
-
-## Add TAG attribute list to payload data
-try:
-    DAOD_RPVLLStream_Augmented.GetEventStream().WritingTool.AttributeListKey = EventTagGlobal.AttributeList
-except:
-    logRecExCommon_topOptions.warning("Failed to add TAG attribute list to payload data")
-
-# -- Note that inside below script, assumes that a StreamAOD globals exist
-StreamAOD = DAOD_RPVLLStream
-protectedInclude( "RecExPers/RecoOutputAODList_jobOptions.py")
-DAOD_RPVLLStream_Augmented.AddItem("SkimDecisionCollection#*")
-#FIXME HACK remove faulty object
-DAOD_RPVLLStream_Augmented.GetEventStream().ItemList = \
-        [ e for e in DAOD_RPVLLStream_Augmented.GetEventStream().ItemList \
-          if not e in [ 'CaloTowerContainer#HLT_TrigCaloTowerMaker'] ]
-
-if AODFlags.TrackParticleSlimmer or AODFlags.TrackParticleLastHitAndPerigeeSlimmer:
-    from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-    from AthenaServices.Configurables import ThinningSvc, createThinningSvc
-    if not hasattr(svcMgr, 'ThinningSvc'):
-        svcMgr += createThinningSvc( svcName="ThinningSvc", outStreams=[StreamAOD] )
-
-if rec.doHeavyIon():
-    protectedInclude ("HIRecExample/heavyion_postOptionsAOD.py")
-
-try:
-    if rec.doFileMetaData(): #needed to have xAOD readable outside athena
-        theApp.CreateSvc += [ "xAODMaker::EventFormatSvc" ]
-        DAOD_RPVLLStream_Augmented.AddMetaDataItem("xAOD::EventFormat#EventFormat")
-except Exception:
-    treatException("Problem with extra attributes for xAOD output")
-
-# -- Needs to be removed if we want to exactly mimick the AOD stream
-if len(filter(lambda x: x.find("AODSelectSeq") != -1,dir())) > 0:
-    topSequence.remove(AODSelectSeq)
-
diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt
index ea2ae4720b150372271ae9711acc262a48cb1f55..598311d967b74c727cb28db8b20e46376f472fd5 100644
--- a/Projects/AthSimulation/externals.txt
+++ b/Projects/AthSimulation/externals.txt
@@ -9,4 +9,4 @@
 AthSimulationExternalsVersion = 2.0.10
 
 # The version of atlas/Gaudi to use:
-GaudiVersion = v30r3.001
+GaudiVersion = v30r3.002
diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt
index 342ee2c90f44580dfb95a2d37a3a9868a57b356f..d9d3ff7d753b75636a230472157eba3956d05938 100644
--- a/Projects/Athena/externals.txt
+++ b/Projects/Athena/externals.txt
@@ -9,4 +9,4 @@
 AthenaExternalsVersion = 2.0.10
 
 # The version of atlas/Gaudi to use: 
-GaudiVersion = v30r3.001
+GaudiVersion = v30r3.002
diff --git a/Projects/Athena/externals/Lhapdf.cmake b/Projects/Athena/externals/Lhapdf.cmake
index ca1ff7347c834f5aa5332a27c65de080197004cf..3eb6fa66064be4ac0d0fbcbbcb5ed590616338f3 100644
--- a/Projects/Athena/externals/Lhapdf.cmake
+++ b/Projects/Athena/externals/Lhapdf.cmake
@@ -2,6 +2,6 @@
 # File specifying the location of Lhapdf to use.
 #
 
-set( LHAPDF_VERSION 6.1.6 )
+set( LHAPDF_VERSION 6.2.1 )
 set( LHAPDF_ROOT
    ${LCG_RELEASE_DIR}/MCGenerators/lhapdf/${LHAPDF_VERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/Sherpa.cmake b/Projects/Athena/externals/Sherpa.cmake
index 284ecfeb0451daadfbe363ea0d1de142073e41d8..1a89135be3b911e601e82aa5414dfc3f13bea21b 100644
--- a/Projects/Athena/externals/Sherpa.cmake
+++ b/Projects/Athena/externals/Sherpa.cmake
@@ -2,6 +2,6 @@
 # File specifying the location of Sherpa to use.
 #
 
-set( SHERPA_VERSION 2.2.1 )
+set( SHERPA_VERSION 2.2.5 )
 set( SHERPA_ROOT
    ${LCG_RELEASE_DIR}/MCGenerators/sherpa/${SHERPA_VERSION}/${LCG_PLATFORM} )
diff --git a/Reconstruction/RecAlgs/src/AppStopAlg.cxx b/Reconstruction/RecAlgs/src/AppStopAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..27b7ff2f1c582389bb7fc8a1d456a59d54e918bf
--- /dev/null
+++ b/Reconstruction/RecAlgs/src/AppStopAlg.cxx
@@ -0,0 +1,82 @@
+#include "AppStopAlg.h"
+#include "GaudiKernel/IEventProcessor.h"
+#include "csignal"
+
+
+namespace
+{
+  volatile std::sig_atomic_t gSignalStatus=0;
+}
+ 
+
+void signal_handler(int /*signal*/,siginfo_t *, void *) {
+  gSignalStatus = 1;
+}
+ 
+
+AppStopAlg::AppStopAlg(const std::string& name, ISvcLocator* pSvcLocator):
+  AthAlgorithm(name,pSvcLocator) {  
+  declareProperty("SignalNumer",m_signal=15);
+  declareProperty("InstallAfterFirstEvent",m_installAfterFirst=true);
+}
+
+
+StatusCode AppStopAlg::installHandler() {
+  ATH_MSG_INFO("Handling signal: " << m_signal);
+
+  struct sigaction act;
+  struct sigaction oldact;
+
+  act.sa_handler=nullptr;
+  sigemptyset(&act.sa_mask);
+  act.sa_flags=SA_RESTART | SA_SIGINFO;
+  act.sa_sigaction=::signal_handler;
+  if (sigaction(m_signal,&act,&oldact)==-1) {
+    ATH_MSG_ERROR("Failed to install signal handler for signal "<< m_signal);
+    return StatusCode::FAILURE;
+  }
+  
+  //const void* oldhandle= (oldact.sa_flags & SA_SIGINFO) ? (void*)oldact.sa_sigaction : (void*)oldact.sa_handler;
+
+  if (oldact.sa_handler==SIG_DFL || oldact.sa_handler==SIG_IGN) {
+    ATH_MSG_DEBUG("No previosly defined signal handler for signal " << m_signal);
+  }
+  else  {
+    ATH_MSG_INFO("Replacing previously defined signal handler for signal "  << m_signal);
+  }
+  m_handlerInstalled=true;
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode AppStopAlg::initialize() {
+  if (!m_installAfterFirst) {
+    return installHandler();
+  }
+  else {
+    return StatusCode::SUCCESS; 
+  }
+}
+
+StatusCode AppStopAlg::execute() {
+  if (!m_handlerInstalled) {
+    return installHandler();
+  }
+
+
+  if (gSignalStatus!=0) {
+    
+    ATH_MSG_INFO("Got signal " << m_signal << ". Stopping the application");
+    IEventProcessor* appMgr=nullptr;
+    ATH_CHECK(service("ApplicationMgr",appMgr));
+    
+    if (!appMgr) {
+      ATH_MSG_ERROR("Failed to retrieve ApplicationMgr as IEventProcessor");
+      return StatusCode::FAILURE;
+    }
+    ATH_CHECK(appMgr->stopRun());
+  }
+  
+  return StatusCode::SUCCESS;
+    
+}
diff --git a/Reconstruction/RecAlgs/src/AppStopAlg.h b/Reconstruction/RecAlgs/src/AppStopAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..95e2aaea8079be80b4343da11ee7957c492ac3f4
--- /dev/null
+++ b/Reconstruction/RecAlgs/src/AppStopAlg.h
@@ -0,0 +1,42 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef RECALGS_APPSTOPALG_H
+#define RECALGS_APPSTOPALG_H
+
+// Gaudi includes
+#include "AthenaBaseComps/AthAlgorithm.h"
+
+/** @class AppStopAlg
+ * installs a signal handler and calls ApplicationMgr::stopRun() when caught
+*/
+
+class AppStopAlg : public AthAlgorithm
+{
+ public:
+  
+  /** Standard Athena-Algorithm Constructor */
+  AppStopAlg(const std::string& name, ISvcLocator* pSvcLocator);
+  
+  /** Default Destructor */
+  ~AppStopAlg() {};
+  
+  /** standard Athena-Algorithm method */
+  StatusCode          initialize();
+  /** standard Athena-Algorithm method */
+  StatusCode          execute();
+  /** standard Athena-Algorithm method */
+  StatusCode          finalize()
+  { return StatusCode::SUCCESS; };
+  
+ private:
+  StatusCode installHandler();
+  bool m_handlerInstalled=false;
+  /** member variables for algorithm properties: */
+  int m_signal;
+  bool m_installAfterFirst;
+
+};
+
+#endif 
diff --git a/Reconstruction/RecAlgs/src/components/RecAlgs_entries.cxx b/Reconstruction/RecAlgs/src/components/RecAlgs_entries.cxx
index 2115958331855865c56bba5c9fb670c3ef62debc..4c13d765500926bc208ca70e0caae4b865450b4e 100644
--- a/Reconstruction/RecAlgs/src/components/RecAlgs_entries.cxx
+++ b/Reconstruction/RecAlgs/src/components/RecAlgs_entries.cxx
@@ -2,9 +2,11 @@
 #include "../MemoryAlg.h"
 #include "../JobInfo.h"
 #include "../EventInfoUnlocker.h"
+#include "../AppStopAlg.h"
 
 DECLARE_COMPONENT( TimingAlg )
 DECLARE_COMPONENT( MemoryAlg )
 DECLARE_COMPONENT( JobInfo )
 DECLARE_COMPONENT( EventInfoUnlocker )
+DECLARE_COMPONENT( AppStopAlg )
 
diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
index 7665e383d6cfc74ad88b0450980ef4448b8135ea..ca0fb0dfd3d09e3c6330ee8f4aff43aba0e18597 100644
--- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
@@ -1358,12 +1358,12 @@ if ( rec.doAOD() or rec.doWriteAOD()) and not rec.readAOD() :
                 addClusterToCaloCellAOD("LArClusterEM7_11Nocorr")
 
             from egammaRec.egammaRecFlags import jobproperties
-            if ( rec.readESD() or jobproperties.egammaRecFlags.Enabled ) and not rec.ScopingLevel()==4  :
+            if ( rec.readESD() or jobproperties.egammaRecFlags.Enabled ) and not rec.ScopingLevel()==4 and rec.doEgamma :
                 from egammaRec import egammaKeys
                 addClusterToCaloCellAOD(egammaKeys.outputClusterKey())
 
             from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags
-            if rec.readESD() or muonCombinedRecFlags.doMuonClusters():
+            if ( rec.readESD() or muonCombinedRecFlags.doMuonClusters() ) and rec.doMuon:
                 addClusterToCaloCellAOD("MuonClusterCollection")
 
             if rec.readESD() or recAlgs.doTrackParticleCellAssociation():
@@ -1585,13 +1585,6 @@ if rec.doWriteBS():
     StreamBSFileOutput.ItemList += ["LUCID_DigitContainer#Lucid_Digits"]
 
 
-    # special SCT CABLING (ONLY FOR OLD FDR DATA)
-    #from InDetCabling.InDetCablingConf import SCT_CablingSelector
-    #SCT_CablingSelector = SCT_CablingSelector(Method = "MANUAL", Layout = "FromTextFile", Filename = "SCT_MC_FullCabling.dat")
-    #ToolSvc            += SCT_CablingSelector
-
-
-
     # LAr
     #        StreamBS.ItemList +=["LArRawChannels#*"]
     StreamBSFileOutput.ItemList +=["2721#*"]
@@ -1711,3 +1704,6 @@ if rec.readAOD():
 
 include("RecExCommon/RecoUtils.py")
 include("RecExCommon/PrintRecoSummary.py")
+
+from RecAlgs.RecAlgsConf import AppStopAlg
+topSequence+=AppStopAlg()
diff --git a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_egamma_fromESD.py b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_egamma_fromESD.py
new file mode 100644
index 0000000000000000000000000000000000000000..1d07e1c9bb095f782a196a825046636ca99be051
--- /dev/null
+++ b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_egamma_fromESD.py
@@ -0,0 +1,198 @@
+#
+#  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+#
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+
+#---------------------------------------------------------------------------------#
+# MT-specific code
+# Get number of processes and threads
+from AthenaCommon.ConcurrencyFlags import jobproperties as jp
+nThreads = jp.ConcurrencyFlags.NumThreads()
+nProc = jp.ConcurrencyFlags.NumProcs()
+
+if nThreads >=1 :
+   from AthenaCommon.AlgScheduler import AlgScheduler
+   AlgScheduler.OutputLevel( INFO )
+   AlgScheduler.ShowControlFlow( True )
+   AlgScheduler.ShowDataDependencies( True )
+   AlgScheduler.setDataLoaderAlg( 'SGInputLoader' )
+
+   # Support for the MT-MP hybrid mode
+   if (nProc > 0) :
+
+      from AthenaCommon.Logging import log as msg
+      if (theApp.EvtMax == -1) : 
+         msg.fatal('EvtMax must be >0 for hybrid configuration')
+         sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
+
+         if ( theApp.EvtMax % nProc != 0 ) :
+            msg.warning('EvtMax[%s] is not divisible by nProcs[%s]: MP Workers will not process all requested events',theApp.EvtMax,nProc)
+
+         chunkSize = int (theApp.EvtMax / nProc)
+
+         from AthenaMP.AthenaMPFlags import jobproperties as jps 
+         jps.AthenaMPFlags.ChunkSize= chunkSize
+         
+         msg.info('AthenaMP workers will process %s events each',chunkSize)
+
+   ## force loading of data. make sure this alg is at the front of the
+   ## AlgSequence
+   #
+   from SGComps.SGCompsConf import SGInputLoader
+   topSequence+=SGInputLoader(OutputLevel=DEBUG, ShowEventDump=False)
+
+# MT-specific code
+#---------------------------------------------------------------------------------#
+
+theApp.EvtMax = 20
+
+from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
+topSequence+=xAODMaker__EventInfoCnvAlg()
+
+#---------------------------------------------------------------------------------#
+# NEW Conditions access infrastructure
+#
+from IOVSvc.IOVSvcConf import CondInputLoader
+topSequence += CondInputLoader( "CondInputLoader", OutputLevel=DEBUG,  )
+
+import StoreGate.StoreGateConf as StoreGateConf
+svcMgr += StoreGateConf.StoreGateSvc("ConditionStore")
+
+from IOVSvc.IOVSvcConf import CondSvc
+svcMgr += CondSvc()
+# NEW Conditions access infrastructure
+#---------------------------------------------------------------------------------#
+
+# Make sure PerfMon is off
+include( "PerfMonGPerfTools/DisablePerfMon_jobOFragment.py" )
+
+# Input file
+dataFile = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc16_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s3170_r10572_homeMade.pool.root"
+
+from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
+athenaCommonFlags.FilesInput=[dataFile,dataFile]
+
+# AutoConfiguration
+from RecExConfig.RecFlags import rec
+rec.AutoConfiguration = ['everything']
+import RecExConfig.AutoConfiguration as auto
+auto.ConfigureFromListOfKeys(rec.AutoConfiguration())
+
+from RecExConfig.ObjKeyStore import objKeyStore, CfgKeyStore
+from RecExConfig.InputFilePeeker import inputFileSummary
+objKeyStore.addManyTypesInputFile(inputFileSummary['eventdata_itemsList'])
+
+#---------------------------------------------------------------------------------#
+# Detector Description
+
+import MagFieldServices.SetupField
+
+from AthenaCommon.GlobalFlags import globalflags
+globalflags.DetGeo = 'atlas'
+from AthenaCommon.DetFlags import DetFlags
+DetFlags.detdescr.all_setOff()
+DetFlags.detdescr.Muon_setOn()
+DetFlags.detdescr.ID_setOn()
+DetFlags.detdescr.Calo_setOn()
+if hasattr(DetFlags,'BField_on'): DetFlags.BField_setOn()
+from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc
+AtlasTrackingGeometrySvc  = svcMgr.AtlasTrackingGeometrySvc
+
+from AtlasGeoModel import SetGeometryVersion
+from AtlasGeoModel import GeoModelInit
+
+from LArGeoAlgsNV.LArGeoAlgsNVConf import LArDetectorToolNV
+from TileGeoModel.TileGeoModelConf import TileDetectorTool
+
+ServiceMgr.GeoModelSvc.DetectorTools += [ LArDetectorToolNV(ApplyAlignments = True, GeometryConfig = "RECO"),
+                                          TileDetectorTool(GeometryConfig = "RECO")
+                                          ]
+
+
+from CaloDetMgrDetDescrCnv import CaloDetMgrDDCnv
+
+include( "TileConditions/TileConditions_jobOptions.py" )
+
+include( "CaloConditions/LArTTCellMap_ATLAS_jobOptions.py")
+include( "CaloConditions/CaloTTIdMap_ATLAS_jobOptions.py")
+
+include( "LArConditionsCommon/LArConditionsCommon_MC_jobOptions.py" )
+include( "LArConditionsCommon/LArIdMap_MC_jobOptions.py" )
+from LArConditionsCommon import LArAlignable
+ServiceMgr.DetDescrCnvSvc.DecodeIdDict = True
+# Detector Description
+#---------------------------------------------------------------------------------#
+
+import AthenaPoolCnvSvc.ReadAthenaPool  #Maybe better to break up to get rid of MetaData stuff
+
+svcMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput()
+
+from GaudiAlg.GaudiAlgConf import EventCounter
+topSequence+=EventCounter(Frequency=2)
+
+from LArROD.LArRODFlags import larRODFlags
+larRODFlags.readDigits=False
+
+from CaloRec.CaloRecFlags import jobproperties
+jobproperties.CaloRecFlags.clusterCellGetterName = 'CaloRec.CaloCellGetter.CaloCellGetter'
+
+from CaloRec.CaloCellFlags import jobproperties
+jobproperties.CaloCellFlags.doLArDeadOTXCorr=False
+
+include( "CaloRec/CaloTopoCluster_jobOptions.py" )
+
+
+include( "McParticleAlgs/TruthParticleBuilder_jobOptions.py" )
+
+from egammaRec.egammaRecFlags import jobproperties
+
+include( "egammaRec/egammaRec_jobOptions.py" )
+
+import AthenaPoolCnvSvc.WriteAthenaPool
+logRecoOutputItemList_jobOptions = logging.getLogger( 'py:RecoOutputItemList_jobOptions' )
+from OutputStreamAthenaPool.OutputStreamAthenaPool import  createOutputStream
+
+StreamESD=createOutputStream("StreamESD","myESD.pool.root",True)
+include ("CaloRecEx/CaloRecOutputItemList_jobOptions.py")
+StreamESD.ItemList+=CaloESDList
+include ("egammaRec/egammaOutputItemList_jobOptions.py")
+StreamESD.ItemList+=egammaESDList
+
+print StreamESD.ItemList
+
+include ( "RecExRecoTest/RecExRecoTest_EgammaHiveRenames.py" )
+
+print "==========================================================================================\n"
+
+#
+## set which Algorithms can be cloned
+#
+# names of algs are:
+#  SGInputLoader
+#  xAODMaker::EventInfoCnvAlg
+#  EventCounter
+#  CaloCellMaker
+#  CmbTowerBldr
+#  CaloClusterMakerSWCmb
+#  CaloTopoCluster
+#  StreamESD
+
+#  set algCardinality = 1 to disable cloning for all Algs
+algCardinality = nThreads
+
+if (algCardinality > 1):   
+   for alg in topSequence:      
+      name = alg.name()
+      if name in ["CaloCellMaker","StreamESD"] :
+         # suppress INFO message about Alg unclonability
+         alg.Cardinality = 1
+      else:
+         alg.Cardinality = algCardinality
+           
+# MT-specific code
+#---------------------------------------------------------------------------------#
+
+
diff --git a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_noAlgs_fromESD.py b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_noAlgs_fromESD.py
new file mode 100644
index 0000000000000000000000000000000000000000..e8f01299e4e26a2cffda8c496c225ff08903129d
--- /dev/null
+++ b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_noAlgs_fromESD.py
@@ -0,0 +1,30 @@
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+athenaCommonFlags.FilesInput=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc16_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s3170_r10572_homeMade.pool.root"]
+
+from RecExConfig.RecFlags import rec
+rec.doEgamma.set_Value_and_Lock(False)
+rec.doMuon.set_Value_and_Lock(False)
+
+from CaloRec.CaloRecFlags import jobproperties
+jobproperties.CaloRecFlags.Enabled.set_Value_and_Lock(False)
+jobproperties.CaloRecFlags.doCaloCluster.set_Value_and_Lock(False)
+jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock(False)
+
+#this turns off CaloCluster2xAOD
+rec.doWritexAOD.set_Value_and_Lock(False)
+#nothing to say on these
+rec.doWriteTAG.set_Value_and_Lock(False)
+rec.doTruth.set_Value_and_Lock(False)
+rec.doAODCaloCells.set_Value_and_Lock(False)
+rec.doTrigger.set_Value_and_Lock(False)
+#Turns off xAODRingSetConfWriter
+rec.doCaloRinger.set_Value_and_Lock(False)
+
+#disables VertexCnvAlg
+from InDetRecExample.InDetJobProperties import jobproperties
+jobproperties.InDetJobProperties.doxAOD.set_Value_and_Lock(False)
+#Disables AllExecutedEvents
+rec.doFileMetaData.set_Value_and_Lock(False)
+
+athenaCommonFlags.EvtMax=10
+include ("RecExCommon/RecExCommon_topOptions.py")
diff --git a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_EgammaHiveRenames.py b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_EgammaHiveRenames.py
new file mode 100644
index 0000000000000000000000000000000000000000..6539ffcba8c5dacf33deaa2c4818088614bf1b5e
--- /dev/null
+++ b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_EgammaHiveRenames.py
@@ -0,0 +1,29 @@
+from SGComps.AddressRemappingSvc import addInputRename
+addInputRename ('xAOD::EventAuxInfo','EventInfoAux.', 'old_EventInfoAux.')
+addInputRename ('xAOD::EventInfo','EventInfo', 'old_EventInfo')
+addInputRename ('xAOD::CaloClusterContainer','CaloCalTopoClusters', 'old_CaloCalTopoClusters')
+addInputRename ('xAOD::CaloClusterAuxContainer','CaloCalTopoClustersAux.', 'old_CaloCalTopoClustersAux.')
+
+addInputRename ('xAOD::ElectronContainer','Electrons', 'old_Electrons')
+addInputRename ('xAOD::PhotonContainer','Photons', 'old_Photons')
+addInputRename ('xAOD::ElectronAuxContainer','ElectronsAux.', 'old_ElectronsAux.')
+addInputRename ('xAOD::PhotonAuxContainer','PhotonsAux.', 'old_PhotonsAux.')
+
+addInputRename ('xAOD::CaloClusterContainer','ForwardElectronClusters', 'old_ForwardElectronClusters')
+addInputRename ('xAOD::CaloClusterContainer','egammaClusters', 'old_egammaClusters')
+addInputRename ('xAOD::CaloClusterAuxContainer','ForwardElectronClustersAux.', 'old_ForwardElectronClustersAux.')
+addInputRename ('xAOD::CaloClusterAuxContainer','egammaClustersAux.', 'old_egammaClustersAux.')
+
+addInputRename ('xAOD::ElectronContainer','ForwardElectrons', 'old_ForwardElectrons')
+addInputRename ('xAOD::ElectronAuxContainer','ForwardElectronsAux.', 'old_ForwardElectronsAux.')
+addInputRename ('xAOD::TruthParticleContainer','egammaTruthParticles', 'old_egammaTruthParticles')
+addInputRename ('xAOD::TruthParticleAuxContainer','egammaTruthParticlesAux.', 'old_egammaTruthParticlesAux.')
+addInputRename ('xAOD::TrackParticleContainer','GSFTrackParticles', 'old_GSFTrackParticles')
+addInputRename ('xAOD::VertexContainer','GSFConversionVertices', 'old_GSFConversionVertices')
+addInputRename ('xAOD::TrackParticleAuxContainer','GSFTrackParticlesAux.', 'old_GSFTrackParticlesAux.')
+addInputRename ('xAOD::VertexAuxContainer','GSFConversionVerticesAux.', 'old_GSFConversionVerticesAux.')
+
+addInputRename ('TrackCollection','GSFTracks', 'old_GSFTracks')
+addInputRename ('CaloClusterCellLinkContainer','ForwardElectronClusters_links', 'old_ForwardElectronClusters_links')
+addInputRename ('CaloClusterCellLinkContainer','egammaClusters_links', 'old_egammaClusters_links')
+
diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_egamma_fromesd.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_egamma_fromesd.sh
new file mode 100755
index 0000000000000000000000000000000000000000..434a3557fcea787b00baf8c65b5529e306db5744
--- /dev/null
+++ b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_egamma_fromesd.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# art-description: Athena runs topoclustering from an ESD file
+# art-type: grid
+athena  RecExRecoTest/RecExRecoTest_ART_egamma_fromESD.py
+echo "art-result: $?"
diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_noalgs_fromesd.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_noalgs_fromesd.sh
new file mode 100755
index 0000000000000000000000000000000000000000..a61ec2edb87e15b8a2750048d80ec53d3f1c062c
--- /dev/null
+++ b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_noalgs_fromesd.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# art-description: Athena runs topoclustering from an ESD file
+# art-type: grid
+athena RecExRecoTest/RecExRecoTest_ART_noAlgs_fromESD.py
+echo "art-result: $?"
diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_pflow_and_jets_fromesd.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_pflow_and_jets_fromesd.sh
new file mode 100755
index 0000000000000000000000000000000000000000..426f6b22f442dc56e31eac1cb8068b978ac16bdb
--- /dev/null
+++ b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_pflow_and_jets_fromesd.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# art-description: Athena runs topoclustering from an ESD file
+# art-type: grid
+athena eflowRec/run_ESDStandardReco.py
+echo "art-result: $?"
diff --git a/Reconstruction/eflowRec/eflowRec/IEFlowCellEOverPTool.h b/Reconstruction/eflowRec/eflowRec/IEFlowCellEOverPTool.h
index 522fddcf63357c6fa18ec03cc0f80ca077133831..483aebd653e20bd23a1a63295024355ce52f49aa 100644
--- a/Reconstruction/eflowRec/eflowRec/IEFlowCellEOverPTool.h
+++ b/Reconstruction/eflowRec/eflowRec/IEFlowCellEOverPTool.h
@@ -41,6 +41,13 @@ class IEFlowCellEOverPTool : public AthAlgTool {
   virtual StatusCode execute(eflowEEtaBinnedParameters *binnedParameters) = 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 };
+
 };
 
 inline const InterfaceID& IEFlowCellEOverPTool::interfaceID()
diff --git a/Reconstruction/eflowRec/eflowRec/PFCellLevelSubtractionTool.h b/Reconstruction/eflowRec/eflowRec/PFCellLevelSubtractionTool.h
index f8346e146c071bd250db166f9afa530c7cbea611..bd8ce6775d45dffe6ebfb2fb5b10d38b138ae08e 100644
--- a/Reconstruction/eflowRec/eflowRec/PFCellLevelSubtractionTool.h
+++ b/Reconstruction/eflowRec/eflowRec/PFCellLevelSubtractionTool.h
@@ -83,6 +83,9 @@ public:
   /** Toggle whether to use updated 2015 charged shower subtraction, which disables the shower subtraction in high calorimeter energy density regions  */
   Gaudi::Property<bool> m_useUpdated2015ChargedShowerSubtraction{this,"useUpdated2015ChargedShowerSubtraction",true,"Toggle whether to use updated 2015 charged shower subtraction, which disables the shower subtraction in high calorimeter energy density region"};
 
+  /** Toggle whether we have the HLLHC setup */
+  Gaudi::Property<bool> m_isHLLHC{this,"isHLLHC",false,"Toggle whether we have the HLLHC setup"};
+
 };
 
 #endif 
diff --git a/Reconstruction/eflowRec/eflowRec/PFMatcher.h b/Reconstruction/eflowRec/eflowRec/PFMatcher.h
index 5a0d557d10f2792c332ad0cd5dd2482cb21c26a7..519f198e550664d84e91e85e1ea6c52d600a5857 100644
--- a/Reconstruction/eflowRec/eflowRec/PFMatcher.h
+++ b/Reconstruction/eflowRec/eflowRec/PFMatcher.h
@@ -119,10 +119,11 @@ std::vector<MatchDistance> TrackClusterMatcher::bestMatches(ITrack* track, const
           continue;
         }
 
-        /* Do not consider the same type (ECAL or HCAL) ones. */
+        /* Do not consider the same type (ECAL, HCAL or FCAL) ones. */
+	/* First we check if another ECAL, HCAL or FCAL cluster is found */ 
         if ((maskedType.size() != 0 && find(maskedType.begin(), maskedType.end(),
-                    thisCluster->getEfRecCluster()->getClusterType()) != maskedType.end())
-            || (thisCluster->getEfRecCluster()->getClusterType() == 3)) {
+					    thisCluster->getEfRecCluster()->getClusterType()) != maskedType.end())
+            || (thisCluster->getEfRecCluster()->getClusterType() == 4)) { /* then also veto if it is type 4, which means "unknown" type */
           continue;
         }
 
diff --git a/Reconstruction/eflowRec/eflowRec/PFRecoverSplitShowersTool.h b/Reconstruction/eflowRec/eflowRec/PFRecoverSplitShowersTool.h
index c9a353df71496aa80ca89a8ad8b169a204afd9a2..a1a0b7cce9f54765ccf59c5d56775ef900c3402c 100644
--- a/Reconstruction/eflowRec/eflowRec/PFRecoverSplitShowersTool.h
+++ b/Reconstruction/eflowRec/eflowRec/PFRecoverSplitShowersTool.h
@@ -81,6 +81,9 @@ private:
   /** Toggle whether to use updated 2015 charged shower subtraction, which disables the shower subtraction in high calorimeter energy density regions  */
   Gaudi::Property<bool> m_useUpdated2015ChargedShowerSubtraction{this,"useUpdated2015ChargedShowerSubtraction",true,"Toggle whether to use updated 2015 charged shower subtraction, which disables the shower subtraction in high calorimeter energy density region"};
   
+  /** Toggle whether we have the HLLHC setup */
+  Gaudi::Property<bool> m_isHLLHC{this,"isHLLHC",false,"Toggle whether we have the HLLHC setup"};
+  
 };
 
 #endif
diff --git a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_HLLHC.h b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_HLLHC.h
new file mode 100644
index 0000000000000000000000000000000000000000..a6483bd57f35fccb292a27510fe5a4e565e638c0
--- /dev/null
+++ b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_HLLHC.h
@@ -0,0 +1,35 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef EFLOWCELLEOVERPTOOL_MC12_HLLHC_H
+#define EFLOWCELLEOVERPTOOL_MC12_HLLHC_H
+
+#include "eflowRec/IEFlowCellEOverPTool.h"
+
+class eflowBaseParameters;
+
+/**
+Class to store reference e/p mean and widths, as well as reference energy density radial profile fit parameters. The data is input to an eflowEEtaBinnedParameters object in the execute method. Stores data at the uncalibrated (EM) scale and is for HLLHC setup. This inherits from IEFlowCellEOverPTool. The values are derived using single pions with the AMI tags e3895_s3020_r9063.
+*/
+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 finalize() ;
+
+ private:
+
+  std::vector<double>  m_eBinValues;
+  std::vector<double> m_etaBinBounds;
+  std::vector<std::string> m_eBinLabels;
+  std::vector<std::string> m_etaBinLabels;
+
+};
+#endif
diff --git a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h
index f687b3c5a8f554dcdce96c506e7697a3b403bb5b..fb5b042b92f2a92ddff39509265e5849160f1e93 100644
--- a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h
+++ b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h
@@ -38,27 +38,6 @@ class eflowCellEOverPTool_mc12_JetETMiss : public IEFlowCellEOverPTool {
 
  private:
 
-  std::vector<std::vector<std::vector<std::vector<std::vector<double> > > > > m_theEnergyEtaFirstIntLayerShapeParams;
-  std::vector<std::vector<double> > m_theLayerShapeParams;
-  std::vector<std::vector<std::vector<double> > > m_theEnergyEtaRingThicknesses;
-  std::vector<std::vector<double> > m_theRingThicknesses;
-  std::vector<double> m_theEOverPMeans;
-  std::vector<double> m_theEOverPStdDevs;
-  std::vector<std::vector<std::vector<double> > >  m_theEnergyEtaFirstIntLayerEOverPMeans;
-  std::vector<std::vector<std::vector<double> > >  m_theEnergyEtaFirstIntLayerEOverPStandardDeviations;
-  std::vector<std::vector<double> > m_test2;
-
-  //const int m_nEBins;
-  //const int m_nEtaBins;
-  //const int m_nFirstIntLayerBins;
-  //const int m_nCaloRegionBins;
-
-  enum E_BINS        { E001bin = 0, E003point5bin, E010bin, E020bin, E032point5bin, E040bin };
-    
-  enum ETA_BINS      { eta050bin = 0, eta100bin, eta150bin, eta250bin};
-
-  enum SHAPE_PARAMS  { NORM1 = 0, WIDTH1, NORM2, WIDTH2 };
-
   std::vector<double>  m_eBinValues;
   std::vector<double> m_etaBinBounds;
   std::vector<std::string> m_eBinLabels;
diff --git a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_LC.h b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_LC.h
index ac88b6f50952dd15a11f90ed7e3d75698e3b8d5f..fad7105eaeb4f3cce4fae60789296e945558e09e 100644
--- a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_LC.h
+++ b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_LC.h
@@ -38,27 +38,6 @@ class eflowCellEOverPTool_mc12_LC : public IEFlowCellEOverPTool {
 
  private:
 
-  std::vector<std::vector<std::vector<std::vector<std::vector<double> > > > > m_theEnergyEtaFirstIntLayerShapeParams;
-  std::vector<std::vector<double> > m_theLayerShapeParams;
-  std::vector<std::vector<std::vector<double> > > m_theEnergyEtaRingThicknesses;
-  std::vector<std::vector<double> > m_theRingThicknesses;
-  std::vector<double> m_theEOverPMeans;
-  std::vector<double> m_theEOverPStdDevs;
-  std::vector<std::vector<std::vector<double> > >  m_theEnergyEtaFirstIntLayerEOverPMeans;
-  std::vector<std::vector<std::vector<double> > >  m_theEnergyEtaFirstIntLayerEOverPStandardDeviations;
-  std::vector<std::vector<double> > m_test2;
-
-  //const int m_nEBins;
-  //const int m_nEtaBins;
-  //const int m_nFirstIntLayerBins;
-  //const int m_nCaloRegionBins;
-
-  enum E_BINS        { E001bin = 0, E003point5bin, E010bin, E020bin, E032point5bin, E040bin };
-    
-  enum ETA_BINS      { eta050bin = 0, eta100bin, eta150bin, eta250bin};
-
-  enum SHAPE_PARAMS  { NORM1 = 0, WIDTH1, NORM2, WIDTH2 };
-
   std::vector<double>  m_eBinValues;
   std::vector<double> m_etaBinBounds;
   std::vector<std::string> m_eBinLabels;
diff --git a/Reconstruction/eflowRec/eflowRec/eflowLayerIntegrator.h b/Reconstruction/eflowRec/eflowRec/eflowLayerIntegrator.h
index c7ab060aeda8cd2ffc205a8ab4f79f8292248350..0b40f27bde0bfa031ee4010784c422b4ade9cacc 100644
--- a/Reconstruction/eflowRec/eflowRec/eflowLayerIntegrator.h
+++ b/Reconstruction/eflowRec/eflowRec/eflowLayerIntegrator.h
@@ -36,9 +36,10 @@ class eflowLayerIntegrator {
 
  public:
 
-  eflowLayerIntegrator(double stdDev, double error, double rMaxOverStdDev);
+  eflowLayerIntegrator(double stdDev, double error, double rMaxOverStdDev, bool isHLLHC = false);
   eflowLayerIntegrator(const eflowLayerIntegrator& originalEflowLayerIntegrator);
   eflowLayerIntegrator&  operator=(const eflowLayerIntegrator& originalEflowLayerIntegrator);
+
   ~eflowLayerIntegrator();
 
   void measureNewClus(const xAOD::CaloCluster* clus, const eflowTrackCaloPoints& trackCalo);
@@ -58,6 +59,9 @@ class eflowLayerIntegrator {
 
   double m_rMax;
 
+  /* Defines whether we are in HLLHC (Run4) setup or not (Runs 1,2 or 3) */
+  bool m_isHLLHC;
+
   std::vector<double> m_allClustersIntegral;
   std::vector<double> m_singleClusterIntegral;
   
diff --git a/Reconstruction/eflowRec/eflowRec/eflowRecCluster.h b/Reconstruction/eflowRec/eflowRec/eflowRecCluster.h
index 8cab141828cd5f16c475d220fa4622e8f811fbf4..8f8d3b41b210e178e47c08822f64c94160c69092 100644
--- a/Reconstruction/eflowRec/eflowRec/eflowRecCluster.h
+++ b/Reconstruction/eflowRec/eflowRec/eflowRecCluster.h
@@ -62,13 +62,17 @@ public:
   const bool& isTouchable() { return m_isTouchable;}
 
 private:
+  /** ENUM that defines calorimeter regions as ECAL, HCAL or FCAL  */
+  enum CalorimeterType { CALORIMETER_START = 0, UNASSIGNED = CALORIMETER_START, ECAL = 1, HCAL = 2, FCAL = 3, UNKNOWN = 4, CALORIMETER_END = 5};
+  
   int m_clusterId;
   const xAOD::CaloCluster* m_cluster;
   ElementLink<xAOD::CaloClusterContainer> m_originalClusElementLink;
   ElementLink<xAOD::CaloClusterContainer> m_clusElementLink;
   bool m_isTouchable;
-  /* 1: ECAL, 2: HCAL */
-  int m_type;
+
+  /** Specifies if we have a cluster mainly in ECAL, HCAL or FCAL  */
+  CalorimeterType m_calorimeterType;
 
   /* for EM mode, LC weight for cells are retrieved before doing any subtraction; they will be used after subtraction */
   std::map<IdentifierHash,double> m_cellsWeightMap;
diff --git a/Reconstruction/eflowRec/eflowRec/eflowTrackCaloPoints.h b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloPoints.h
index 2fa0bf3ec14fa13c60508d66ef454ff54d1ab384..df8a04f73b2fa80769d46b9321c679389b9e1867 100644
--- a/Reconstruction/eflowRec/eflowRec/eflowTrackCaloPoints.h
+++ b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloPoints.h
@@ -44,7 +44,8 @@ class eflowTrackCaloPoints {
   const eflowEtaPhiPosition& getEM2etaPhiPos() const  {return getEtaPhiPos(getEM2Layer()); }
   double getEM2eta() const {return getEM2etaPhiPos().getEta(); }
   double getEM1eta() const {return getEtaPhiPos(getEM1Layer()).getEta(); }
-
+  double getFCAL0eta() const {return getEtaPhiPos(eflowCalo::FCAL0).getEta(); }
+  
   Amg::Vector3D getPosition(eflowCalo::LAYER layer);
   Amg::Vector3D getDirection(eflowCalo::LAYER layer);
 
diff --git a/Reconstruction/eflowRec/share/run_ESDStandardReco.py b/Reconstruction/eflowRec/share/run_ESDStandardReco.py
index edcf729fd3246caffde93f4723c2ca83e868651b..d7d4abca11459b8dece02413cfba831a9fc8b9d1 100644
--- a/Reconstruction/eflowRec/share/run_ESDStandardReco.py
+++ b/Reconstruction/eflowRec/share/run_ESDStandardReco.py
@@ -1,7 +1,7 @@
 #This file is to run standard reconstruction + pflow + jet finding on an ESD file
 
 from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-athenaCommonFlags.FilesInput=["/data/hodgkinson/dataFiles/mc16_13TeV/ESDFiles/mc16_valid.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.recon.ESD.e3698_s2995_r8905/ESD.10230993._000008.pool.root.1"]
+athenaCommonFlags.FilesInput=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc16_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s3170_r10572_homeMade.pool.root"]
 
 doDumpProperties=True
 
@@ -20,6 +20,6 @@ rec.doWriteTAG.set_Value_and_Lock(False)
 
 athenaCommonFlags.EvtMax=1
 #Run pflopw jet finding - this cannot be enabled via reconstruction flags currently! (without enabling other things we don't want)
-UserAlgs = ["jetAlgs.py"]
+UserAlgs = ["eflowRec/jetAlgs.py"]
 include ("RecExCommon/RecExCommon_topOptions.py")
 
diff --git a/Reconstruction/eflowRec/src/PFCellLevelSubtractionTool.cxx b/Reconstruction/eflowRec/src/PFCellLevelSubtractionTool.cxx
index 17a1a5c0926476e296fad507397b84f4ec264c22..9fe77e8b0876170c77e75b9609a0b74de7a1b1e4 100644
--- a/Reconstruction/eflowRec/src/PFCellLevelSubtractionTool.cxx
+++ b/Reconstruction/eflowRec/src/PFCellLevelSubtractionTool.cxx
@@ -65,7 +65,11 @@ StatusCode PFCellLevelSubtractionTool::initialize(){
     msg(MSG::WARNING) << "Cannot find PFTrackClusterMatchingTool_2" << endmsg;
   }
 
-  m_integrator = std::make_unique<eflowLayerIntegrator>(0.032, 1.0e-3, 3.0);
+  const double gaussianRadius = 0.032;
+  const double gaussianRadiusError = 1.0e-3;
+  const double maximumRadiusSigma = 3.0;
+
+  m_integrator = std::make_unique<eflowLayerIntegrator>(gaussianRadius, gaussianRadiusError, maximumRadiusSigma, m_isHLLHC);
   m_binnedParameters = std::make_unique<eflowEEtaBinnedParameters>();
   
   sc = m_theEOverPTool->execute(m_binnedParameters.get());
diff --git a/Reconstruction/eflowRec/src/PFRecoverSplitShowersTool.cxx b/Reconstruction/eflowRec/src/PFRecoverSplitShowersTool.cxx
index 7faf99161894c91322b67fef07486a4e8d9819e3..52d28929c3ab66f31bc65b09b98f04f83204c062 100644
--- a/Reconstruction/eflowRec/src/PFRecoverSplitShowersTool.cxx
+++ b/Reconstruction/eflowRec/src/PFRecoverSplitShowersTool.cxx
@@ -31,7 +31,6 @@ PFRecoverSplitShowersTool::PFRecoverSplitShowersTool(const std::string& type,con
   m_rCell(0.75),
   m_windowRms(0.032),
   m_binnedParameters(std::make_unique<eflowEEtaBinnedParameters>()),
-  m_integrator(std::make_unique<eflowLayerIntegrator>(m_windowRms, 1.0e-3, 3.0)),
   m_nTrackClusterMatches(0)
 {
   eflowRingSubtractionManager::setRMaxAndWeightRange(m_rCell, 1.0e6);
@@ -56,6 +55,12 @@ StatusCode PFRecoverSplitShowersTool::initialize(){
     return StatusCode::SUCCESS;
   }
 
+  const double gaussianRadius = 0.032;
+  const double gaussianRadiusError = 1.0e-3;
+  const double maximumRadiusSigma = 3.0;
+  
+  m_integrator = std::make_unique<eflowLayerIntegrator>(gaussianRadius, gaussianRadiusError, maximumRadiusSigma, m_isHLLHC);
+
   return StatusCode::SUCCESS;
 }
 
diff --git a/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx b/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx
index c411864c269a17135e73e0ced9c59a02b09aeb06..312ccc01ec831f3310bdd89ae64ac1809c70a3e1 100644
--- a/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx
+++ b/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx
@@ -2,6 +2,7 @@
 #include "eflowRec/eflowTrackCaloDummyExtensionTool.h"
 #include "eflowRec/PFTrackClusterMatchingTool.h"
 #include "eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h"
+#include "eflowRec/eflowCellEOverPTool_mc12_HLLHC.h"
 #include "eflowRec/eflowCellEOverPTool_mc12_LC.h"
 #include "eflowRec/eflowOverlapRemoval.h"
 #include "eflowRec/PFLeptonSelector.h"
@@ -33,6 +34,5 @@ DECLARE_COMPONENT( eflowTrackCaloExtensionTool )
 DECLARE_COMPONENT( eflowTrackCaloDummyExtensionTool )
 DECLARE_COMPONENT( PFTrackClusterMatchingTool )
 DECLARE_COMPONENT( eflowCellEOverPTool_mc12_JetETMiss)
+DECLARE_COMPONENT(  eflowCellEOverPTool_mc12_HLLHC)
 DECLARE_COMPONENT( eflowCellEOverPTool_mc12_LC)
-
-
diff --git a/Reconstruction/eflowRec/src/eflowCaloObject.cxx b/Reconstruction/eflowRec/src/eflowCaloObject.cxx
index 622c74e81ae68592fed7aef4f25f33e6f5c8cc5a..f2d383ae894ff22b73e110b282d55d1c20440907 100644
--- a/Reconstruction/eflowRec/src/eflowCaloObject.cxx
+++ b/Reconstruction/eflowRec/src/eflowCaloObject.cxx
@@ -66,6 +66,11 @@ void eflowCaloObject::simulateShower(eflowLayerIntegrator *integrator, eflowEEta
     }
 
     double trackEM1eta = thisEfRecTrack->getTrackCaloPoints().getEM1eta();
+    /* if a track is in the forward EM (2.5 < eta < 3.2) then there is no EM1 -> need to use EM2 */
+    if(trackEM1eta<-998.) trackEM1eta = thisEfRecTrack->getTrackCaloPoints().getEM2eta();
+    /* if a track is not in the EM region (3.2 < eta < 4.0) then should use FCAL0 */
+    if(trackEM1eta<-998.) trackEM1eta = thisEfRecTrack->getTrackCaloPoints().getFCAL0eta();
+
     double trackE = thisEfRecTrack->getTrack()->e();
 
     if (!binnedParameters->binExists(trackE, trackEM1eta)) {
diff --git a/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_HLLHC.cxx b/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_HLLHC.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..a38b6d6bc47832483ac74770c282c25a80b68c4e
--- /dev/null
+++ b/Reconstruction/eflowRec/src/eflowCellEOverPTool_mc12_HLLHC.cxx
@@ -0,0 +1,5279 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "eflowRec/eflowEEtaBinnedParameters.h"
+#include "eflowRec/eflowCellEOverPTool_mc12_HLLHC.h"
+#include "eflowRec/eflowCaloRegions.h"
+
+#include "GaudiKernel/SystemOfUnits.h"
+
+#include <vector>
+#include <iomanip>
+#include <sstream>
+
+eflowCellEOverPTool_mc12_HLLHC::eflowCellEOverPTool_mc12_HLLHC(const std::string& type,const std::string& name,const IInterface* parent) : IEFlowCellEOverPTool( type, name, parent) {
+
+  declareInterface<IEFlowCellEOverPTool>(this);
+
+  m_eBinValues.push_back(  1.0*Gaudi::Units::GeV );
+  m_eBinValues.push_back( 3.5*Gaudi::Units::GeV );
+  m_eBinValues.push_back( 10.0*Gaudi::Units::GeV );
+  m_eBinValues.push_back( 25.0*Gaudi::Units::GeV );
+  m_eBinValues.push_back( 32.5*Gaudi::Units::GeV );
+  m_eBinValues.push_back( 40.0*Gaudi::Units::GeV );
+
+  for (double x = 0.0; x < 2.0; x+=0.5) {
+    m_etaBinBounds.push_back(x);
+  }
+  m_etaBinBounds.push_back(2.5);
+  m_etaBinBounds.push_back(3.5);
+  m_etaBinBounds.push_back(4.0);
+}
+
+StatusCode eflowCellEOverPTool_mc12_HLLHC::initialize(){
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode eflowCellEOverPTool_mc12_HLLHC::execute(eflowEEtaBinnedParameters *binnedParameters){
+
+  if (binnedParameters) {
+    
+    binnedParameters->initialise(m_eBinValues, m_etaBinBounds);
+
+    ////////////////////////////
+    //      0 <= eta <  0.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0168204);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,1.25334);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0271471);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,0.663936);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0189791);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,5.53498e-12);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0316743);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.0203202);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0196479);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,6.94375e-14);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.036906);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.00835219);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0264806);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.0044585);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0791346);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.000400347);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0212892);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.000303684);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0730744);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0258821);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,1.45001e-11);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.043646);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,2.21009);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0134251);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,1.10769);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0164651);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.0624758);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.020866);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,6.16482e-13);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0317775);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.0115304);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0311416);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.00862162);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0391306);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0195858);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.235161);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.032395);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.380046);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0126418);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.188588);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.0154497);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.361352);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.021527);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,1.89128e-16);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.0425202);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.404778);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0320893);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,4.62233e-16);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0534411);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.0184951);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0309242);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.0120615);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0479672);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.000868798);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.0519249);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,0.000587644);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0849451);
+
+
+   // j1st = EME1
+
+
+
+
+   // j1st = EME2
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0138596);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.0534621);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0256467);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.161996);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0148295);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,7.89294e-05);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.0915887);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0245581);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.00865135);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,0.0191107);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.0173007);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.583746);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0269363);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.433412);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0413036);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0398166);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0381357);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,2.14169e-12);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0554185);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.00278402);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0322164);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,0.00215081);
+    binnedParameters->setShapeParam( E001bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0973158);
+    ////////////////////////////
+    //      0.5 <= eta <  1.0   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0156099);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.808449);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0267883);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,0.435437);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0160278);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.211776);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0183567);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.0185577);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0247299);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,3.72713e-15);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0481121);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.00570054);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0426672);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.00351536);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0554037);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0171953);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.151554);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0286717);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,1.43369);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0215994);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,1.67493e-09);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0352575);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.0497882);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.022884);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.0185839);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0288421);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.0123494);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0451839);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.00635336);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0564201);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0303991);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.000362163);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,100);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.30696);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0131204);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.166569);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.0158926);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.399002);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.0169557);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.2238);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.0218754);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.164223);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0320828);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.107628);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0490205);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.00587084);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0309042);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.00389205);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0593085);
+
+
+   // j1st = EME1
+
+
+
+
+   // j1st = EME2
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0343823);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,2.41034e-12);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0509397);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0292083);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0309945);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.0229514);
+    binnedParameters->setShapeParam( E001bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0378671);
+    ////////////////////////////
+    //      1.0 <= eta <  1.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.016814);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.540101);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0266796);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,0.359921);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0181035);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,1.77937e-06);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,98.1747);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.0187861);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0267296);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,2.17679e-13);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0418478);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.0012833);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0407267);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.000841242);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0497419);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0183531);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.124575);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0279988);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,2.0004);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0119676);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,1.17914);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0143852);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.0582675);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0190325);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.0317971);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0235254);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.00582294);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0288492);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.00437983);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0452182);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0172759);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.217393);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0333402);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.306666);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.0160616);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.216629);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.0190399);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.0461627);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0562768);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.0207018);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0657336);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.00149515);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0641968);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.000783497);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0715853);
+
+
+   // j1st = EME1
+    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 ); 
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0335637);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.0558209);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0443118);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0174255);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0416614);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,1.5816e-12);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0580952);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.0034654);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0433706);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,1.91116e-10);
+    binnedParameters->setShapeParam( E001bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0594901);
+    ////////////////////////////
+    //      1.5 <= eta <  2.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+
+
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM1,0.00724761);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH1,0.0548047);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM2,0.00255358);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH2,0.0860387);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.00124882);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.190155);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,5.35791e-07);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,1.71129);
+
+
+   // j1st = EMB2
+
+
+
+
+   // j1st = EMB3
+
+
+
+
+   // j1st = EME1
+    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);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, WIDTH1,0.0159687);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, NORM2,1.34623);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, WIDTH2,0.0229601);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, NORM1,0.0589921);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, WIDTH1,0.0158155);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, NORM2,3.87065e-09);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, WIDTH2,0.0212464);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, NORM1,0.0358702);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, WIDTH1,0.0297682);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, NORM2,0.0239638);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, WIDTH2,0.0455734);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, NORM1,0.0114182);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, WIDTH1,0.188175);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, NORM2,6.75831e-06);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, WIDTH2,37.6017);
+
+
+   // j1st = EME2
+    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);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, WIDTH1,0.0150168);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, NORM2,0.276339);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, WIDTH2,0.0271537);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, NORM1,0.182221);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, WIDTH1,0.0133989);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, NORM2,0.131511);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, WIDTH2,0.0166971);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, NORM1,0.0728284);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, WIDTH1,0.0171654);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, NORM2,0.0524122);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, WIDTH2,0.0308567);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, NORM1,0.00135954);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, WIDTH1,0.188377);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, NORM2,6.77379e-07);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, WIDTH2,21.542);
+
+
+   // j1st = EME3
+    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);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, WIDTH1,0.0273051);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, NORM2,0.502539);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, WIDTH2,0.0376906);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, NORM1,0.00853938);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, WIDTH1,0.45);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, NORM2,0.00165487);
+    binnedParameters->setShapeParam( E001bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, WIDTH2,100);
+
+
+   // j1st = HEC
+    binnedParameters->setFudgeMean( E001bin, eta250bin, eflowFirstIntRegions::HEC, 0.000000 ); 
+    binnedParameters->setFudgeStdDev( E001bin, eta250bin, eflowFirstIntRegions::HEC, 0.000000 ); 
+
+
+
+
+   // j1st = Tile
+
+
+    ////////////////////////////
+    //      0 <= eta <  0.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0163051);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,1.12042);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0431609);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,0.586798);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0147808);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.230807);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0457591);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.025757);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0396094);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,1.20506e-11);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0597906);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.0636316);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0563992);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.0433544);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0646537);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.0189566);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0506081);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.0144211);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0611632);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM1,0.00318928);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH1,0.0496917);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM2,0.00230189);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH2,0.0580063);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0151245);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.182582);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0294892);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,2.13156);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0128634);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,0.876613);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0173541);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.0751431);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0168211);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.03546);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0292961);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.0536873);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0560957);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,2.62402e-09);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0642689);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.0109966);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0447182);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,0.000407257);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.0886383);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM1,0.0026831);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH1,0.0422008);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM2,1.01313e-07);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH2,100);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0153559);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.109587);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0305993);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.597489);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0122659);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.00397483);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.0462338);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.288587);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.0209442);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,6.22038e-05);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.0947991);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.443061);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0367057);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.276648);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0489165);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.0430324);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0387216);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.0263116);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0479872);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.00356521);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.0466604);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,0.00288499);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0596275);
+
+
+   // j1st = EME1
+
+
+
+
+   // j1st = EME2
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.046663);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,9.00573e-10);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0615625);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.365771);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0116307);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,0.0196174);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.0526727);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0241309);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0132287);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,2.93404e-05);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.24575);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.548824);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0315008);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.355506);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0542414);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0666754);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0476401);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.0336508);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0540582);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.00879835);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0434908);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,0.00695046);
+    binnedParameters->setShapeParam( E003point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0577408);
+    ////////////////////////////
+    //      0.5 <= eta <  1.0   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0404413);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,2.09284e-10);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0592775);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,0.446213);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0159506);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.127674);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0474695);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.0247545);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.010705);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,0.0150163);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0516894);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.0422736);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0698411);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.0120804);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0746947);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.00298504);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0627866);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.0010503);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0668908);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM1,0.000401819);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH1,0.0674418);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM2,0.000253859);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH2,0.0762671);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0176177);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.1142);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0353907);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,1.50849);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0168855);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,0.000911174);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0757216);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.0653476);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0223868);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.0231897);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0316196);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.0381943);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0424628);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.0219708);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0497537);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.00251685);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0476216);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,0.00115537);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.0597969);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0211553);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.0789882);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0456678);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.544969);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0173078);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.00418027);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.0591932);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.386584);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.0127227);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.255357);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.0229685);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.243719);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0458036);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,7.2292e-14);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.061688);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.0201373);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0423654);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.0115447);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.049243);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.00145989);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.0482276);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,0.00111997);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0701061);
+
+
+   // j1st = EME1
+
+
+
+
+   // j1st = EME2
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0169458);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.0592545);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.044326);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.265112);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0136897);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,0.00660444);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.0544958);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0301779);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.012885);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,0.00686981);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.046152);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.529264);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.044202);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,5.82567e-05);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.20014);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0282497);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0688898);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.00711749);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0810541);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.0055954);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0717456);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,1.10729e-06);
+    binnedParameters->setShapeParam( E003point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,3.78592);
+    ////////////////////////////
+    //      1.0 <= eta <  1.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0211489);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.373319);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.053205);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,0.416507);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0135327);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.113642);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0530699);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.0217858);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0483019);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,8.02195e-11);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0578879);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM1,0.0587616);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH1,0.058959);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM2,9.03463e-10);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH2,0.0775054);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM1,0.00153442);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH1,0.361609);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM2,3.31998e-10);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH2,32.0691);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.0140964);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0686344);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.00482143);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.072399);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.00179167);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0792087);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.000558903);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0844355);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM1,0.000468176);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH1,0.0747588);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM2,0.000320548);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH2,0.0856648);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0176591);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.0939267);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0364501);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,2.19448);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.00933317);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,1.15722);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0171829);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.062551);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0287651);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.000128159);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.090063);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.0131508);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0447349);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.00696293);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.067602);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.00172008);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.047677);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,0.000868349);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.0536292);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.016321);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.0905572);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0340535);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.40404);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0140158);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,2.24734e-05);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,100);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.474099);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.0228371);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.000262616);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.126311);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, NORM1,0.366807);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, WIDTH1,0.0348501);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, NORM2,8.57729e-10);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, WIDTH2,0.0536777);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, NORM1,1.09793);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, WIDTH1,0.0128531);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, NORM2,0.00535363);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, WIDTH2,0.35329);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, NORM1,299.656);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, WIDTH1,0.0224636);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, NORM2,0.108199);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, WIDTH2,0.0570538);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.0860347);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.036449);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.0517141);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.053564);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.00476957);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0188928);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.00451606);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0730821);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.000350296);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.118436);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,8.87913e-05);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.131158);
+
+
+   // j1st = EME1
+    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 ); 
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0222098);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.00534601);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0780049);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.201252);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0136194);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,0.00100958);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.0848644);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0463383);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0186511);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,0.00355049);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.0636113);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM1,0.0124098);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH1,0.0697969);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM2,2.02768e-05);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH2,43.0469);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.185515);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0295411);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.117274);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0468);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0257123);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.042705);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,1.12688e-12);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0613129);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.00465345);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0452127);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,6.02903e-11);
+    binnedParameters->setShapeParam( E003point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0614419);
+    ////////////////////////////
+    //      1.5 <= eta <  2.5   //
+    ////////////////////////////
+
+
+   // j1st = EMB1
+
+
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM1,0.00458102);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH1,0.0145426);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM2,1.88805e-15);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH2,0.5599);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM1,0.0019465);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH1,0.218184);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM2,8.23078e-07);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH2,7.60627);
+
+
+   // j1st = EMB2
+
+
+
+
+   // j1st = EMB3
+
+
+
+
+   // j1st = EME1
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, WIDTH1,0.0174439);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, NORM2,1.92293);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, WIDTH2,0.0420891);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, NORM1,1.88636);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, WIDTH1,0.0119581);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, NORM2,0.784414);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, WIDTH2,0.0412051);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, NORM1,0.086613);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, WIDTH1,0.0108126);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, NORM2,0.0445219);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, WIDTH2,0.0431278);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, NORM1,0.099347);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, WIDTH1,0.0645505);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, NORM2,0.0338671);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, WIDTH2,0.07);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, NORM1,0.0464464);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, WIDTH1,0.066873);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, NORM2,0.0202846);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, WIDTH2,0.0750935);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, NORM1,0.00370922);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, WIDTH1,0.0855148);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, NORM2,0.00148092);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, WIDTH2,0.098304);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, NORM1,0.000395498);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, WIDTH1,0.45);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, NORM2,0.000137124);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, WIDTH2,99.9999);
+
+
+   // j1st = EME2
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, WIDTH1,0.0155112);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, NORM2,0.296018);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, WIDTH2,0.0317198);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, NORM1,8.5939);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, WIDTH1,0.0161733);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, NORM2,0.128641);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, WIDTH2,0.0554278);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, NORM1,0.324516);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, WIDTH1,0.0197057);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, NORM2,0.106326);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, WIDTH2,0.0495868);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, NORM1,0.143272);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, WIDTH1,0.0566275);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, NORM2,0.0568543);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, WIDTH2,0.062271);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, NORM1,0.0814092);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, WIDTH1,0.0673488);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, NORM2,0.0406843);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, WIDTH2,0.073446);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, NORM1,0.00720591);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, WIDTH1,0.071149);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, NORM2,0.00348804);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, WIDTH2,0.0807755);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, NORM1,0.00397349);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, WIDTH1,0.0948414);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, NORM2,0.000734123);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, WIDTH2,0.102828);
+
+
+   // j1st = EME3
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, WIDTH1,0.0311642);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, NORM2,0.1124);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, WIDTH2,0.0387052);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, NORM1,3.24687);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, WIDTH1,0.0132041);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, NORM2,0.0280368);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, WIDTH2,0.0559469);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, NORM1,3.20326);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, WIDTH1,0.0158991);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, NORM2,1.72949);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, WIDTH2,0.02414);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, NORM1,1.02871);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, WIDTH1,0.0346604);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, NORM2,0.630881);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, WIDTH2,0.0566312);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, NORM1,0.114741);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, WIDTH1,0.0368067);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, NORM2,0.0771602);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, WIDTH2,0.0443537);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, NORM1,0.00622442);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, WIDTH1,0.042518);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, NORM2,5.37162e-12);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, WIDTH2,0.0595713);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, NORM1,0.000489715);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, WIDTH1,0.381595);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, NORM2,8.33367e-05);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, WIDTH2,0.384994);
+
+
+   // j1st = HEC
+    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);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, WIDTH1,0.0456957);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, NORM2,1.60367e-11);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, WIDTH2,0.0620157);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, NORM1,0.5221);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, WIDTH1,0.0542033);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, NORM2,2.33832e-13);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, WIDTH2,0.0637572);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, NORM1,0.238457);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, WIDTH1,0.0462337);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, NORM2,1.8411e-10);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, WIDTH2,0.0622381);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM1,1.81159);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH1,0.0696539);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM2,8.75491e-12);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH2,0.0695807);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM1,2.30227);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH1,0.0620773);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM2,0.712492);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH2,0.0795494);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM1,0.280207);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH1,0.0704436);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM2,0.0959456);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH2,0.0748832);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, NORM1,0.10217);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, WIDTH1,0.0509335);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, NORM2,0.0389563);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, WIDTH2,0.0820412);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM1,0.0356129);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH1,0.0412401);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM2,0.0206591);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH2,0.0518396);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM1,0.0109973);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH1,0.039154);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM2,0.00669246);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH2,0.0543702);
+
+
+   // j1st = Tile
+
+
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM1,0.014411);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH1,0.0147906);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM2,0.00950171);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH2,0.0243858);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM1,0.00286624);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH1,0.201153);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM2,1.22956e-06);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH2,1.74394);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.0117055);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0305104);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,1.10007e-10);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0489894);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.00110908);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0560136);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.000829553);
+    binnedParameters->setShapeParam( E003point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0693709);
+    ////////////////////////////
+    //      0 <= eta <  0.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0264147);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.791667);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0447015);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,1.74367);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0312494);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.0155367);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0583005);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.0506118);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0387003);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,1.30443e-12);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0591039);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.257556);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0457905);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.147931);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.053561);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.0497407);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0457296);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,2.10153e-11);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0619428);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM1,0.00987725);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH1,0.0413989);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM2,0.00707126);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH2,0.0504321);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0262505);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.163512);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0428703);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,2.60076);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0189702);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,0.0305073);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0464687);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.158106);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0203088);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.0598946);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.031921);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.220037);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0454751);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,7.20622e-14);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.062655);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.0359768);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0424384);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,9.57033e-12);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.060766);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM1,0.00521616);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH1,0.0455598);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM2,3.83091e-14);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH2,0.0616888);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0170635);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.103371);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0405007);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.561538);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0100085);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.134143);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.030998);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.234464);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.0101076);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.155732);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.0226077);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.481828);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0285387);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.37224);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0416412);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.0760033);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0392878);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,3.52227e-12);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0586419);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.00729375);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.0390991);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,0.0053566);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0489968);
+
+
+   // j1st = EME1
+
+
+
+
+   // j1st = EME2
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0155222);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.0940428);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0493488);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.37723);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0121414);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,0.0404692);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.0438888);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0306165);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0123617);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,0.0147644);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.0277508);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.695735);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0275237);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.531432);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0438924);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.129321);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.027756);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.0971365);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0387448);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.0136531);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0410244);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,0.0112152);
+    binnedParameters->setShapeParam( E010bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0511111);
+    ////////////////////////////
+    //      0.5 <= eta <  1.0   //
+    ////////////////////////////
+
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0220805);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.972506);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0423516);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,0.86905);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0333982);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.141036);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0430651);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.0510567);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0430306);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,2.4439e-15);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0608037);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.134676);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.051376);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.0814807);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0587628);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.0190709);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0499105);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.0116366);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0576878);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM1,0.00164961);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH1,0.0516156);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM2,0.00123942);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH2,0.0606703);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.021036);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.12303);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0419191);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,1.87103);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0176736);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,0.00732167);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0560577);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.108894);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0213373);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.0366756);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0346895);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.0869118);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0476519);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.0512302);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0544952);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.0108252);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0447457);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,0.00654401);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.0522346);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0465488);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,1.31824e-10);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0613212);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.519179);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0116016);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.128661);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.0287316);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.379677);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.0111537);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.256543);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.0245121);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.287154);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0366949);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.179849);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0510882);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.0349159);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0393902);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.0214494);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0497507);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.00189587);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.0445635);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,0.00141012);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0551907);
+
+
+   // j1st = EME1
+
+
+
+
+   // j1st = EME2
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0442725);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,1.04335e-10);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0618364);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.304626);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.00946568);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,0.0772496);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.0391326);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0464627);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0323949);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,4.60511e-06);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,1.18441);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.648665);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0302429);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.476018);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0445259);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0570575);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0406443);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.0352308);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0475855);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.00782868);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0458018);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,0.0052633);
+    binnedParameters->setShapeParam( E010bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0548087);
+    ////////////////////////////
+    //      1.0 <= eta <  1.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0232748);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.562818);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0482167);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,0.552515);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0410349);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.0280215);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0475267);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.0270376);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0468892);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,0.00601263);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0489855);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM1,0.0278002);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH1,0.063943);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM2,1.73426e-09);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH2,0.067019);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM1,0.00422421);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH1,0.0538067);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM2,0.00295251);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH2,0.0646187);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC4, NORM1,0.0305991);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC4, WIDTH1,0.143847);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC4, NORM2,1.62703e-05);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC4, WIDTH2,0.191941);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.0305965);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0550051);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.0205343);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0622774);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.00490065);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.058384);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.00340977);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0649425);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0404948);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,9.76601e-12);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0611764);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,2.7971);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0147703);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,0.255061);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0392313);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.0928868);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0294416);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.0204564);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.041184);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, NORM1,0.0590927);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, WIDTH1,0.0120044);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, NORM2,0.0266221);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, WIDTH2,0.0575838);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, NORM1,0.00950486);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, WIDTH1,0.0766625);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, NORM2,1.00831e-06);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, WIDTH2,89.8731);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC3, NORM1,0.00125205);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC3, WIDTH1,0.340479);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC3, NORM2,2.91253e-14);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC3, WIDTH2,37.3823);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.035015);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0523895);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.0217389);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0590855);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.00434122);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0568257);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,0.00273717);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.0641086);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0154937);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.0609738);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0530026);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.442581);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0111968);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.0862074);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.0426281);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.524073);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.0124265);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.326695);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.0259184);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, NORM1,0.0387601);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, WIDTH1,0.0569221);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, NORM2,2.65288e-05);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, WIDTH2,29.8963);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, NORM1,0.0372308);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, WIDTH1,0.0378605);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, NORM2,9.26293e-11);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, WIDTH2,0.0523843);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, NORM1,278.088);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, WIDTH1,0.0205206);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, NORM2,0.108545);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, WIDTH2,0.0569066);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.200939);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0434414);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.111024);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0558184);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.013543);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0568308);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.00640424);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0637356);
+
+
+   // j1st = EME1
+    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 ); 
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM1,0.136382);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH1,0.0448769);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM2,5.47603e-06);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH2,0.047752);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM1,0.0018476);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH1,0.0854441);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM2,2.72158e-12);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH2,99.8487);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM1,0.0762528);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH1,0.0447318);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM2,1.32456e-11);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH2,0.0603275);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM1,0.100018);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH1,0.0419884);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM2,0.0786916);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH2,0.0557095);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM1,0.0266601);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH1,0.0693337);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM2,1.1751e-06);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH2,0.0694083);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM1,0.181088);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH1,0.0514933);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM2,0.0899712);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH2,0.0568709);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM1,0.0187196);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH1,0.0556232);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM2,0.00933904);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH2,0.0606709);
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0485295);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,9.07744e-12);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0623686);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.125739);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0424995);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,8.81662e-13);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.0617634);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0573944);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0345456);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,4.28562e-11);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.0532603);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM1,0.0866207);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH1,0.0317206);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM2,0.0726558);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH2,0.0600944);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM1,0.00484889);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH1,0.0784019);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM2,0.00337335);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH2,0.100586);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM1,445969);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH1,0.00635418);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM2,0.0392434);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH2,0.0541595);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.267861);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0314505);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.172691);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0543714);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0563838);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0445705);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.0329435);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.053013);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.00919329);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0502742);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,0.00624208);
+    binnedParameters->setShapeParam( E010bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0658234);
+    ////////////////////////////
+    //      1.5 <= eta <  2.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+
+
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM1,0.0511672);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0173667);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.0365299);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0426034);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM1,0.0111146);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH1,0.0596594);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM2,0.0049117);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH2,0.0743571);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM1,0.000381564);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH1,0.0342217);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM2,0.00025611);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH2,0.0525073);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC4, NORM1,3353.53);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC4, WIDTH1,0.000895537);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC4, NORM2,0.0803427);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC4, WIDTH2,0.0710168);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.00121142);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.124225);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,2.21386e-05);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.126535);
+
+
+   // j1st = EMB2
+
+
+
+
+   // j1st = EMB3
+
+
+
+
+   // j1st = EME1
+    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);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, WIDTH1,0.0239174);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, NORM2,1.70041);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, WIDTH2,0.0502026);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, NORM1,4.9675);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, WIDTH1,0.0383672);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, NORM2,0.560446);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, WIDTH2,0.0489854);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, NORM1,0.325845);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, WIDTH1,0.046213);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, NORM2,2.75898e-11);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, WIDTH2,0.0613053);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, NORM1,0.533422);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, WIDTH1,0.0530403);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, NORM2,0.266806);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, WIDTH2,0.0692005);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, NORM1,0.609148);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, WIDTH1,0.0517168);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, NORM2,0.255356);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, WIDTH2,0.0678099);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, NORM1,0.0687165);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, WIDTH1,0.0612782);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, NORM2,0.0299398);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, WIDTH2,0.0696185);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, NORM1,0.015527);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, WIDTH1,0.0638857);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, NORM2,0.0071023);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, WIDTH2,0.0744424);
+
+
+   // j1st = EME2
+    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);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, WIDTH1,0.0256319);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, NORM2,0.246536);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, WIDTH2,0.0531167);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, NORM1,10.8857);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, WIDTH1,0.0178785);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, NORM2,0.89118);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, WIDTH2,0.0457925);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, NORM1,0.667654);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, WIDTH1,0.0263233);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, NORM2,0.11678);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, WIDTH2,0.0548898);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, NORM1,0.421174);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, WIDTH1,0.0480662);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, NORM2,0.167724);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, WIDTH2,0.0768477);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, NORM1,0.225175);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, WIDTH1,0.0641018);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, NORM2,0.101274);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, WIDTH2,0.0713283);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, NORM1,0.0258046);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, WIDTH1,0.0574324);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, NORM2,0.0140833);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, WIDTH2,0.0672338);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, NORM1,0.00832946);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, WIDTH1,0.0498456);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, NORM2,0.00498009);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, WIDTH2,0.0667664);
+
+
+   // j1st = EME3
+    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);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, WIDTH1,0.0470954);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, NORM2,3.25232e-12);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, WIDTH2,0.0623969);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, NORM1,2.78532);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, WIDTH1,0.0131695);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, NORM2,0.452008);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, WIDTH2,0.0515226);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, NORM1,3.33656);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, WIDTH1,0.0130931);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, NORM2,1.73185);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, WIDTH2,0.0302168);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, NORM1,1.75021);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, WIDTH1,0.0327991);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, NORM2,1.14403);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, WIDTH2,0.0558077);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, NORM1,0.617317);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, WIDTH1,0.0557263);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, NORM2,0.257868);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, WIDTH2,0.0627204);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, NORM1,0.047606);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, WIDTH1,0.0591886);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, NORM2,0.0213238);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, WIDTH2,0.065177);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, NORM1,0.0130116);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, WIDTH1,0.0539308);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, NORM2,0.00646192);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, WIDTH2,0.0619736);
+
+
+   // j1st = HEC
+    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);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH1,0.0479837);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM2,1.67211e-10);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH2,0.0596882);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM1,0.737579);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH1,0.0258178);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM2,0.420932);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH2,0.0343544);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, NORM1,0.351888);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, WIDTH1,0.0510842);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, NORM2,3.05314e-12);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, WIDTH2,0.0633916);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, NORM1,0.65514);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, WIDTH1,0.0488786);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, NORM2,0.0340784);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, WIDTH2,0.0556956);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, NORM1,0.265112);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, WIDTH1,0.0145909);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, NORM2,0.1093);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, WIDTH2,0.0533027);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM1,2.17383);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH1,0.030074);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM2,1.40347);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH2,0.059193);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM1,2.39075);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH1,0.0388658);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM2,0.899707);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH2,0.0741364);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM1,0.277399);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH1,0.0578693);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM2,0.000338516);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH2,0.216801);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, NORM1,0.0829032);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, WIDTH1,0.0438172);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, NORM2,0.0440031);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, WIDTH2,0.0662169);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM1,0.104072);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH1,0.0544505);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM2,0.044512);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH2,0.0596786);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM1,0.0144483);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH1,0.0526697);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM2,6.25827e-10);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH2,0.0637125);
+
+
+   // j1st = Tile
+
+
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.00235472);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.05536);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.001529);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0648168);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.184838);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0336996);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,2.40929e-06);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,99.9976);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM1,0.0560997);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH1,0.0356523);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM2,2.64137e-10);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH2,0.055552);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM1,0.0114804);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH1,0.062333);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM2,0.00435962);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH2,0.0998012);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM1,0.0411583);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH1,0.0579674);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM2,1.31741e-06);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH2,0.0637596);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.0149687);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0673642);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.00491883);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0729786);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.00190878);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0168903);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.000383659);
+    binnedParameters->setShapeParam( E010bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.111162);
+    ////////////////////////////
+    //      0 <= eta <  0.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0257643);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.141225);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0568183);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,2.36902);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0246428);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.0499834);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0521249);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.125038);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0233302);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,0.0367646);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0385952);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.520795);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0251202);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.328618);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0480523);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.105142);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.026393);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.0753722);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0419659);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM1,0.0133497);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH1,0.0381432);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM2,0.00867097);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH2,0.048894);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0260478);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.043321);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0528443);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,3.1401);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0169856);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,0.0284962);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0445515);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.206694);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0163943);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.0708912);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0290886);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.322759);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0260355);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.26906);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0450194);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.0563909);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0402059);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,1.85716e-13);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.0559031);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM1,0.00889098);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH1,0.0449852);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM2,2.27276e-13);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH2,0.0608962);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0255483);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.0322997);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0493452);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.365157);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0152538);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.00657056);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.0557869);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.219015);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.0105978);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.15959);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.020256);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.526796);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0263296);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.378852);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0391036);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.107037);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.026992);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.078879);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0371195);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.0116382);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.0356413);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,0.00810173);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0473555);
+
+
+   // j1st = EME1
+
+
+
+
+   // j1st = EME2
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0209078);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.0612746);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0431291);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.29426);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0161611);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,0.0147467);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.043944);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0347578);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0125305);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,0.0138492);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.0281717);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.789035);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0221812);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.612032);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.034079);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.154621);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0334293);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,2.93648e-05);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.108695);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.0182256);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0447715);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,2.17268e-11);
+    binnedParameters->setShapeParam( E020bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0595785);
+    ////////////////////////////
+    //      0.5 <= eta <  1.0   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0244269);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.485298);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0452412);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,1.38804);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0234058);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.0633661);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0506653);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.0675873);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0234324);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,0.0365939);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0419819);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.227198);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0497176);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,7.2288e-10);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0571454);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.0314932);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0298404);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.0198815);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0500504);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM1,0.00187819);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH1,0.0464706);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM2,0.00133628);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH2,0.055265);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0287242);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.0296536);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0561712);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,2.55626);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0173003);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,0.0420874);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0422297);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.170413);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0205383);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.0296703);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0382141);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.176682);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0285588);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.159897);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0503605);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.0273297);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0455678);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,1.83236e-14);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.0605593);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM1,0.00277535);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH1,0.0426334);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM2,0.0019246);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH2,0.052521);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0238996);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.0373374);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0507116);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.392235);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0157038);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.020834);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.0442625);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.290069);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.0177745);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.0118027);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.0406984);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.348993);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0284273);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.270348);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0436774);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.0482153);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0289524);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.0368072);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0420967);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.00306544);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.040368);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,0.00212887);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0539898);
+
+
+   // j1st = EME1
+
+
+
+
+   // j1st = EME2
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0159767);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.0310284);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0465349);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.190177);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0107129);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,0.0196107);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.0335917);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0463462);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0129062);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,0.0069137);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.0329134);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.63315);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0238872);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.480849);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0371451);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0691731);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0382234);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,1.01373e-11);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.059777);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.00365001);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0443089);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,0.00277234);
+    binnedParameters->setShapeParam( E020bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0560647);
+    ////////////////////////////
+    //      1.0 <= eta <  1.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0290323);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.127655);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0555132);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,0.891194);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0263361);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.0681112);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0509749);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.055814);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0336575);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,0.0307466);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0444479);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM1,0.0344114);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH1,0.0581535);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM2,0.00836807);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH2,0.063316);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM1,0.00520136);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH1,0.0675133);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM2,0.00216503);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH2,0.080296);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.0723214);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0566884);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.00392935);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0585221);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.00676273);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0558888);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.0038172);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0629374);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0236299);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.177718);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0417135);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,3.19544);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0192795);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,0.0363422);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0475842);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.167427);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0253788);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.02569);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0438348);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, NORM1,0.01127);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, WIDTH1,0.0587553);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, NORM2,0.00965997);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, WIDTH2,0.0689978);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, NORM1,0.0407365);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, WIDTH1,0.0445821);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, NORM2,5.15947e-11);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, WIDTH2,0.0606615);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.0901288);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0540389);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.00952278);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0565413);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.00523441);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0628054);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,0.00201054);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.070353);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0209532);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.0705625);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0501152);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.495793);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0243236);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.0105066);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.0593188);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.56928);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.013114);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.308539);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.024683);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, NORM1,0.0853562);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, WIDTH1,0.0479908);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, NORM2,6.98167e-09);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, WIDTH2,0.0617534);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, NORM1,0.0322536);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, WIDTH1,0.0148471);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, NORM2,0.00525991);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, WIDTH2,0.0977182);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, NORM1,0.0951486);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, WIDTH1,0.045434);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, NORM2,1.37726e-06);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, WIDTH2,64.4744);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC4, NORM1,50.4708);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC4, WIDTH1,0.000518764);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC4, NORM2,0.00557717);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC4, WIDTH2,0.0586984);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.302789);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0288472);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.238756);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0462398);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.0216502);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0505848);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.00970464);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0566738);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.00226788);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.0688328);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,1.02221e-05);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0705482);
+
+
+   // j1st = EME1
+    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 ); 
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM1,0.193592);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH1,0.0241119);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM2,0.0505344);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH2,0.0575344);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM1,0.0118399);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH1,0.0308121);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM2,5.28977e-13);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH2,0.053755);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM1,0.0564312);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH1,0.0634212);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM2,0.0275778);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH2,0.0780485);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM1,0.0345557);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH1,0.0535107);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM2,0.0175554);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH2,0.0633892);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM1,5.0867);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH1,0.0254908);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM2,1.47043e-05);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH2,72.6057);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM1,0.220489);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH1,0.0529551);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM2,2.00189e-06);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH2,88.8299);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM1,0.0142571);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH1,0.0479393);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM2,0.00834526);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH2,0.0600595);
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0331704);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.0169171);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0628235);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.179143);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0207188);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,0.0536145);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.0429526);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0575629);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0188798);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,0.0145695);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.0383498);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM1,0.115862);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH1,0.0465705);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM2,0.0734799);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH2,0.0545995);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM1,0.0365587);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH1,0.0545131);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM2,0.0238504);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH2,0.0667381);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM1,1.28941);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH1,0.0292393);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM2,3.27216e-09);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH2,0.0518437);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC4, NORM1,293.669);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC4, WIDTH1,0.0130995);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC4, NORM2,198.393);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC4, WIDTH2,0.0272136);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.360333);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0276764);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.17285);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0501804);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0618056);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.030395);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.036782);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0510028);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.00717991);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0327531);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,0.00400793);
+    binnedParameters->setShapeParam( E020bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0646005);
+    ////////////////////////////
+    //      1.5 <= eta <  2.5   //
+    ////////////////////////////
+
+
+   // j1st = EMB1
+
+
+
+
+   // j1st = EMB2
+
+
+
+
+   // j1st = EMB3
+
+
+
+
+   // j1st = EME1
+    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);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, WIDTH1,0.0223761);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, NORM2,1.99781);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, WIDTH2,0.0457662);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, NORM1,7.8631);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, WIDTH1,0.0234169);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, NORM2,2.28111);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, WIDTH2,0.043148);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, NORM1,0.408412);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, WIDTH1,0.0450111);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, NORM2,1.13702e-10);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, WIDTH2,0.0599763);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, NORM1,0.909703);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, WIDTH1,0.0243617);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, NORM2,0.69451);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, WIDTH2,0.057482);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, NORM1,0.870895);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, WIDTH1,0.0281186);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, NORM2,0.606206);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, WIDTH2,0.0571675);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, NORM1,0.105631);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, WIDTH1,0.0270518);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, NORM2,0.0879581);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, WIDTH2,0.056267);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, NORM1,0.0313929);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, WIDTH1,0.0470701);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, NORM2,2.65879e-16);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, WIDTH2,0.0621862);
+
+
+   // j1st = EME2
+    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);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, WIDTH1,0.018059);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, NORM2,0.794451);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, WIDTH2,0.0438236);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, NORM1,15.627);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, WIDTH1,0.01926);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, NORM2,0.682889);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, WIDTH2,0.0526405);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, NORM1,1.18005);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, WIDTH1,0.024933);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, NORM2,0.149787);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, WIDTH2,0.0540057);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, NORM1,0.895263);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, WIDTH1,0.0358552);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, NORM2,0.453459);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, WIDTH2,0.0664068);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, NORM1,0.721926);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, WIDTH1,0.0264127);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, NORM2,0.52165);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, WIDTH2,0.0641985);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, NORM1,0.0613263);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, WIDTH1,0.0617475);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, NORM2,0.00013177);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, WIDTH2,0.18982);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, NORM1,0.018728);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, WIDTH1,0.0591224);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, NORM2,5.81739e-14);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, WIDTH2,0.0612284);
+
+
+   // j1st = EME3
+    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);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, WIDTH1,0.0485797);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, NORM2,0.124247);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, WIDTH2,0.0532233);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, NORM1,2.54092);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, WIDTH1,0.0182001);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, NORM2,0.774736);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, WIDTH2,0.0448014);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, NORM1,3.75711);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, WIDTH1,0.0217872);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, NORM2,0.141581);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, WIDTH2,0.054786);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, NORM1,2.20746);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, WIDTH1,0.0360479);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, NORM2,1.36022);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, WIDTH2,0.0550949);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, NORM1,1.04435);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, WIDTH1,0.048398);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, NORM2,0.499602);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, WIDTH2,0.0624226);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, NORM1,0.0909056);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, WIDTH1,0.049404);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, NORM2,0.0475978);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, WIDTH2,0.057347);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, NORM1,0.0203063);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, WIDTH1,0.0431742);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, NORM2,0.0143546);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, WIDTH2,0.0507402);
+
+
+   // j1st = HEC
+    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);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH1,0.0504252);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM2,0.00945794);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH2,0.0579527);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, NORM1,0.288101);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, WIDTH1,0.0508515);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, NORM2,0.0991999);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, WIDTH2,0.0551192);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, NORM1,0.650296);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, WIDTH1,0.0442932);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, NORM2,0.0109936);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, WIDTH2,0.0674595);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, NORM1,0.220481);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, WIDTH1,0.0221806);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, NORM2,0.0710614);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, WIDTH2,0.0560189);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM1,2.35534);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH1,0.0225483);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM2,1.80025);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH2,0.047595);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM1,2.92962);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH1,0.0242139);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM2,2.10523);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH2,0.0517304);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM1,0.306678);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH1,0.0525893);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM2,3.66634e-05);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH2,0.622399);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, NORM1,0.117962);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, WIDTH1,0.0471868);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, NORM2,0.0459269);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, WIDTH2,0.0526173);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM1,0.104755);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH1,0.053291);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM2,0.0502035);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH2,0.0627469);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM1,0.0118436);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH1,0.0507354);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM2,0.00713461);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH2,0.0632954);
+
+
+   // j1st = Tile
+
+
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0375708);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0474946);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,2.52216e-10);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0616794);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM1,0.128119);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH1,0.044039);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM2,0.078585);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH2,0.0551801);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM1,0.0200631);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH1,0.0434832);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM2,0.000176544);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH2,99.9993);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM1,481464);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH1,0.00677049);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM2,0.902576);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH2,0.0264165);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.0524479);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0614769);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.024961);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0670193);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.00473647);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0670134);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.00107146);
+    binnedParameters->setShapeParam( E020bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0716983);
+    ////////////////////////////
+    //      0 <= eta <  0.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0241584);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.172378);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0533242);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,4.05152);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0196149);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.0642167);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0513073);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.160269);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0209104);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,0.0285107);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0392588);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.550724);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0258677);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.247482);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0492322);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.10623);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.024479);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.0769743);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0384226);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM1,0.0142365);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH1,0.0341461);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM2,0.00939109);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH2,0.045253);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0251113);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.027439);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.057932);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,3.57373);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0165723);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,0.0311546);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0455675);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.269796);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0179657);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.0174461);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0373641);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.444891);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0261207);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.270118);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0449894);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.0536461);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0404201);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,3.28968e-11);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.0409252);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM1,0.00923773);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH1,0.0450636);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM2,3.37923e-12);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH2,0.0596799);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.022586);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.0469233);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0465624);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.400436);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.015268);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.0177332);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.0398485);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.243751);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.0138888);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.0168723);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.0305657);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.555191);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0245941);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.416403);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0399252);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.126083);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0247628);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.0964075);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0400248);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.0150651);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.0357455);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,0.0100389);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0463317);
+
+
+   // j1st = EME1
+
+
+
+
+   // j1st = EME2
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0155913);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.0472144);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0417573);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.240625);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0129248);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,0.0139777);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.0402148);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0317658);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0139131);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,0.00529227);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.0322097);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.801009);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0186565);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.591533);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0330683);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.163532);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0324993);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,2.09362e-05);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.173905);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.0222134);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0325613);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,0.0153872);
+    binnedParameters->setShapeParam( E032point5bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0462309);
+    ////////////////////////////
+    //      0.5 <= eta <  1.0   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0273804);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.136236);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.054484);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,2.34341);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0210483);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.0763926);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0479934);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.108172);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0229198);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,0.0342008);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0426187);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.25801);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0269534);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.163013);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.053386);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.0355739);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0255167);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.0287438);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0462245);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM1,0.00234796);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH1,0.044317);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM2,0.00166527);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH2,0.0583839);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0248469);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.0393611);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0519812);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,3.32719);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0162868);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,0.0231018);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0491577);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.16297);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0225159);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.00982868);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0471155);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.218408);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0279049);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.135629);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0518661);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.0287619);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0284021);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,0.0171934);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.0491029);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM1,0.00218528);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH1,0.0445654);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM2,0.00145678);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH2,0.057174);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0231883);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.0383519);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0478522);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.525387);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0152318);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.0195471);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.04203);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.43908);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.014938);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.0120291);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.0391316);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.353532);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0287434);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.256231);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0426947);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.0532986);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0264294);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.0398616);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0414249);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.00291059);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.0422746);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,0.00207431);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0550312);
+
+
+   // j1st = EME1
+
+
+
+
+   // j1st = EME2
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0182134);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.0365286);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0425278);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.148982);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0176383);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,0.00920694);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.044749);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0402713);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0172119);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,0.00410208);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.0385493);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.70349);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0219506);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.514606);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0339096);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.100317);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0247921);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.0740704);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0380426);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.00594556);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0409529);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,0.0036856);
+    binnedParameters->setShapeParam( E032point5bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0515688);
+    ////////////////////////////
+    //      1.0 <= eta <  1.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0236095);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.345001);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0446888);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,1.24677);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0229866);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.0437655);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0537223);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.0658013);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0236996);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,0.0350941);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0441018);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM1,0.0718088);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH1,0.0418597);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM2,3.10418e-12);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH2,0.0619809);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM1,0.00811941);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH1,0.0622673);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM2,1.30591e-05);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH2,88.9661);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC3, NORM1,926166);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC3, WIDTH1,0.00574081);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC3, NORM2,0.171801);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC3, WIDTH2,0.0428157);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.0548374);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0602103);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,1.60391e-10);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.064627);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.00839087);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0582517);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.00238365);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.063023);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM1,0.00149664);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH1,0.0666316);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM2,0.000294337);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH2,0.0709869);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0279371);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.0319074);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0591499);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,4.45163);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0162708);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,0.0521545);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0464636);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.172051);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0233377);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.0260823);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0430338);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, NORM1,0.000709271);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, WIDTH1,0.0821057);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, NORM2,0.000607947);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, WIDTH2,0.0989921);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, NORM1,0.0125993);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, WIDTH1,0.0489716);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, NORM2,1.06907e-13);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, WIDTH2,0.0613261);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.0799019);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.056891);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.00199701);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0584965);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.00568685);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0614987);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,0.00268959);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.0696051);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0430149);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,8.61018e-12);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0605165);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.405883);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0175624);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.0462341);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.0429915);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.604687);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.0166912);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.0368151);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.0381554);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, NORM1,0.0952323);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, WIDTH1,0.0424092);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, NORM2,0.0630234);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, WIDTH2,0.0563537);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, NORM1,0.0581073);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, WIDTH1,0.055654);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, NORM2,2.79056e-10);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, WIDTH2,0.0613598);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.316898);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0254784);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.176037);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0485687);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.0233718);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0492296);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.0137241);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0565655);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.0022339);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.0539419);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,0.00129777);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0616361);
+
+
+   // j1st = EME1
+    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 ); 
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM1,0.113967);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH1,0.0424065);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM2,0.0207825);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH2,0.0444903);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM1,0.00588077);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH1,0.0598422);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM2,6.58715e-09);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH2,0.0650588);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM1,0.0657888);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH1,0.0549409);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM2,0.0379762);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH2,0.0635992);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM1,0.0316191);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH1,0.0507851);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM2,0.0271021);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH2,0.0634956);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM1,0.0351864);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH1,0.0391264);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM2,0.0187348);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH2,0.0600992);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM1,0.288794);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH1,0.0270478);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM2,0.180582);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH2,0.0530235);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM1,0.0250609);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH1,0.0482719);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM2,3.95042e-11);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH2,0.0624533);
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.046984);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,9.89981e-12);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0584146);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.251993);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0146801);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,0.0676421);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.0435449);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.050834);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0140769);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,0.0193356);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.0338331);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM1,0.1128);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH1,0.0532951);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM2,0.0508425);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH2,0.0616501);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM1,0.028327);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH1,0.0574232);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM2,0.0157782);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH2,0.0693185);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM1,0.0484037);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH1,0.0620854);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM2,4.00496e-07);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH2,0.0657159);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC4, NORM1,0.514656);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC4, WIDTH1,0.0448175);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC4, NORM2,8.49537e-06);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC4, WIDTH2,0.0487596);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.367981);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0247012);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.265064);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0435837);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0697904);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0348195);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.00807895);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0635174);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.00689002);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0361319);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,0.00525004);
+    binnedParameters->setShapeParam( E032point5bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0577743);
+    ////////////////////////////
+    //      1.5 <= eta <  2.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+
+
+
+
+   // j1st = EMB2
+
+
+
+
+   // j1st = EMB3
+
+
+
+
+   // j1st = EME1
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, WIDTH1,0.0233926);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, NORM2,1.64489);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, WIDTH2,0.0471837);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, NORM1,11.3375);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, WIDTH1,0.024017);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, NORM2,0.784126);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, WIDTH2,0.0521671);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, NORM1,0.50557);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, WIDTH1,0.0254571);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, NORM2,0.24039);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, WIDTH2,0.0505531);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, NORM1,1.14357);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, WIDTH1,0.0230458);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, NORM2,0.892218);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, WIDTH2,0.0558674);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, NORM1,1.12562);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, WIDTH1,0.0299834);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, NORM2,0.624859);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, WIDTH2,0.058697);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, NORM1,0.119477);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, WIDTH1,0.0428752);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, NORM2,0.0740935);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, WIDTH2,0.0537863);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, NORM1,0.0427884);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, WIDTH1,0.0438706);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, NORM2,0.0265513);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, WIDTH2,0.0538541);
+
+
+   // j1st = EME2
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, WIDTH1,0.021164);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, NORM2,0.804359);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, WIDTH2,0.0461634);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, NORM1,16.2928);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, WIDTH1,0.0192049);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, NORM2,0.530989);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, WIDTH2,0.0512967);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, NORM1,1.21617);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, WIDTH1,0.0241392);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, NORM2,0.25691);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, WIDTH2,0.0482477);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, NORM1,1.11354);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, WIDTH1,0.0349349);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, NORM2,0.563962);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, WIDTH2,0.0608327);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, NORM1,0.846323);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, WIDTH1,0.0346222);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, NORM2,0.504759);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, WIDTH2,0.0613693);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, NORM1,0.0755724);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, WIDTH1,0.0358791);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, NORM2,0.0598718);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, WIDTH2,0.0632458);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, NORM1,0.0261397);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, WIDTH1,0.040521);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, NORM2,0.0150148);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, WIDTH2,0.0599371);
+
+
+   // j1st = EME3
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, WIDTH1,0.0487708);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, NORM2,5.17897e-13);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, WIDTH2,0.0632326);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, NORM1,2.98957);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, WIDTH1,0.0180235);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, NORM2,0.813269);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, WIDTH2,0.0453);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, NORM1,4.69935);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, WIDTH1,0.0192552);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, NORM2,0.153444);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, WIDTH2,0.0514732);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, NORM1,2.57509);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, WIDTH1,0.0290207);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, NORM2,1.76901);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, WIDTH2,0.0510153);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, NORM1,1.48191);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, WIDTH1,0.0389556);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, NORM2,0.880331);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, WIDTH2,0.0566413);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, NORM1,0.136242);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, WIDTH1,0.0349211);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, NORM2,0.0946762);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, WIDTH2,0.0610287);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, NORM1,0.044527);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, WIDTH1,0.0403116);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, NORM2,0.033562);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, WIDTH2,0.0540277);
+
+
+   // j1st = HEC
+    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);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH1,0.0503328);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM2,0.0089752);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH2,0.0553728);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM1,0.290073);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH1,0.0339623);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM2,2.95932e-11);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH2,0.0557426);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, NORM1,0.332149);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, WIDTH1,0.0515326);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, NORM2,0.0235258);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, WIDTH2,0.053458);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, NORM1,0.989708);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, WIDTH1,0.0128883);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, NORM2,0.39949);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, WIDTH2,0.0472934);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, NORM1,0.243986);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, WIDTH1,0.0192832);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, NORM2,0.0922185);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, WIDTH2,0.0473386);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM1,2.1387);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH1,0.023901);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM2,1.63294);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH2,0.0447968);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM1,3.02984);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH1,0.0263946);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM2,2.08898);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH2,0.0472308);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM1,0.358412);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH1,0.0290191);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM2,0.243905);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH2,0.0515002);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, NORM1,0.085789);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, WIDTH1,0.0370426);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, NORM2,0.0646299);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, WIDTH2,0.0523088);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM1,0.0601389);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH1,0.0526165);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM2,0.0311897);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH2,0.0600758);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM1,0.00977417);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH1,0.0384518);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM2,0.00522021);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH2,0.0632307);
+
+
+   // j1st = Tile
+
+
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0201071);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0503644);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.0156756);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0570086);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM1,0.123583);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH1,0.0421338);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM2,0.0686842);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH2,0.0537062);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM1,0.028633);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH1,0.0355167);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM2,0.019514);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH2,0.046151);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM1,0.163842);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH1,0.0344131);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM2,0.000124144);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH2,99.4109);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.0885137);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0236117);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.0634066);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0630784);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0127241);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0446466);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.00070743);
+    binnedParameters->setShapeParam( E032point5bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0885421);
+    ////////////////////////////
+    //      0 <= eta <  0.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.024964);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.12352);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0522556);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.127318);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0163003);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,0.0633877);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0311579);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.384456);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0397603);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.00795027);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0893198);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.0813436);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0267562);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.0438048);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0432945);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM1,0.00486804);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH1,0.0403581);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM2,0.0030982);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH2,0.0495172);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0185049);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.034705);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0478348);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.279231);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0168225);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.0390385);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0299849);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.312085);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0422105);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,8.01646e-11);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0427923);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.0564904);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0241307);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,0.0383508);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.0415124);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM1,0.0079108);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH1,0.0281026);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM2,0.00575035);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH2,0.0465838);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0108529);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.0455207);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0409214);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.62799);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.035329);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.00231607);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0835762);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.114452);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0249358);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.084622);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0360926);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.0143931);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.0355374);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,0.0103169);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0454802);
+
+
+   // j1st = EME1
+
+
+
+
+   // j1st = EME2
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0181298);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.0308186);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0336525);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.903132);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0280265);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.00173836);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0791247);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.144279);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0228577);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.107244);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0334375);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.011505);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0314205);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,0.0076875);
+    binnedParameters->setShapeParam( E040bin, eta050bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.042833);
+    ////////////////////////////
+    //      0.5 <= eta <  1.0   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.024423);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.114499);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.0551192);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,2.62351);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0184546);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.0635337);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0487529);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.121118);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0226581);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,0.0182105);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0479331);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.241527);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0279677);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.10282);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0577611);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.0302174);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0456934);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,1.56032e-12);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0605244);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM1,0.00284517);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH1,0.03803);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, NORM2,0.00204332);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile3, WIDTH2,0.0561112);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0251562);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.0664101);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0468055);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,3.73093);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0133327);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,0.052746);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0406351);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.146319);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0214577);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.010963);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0451028);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.212695);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0223284);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,0.181934);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0475403);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.0262181);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0265859);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,0.0163539);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.0497598);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM1,0.00226322);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH1,0.0472648);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, NORM2,0.00129847);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile3, WIDTH2,0.0552459);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0211502);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,0.0320657);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0464143);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.459304);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0144688);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.0306492);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.0353507);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.47749);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.013729);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.0115097);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.039844);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.391893);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0264173);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.206052);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0453452);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.0399504);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0248274);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.0228291);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0459155);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.00306053);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.0386042);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,0.00205591);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0546711);
+
+
+   // j1st = EME1
+
+
+
+
+   // j1st = EME2
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0173089);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.0367975);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0427471);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.157775);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0133301);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,0.0144742);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.040853);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0455022);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0151746);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,0.00203424);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.0464898);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.66148);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0238178);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.52503);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.0363029);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0972988);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0247395);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.0717163);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0390044);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.00614898);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0428568);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,0.00384012);
+    binnedParameters->setShapeParam( E040bin, eta100bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.0535588);
+    ////////////////////////////
+    //      1.0 <= eta <  1.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+    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);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH1,0.0245497);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, NORM2,0.158374);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB1, WIDTH2,0.049984);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM1,1.88969);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH1,0.0200308);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, NORM2,0.068463);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB2, WIDTH2,0.0500765);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM1,0.106999);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH1,0.0221355);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, NORM2,0.0321205);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::EMB3, WIDTH2,0.0459137);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM1,0.0357597);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH1,0.0389003);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM2,0.0294906);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH2,0.0657968);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM1,0.0223763);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH1,0.0195435);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM2,0.0191797);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH2,0.0577746);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC4, NORM1,1.85019e+12);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC4, WIDTH1,0.00693099);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC4, NORM2,0.77333);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC4, WIDTH2,0.0480124);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.0865918);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0560916);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,4.69104e-12);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0646545);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.0103771);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0618199);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,1.42061e-10);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0640779);
+
+
+   // j1st = EMB2
+    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);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH1,0.0266421);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, NORM2,0.0430749);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB1, WIDTH2,0.0581093);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM1,6.06788);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH1,0.0146726);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, NORM2,0.0656028);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB2, WIDTH2,0.0453245);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM1,0.142136);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH1,0.0199057);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, NORM2,0.0404992);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::EMB3, WIDTH2,0.0415489);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, NORM1,0.0821334);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, WIDTH1,0.0526648);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, NORM2,0.00347676);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC1, WIDTH2,0.0544563);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, NORM1,0.0117072);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, WIDTH1,0.0602247);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, NORM2,0.00677871);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC2, WIDTH2,0.0755989);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC3, NORM1,0.228276);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC3, WIDTH1,0.0323147);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC3, NORM2,3.69142e-09);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::HEC3, WIDTH2,0.0357092);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM1,0.0787826);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH1,0.0574006);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, NORM2,1.34438e-09);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile1, WIDTH2,0.0637603);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM1,0.00665256);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH1,0.0653984);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, NORM2,0.001018);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB2, eflowCalo::Tile2, WIDTH2,0.0692364);
+
+
+   // j1st = EMB3
+    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);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH1,0.0435715);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, NORM2,1.06973e-12);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB1, WIDTH2,0.0606016);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM1,0.686974);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH1,0.0146987);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, NORM2,0.0386745);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB2, WIDTH2,0.0425162);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM1,0.627117);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH1,0.0149972);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, NORM2,0.0310439);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::EMB3, WIDTH2,0.0387532);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, NORM1,0.0655697);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, WIDTH1,0.0484833);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, NORM2,0.0423458);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC1, WIDTH2,0.0569884);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, NORM1,0.0190078);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, WIDTH1,0.0555275);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, NORM2,0.0126341);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC2, WIDTH2,0.0693699);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, NORM1,9217.37);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, WIDTH1,0.00210147);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, NORM2,0.610271);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::HEC3, WIDTH2,0.0333958);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM1,0.354687);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH1,0.0292366);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, NORM2,0.079949);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile1, WIDTH2,0.0559165);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM1,0.0218668);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH1,0.0339349);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, NORM2,0.0139948);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile2, WIDTH2,0.0609941);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM1,0.00264671);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH1,0.0586258);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, NORM2,0.00120061);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::EMB3, eflowCalo::Tile3, WIDTH2,0.0663476);
+
+
+   // j1st = EME1
+    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 ); 
+
+
+
+
+   // j1st = EME3
+
+
+
+
+   // j1st = HEC
+
+
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM1,0.0816557);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH1,0.0420198);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM2,3.87155e-13);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH2,0.0606918);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB2, NORM1,0.414992);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB2, WIDTH1,0.0134515);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB2, NORM2,0.106619);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB2, WIDTH2,0.0391022);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM1,0.0151375);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH1,0.0417935);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM2,4.84735e-12);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH2,0.0560474);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM1,0.112463);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH1,0.0383512);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM2,0.0261453);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH2,0.068982);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM1,0.0306669);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH1,0.0485925);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM2,0.0188906);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH2,0.0581838);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM1,0.960074);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH1,0.027809);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM2,0.000281361);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH2,0.0891797);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM1,0.279366);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH1,0.0314745);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM2,0.0389111);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH2,0.0673132);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM1,0.0265388);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH1,0.0361786);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM2,0.0184285);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH2,0.0494776);
+
+
+   // j1st = Tile
+    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);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0201076);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.0457372);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0508921);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM1,0.403482);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH1,0.0125178);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, NORM2,0.0573864);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB2, WIDTH2,0.0428808);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM1,0.0418837);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH1,0.0141969);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, NORM2,0.00883953);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::EMB3, WIDTH2,0.0428138);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM1,0.106501);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH1,0.0532723);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM2,0.0546096);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH2,0.0621851);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM1,0.0199346);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH1,0.052676);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM2,0.0164619);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH2,0.0640172);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM1,0.233811);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH1,0.043414);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM2,4.11018e-05);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH2,99.9104);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.391746);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0298154);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.0508687);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.063098);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0491785);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0350276);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM2,0.0120624);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH2,0.0593722);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM1,0.00671071);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH1,0.0334307);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, NORM2,0.00463861);
+    binnedParameters->setShapeParam( E040bin, eta150bin, eflowFirstIntRegions::Tile, eflowCalo::Tile3, WIDTH2,0.060557);
+    ////////////////////////////
+    //      1.5 <= eta <  2.5   //
+    ////////////////////////////
+
+   // j1st = EMB1
+
+
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM1,0.203497);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH1,0.053081);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, NORM2,6.68094e-08);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC1, WIDTH2,0.061973);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM1,0.0320718);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH1,0.0646491);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, NORM2,0.0113092);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC2, WIDTH2,0.0726401);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC3, NORM1,0.40913);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC3, WIDTH1,0.0231817);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC3, NORM2,0.00618228);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::HEC3, WIDTH2,0.0339834);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM1,0.0482104);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH1,0.0617956);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, NORM2,0.0181561);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile1, WIDTH2,0.0688583);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM1,0.00341247);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH1,0.0549235);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, NORM2,0.00214413);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EMB1, eflowCalo::Tile2, WIDTH2,0.0635135);
+
+
+   // j1st = EMB2
+
+
+
+
+   // j1st = EMB3
+
+
+
+
+   // j1st = EME1
+    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);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, WIDTH1,0.0221447);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, NORM2,1.09971);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME1, WIDTH2,0.0474854);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, NORM1,16.3319);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, WIDTH1,0.0211335);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, NORM2,0.338712);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME2, WIDTH2,0.0611115);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, NORM1,0.869078);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, WIDTH1,0.0232659);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, NORM2,0.164597);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::EME3, WIDTH2,0.0529256);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, NORM1,1.14881);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, WIDTH1,0.0287525);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, NORM2,0.655292);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC1, WIDTH2,0.0591881);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, NORM1,0.968572);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, WIDTH1,0.0533593);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, NORM2,7.14436e-06);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC2, WIDTH2,98.1521);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, NORM1,0.152309);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, WIDTH1,0.0232571);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, NORM2,0.110022);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC3, WIDTH2,0.0558493);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, NORM1,0.0482718);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, WIDTH1,0.0253548);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, NORM2,0.0338111);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME1, eflowCalo::HEC4, WIDTH2,0.0518962);
+
+
+   // j1st = EME2
+    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);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, WIDTH1,0.0240263);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, NORM2,0.348783);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME1, WIDTH2,0.0512831);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, NORM1,25.8323);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, WIDTH1,0.0161874);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, NORM2,0.376784);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME2, WIDTH2,0.0529721);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, NORM1,1.56218);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, WIDTH1,0.0232427);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, NORM2,0.134018);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::EME3, WIDTH2,0.0528657);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, NORM1,1.4877);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, WIDTH1,0.0307377);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, NORM2,0.688257);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC1, WIDTH2,0.0580025);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, NORM1,1.29175);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, WIDTH1,0.0317916);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, NORM2,0.674943);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC2, WIDTH2,0.0577605);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, NORM1,0.123532);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, WIDTH1,0.0276264);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, NORM2,0.092466);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC3, WIDTH2,0.0582832);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, NORM1,0.0339402);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, WIDTH1,0.0257484);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, NORM2,0.0315913);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME2, eflowCalo::HEC4, WIDTH2,0.0529622);
+
+
+   // j1st = EME3
+    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);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, WIDTH1,0.0462113);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, NORM2,8.50017e-11);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME1, WIDTH2,0.060623);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, NORM1,2.86696);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, WIDTH1,0.0188349);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, NORM2,0.283557);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME2, WIDTH2,0.0503395);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, NORM1,4.39009);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, WIDTH1,0.0179396);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, NORM2,0.120544);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::EME3, WIDTH2,0.0488857);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, NORM1,2.79331);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, WIDTH1,0.0249441);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, NORM2,1.93564);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC1, WIDTH2,0.0463383);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, NORM1,1.76108);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, WIDTH1,0.0293338);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, NORM2,1.19237);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC2, WIDTH2,0.0520034);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, NORM1,0.147439);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, WIDTH1,0.0349693);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, NORM2,0.105286);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC3, WIDTH2,0.0573916);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, NORM1,0.0391658);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, WIDTH1,0.0441786);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, NORM2,0.018891);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::EME3, eflowCalo::HEC4, WIDTH2,0.0522748);
+
+
+   // j1st = HEC
+    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);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH1,0.0607171);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, NORM2,0.00237314);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB1, WIDTH2,0.0634735);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB2, NORM1,0.0375176);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB2, WIDTH1,0.0487391);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB2, NORM2,2.54488e-10);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB2, WIDTH2,0.0519017);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM1,0.833552);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH1,0.0296668);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, NORM2,1.83443e-11);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EMB3, WIDTH2,0.0562922);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, NORM1,0.252614);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, WIDTH1,0.0480815);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, NORM2,4.66107e-13);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME1, WIDTH2,0.0618544);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, NORM1,1.1218);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, WIDTH1,0.0190025);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, NORM2,0.144791);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME2, WIDTH2,0.0522178);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, NORM1,0.264636);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, WIDTH1,0.0207886);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, NORM2,0.0501236);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::EME3, WIDTH2,0.049792);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM1,2.11687);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH1,0.0225741);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, NORM2,1.60814);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC1, WIDTH2,0.0409602);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM1,3.56914);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH1,0.0234799);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, NORM2,2.77481);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC2, WIDTH2,0.0425815);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM1,0.472696);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH1,0.0261771);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, NORM2,0.330235);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC3, WIDTH2,0.048248);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, NORM1,0.155045);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, WIDTH1,0.0251619);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, NORM2,0.119562);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::HEC4, WIDTH2,0.0463912);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM1,0.0730592);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH1,0.0542234);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, NORM2,0.0284529);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile1, WIDTH2,0.059963);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM1,0.0158788);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH1,0.0369271);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, NORM2,0.00973623);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::HEC, eflowCalo::Tile2, WIDTH2,0.0551154);
+
+
+   // j1st = Tile
+
+
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM1,0.0341412);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH1,0.0488482);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, NORM2,0.0239211);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::EMB1, WIDTH2,0.0544879);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM1,0.169896);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH1,0.0444054);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, NORM2,0.0952583);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC1, WIDTH2,0.0552796);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM1,0.0332019);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH1,0.0453793);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, NORM2,0.0205827);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC2, WIDTH2,0.05349);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM1,0.0234349);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH1,0.0464545);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, NORM2,1.09201e-11);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC3, WIDTH2,0.061161);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC4, NORM1,3.76257e+08);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC4, WIDTH1,0.00782468);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC4, NORM2,0.408109);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::HEC4, WIDTH2,0.0401014);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM1,0.0975048);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH1,0.0595211);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, NORM2,0.0183247);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile1, WIDTH2,0.06259);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, NORM1,0.0197959);
+    binnedParameters->setShapeParam( E040bin, eta250bin, eflowFirstIntRegions::Tile, eflowCalo::Tile2, WIDTH1,0.0459932);
+    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::FCAL, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta350bin, eflowFirstIntRegions::FCAL, 0.000000 );
+    binnedParameters->setFudgeMean( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL, 0.000000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL, 0.000000 );
+    binnedParameters->setFudgeMean( E010bin, eta350bin, eflowFirstIntRegions::FCAL, 0.506000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta350bin, eflowFirstIntRegions::FCAL, 0.299000 );
+    binnedParameters->setFudgeMean( E020bin, eta350bin, eflowFirstIntRegions::FCAL, 0.478000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta350bin, eflowFirstIntRegions::FCAL, 0.278000 );
+    binnedParameters->setFudgeMean( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL, 0.473000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL, 0.261000 );
+    binnedParameters->setFudgeMean( E040bin, eta350bin, eflowFirstIntRegions::FCAL, 0.502000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta350bin, eflowFirstIntRegions::FCAL, 0.268000 );
+    binnedParameters->setFudgeMean( E001bin, eta450bin, eflowFirstIntRegions::FCAL, 0.000000 );
+    binnedParameters->setFudgeStdDev( E001bin, eta450bin, eflowFirstIntRegions::FCAL, 0.000000 );
+    binnedParameters->setFudgeMean( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL, 0.000000 );
+    binnedParameters->setFudgeStdDev( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL, 0.000000 );
+    binnedParameters->setFudgeMean( E010bin, eta450bin, eflowFirstIntRegions::FCAL, 0.534000 );
+    binnedParameters->setFudgeStdDev( E010bin, eta450bin, eflowFirstIntRegions::FCAL, 0.376000 );
+    binnedParameters->setFudgeMean( E020bin, eta450bin, eflowFirstIntRegions::FCAL, 0.540000 );
+    binnedParameters->setFudgeStdDev( E020bin, eta450bin, eflowFirstIntRegions::FCAL, 0.308000 );
+    binnedParameters->setFudgeMean( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL, 0.569000 );
+    binnedParameters->setFudgeStdDev( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL, 0.273000 );
+    binnedParameters->setFudgeMean( E040bin, eta450bin, eflowFirstIntRegions::FCAL, 0.626000 );
+    binnedParameters->setFudgeStdDev( E040bin, eta450bin, eflowFirstIntRegions::FCAL, 0.268000 );
+
+
+    ////////////////////////////
+    //      2.5 <= eta <  4.0  //
+    ////////////////////////////
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, NORM1, 1.3813793);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, WIDTH1, 0.0232664);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, NORM2, 0.0039834937);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, WIDTH2, 0.34451613);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, NORM1, 0.17716285);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, WIDTH1, 0.054805612);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, NORM2, 0.026187203);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, WIDTH2, 0.2464913);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, NORM1, 0.01234669);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, WIDTH1, 0.047877717);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, NORM2, 0.014973409);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, WIDTH2, 0.50541161);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, NORM1, 0.31656023);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, WIDTH1, 0.059290981);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, NORM2, 0.14174174);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, WIDTH2, 0.40185226);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, NORM1, 0.1443976);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, WIDTH1, 0.057142009);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, NORM2, 0.007423484);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, WIDTH2, 26111.848);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, NORM1, 0.10888774);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, WIDTH1, 0.17098204);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, NORM2, 0.057311313);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, WIDTH2, 0.82554351);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, NORM1, 0.0099201798);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, WIDTH1, 0.17534287);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, NORM2, 0.0059733624);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, WIDTH2, 51689.012);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, NORM1, 0.0099201798);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, WIDTH1, 0.17534287);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, NORM2, 0.0059733624);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, WIDTH2, 51689.012);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, NORM1, 0.0099201798);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, WIDTH1, 0.17534287);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, NORM2, 0.0059733624);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, WIDTH2, 51689.012);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, NORM1, 0.0099201798);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, WIDTH1, 0.17534287);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, NORM2, 0.0059733624);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, WIDTH2, 51689.012);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, NORM1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, NORM2, 0.0036144337);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, WIDTH2, 0.21087275);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, NORM1, 0.059867211);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, WIDTH1, 0.036830397);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, NORM2, 0.006232976);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, WIDTH2, 2.2431972e+08);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, NORM1, 0.16109627);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, WIDTH1, 0.046519754);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, NORM2, 0.0082772051);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, WIDTH2, 2542.2248);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, NORM1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, NORM2, 0.003517246);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, WIDTH2, 0.23591711);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, NORM1, 0.022720075);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, WIDTH1, 0.036575156);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, NORM2, 0.0064717183);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, WIDTH2, 2.6575438e+09);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, NORM1, 0.0068899654);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, WIDTH1, 0.048576774);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, NORM2, 0.0083968234);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, WIDTH2, 1568910.6);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, NORM1, 0.064274159);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, WIDTH1, 0.062056168);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, NORM2, 0.004851177);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, WIDTH2, 407207.46);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, NORM1, 0.064274159);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, WIDTH1, 0.062056168);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, NORM2, 0.004851177);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, WIDTH2, 407207.46);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, NORM1, 0.064274159);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, WIDTH1, 0.062056168);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, NORM2, 0.004851177);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, WIDTH2, 407207.46);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, NORM1, 0.064274159);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, WIDTH1, 0.062056168);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, NORM2, 0.004851177);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, WIDTH2, 407207.46);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E001bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E001bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E001bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E001bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E001bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH2, 1.5019511);
+
+    binnedParameters->setShapeParam( E001bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E001bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E001bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E001bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH2, 1.5019511);
+
+    binnedParameters->setShapeParam( E001bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E001bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E001bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E001bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH2, 1.5019511);
+
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, NORM1, 1.3813793);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, WIDTH1, 0.0232664);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, NORM2, 0.0039834937);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, WIDTH2, 0.34451613);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, NORM1, 0.17716285);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, WIDTH1, 0.054805612);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, NORM2, 0.026187203);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, WIDTH2, 0.2464913);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, NORM1, 0.01234669);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, WIDTH1, 0.047877717);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, NORM2, 0.014973409);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, WIDTH2, 0.50541161);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, NORM1, 0.082213185);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, WIDTH1, 0.031848575);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, NORM2, 0.0021992948);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, WIDTH2, 0.50648018);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, NORM1, 0.1443976);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, WIDTH1, 0.057142009);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, NORM2, 0.007423484);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, WIDTH2, 26111.848);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, NORM1, 0.013193767);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, WIDTH1, 0.12809421);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, NORM2, 0.0094367992);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, WIDTH2, 799.22293);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, NORM1, 0.0099201798);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, WIDTH1, 0.17534287);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, NORM2, 0.0059733624);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, WIDTH2, 51689.012);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, NORM1, 0.0099201798);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, WIDTH1, 0.17534287);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, NORM2, 0.0059733624);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, WIDTH2, 51689.012);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, NORM1, 0.0099201798);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, WIDTH1, 0.17534287);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, NORM2, 0.0059733624);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, WIDTH2, 51689.012);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, NORM1, 0.0099201798);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, WIDTH1, 0.17534287);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, NORM2, 0.0059733624);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, WIDTH2, 51689.012);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, NORM1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, NORM2, 0.0036144337);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, WIDTH2, 0.21087275);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, NORM1, 0.059867211);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, WIDTH1, 0.036830397);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, NORM2, 0.006232976);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, WIDTH2, 2.2431972e+08);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, NORM1, 0.16109627);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, WIDTH1, 0.046519754);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, NORM2, 0.0082772051);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, WIDTH2, 2542.2248);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, NORM1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, NORM2, 0.003517246);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, WIDTH2, 0.23591711);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, NORM1, 0.022720075);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, WIDTH1, 0.036575156);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, NORM2, 0.0064717183);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, WIDTH2, 2.6575438e+09);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, NORM1, 0.0068899654);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, WIDTH1, 0.048576774);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, NORM2, 0.0083968234);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, WIDTH2, 1568910.6);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, NORM1, 0.064274159);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, WIDTH1, 0.062056168);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, NORM2, 0.004851177);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, WIDTH2, 407207.46);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, NORM1, 0.064274159);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, WIDTH1, 0.062056168);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, NORM2, 0.004851177);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, WIDTH2, 407207.46);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, NORM1, 0.064274159);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, WIDTH1, 0.062056168);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, NORM2, 0.004851177);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, WIDTH2, 407207.46);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, NORM1, 0.064274159);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, WIDTH1, 0.062056168);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, NORM2, 0.004851177);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, WIDTH2, 407207.46);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E003point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH2, 1.5019511);
+
+    binnedParameters->setShapeParam( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH2, 1.5019511);
+
+    binnedParameters->setShapeParam( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E003point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH2, 1.5019511);
+
+
+
+
+
+
+
+
+
+
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, NORM1, 1.3813793);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, WIDTH1, 0.0232664);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, NORM2, 0.0039834937);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, WIDTH2, 0.34451613);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, NORM1, 0.23609988);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, WIDTH1, 0.05719458);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, NORM2, 0.0081589893);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, WIDTH2, 0.32690281);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, NORM1, 0.011784363);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, WIDTH1, 0.11826397);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, NORM2, 0.0028071707);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, WIDTH2, 27279.884);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, NORM1, 0.082213185);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, WIDTH1, 0.031848575);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, NORM2, 0.0021992948);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, WIDTH2, 0.50648018);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, NORM1, 0.20183155);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, WIDTH1, 0.059766992);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, NORM2, 0.0064836516);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, WIDTH2, 0.77168335);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, NORM1, 0.018280145);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, WIDTH1, 0.11454765);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, NORM2, 0.0044973389);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, WIDTH2, 4277.3138);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, NORM1, 0.010507261);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, WIDTH1, 0.16367948);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, NORM2, 0.0026607468);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, WIDTH2, 12028.25);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, NORM1, 0.010507261);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, WIDTH1, 0.16367948);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, NORM2, 0.0026607468);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, WIDTH2, 12028.25);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, NORM1, 0.010507261);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, WIDTH1, 0.16367948);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, NORM2, 0.0026607468);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, WIDTH2, 12028.25);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, NORM1, 0.010507261);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, WIDTH1, 0.16367948);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, NORM2, 0.0026607468);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, WIDTH2, 12028.25);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, NORM1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, NORM2, 0.0036144337);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, WIDTH2, 0.21087275);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, NORM1, 0.055648604);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, WIDTH1, 0.039226644);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, NORM2, 0.0030136557);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, WIDTH2, 50950.582);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, NORM1, 0.18071435);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, WIDTH1, 0.042852113);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, NORM2, 0.0046857163);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, WIDTH2, 3.6842169);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, NORM1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, NORM2, 0.003517246);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, WIDTH2, 0.23591711);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, NORM1, 0.016981017);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, WIDTH1, 0.034934684);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, NORM2, 0.0027894721);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, WIDTH2, 77064.908);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, NORM1, 0.0075209883);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, WIDTH1, 0.045748948);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, NORM2, 0.0038305995);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, WIDTH2, 2.5581616e+09);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, NORM1, 0.051846429);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, WIDTH1, 0.062647078);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, NORM2, 0.002422447);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, WIDTH2, 550038.9);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, NORM1, 0.051846429);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, WIDTH1, 0.062647078);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, NORM2, 0.002422447);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, WIDTH2, 550038.9);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, NORM1, 0.051846429);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, WIDTH1, 0.062647078);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, NORM2, 0.002422447);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, WIDTH2, 550038.9);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, NORM1, 0.051846429);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, WIDTH1, 0.062647078);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, NORM2, 0.002422447);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, WIDTH2, 550038.9);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E010bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E010bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E010bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E010bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E010bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH2, 1.5019511);
+
+    binnedParameters->setShapeParam( E010bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E010bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E010bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E010bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH2, 1.5019511);
+
+    binnedParameters->setShapeParam( E010bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E010bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E010bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E010bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH2, 1.5019511);
+
+
+
+
+
+
+
+
+
+
+
+
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, NORM1, 1.3813793);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, WIDTH1, 0.0232664);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, NORM2, 0.0039834937);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, WIDTH2, 0.34451613);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, NORM1, 0.23449859);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, WIDTH1, 0.052786845);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, NORM2, 0.0047146775);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, WIDTH2, 0.45730436);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, NORM1, 0.031271648);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, WIDTH1, 0.060151358);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, NORM2, 0.0026248073);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, WIDTH2, 444040.85);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, NORM1, 0.018843124);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, WIDTH1, 0.08280612);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, NORM2, 0.0056078819);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, WIDTH2, 0.26995778);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, NORM1, 0.082213185);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, WIDTH1, 0.031848575);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, NORM2, 0.0021992948);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, WIDTH2, 0.50648018);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, NORM1, 0.26470439);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, WIDTH1, 0.059848676);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, NORM2, 0.0056677487);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, WIDTH2, 0.49846045);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, NORM1, 0.02357232);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, WIDTH1, 0.099399152);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, NORM2, 0.0028146556);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, WIDTH2, 8.5208336);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, NORM1, 0.012387016);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, WIDTH1, 0.13900915);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, NORM2, 0.0015286771);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, WIDTH2, 4637.2694);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, NORM1, 0.012387016);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, WIDTH1, 0.13900915);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, NORM2, 0.0015286771);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, WIDTH2, 4637.2694);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, NORM1, 0.012387016);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, WIDTH1, 0.13900915);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, NORM2, 0.0015286771);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, WIDTH2, 4637.2694);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, NORM1, 0.012387016);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, WIDTH1, 0.13900915);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, NORM2, 0.0015286771);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, WIDTH2, 4637.2694);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, NORM1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, NORM2, 0.0036144337);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, WIDTH2, 0.21087275);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, NORM1, 0.05252265);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, WIDTH1, 0.039222033);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, NORM2, 0.0018315621);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, WIDTH2, 1342641.6);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, NORM1, 0.21120431);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, WIDTH1, 0.040515028);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, NORM2, 0.0035771621);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, WIDTH2, 1.3319126);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, NORM1, 0.047839315);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, WIDTH1, 0.074603286);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, NORM2, 0.0014737539);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, WIDTH2, 19264.942);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, NORM1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, NORM2, 0.003517246);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, WIDTH2, 0.23591711);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, NORM1, 0.011382257);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, WIDTH1, 0.034009729);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, NORM2, 0.0019165648);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, WIDTH2, 37985896);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, NORM1, 0.0048428696);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, WIDTH1, 0.043778151);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, NORM2, 0.0024266003);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, WIDTH2, 10.891788);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, NORM1, 0.042437972);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, WIDTH1, 0.060029289);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, NORM2, 0.001511592);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, WIDTH2, 67637.77);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, NORM1, 0.042437972);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, WIDTH1, 0.060029289);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, NORM2, 0.001511592);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, WIDTH2, 67637.77);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, NORM1, 0.042437972);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, WIDTH1, 0.060029289);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, NORM2, 0.001511592);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, WIDTH2, 67637.77);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, NORM1, 0.042437972);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, WIDTH1, 0.060029289);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, NORM2, 0.001511592);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, WIDTH2, 67637.77);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E020bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E020bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E020bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E020bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E020bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH2, 1.5019511);
+
+    binnedParameters->setShapeParam( E020bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E020bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E020bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E020bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH2, 1.5019511);
+
+    binnedParameters->setShapeParam( E020bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E020bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E020bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E020bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH2, 1.5019511);
+
+
+
+
+
+
+
+
+
+
+
+
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, NORM1, 1.3813793);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, WIDTH1, 0.0232664);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, NORM2, 0.0039834937);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME1, WIDTH2, 0.34451613);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, NORM1, 0.91133313);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, WIDTH1, 0.031747292);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, NORM2, 0.0095742452);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME2, WIDTH2, 0.14308432);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, NORM1, 0.043243474);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, WIDTH1, 0.042702698);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, NORM2, 0.0012876631);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::EME3, WIDTH2, 0.61753758);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, NORM1, 0.017872019);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, WIDTH1, 0.084197789);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, NORM2, 0.00074130888);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC1, WIDTH2, 0.50061279);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, NORM1, 0.017872019);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, WIDTH1, 0.084197789);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, NORM2, 0.00074130888);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC2, WIDTH2, 0.50061279);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, NORM1, 0.017872019);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, WIDTH1, 0.084197789);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, NORM2, 0.00074130888);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC3, WIDTH2, 0.50061279);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, NORM1, 0.017872019);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, WIDTH1, 0.084197789);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, NORM2, 0.00074130888);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME1,  eflowCalo::HEC4, WIDTH2, 0.50061279);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, NORM1, 0.082213185);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, WIDTH1, 0.031848575);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, NORM2, 0.0021992948);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME1, WIDTH2, 0.50648018);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, NORM1, 0.34232222);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, WIDTH1, 0.061562698);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, NORM2, 0.005208505);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME2, WIDTH2, 0.18303114);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, NORM1, 0.047252116);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, WIDTH1, 0.068264213);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, NORM2, 0.001276509);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::EME3, WIDTH2, 0.49466179);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, NORM1, 0.021432233);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, WIDTH1, 0.083042841);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, NORM2, 0.00028390353);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC1, WIDTH2, 2233.5658);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, NORM1, 0.021432233);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, WIDTH1, 0.083042841);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, NORM2, 0.00028390353);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC2, WIDTH2, 2233.5658);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, NORM1, 0.021432233);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, WIDTH1, 0.083042841);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, NORM2, 0.00028390353);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC3, WIDTH2, 2233.5658);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, NORM1, 0.021432233);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, WIDTH1, 0.083042841);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, NORM2, 0.00028390353);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::HEC4, WIDTH2, 2233.5658);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL0, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL1, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, NORM2, 0.0089706729);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME2,  eflowCalo::FCAL2, WIDTH2, 0.43388569);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, NORM1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, NORM2, 0.0036144337);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME1, WIDTH2, 0.21087275);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, NORM1, 0.039133495);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, WIDTH1, 0.041354959);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, NORM2, 0.00070313738);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME2, WIDTH2, 0.43677138);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, NORM1, 0.22406408);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, WIDTH1, 0.039434804);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, NORM2, 0.0012524351);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::EME3, WIDTH2, 0.4050655);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, NORM1, 0.078739208);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, WIDTH1, 0.063620685);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, NORM2, 0.00033318953);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC1, WIDTH2, 2.1746991);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, NORM1, 0.078739208);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, WIDTH1, 0.063620685);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, NORM2, 0.00033318953);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC2, WIDTH2, 2.1746991);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, NORM1, 0.078739208);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, WIDTH1, 0.063620685);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, NORM2, 0.00033318953);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC3, WIDTH2, 2.1746991);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, NORM1, 0.078739208);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, WIDTH1, 0.063620685);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, NORM2, 0.00033318953);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::HEC4, WIDTH2, 2.1746991);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL0, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL1, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, NORM2, 0.0073663499);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::EME3,  eflowCalo::FCAL2, WIDTH2, 0.58100713);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, NORM1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, NORM2, 0.003517246);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME1, WIDTH2, 0.23591711);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, NORM1, 0.0031119248);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, WIDTH1, 0.034001721);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, NORM2, 0.00026767493);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME2, WIDTH2, 9159295);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, NORM1, 0.0016333563);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, WIDTH1, 0.04466355);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, NORM2, 0.00048380202);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::EME3, WIDTH2, 1.2059434);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, NORM1, 0.023887099);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, WIDTH1, 0.058887659);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, NORM2, 0.00024090821);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC1, WIDTH2, 5.7812127);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, NORM1, 0.023887099);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, WIDTH1, 0.058887659);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, NORM2, 0.00024090821);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC2, WIDTH2, 5.7812127);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, NORM1, 0.023887099);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, WIDTH1, 0.058887659);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, NORM2, 0.00024090821);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC3, WIDTH2, 5.7812127);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, NORM1, 0.023887099);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, WIDTH1, 0.058887659);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, NORM2, 0.00024090821);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::HEC4, WIDTH2, 5.7812127);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, NORM1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, WIDTH1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL0, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, NORM1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, WIDTH1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL1, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, NORM1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, WIDTH1, 0);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, NORM2, 0.0069057353);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::HEC,  eflowCalo::FCAL2, WIDTH2, 0.43762312);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM1, 0.03326799);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH1, 0.082254);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM2, 0.0047988219);
+    binnedParameters->setShapeParam( E032point5bin, eta350bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH2, 0.81971037);
+
+    binnedParameters->setShapeParam( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL0, WIDTH2, 1.5019511);
+
+    binnedParameters->setShapeParam( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL1, WIDTH2, 1.5019511);
+
+    binnedParameters->setShapeParam( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM1, 0.0898856);
+    binnedParameters->setShapeParam( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH1, 0.0743953);
+    binnedParameters->setShapeParam( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, NORM2, 0.00602437);
+    binnedParameters->setShapeParam( E032point5bin, eta450bin, eflowFirstIntRegions::FCAL,  eflowCalo::FCAL2, WIDTH2, 1.5019511);
+
+
+
+  }
+
+  return StatusCode::SUCCESS;
+
+}
+
+StatusCode eflowCellEOverPTool_mc12_HLLHC::finalize(){
+  return StatusCode::SUCCESS;
+}
diff --git a/Reconstruction/eflowRec/src/eflowLayerIntegrator.cxx b/Reconstruction/eflowRec/src/eflowLayerIntegrator.cxx
index dfa9e47773a74a14fcb58971859989ed99326831..e6177eb6bd6327c471b5dca92d12cca998f083ab 100644
--- a/Reconstruction/eflowRec/src/eflowLayerIntegrator.cxx
+++ b/Reconstruction/eflowRec/src/eflowLayerIntegrator.cxx
@@ -29,8 +29,9 @@ CREATED:  18th Aug, 2005
 
 #include "FourMomUtils/xAODP4Helpers.h"
 
-eflowLayerIntegrator::eflowLayerIntegrator(double stdDev, double error, double rMaxOverStdDev) :
+eflowLayerIntegrator::eflowLayerIntegrator(double stdDev, double error, double rMaxOverStdDev, bool isHLLHC) :
     m_rMax(rMaxOverStdDev * stdDev),
+    m_isHLLHC(isHLLHC),
     m_allClustersIntegral(eflowCalo::nRegions, 0.0),
     m_nUnitCellPerWindowOverCellEtaPhiArea(eflowCalo::nRegions),
     m_integrator(std::make_unique<eflowCellIntegrator<0> >(stdDev, error)),
@@ -62,6 +63,7 @@ eflowLayerIntegrator::eflowLayerIntegrator(double stdDev, double error, double r
 
 eflowLayerIntegrator::eflowLayerIntegrator(const eflowLayerIntegrator& originalEflowLayerIntegrator){
   m_rMax = originalEflowLayerIntegrator.m_rMax;
+  m_isHLLHC = originalEflowLayerIntegrator.m_isHLLHC;
   m_allClustersIntegral =  originalEflowLayerIntegrator.m_allClustersIntegral;
   m_nUnitCellPerWindowOverCellEtaPhiArea = originalEflowLayerIntegrator.m_nUnitCellPerWindowOverCellEtaPhiArea;
   m_integrator = std::make_unique<eflowCellIntegrator<0> >(*originalEflowLayerIntegrator.m_integrator);
@@ -78,6 +80,7 @@ eflowLayerIntegrator& eflowLayerIntegrator::operator=(const eflowLayerIntegrator
   //if not assigning to self, then we copy the data to the new object
   else {
     m_rMax = originalEflowLayerIntegrator.m_rMax;
+    m_isHLLHC = originalEflowLayerIntegrator.m_isHLLHC;
     m_allClustersIntegral =  originalEflowLayerIntegrator.m_allClustersIntegral;
     m_nUnitCellPerWindowOverCellEtaPhiArea = originalEflowLayerIntegrator.m_nUnitCellPerWindowOverCellEtaPhiArea;
     m_integrator = std::make_unique<eflowCellIntegrator<0> >(*originalEflowLayerIntegrator.m_integrator);
@@ -100,7 +103,14 @@ void eflowLayerIntegrator::resetAllClustersIntegralForNewTrack(const eflowTrackC
   }
   /* Calculate the caloDepthArray */
   double em2Eta = trackCalo.getEM2eta();
-  if ( fabs(em2Eta) > 2.5 ) { em2Eta = 2.49; }   //sometimes track extrapolator returns e.g. 2.51 for em2Eta, which causes depth array to be filled with zeroes.
+  if (!m_isHLLHC) {
+    if ( fabs(em2Eta) > 2.5 ) em2Eta = 2.49;  //sometimes track extrapolator returns e.g. 2.51 for em2Eta, which causes depth array to be filled with zeroes.
+  }
+  else{
+    if(em2Eta<-998.) em2Eta = trackCalo.getFCAL0eta();
+    if ( fabs(em2Eta) > 4.0 ) { em2Eta = 3.99; }   //sometimes track extrapolator returns e.g. 4.01 for em2Eta, which causes depth array to be filled with zeroes.
+  }
+
   m_caloModel.calcDepthArray(em2Eta, 1.0e-4);
 }
 
diff --git a/Reconstruction/eflowRec/src/eflowRecCluster.cxx b/Reconstruction/eflowRec/src/eflowRecCluster.cxx
index d7554219d236260aa896f49c6a976894cf82132d..9cfcf34144abd87a26876d4f407536a21933821e 100644
--- a/Reconstruction/eflowRec/src/eflowRecCluster.cxx
+++ b/Reconstruction/eflowRec/src/eflowRecCluster.cxx
@@ -15,7 +15,7 @@
 #include "xAODCaloEvent/CaloClusterKineHelper.h"
 
 eflowRecCluster::eflowRecCluster(const ElementLink<xAOD::CaloClusterContainer>& clusElementLink) :
-  m_clusterId(-1), m_cluster(*clusElementLink),m_originalClusElementLink(clusElementLink), m_clusElementLink(clusElementLink), m_isTouchable(false), m_type(0), m_matchCluster(nullptr) {
+  m_clusterId(-1), m_cluster(*clusElementLink),m_originalClusElementLink(clusElementLink), m_clusElementLink(clusElementLink), m_isTouchable(false),m_calorimeterType(UNASSIGNED) , m_matchCluster(nullptr) {
   m_matchCluster = std::make_unique<eflowMatchCluster>(this);
 }
 
@@ -25,7 +25,7 @@ eflowRecCluster::eflowRecCluster(const eflowRecCluster& originalEflowRecCluster)
   m_clusElementLink = originalEflowRecCluster.m_clusElementLink;
   m_originalClusElementLink = originalEflowRecCluster.m_originalClusElementLink;
   m_isTouchable = originalEflowRecCluster.m_isTouchable;
-  m_type = originalEflowRecCluster.m_type;
+  m_calorimeterType = originalEflowRecCluster.m_calorimeterType;
   m_matchCluster = std::make_unique<eflowMatchCluster>(this);
 }
 
@@ -37,6 +37,7 @@ eflowRecCluster& eflowRecCluster::operator=(const eflowRecCluster& originalEflow
     m_clusElementLink = originalEflowRecCluster.m_clusElementLink;
     m_originalClusElementLink = originalEflowRecCluster.m_originalClusElementLink;
     m_isTouchable = originalEflowRecCluster.m_isTouchable;
+    m_calorimeterType = originalEflowRecCluster.m_calorimeterType;
     m_matchCluster = std::make_unique<eflowMatchCluster>(this);
     return *this;
   }//if not assigning to self, then we have copied the data to the new object
@@ -110,7 +111,7 @@ double eflowRecCluster::getVarianceOfSumExpectedEnergy() {
 }
 
 int eflowRecCluster::getClusterType() {
-  if(m_type!=0) return m_type;
+  if(m_calorimeterType!=UNASSIGNED) return m_calorimeterType;
   CaloClusterKineHelper::calculateKine(const_cast<xAOD::CaloCluster*>(m_cluster), true, true);
 
   double EMB_E = m_cluster->eSample(xAOD::CaloCluster::CaloSample::PreSamplerB)
@@ -145,16 +146,19 @@ int eflowRecCluster::getClusterType() {
   double totalEnergy = EMB_E + EME_E + HEC_E + Tile_E + FCAL_E + MiniFCAL_E;
   double ratioEM = (EMB_E+EME_E)/totalEnergy;
   double ratioHCAL = (HEC_E+Tile_E)/totalEnergy;
+  double ratioFCAL = (FCAL_E + MiniFCAL_E)/totalEnergy;
 
   if(ratioEM > 0.5) {
-    m_type = 1;
+    m_calorimeterType = ECAL;
   } else if (ratioHCAL > 0.5) {
-    m_type = 2;
+    m_calorimeterType = HCAL;
+  } else if (ratioFCAL > 0.5) {
+    m_calorimeterType = FCAL;
   } else {
-    m_type = 3;
+    m_calorimeterType = UNKNOWN;
   }
 
-  assert(m_type!=0);
-  return m_type;
+  assert(m_calorimeterType!=UNASSIGNED);
+  return m_calorimeterType;
 
 }
diff --git a/Reconstruction/egamma/egammaAlgs/CMakeLists.txt b/Reconstruction/egamma/egammaAlgs/CMakeLists.txt
index 0ed9bf5bc781b4d518bdb666f0ff4121a2561c4b..1252c403ce4ff14b64abd7d2e05ea0346d7147d3 100644
--- a/Reconstruction/egamma/egammaAlgs/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaAlgs/CMakeLists.txt
@@ -18,33 +18,27 @@ atlas_depends_on_subdirs( PRIVATE
                           Calorimeter/CaloUtils
                           Calorimeter/CaloEvent
                           Control/AthenaKernel
-                          Control/CxxUtils
                           Control/StoreGate
                           Event/FourMomUtils
                           Event/xAOD/xAODTracking
                           InnerDetector/InDetRecTools/InDetConversionFinderTools
                           InnerDetector/InDetRecTools/InDetRecToolInterfaces
                           PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces
-                          Reconstruction/Particle
-                          Reconstruction/ParticleTruth
                           Reconstruction/egamma/egammaInterfaces
                           Reconstruction/egamma/egammaRecEvent
-                          Reconstruction/egamma/egammaUtils
+                          Reconstruction/egamma/egammaInDetUtils
                           Reconstruction/egamma/egammaMVACalib
-                          Tools/PathResolver
                           Tracking/TrkEvent/TrkPseudoMeasurementOnTrack
                           Tracking/TrkEvent/TrkTrack
                           Tracking/TrkEvent/TrkTrackLink
 			  Tracking/TrkTools/TrkToolInterfaces )
 
-# External dependencies:
-find_package( CLHEP )
 
 atlas_add_component( egammaAlgs
 		     src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps EventKernel xAODCaloEvent xAODEgamma xAODTruth GaudiKernel MCTruthClassifierLib CaloGeoHelpers CaloUtilsLib AthenaKernel CxxUtils StoreGateLib SGtests xAODTracking EgammaAnalysisInterfacesLib egammaRecEvent egammaUtils egammaMVACalibLib PathResolver Particle ParticleTruth TrkToolInterfaces InDetRecToolInterfaces FourMomUtils TrkTrack TrkPseudoMeasurementOnTrack InDetConversionFinderToolsLib )
+                     INCLUDE_DIRS 
+                     LINK_LIBRARIES AthenaBaseComps EventKernel xAODCaloEvent xAODEgamma xAODTruth GaudiKernel MCTruthClassifierLib CaloGeoHelpers CaloUtilsLib AthenaKernel  StoreGateLib SGtests xAODTracking EgammaAnalysisInterfacesLib egammaRecEvent egammaUtils  TrkToolInterfaces InDetRecToolInterfaces FourMomUtils TrkTrack TrkPseudoMeasurementOnTrack InDetConversionFinderToolsLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaForwardBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaForwardBuilder.cxx
index 4dfa273663e6a519553503ab49fa69bfa3e32362..13e294555215642d6eb68a2828ce00d0b00d7d80 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaForwardBuilder.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaForwardBuilder.cxx
@@ -4,9 +4,6 @@
 
 #include "egammaForwardBuilder.h"
 #include "egammaInterfaces/IegammaBaseTool.h"
-
-#include "CLHEP/Units/SystemOfUnits.h"
-#include "PathResolver/PathResolver.h"
 #include "StoreGate/StoreGateSvc.h"
 
 #include "xAODCaloEvent/CaloClusterContainer.h"
diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx
index cdf36409929dc77b79ab1802654d8381a87b6023..27583796e4c0a42524097d89adea4fc8e326d6dd 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx
@@ -382,7 +382,7 @@ StatusCode egammaSuperClusterBuilder::CalibrateCluster(xAOD::CaloCluster* newClu
   ATH_MSG_DEBUG("Cluster phiBE(2) no correction/calibration: "<<newCluster->phiBE(2));
   // first do the corrections
   if (m_correctClusters) {
-    ATH_CHECK(m_clusterCorrectionTool->execute(newCluster,egType,xAOD::EgammaHelpers::isBarrel(newCluster)));
+    ATH_CHECK(m_clusterCorrectionTool->execute(Gaudi::Hive::currentContext(),newCluster,egType,xAOD::EgammaHelpers::isBarrel(newCluster)));
   }
   newCluster->setRawE(newCluster->e());
   newCluster->setRawEta(newCluster->eta());
diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.cxx
index c0fe4025c2ed9a6fc06e06d42f9e295fb06117b3..7255d0ef60c1e67ffd6a36572520970f5708ac53 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.cxx
@@ -1,10 +1,9 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 
 #include "egammaTruthAssociationAlg.h"
-
 #include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/WriteHandle.h"
@@ -17,7 +16,6 @@
 #include "xAODTruth/TruthParticle.h"
 #include "xAODTruth/TruthParticleAuxContainer.h"
 #include "xAODTruth/TruthEventContainer.h"
-#include "CxxUtils/make_unique.h"
 
 typedef ElementLink<xAOD::TruthParticleContainer> TruthLink_t;
 typedef ElementLink<xAOD::CaloClusterContainer> ClusterLink_t;  
diff --git a/Reconstruction/egamma/egammaCaloTools/CMakeLists.txt b/Reconstruction/egamma/egammaCaloTools/CMakeLists.txt
index 969fb87df4aca8cabe620735f99eb1196faa9f55..6c0f663bffb8bd22d24ba329b0be39946967f901 100644
--- a/Reconstruction/egamma/egammaCaloTools/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaCaloTools/CMakeLists.txt
@@ -19,15 +19,13 @@ atlas_depends_on_subdirs( PRIVATE
                           GaudiKernel
                           Reconstruction/egamma/egammaInterfaces )
 
-# External dependencies:
-find_package( CLHEP )
 
 # Component(s) in the package:
 atlas_add_component( egammaCaloTools
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloDetDescrLib CaloEvent CaloGeoHelpers CaloIdentifier CaloUtilsLib AthenaBaseComps SGTools FourMomUtils xAODCaloEvent GaudiKernel )
+                     INCLUDE_DIRS 
+                     LINK_LIBRARIES CaloDetDescrLib CaloEvent CaloGeoHelpers CaloIdentifier CaloUtilsLib AthenaBaseComps SGTools FourMomUtils xAODCaloEvent GaudiKernel )
 
 # Install files from the package:
 atlas_install_headers( egammaCaloTools )
diff --git a/Reconstruction/egamma/egammaCaloTools/src/egammaBackShape.cxx b/Reconstruction/egamma/egammaCaloTools/src/egammaBackShape.cxx
index 9e5c6677d90ecdda08d612c357af96eab1cd3cde..d72e95860740496a5b916a6796ae76333502dd86 100755
--- a/Reconstruction/egamma/egammaCaloTools/src/egammaBackShape.cxx
+++ b/Reconstruction/egamma/egammaCaloTools/src/egammaBackShape.cxx
@@ -17,7 +17,6 @@
 #include "GaudiKernel/Property.h"
 #include "GaudiKernel/ListItem.h"
 
-#include "CLHEP/Units/SystemOfUnits.h"
 
 #include <cmath>
 
diff --git a/Reconstruction/egamma/egammaEvent/egammaEvent/ElectronAssociation.h b/Reconstruction/egamma/egammaEvent/egammaEvent/ElectronAssociation.h
index 86dfb8a2453e38979c28baf11ac4d28505fcea5d..f75e87015810a4243395a4f9534a56a4a8a6054d 100755
--- a/Reconstruction/egamma/egammaEvent/egammaEvent/ElectronAssociation.h
+++ b/Reconstruction/egamma/egammaEvent/egammaEvent/ElectronAssociation.h
@@ -32,7 +32,7 @@ namespace Analysis
       
     public:
       ElectronAssociation() ;      //!< constructor
-      ElectronAssociation(NameType& name) ;      //!< constructor
+      ElectronAssociation(const NameType& name) ;      //!< constructor
       ~ElectronAssociation() ;      //!< destructor
       
       virtual JetAssociationBase* clone() const; 
@@ -45,20 +45,22 @@ namespace Analysis
 			const Electron* the_electron,  double weight=1);
       
       void set_electron(const ElectronContainer* theContainer,
-			index_type& theIndex,   double weight=1);
+			const index_type& theIndex,
+                        double weight=1);
       
       void set_association(const ElectronContainer* theContainer,
 			   const Electron* the_electron,  double weight=1) 
 	{set_electron(theContainer, the_electron, weight);}
       
       void set_association(const ElectronContainer* theContainer,
-			   index_type& theIndex,   double weight=1)
+			   const index_type& theIndex,
+                           double weight=1)
 	{set_electron(theContainer, theIndex, weight);}
       
       double getElectronWeight(const Electron* the_electron) const ;
       
       double getElectronWeight(const ElectronContainer* theContainer,
-			       index_type& theIndex) const;
+			       const index_type& theIndex) const;
       
     } ;
   
diff --git a/Reconstruction/egamma/egammaEvent/egammaEvent/PhotonAssociation.h b/Reconstruction/egamma/egammaEvent/egammaEvent/PhotonAssociation.h
index f5e8c3d0ee9d055e99d7c3ef96d9aaef7272f95e..7fd03d6aca085654e839239bfd37438daf2ffba5 100755
--- a/Reconstruction/egamma/egammaEvent/egammaEvent/PhotonAssociation.h
+++ b/Reconstruction/egamma/egammaEvent/egammaEvent/PhotonAssociation.h
@@ -32,7 +32,7 @@ namespace Analysis
       
     public:
       PhotonAssociation() ;      //!< constructor
-      PhotonAssociation(NameType& name) ;      //!< constructor
+      PhotonAssociation(const NameType& name) ;      //!< constructor
       ~PhotonAssociation() ;      //!< destructor
       
       virtual JetAssociationBase* clone() const; 
@@ -45,20 +45,20 @@ namespace Analysis
 			const Photon* the_photon,  double weight=1);
       
       void set_photon(const PhotonContainer* theContainer,
-			index_type& theIndex,   double weight=1);
+                      const index_type& theIndex,   double weight=1);
       
       void set_association(const PhotonContainer* theContainer,
 			   const Photon* the_photon,  double weight=1) 
 	{set_photon(theContainer, the_photon, weight);}
       
       void set_association(const PhotonContainer* theContainer,
-			   index_type& theIndex,   double weight=1)
+			   const index_type& theIndex,   double weight=1)
 	{set_photon(theContainer, theIndex, weight);}
       
       double getPhotonWeight(const Photon* the_photon) const ;
       
       double getPhotonWeight(const PhotonContainer* theContainer,
-			       index_type& theIndex) const;
+                             const index_type& theIndex) const;
       
     } ;
   
diff --git a/Reconstruction/egamma/egammaEvent/src/ElectronAssociation.cxx b/Reconstruction/egamma/egammaEvent/src/ElectronAssociation.cxx
index 7483e7125967bdccd973368009e30e7b99a11032..450eeb64ba818cf763ca0074709acc891c4b6265 100755
--- a/Reconstruction/egamma/egammaEvent/src/ElectronAssociation.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/ElectronAssociation.cxx
@@ -10,7 +10,7 @@ namespace Analysis
   ElectronAssociation::ElectronAssociation()
   {  } 
   
-  ElectronAssociation::ElectronAssociation(NameType& name)
+  ElectronAssociation::ElectronAssociation(const NameType& name)
   {
     this->setName(name);
   }  
@@ -54,7 +54,7 @@ namespace Analysis
   }
   
   void  ElectronAssociation::set_electron(const ElectronContainer* theContainer,
-					  index_type& theIndex,
+					  const index_type& theIndex,
 					  double weight)
   {
     double newWeight = weight;
@@ -80,7 +80,7 @@ namespace Analysis
   }
   
   double ElectronAssociation::getElectronWeight(const ElectronContainer* theContainer,
-						index_type& theIndex) const
+						const index_type& theIndex) const
   {
     // from Navigable
     return (this->contains(theContainer,theIndex))
diff --git a/Reconstruction/egamma/egammaEvent/src/PhotonAssociation.cxx b/Reconstruction/egamma/egammaEvent/src/PhotonAssociation.cxx
index 15f3ad38b6500f7eee86567a0bb44699d5bf9525..49bf3008c5e6364db17ca07fffb6a0a94794f78b 100755
--- a/Reconstruction/egamma/egammaEvent/src/PhotonAssociation.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/PhotonAssociation.cxx
@@ -10,7 +10,7 @@ namespace Analysis
   PhotonAssociation::PhotonAssociation()
   {  } 
   
-  PhotonAssociation::PhotonAssociation(NameType& name)
+  PhotonAssociation::PhotonAssociation(const NameType& name)
   {
     this->setName(name);
   }  
@@ -54,8 +54,8 @@ namespace Analysis
   }
   
   void  PhotonAssociation::set_photon(const PhotonContainer* theContainer,
-					  index_type& theIndex,
-					  double weight)
+                                      const index_type& theIndex,
+                                      double weight)
   {
     double newWeight = weight;
     // photon already in collection
@@ -80,7 +80,7 @@ namespace Analysis
   }
   
   double PhotonAssociation::getPhotonWeight(const PhotonContainer* theContainer,
-						index_type& theIndex) const
+                                            const index_type& theIndex) const
   {
     // from Navigable
     return (this->contains(theContainer,theIndex))
diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h
index 9b8bc9f033924acea650a998e312eeccf7ef62c2..d6540b79374e1e914808a391db610cbc16ff2f73 100644
--- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h
+++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h
@@ -20,8 +20,9 @@ public:
 
   virtual ~IegammaMVACalibTool() override {};
 
-  virtual float getEnergy(const xAOD::Egamma* eg,
-			  const xAOD::CaloCluster* clus) const = 0;
+  ///Return MVA energy for the given cluster, an eg object is optional
+  virtual float getEnergy(const xAOD::CaloCluster& clus,
+                         const xAOD::Egamma* eg) const = 0;
 
 }; 
 
diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h
index 14525a8bffc539f6fa9a224a11d915a8173a1099..97497f096a4b317d0e3d61091ba48ff875136ee8 100644
--- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h
+++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h
@@ -29,7 +29,7 @@ public:
   /// An execute that just has cluster and egType. A converted photon
   /// is treated like an unconverted photon since no access to vertex.
   virtual StatusCode execute(xAOD::CaloCluster& cluster,
-			     xAOD::EgammaParameters::EgammaType egType) const = 0;
+			     const xAOD::EgammaParameters::EgammaType egType) const = 0;
 
 
 };
diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaSwTool.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaSwTool.h
index bd1df9849f85acfdbcbbfee359359c5e211e8859..049f3c8c44ba5a730180e3c142eec45c6659e8be 100755
--- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaSwTool.h
+++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaSwTool.h
@@ -22,6 +22,7 @@ MODIFIED : Bruno Lenzi (02/2014): xAOD migration
 #include "GaudiKernel/IAlgTool.h"
 #include "xAODCaloEvent/CaloClusterFwd.h"
 #include "xAODEgamma/EgammaEnums.h"
+#include "GaudiKernel/EventContext.h"
 
 static const InterfaceID IID_IegammaSwTool("IegammaSwTool", 1, 0);
 
@@ -41,8 +42,8 @@ class IegammaSwTool : virtual public IAlgTool
   /** @brief finalize method*/
   virtual StatusCode finalize() = 0;
   /** @brief execute method*/
-  virtual StatusCode execute(xAOD::CaloCluster* cluster) = 0;
-  virtual StatusCode execute(xAOD::CaloCluster* cluster, xAOD::EgammaParameters::EgammaType egType , bool isBarrel) = 0;
+  virtual StatusCode execute(const EventContext& ctx, xAOD::CaloCluster* cluster) = 0;
+  virtual StatusCode execute(const EventContext& ctx, xAOD::CaloCluster* cluster, xAOD::EgammaParameters::EgammaType egType , bool isBarrel) = 0;
 };
 
 inline const InterfaceID& IegammaSwTool::interfaceID()
diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx
index 9a4db6bdf08ddadfa9e6281c86ade6f7ab5affe7..913e682b639ff5c4f9ba1a0ac02ee5be24c3427d 100644
--- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx
+++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx
@@ -198,35 +198,24 @@ const TString& egammaMVACalibTool::getString(TObject* obj) const
   return objS->GetString();
 }
 
-float egammaMVACalibTool::getEnergy(const xAOD::Egamma* eg,
-				    const xAOD::CaloCluster* clus) const
+float egammaMVACalibTool::getEnergy(const xAOD::CaloCluster& clus, 
+                                    const xAOD::Egamma* eg) const
 {
 
-  ATH_MSG_DEBUG("calling getEnergy with cluster (" << clus << ") and eg (" << eg <<")");
-
-
-  if (!clus && eg) {
-    clus = eg->caloCluster();
-  }
-  if (!clus) {
-    ATH_MSG_FATAL("The cluster pointer must not be null!");
-    throw std::runtime_error("egammaMVACalibTool::getEnergy called with a null cluster");
-    return 0.0;
-  }
+  ATH_MSG_DEBUG("calling getEnergy with cluster index (" << clus.index());
 
   // find the bin of BDT
-
   const auto initEnergy = (m_useLayerCorrected ? 
-			   egammaMVAFunctions::compute_correctedcl_Eacc(*clus) :
-                           egammaMVAFunctions::compute_rawcl_Eacc(*clus));
+			   egammaMVAFunctions::compute_correctedcl_Eacc(clus) :
+                           egammaMVAFunctions::compute_rawcl_Eacc(clus));
   
-  const auto energyVarGeV = (initEnergy / std::cosh(clus->eta())) / CLHEP::GeV;
-  const auto etaVar = std::abs(clus->eta());
+  const auto energyVarGeV = (initEnergy / std::cosh(clus.eta())) / CLHEP::GeV;
+  const auto etaVar = std::abs(clus.eta());
 
   ATH_MSG_DEBUG("Looking at object with initEnergy = " << initEnergy 
 		<< ", energyVarGeV = " <<  energyVarGeV
 		<< ", etaVar = " << etaVar
-		<< ", clus->e() = " << clus->e());
+		<< ", clus->e() = " << clus.e());
 
   const int bin = m_hPoly->FindBin(etaVar, energyVarGeV) - 1; // poly bins are shifted by one
 
@@ -234,12 +223,12 @@ float egammaMVACalibTool::getEnergy(const xAOD::Egamma* eg,
 
   if (bin < 0) {
     ATH_MSG_DEBUG("The bin is under/overflow; just return the energy");
-    return clus->e();
+    return clus.e();
   }
 
   if (bin >= static_cast<int>(m_BDTs.size())) {
     ATH_MSG_WARNING("The bin is outside the range, so just return the energy");
-    return clus->e();
+    return clus.e();
   }
 
   // select the bdt and funcsions. (shifts are done later if needed)
@@ -252,7 +241,7 @@ float egammaMVACalibTool::getEnergy(const xAOD::Egamma* eg,
   std::vector<float> vars(sz);
 
   for (size_t i = 0; i < sz; i++) {
-    vars[i] = funcs[i](eg,clus);
+    vars[i] = funcs[i](eg,&clus);
   }
 
   // evaluate the BDT response
@@ -261,7 +250,7 @@ float egammaMVACalibTool::getEnergy(const xAOD::Egamma* eg,
   // what to do if the MVA response is 0;
   if (mvaOutput == 0.) {
     if (m_clusterEif0) {
-      return clus->e();
+      return clus.e();
     } else {
       return 0.;
     }
@@ -279,7 +268,7 @@ float egammaMVACalibTool::getEnergy(const xAOD::Egamma* eg,
   }
 
   // have to do a shift if here. It's based on the corrected Et in GeV
-  const auto etGeV = (energy / std::cosh(clus->eta())) / CLHEP::GeV;
+  const auto etGeV = (energy / std::cosh(clus.eta())) / CLHEP::GeV;
 
   // evaluate the TFormula associated with the bin
   const auto shift = m_shifts[bin].Eval(etGeV);
diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h
index 6c04bf07461ec82805a373bfa72222497bb9b2ad..dca398dbf9f56ef21b2743e66273a47c4c29f5b5 100644
--- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h
+++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h
@@ -46,8 +46,8 @@ public:
 		  MEAN10TOTRUE, MEAN20TOTRUE, MEDIAN10TOTRUE, MEDIAN20TOTRUE, 
 		  NSHIFTCORRECTIONS};
 
-  float getEnergy(const xAOD::Egamma* eg,
-		  const xAOD::CaloCluster* clus) const override final;
+  float getEnergy(const xAOD::CaloCluster& clus,
+                  const xAOD::Egamma* eg) const override final;
 
 private:
   Gaudi::Property<int> m_particleType {this, 
diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx
index 62d42a0dc5ea84a407754426c5ccb900162ba40f..048cf74b6eb1c997a56144440208a9f3a720a4ff 100644
--- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx
+++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx
@@ -68,7 +68,7 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster& cluster,
 
   if (xAOD::EgammaHelpers::isElectron(&eg)) {
     if (m_mvaElectron.isEnabled()) {
-      mvaE = m_mvaElectron->getEnergy(&eg, &cluster);
+      mvaE = m_mvaElectron->getEnergy(cluster,&eg);
     } else {
       ATH_MSG_FATAL("Trying to calibrate an electron, but disabled");
       return StatusCode::FAILURE;
@@ -76,14 +76,14 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster& cluster,
   } else if (xAOD::EgammaHelpers::isConvertedPhoton(&eg) && 
 	     xAOD::EgammaHelpers::conversionRadius(static_cast<const xAOD::Photon*>(&eg)) < m_maxConvR) {
     if (m_mvaConvertedPhoton.isEnabled()) {
-      mvaE = m_mvaConvertedPhoton->getEnergy(&eg, &cluster);
+      mvaE = m_mvaConvertedPhoton->getEnergy(cluster,&eg);
     } else {
       ATH_MSG_FATAL("Trying to calibrate a converted photon, but disabled");
       return StatusCode::FAILURE;
     }
   } else if (xAOD::EgammaHelpers::isPhoton(&eg)) {
     if (m_mvaUnconvertedPhoton.isEnabled()) {
-      mvaE = m_mvaUnconvertedPhoton->getEnergy(&eg, &cluster);
+      mvaE = m_mvaUnconvertedPhoton->getEnergy(cluster,&eg);
     } else {
       ATH_MSG_FATAL("Trying to calibrate an unconverted photon, but disabled");
       return StatusCode::FAILURE;
@@ -106,7 +106,7 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster& cluster,
 }
 
 StatusCode egammaMVASvc::execute(xAOD::CaloCluster& cluster,
-				 xAOD::EgammaParameters::EgammaType egType) const
+				 const xAOD::EgammaParameters::EgammaType egType) const
 {
 
   ATH_MSG_DEBUG("calling execute with cluster and egType (" << egType <<")");
@@ -115,7 +115,7 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster& cluster,
   switch (egType) {
   case xAOD::EgammaParameters::electron:
     if (m_mvaElectron.isEnabled()) {
-      mvaE = m_mvaElectron->getEnergy(nullptr, &cluster);
+      mvaE = m_mvaElectron->getEnergy(cluster,nullptr);
     } else {
       ATH_MSG_FATAL("Trying to calibrate an electron, but disabled");
       return StatusCode::FAILURE;
@@ -125,7 +125,7 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster& cluster,
   case xAOD::EgammaParameters::unconvertedPhoton:
     // treat converted photons like unconverted photons since don't have access to vertex
     if (m_mvaUnconvertedPhoton.isEnabled()) {
-      mvaE = m_mvaUnconvertedPhoton->getEnergy(nullptr, &cluster);
+      mvaE = m_mvaUnconvertedPhoton->getEnergy(cluster,nullptr);
     } else {
       ATH_MSG_FATAL("Trying to calibrate an unconverted photon, but disabled");
       return StatusCode::FAILURE;
diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h
index 728e6a58d5de909f4aef78975dcf27d7d7e5c725..ae5d95928d842261b337fe916554ec0bbbfa62c2 100644
--- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h
+++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h
@@ -39,7 +39,7 @@ public:
 		     const xAOD::Egamma& eg) const override final;
 
   StatusCode execute(xAOD::CaloCluster& cluster,
-		     xAOD::EgammaParameters::EgammaType egType) const override final;
+		     const xAOD::EgammaParameters::EgammaType egType) const override final;
 
 private:
 
diff --git a/Reconstruction/egamma/egammaTools/CMakeLists.txt b/Reconstruction/egamma/egammaTools/CMakeLists.txt
index 30906cef3667b1084b8461b1cf1665ed1260760f..7e85fbbc8405756bdd7556c8c4adc6a4b17a046e 100644
--- a/Reconstruction/egamma/egammaTools/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaTools/CMakeLists.txt
@@ -7,64 +7,46 @@ atlas_subdir( egammaTools )
 
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PRIVATE
-                          Calorimeter/CaloConditions
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloInterface
-                          Calorimeter/CaloRec
-                          Calorimeter/CaloUtils
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/CxxUtils
-                          Control/SGTools
-                          Control/StoreGate
-                          Control/AthContainers
-                          DetectorDescription/Identifier
-                          DetectorDescription/GeoPrimitives
-                          Event/EventKernel
-                          Event/EventPrimitives
-                          Event/FourMom
-                          Event/FourMomUtils
-                          Event/NavFourMom
-                          Event/xAOD/xAODCaloEvent
-                          Event/xAOD/xAODEgamma
-                          Event/xAOD/xAODTracking
-                          Event/xAOD/xAODTruth
-                          GaudiKernel
-                          InnerDetector/InDetConditions/InDetBeamSpotService
-                          InnerDetector/InDetRecTools/InDetConversionFinderTools
-                          InnerDetector/InDetRecTools/InDetRecToolInterfaces
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArCabling
-                          LumiBlock/LumiBlockComps
-                          PhysicsAnalysis/AnalysisCommon/PATCore
-                          PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces
-			  PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection
-                          Reconstruction/Particle	
-                          Reconstruction/ParticleTruth
-                          Reconstruction/egamma/egammaInterfaces
-                          Reconstruction/egamma/egammaMVACalib
-                          Reconstruction/egamma/egammaRecEvent
-                          Reconstruction/egamma/egammaUtils
-                          Tracking/TrkEvent/TrkEventPrimitives
-                          Tracking/TrkEvent/TrkMaterialOnTrack
-                          Tracking/TrkEvent/TrkParticleBase
-                          Tracking/TrkEvent/TrkPseudoMeasurementOnTrack
-                          Tracking/TrkEvent/TrkTrack
-                          Tracking/TrkEvent/TrkTrackLink
-                          Tracking/TrkEvent/VxVertex
-                          Tracking/TrkTools/TrkToolInterfaces )
+	Calorimeter/CaloConditions
+	Calorimeter/CaloEvent
+	Calorimeter/CaloIdentifier
+	Calorimeter/CaloInterface
+	Calorimeter/CaloRec
+	Calorimeter/CaloUtils
+	Control/AthenaBaseComps
+	Control/AthenaKernel
+	Control/SGTools
+	Control/StoreGate
+	Control/AthContainers
+	DetectorDescription/Identifier
+	DetectorDescription/GeoPrimitives
+	Event/EventKernel
+	Event/EventPrimitives
+	Event/FourMom
+	Event/FourMomUtils
+	Event/xAOD/xAODCaloEvent
+	Event/xAOD/xAODEgamma
+	Event/xAOD/xAODTracking
+	Event/xAOD/xAODTruth
+	GaudiKernel
+	LArCalorimeter/LArRecConditions
+	LArCalorimeter/LArCabling
+	LumiBlock/LumiBlockComps
+	PhysicsAnalysis/AnalysisCommon/PATCore
+	PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces
+	PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection
+	Reconstruction/egamma/egammaInterfaces
+	Reconstruction/egamma/egammaRecEvent
+	Reconstruction/egamma/egammaUtils
+	Tracking/TrkEvent/TrkEventPrimitives
+	)
 
-# External dependencies:
-find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint )
 
-# Component(s) in the package:
 atlas_add_component( egammaTools
-                     src/*.cxx
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloConditions CaloEvent  CaloIdentifier CaloRecLib CaloUtilsLib AthenaBaseComps AthenaKernel CxxUtils AthContainers SGTools StoreGateLib SGtests Identifier EventKernel EventPrimitives FourMom FourMomUtils NavFourMom xAODCaloEvent  xAODEgamma xAODTracking xAODTruth GaudiKernel InDetConversionFinderToolsLib InDetRecToolInterfaces LArRecConditions LArCablingLib LumiBlockCompsLib PATCoreLib EgammaAnalysisInterfacesLib ElectronPhotonFourMomentumCorrectionLib Particle ParticleTruth egammaMVACalibLib egammaRecEvent egammaUtils TrkEventPrimitives TrkMaterialOnTrack TrkParticleBase TrkPseudoMeasurementOnTrack TrkTrack VxVertex TrkToolInterfaces )
+	src/*.cxx
+	src/components/*.cxx
+	INCLUDE_DIRS
+	LINK_LIBRARIES CaloConditions CaloEvent  CaloIdentifier CaloRecLib CaloUtilsLib AthenaBaseComps AthenaKernel AthContainers SGTools StoreGateLib SGtests Identifier EventKernel EventPrimitives FourMom FourMomUtils  xAODCaloEvent  xAODEgamma xAODTracking xAODTruth GaudiKernel LArRecConditions LArCablingLib LumiBlockCompsLib PATCoreLib EgammaAnalysisInterfacesLib ElectronPhotonFourMomentumCorrectionLib egammaRecEvent egammaUtils TrkEventPrimitives )
 
 # Install files from the package:
 atlas_install_headers( egammaTools )
diff --git a/Reconstruction/egamma/egammaTools/python/InDetTools.py b/Reconstruction/egamma/egammaTools/python/InDetTools.py
index b1ee3f315153d3bb11e2e83520efde250946dae2..c4cfcff362c82e6074b7c00107d343f06cce666a 100644
--- a/Reconstruction/egamma/egammaTools/python/InDetTools.py
+++ b/Reconstruction/egamma/egammaTools/python/InDetTools.py
@@ -4,7 +4,6 @@ __doc__ = "ToolFactories to instantiate InDet tools for egamma with default conf
 __author__ = "Bruno Lenzi"
 
 from egammaRec.Factories import FcnWrapper, ToolFactory, PublicToolFactory
-import egammaRec.EMCommonRefitter
 
 # Tools for extrapolating to the calo
 def configureExtrapolator( egammaExtrapolator ):
@@ -84,15 +83,4 @@ egammaInDetTrackSummaryTool = PublicToolFactory( Trk__TrackSummaryTool,
                                                  doSharedHits           = False,
                                                  InDetHoleSearchTool    = egammaInDetHoleSearchTool)
 
-#################################################################
-#
-# Single track conversion tool
-#
-from InDetConversionFinderTools import InDetConversionFinderToolsConf
-InDet__SingleTrackConversionTool = PublicToolFactory( InDetConversionFinderToolsConf.InDet__SingleTrackConversionTool,
-                                                      name                       = "CPSingleTrackConversionTool",
-                                                      TrackSummaryTool           = egammaInDetTrackSummaryTool,
-                                                      Extrapolator               = FcnWrapper(egammaRec.EMCommonRefitter.getTrkExtrapolator),
-                                                      MinInitialHitRadius        = 70.,
-                                                      MinRatioOfHLhits           = 0.95)
 
diff --git a/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx b/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx
index 5e51ea410505f7d1d36bd1ac55cd8b2e24ac2a68..53516da8d661b14cb68c1605bc8b0e1e063cc1e0 100644
--- a/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx
+++ b/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx
@@ -219,7 +219,7 @@ xAOD::CaloCluster* EMClusterTool::makeNewCluster(const xAOD::CaloCluster& cluste
 								   cluster.eta0(),cluster.phi0(),
 								   cluSize);
   if(newClus){  
-    if (m_clusterCorrectionTool->execute(newClus).isFailure()){
+    if (m_clusterCorrectionTool->execute(Gaudi::Hive::currentContext(),newClus).isFailure()){
       ATH_MSG_ERROR("Problem executing cluster correction tool");
     }
     fillPositionsInCalo(newClus);
diff --git a/Reconstruction/egamma/egammaTools/src/egammaSwTool.cxx b/Reconstruction/egamma/egammaTools/src/egammaSwTool.cxx
index f145038fc5df53fb6b03698276fb94b80b7a2bd0..724b35c6ff2420e12e761a3edda1effdae505211 100644
--- a/Reconstruction/egamma/egammaTools/src/egammaSwTool.cxx
+++ b/Reconstruction/egamma/egammaTools/src/egammaSwTool.cxx
@@ -79,7 +79,7 @@ StatusCode egammaSwTool::finalize(){
 
 // ==============================================================
 // ATHENA EXECUTE METHOD:
-StatusCode egammaSwTool::execute(xAOD::CaloCluster *cluster){ 
+StatusCode egammaSwTool::execute(const EventContext& ctx, xAOD::CaloCluster *cluster){ 
   ATH_MSG_DEBUG("Executing egammaSwTool");
   
   // protection against bad clusters
@@ -88,31 +88,31 @@ StatusCode egammaSwTool::execute(xAOD::CaloCluster *cluster){
   xAOD::CaloCluster::ClusterSize requestedSize = cluster->clusterSize();
   switch (requestedSize) {
   case xAOD::CaloCluster::SW_55ele:
-    ATH_CHECK(processTools(m_clusterCorrectionPointersEle55,cluster));
+    ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersEle55,cluster));
     break;
   case xAOD::CaloCluster::SW_35ele:
-    ATH_CHECK(processTools(m_clusterCorrectionPointersEle35,cluster));
+    ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersEle35,cluster));
     break;
   case xAOD::CaloCluster::SW_37ele:
-    ATH_CHECK(processTools(m_clusterCorrectionPointersEle37,cluster));
+    ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersEle37,cluster));
     break;
   case xAOD::CaloCluster::SW_35gam:
-    ATH_CHECK(processTools(m_clusterCorrectionPointersGam35,cluster));
+    ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersGam35,cluster));
     break;
   case xAOD::CaloCluster::SW_55gam:
-    ATH_CHECK(processTools(m_clusterCorrectionPointersGam55,cluster));
+    ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersGam55,cluster));
     break;
   case xAOD::CaloCluster::SW_37gam:
-    ATH_CHECK(processTools(m_clusterCorrectionPointersGam37,cluster));
+    ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersGam37,cluster));
     break;
   case xAOD::CaloCluster::SW_55Econv:
-    ATH_CHECK(processTools(m_clusterCorrectionPointersEconv55,cluster));
+    ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersEconv55,cluster));
     break;
   case xAOD::CaloCluster::SW_35Econv:
-    ATH_CHECK(processTools(m_clusterCorrectionPointersEconv35,cluster));
+    ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersEconv35,cluster));
     break;
   case xAOD::CaloCluster::SW_37Econv:
-    ATH_CHECK(processTools(m_clusterCorrectionPointersEconv37,cluster));
+    ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersEconv37,cluster));
     break;
   default:
     ATH_MSG_DEBUG("Inexisting cluster type and calibration requested: " << requestedSize);
@@ -124,7 +124,7 @@ StatusCode egammaSwTool::execute(xAOD::CaloCluster *cluster){
 // ==============================================================
 // ATHENA EXECUTE METHOD for superClusters
 
-StatusCode egammaSwTool::execute(xAOD::CaloCluster* cluster, xAOD::EgammaParameters::EgammaType egType , bool isBarrel) {
+StatusCode egammaSwTool::execute(const EventContext& ctx, xAOD::CaloCluster* cluster, xAOD::EgammaParameters::EgammaType egType , bool isBarrel) {
   ATH_MSG_DEBUG("Executing egammaSwTool");
   
   // protection against bad clusters
@@ -135,15 +135,15 @@ StatusCode egammaSwTool::execute(xAOD::CaloCluster* cluster, xAOD::EgammaParamet
     switch (egType) {
     case xAOD::EgammaParameters::electron:
       ATH_MSG_DEBUG("correction for barrel electron");
-      ATH_CHECK(processTools(m_clusterCorrectionPointersSuperClusterEle37,cluster));
+      ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersSuperClusterEle37,cluster));
       break;
     case xAOD::EgammaParameters::unconvertedPhoton:
       ATH_MSG_DEBUG("correction for barrel unconverted");
-      ATH_CHECK(processTools(m_clusterCorrectionPointersSuperClusterGam37,cluster));
+      ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersSuperClusterGam37,cluster));
       break;
     case xAOD::EgammaParameters::convertedPhoton:
       ATH_MSG_DEBUG("correction for barrel converted");
-      ATH_CHECK(processTools(m_clusterCorrectionPointersSuperClusterEconv37,cluster));
+      ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersSuperClusterEconv37,cluster));
       break;
     default:
       ATH_MSG_DEBUG("Inexisting correction requested for egType: " <<egType << " isBarrel: " << isBarrel);
@@ -154,15 +154,15 @@ StatusCode egammaSwTool::execute(xAOD::CaloCluster* cluster, xAOD::EgammaParamet
     switch (egType) {
     case xAOD::EgammaParameters::electron:
       ATH_MSG_DEBUG("correction for endcap electron");
-      ATH_CHECK(processTools(m_clusterCorrectionPointersSuperClusterEle55,cluster));
+      ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersSuperClusterEle55,cluster));
       break;
     case xAOD::EgammaParameters::unconvertedPhoton:
       ATH_MSG_DEBUG("correction for endcap unconverted");
-      ATH_CHECK(processTools(m_clusterCorrectionPointersSuperClusterGam55,cluster));
+      ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersSuperClusterGam55,cluster));
       break;
     case xAOD::EgammaParameters::convertedPhoton:
       ATH_MSG_DEBUG("correction for endcap converted");
-      ATH_CHECK(processTools(m_clusterCorrectionPointersSuperClusterEconv55,cluster));
+      ATH_CHECK(processTools(ctx,m_clusterCorrectionPointersSuperClusterEconv55,cluster));
       break;
     default:
       ATH_MSG_DEBUG("Inexisting correction requested for egType: " <<egType << " isBarrel: " << isBarrel);
@@ -185,7 +185,7 @@ StatusCode egammaSwTool::populateTools(ToolHandleArray<CaloClusterProcessor>& to
   return StatusCode::SUCCESS;
 }
 
-StatusCode egammaSwTool::processTools(ToolHandleArray<CaloClusterProcessor>& tools,
+StatusCode egammaSwTool::processTools(const EventContext& ctx, ToolHandleArray<CaloClusterProcessor>& tools,
 				      xAOD::CaloCluster* cluster) const
 {
   
@@ -193,7 +193,7 @@ StatusCode egammaSwTool::processTools(ToolHandleArray<CaloClusterProcessor>& too
   auto lastTool  = tools.end();
   // loop tools
   for ( ; firstTool != lastTool; ++firstTool ) {
-   StatusCode processCheck = (*firstTool)->execute(cluster);
+   StatusCode processCheck = (*firstTool)->execute(ctx, cluster);
    ATH_MSG_DEBUG("Tool " << (*firstTool)->name() <<  " executing  ");
    if ( processCheck.isFailure() ) {
      ATH_MSG_ERROR("Cluster corrections failed!");
diff --git a/Reconstruction/egamma/egammaTools/src/egammaSwTool.h b/Reconstruction/egamma/egammaTools/src/egammaSwTool.h
index 530b568d10ee481d1eee60e5ea61c4ec1850df08..7f21ce0a9818950ef88da9d3eba47282860c9392 100644
--- a/Reconstruction/egamma/egammaTools/src/egammaSwTool.h
+++ b/Reconstruction/egamma/egammaTools/src/egammaSwTool.h
@@ -19,6 +19,7 @@
 #include "egammaInterfaces/IegammaSwTool.h" 
 #include "xAODCaloEvent/CaloClusterFwd.h"
 #include "CaloRec/CaloClusterProcessor.h"
+#include "GaudiKernel/EventContext.h"
 
 class egammaSwTool : public AthAlgTool, virtual public IegammaSwTool
 {
@@ -38,13 +39,13 @@ class egammaSwTool : public AthAlgTool, virtual public IegammaSwTool
   /** @brief finalize method*/
   StatusCode finalize();
   /** @brief execute method*/
-  StatusCode execute(xAOD::CaloCluster* cluster);
-  StatusCode execute(xAOD::CaloCluster* cluster, xAOD::EgammaParameters::EgammaType egType , bool isBarrel) ;
+  StatusCode execute(const EventContext& ctx, xAOD::CaloCluster* cluster);
+  StatusCode execute(const EventContext& ctx, xAOD::CaloCluster* cluster, xAOD::EgammaParameters::EgammaType egType , bool isBarrel) ;
 
  private:
   
   StatusCode populateTools(ToolHandleArray<CaloClusterProcessor>& tools);
-  StatusCode processTools(ToolHandleArray<CaloClusterProcessor>& tools, xAOD::CaloCluster* cluster) const;
+  StatusCode processTools(const EventContext& ctx, ToolHandleArray<CaloClusterProcessor>& tools, xAOD::CaloCluster* cluster) const;
 
   /**
    * @brief a list of names for tools to correct clusters
diff --git a/Reconstruction/egamma/egammaUtils/CMakeLists.txt b/Reconstruction/egamma/egammaUtils/CMakeLists.txt
index 2dab0bd76adec9857310e99d98783e47ca15e001..f4a257a4c910489e1941ffe386ae0b440c903050 100644
--- a/Reconstruction/egamma/egammaUtils/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaUtils/CMakeLists.txt
@@ -14,21 +14,20 @@ atlas_depends_on_subdirs( PUBLIC
                           PRIVATE
                           Control/AthenaBaseComps
                           Event/FourMomUtils
-                          PhysicsAnalysis/AnalysisCommon/AnalysisUtils
                           Tracking/TrkDetDescr/TrkSurfaces
                           Tracking/TrkEvent/TrkEventPrimitives
-                          Tracking/TrkEvent/TrkParameters )
+                          Tracking/TrkEvent/TrkParameters 
+			  PhysicsAnalysis/AnalysisCommon/AnalysisUtils)
 
 # External dependencies:
 find_package( Eigen )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint )
 
 # Component(s) in the package:
 atlas_add_library( egammaUtils
                    Root/*.cxx
                    PUBLIC_HEADERS egammaUtils
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                   INCLUDE_DIRS 
                    PRIVATE_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} EventPrimitives xAODCaloEvent xAODTracking TrkNeutralParameters AnalysisUtilsLib
-                   PRIVATE_LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps FourMomUtils TrkSurfaces TrkEventPrimitives TrkParameters )
+                   LINK_LIBRARIES EventPrimitives xAODCaloEvent xAODTracking TrkNeutralParameters 
+		   PRIVATE_LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps FourMomUtils TrkSurfaces TrkEventPrimitives TrkParameters  AnalysisUtilsLib)
 
diff --git a/Reconstruction/iPat/iPatTrackFinder/iPatTrackFinder/FinderTolerances.h b/Reconstruction/iPat/iPatTrackFinder/iPatTrackFinder/FinderTolerances.h
index 0e621c6a4d9fd31e577a53a6c19b63ea238d4568..c7d9a1bbf13d71cff7f74e6b69d1a830b43e0fd3 100755
--- a/Reconstruction/iPat/iPatTrackFinder/iPatTrackFinder/FinderTolerances.h
+++ b/Reconstruction/iPat/iPatTrackFinder/iPatTrackFinder/FinderTolerances.h
@@ -26,7 +26,7 @@
 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
 
 class IIncidentSvc;
-namespace InDetDD	{ class SiDetectorManager; }
+namespace InDetDD	{ class PixelDetectorManager; }
 namespace MagField	{ class IMagFieldSvc; }
 
 class FinderTolerances: public AthAlgTool,
@@ -89,7 +89,7 @@ private:
     // services and managers:
     ServiceHandle<IIncidentSvc>	       	m_incidentSvc;   //!< IncidentSvc to catch begin of event
     ServiceHandle<MagField::IMagFieldSvc> m_magFieldSvc;
-    const InDetDD::SiDetectorManager*	m_manager;
+    const InDetDD::PixelDetectorManager*	m_manager;
     
     double				m_halfField;
     double				m_maxPhiSlope;
diff --git a/Reconstruction/iPat/iPatTrackFinder/src/FinderTolerances.cxx b/Reconstruction/iPat/iPatTrackFinder/src/FinderTolerances.cxx
index b1aa5e47b15a66cd016fcf37af385979d3cd505c..b2842186ef9b632f529822271ec910f44360f70a 100755
--- a/Reconstruction/iPat/iPatTrackFinder/src/FinderTolerances.cxx
+++ b/Reconstruction/iPat/iPatTrackFinder/src/FinderTolerances.cxx
@@ -12,7 +12,7 @@
 
 #include "GaudiKernel/Incident.h"
 #include "GaudiKernel/SystemOfUnits.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "iPatTrackFinder/FinderTolerances.h"
 #include "iPatUtility/VertexRegion.h"
diff --git a/Simulation/Digitization/share/jobOpts/DigitizationRTT_all_noLVL1.py b/Simulation/Digitization/share/jobOpts/DigitizationRTT_all_noLVL1.py
index c3da7023628f002e090d4ba6456f71a6b44864ac..79eeb878de615e98787970b612f9a40662a46828 100755
--- a/Simulation/Digitization/share/jobOpts/DigitizationRTT_all_noLVL1.py
+++ b/Simulation/Digitization/share/jobOpts/DigitizationRTT_all_noLVL1.py
@@ -10,15 +10,15 @@
 #--------------------------------------------------------------
 from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
 athenaCommonFlags.EvtMax=25
-athenaCommonFlags.PoolHitsInput=["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc15a/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.simul.HITS.e3099_s2578_tid04919495_00/HITS.04919495._001041.pool.root.1"]
+athenaCommonFlags.PoolHitsInput=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1"]
 athenaCommonFlags.PoolRDOOutput="DigitizationOutput.pool.root"
 
 #--------------------------------------------------------------
 # Digitiziation and Pileup configuration
 #--------------------------------------------------------------
 from Digitization.DigitizationFlags import digitizationFlags
-digitizationFlags.IOVDbGlobalTag='OFLCOND-RUN12-SDR-25'
-#digitizationFlags.dataRunNumber=222500
+digitizationFlags.IOVDbGlobalTag='OFLCOND-MC16-SDR-16'
+digitizationFlags.dataRunNumber=284500
 # digitizationFlags.doInDetNoise=True
 # digitizationFlags.doCaloNoise=True
 # digitizationFlags.doMuonNoise=True
@@ -36,7 +36,7 @@ digitizationFlags.IOVDbGlobalTag='OFLCOND-RUN12-SDR-25'
 # Global flags. Like eg the DD version:
 #--------------------------------------------------------------
 from AthenaCommon.GlobalFlags import globalflags
-globalflags.DetDescrVersion = "ATLAS-R2-2015-03-01-00"
+globalflags.DetDescrVersion = "ATLAS-R2-2016-01-00-01"
 
 #--------------------------------------------------------------------
 # DetFlags. Use to turn on/off individual subdetector or LVL1 trigger
diff --git a/Simulation/Digitization/share/jobOpts/NightlyPileUp.py b/Simulation/Digitization/share/jobOpts/NightlyPileUp.py
index 331df3d7bc6e085a36006c807bf67c8b940b4ec5..e922f08fa570be67c0cc6edbd427d27e2947d925 100755
--- a/Simulation/Digitization/share/jobOpts/NightlyPileUp.py
+++ b/Simulation/Digitization/share/jobOpts/NightlyPileUp.py
@@ -10,30 +10,31 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
 athenaCommonFlags.EvtMax = 3
 athenaCommonFlags.SkipEvents=10
 
-athenaCommonFlags.PoolHitsInput=["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc15a/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.simul.HITS.e3099_s2578_tid04919495_00/HITS.04919495._001041.pool.root.1"]
+athenaCommonFlags.PoolHitsInput=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1"]
 athenaCommonFlags.PoolRDOOutput="PileUpDigiTest.root"
 
 #--------------------------------------------------------------
 # Digitiziation and Pileup configuration
 #--------------------------------------------------------------
 from Digitization.DigitizationFlags import digitizationFlags
-digitizationFlags.IOVDbGlobalTag='OFLCOND-RUN12-SDR-25'
+digitizationFlags.IOVDbGlobalTag='OFLCOND-MC16-SDR-16'
+digitizationFlags.simRunNumber=284500
+digitizationFlags.dataRunNumber=284500
 #inputs
 digitizationFlags.overrideMetadata=['ALL'] #True
-digitizationFlags.doHighPtMinBias=True
-digitizationFlags.numberOfHighPtMinBias=0.0
+digitizationFlags.doHighPtMinBias=False
 digitizationFlags.doLowPtMinBias=True
 digitizationFlags.numberOfLowPtMinBias=2.3
-digitizationFlags.LowPtMinBiasInputCols=["root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc15a/mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/HITS.05098374._000241.pool.root.1",
-"root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc15a/mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/HITS.05098374._000242.pool.root.1"]
+digitizationFlags.LowPtMinBiasInputCols=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/HITS.10501925._000003.pool.root.1",
+"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/HITS.10501925._000024.pool.root.1"]
 
 #time structure
 #for now use old flags...
-digitizationFlags.bunchSpacing=25 # This now sets the bunch slot length.
+digitizationFlags.bunchSpacing = 25
+digitizationFlags.BeamIntensityPattern.createConstBunchSpacingPattern(75) #FIXME This runArg should probably in
 digitizationFlags.initialBunchCrossing=-5
 digitizationFlags.finalBunchCrossing=3
 digitizationFlags.doXingByXingPileUp=True
-digitizationFlags.BeamIntensityPattern=[0.0,1.0,0.0] #mimic 75ns bunch spacing (using smallest repeatable unit)
 #digitizationFlags.FixedT0BunchCrossing=0 # redundant as only position 0 is non-zero
 
 from AthenaCommon.BeamFlags import jobproperties
@@ -43,15 +44,15 @@ jobproperties.Beam.bunchSpacing = 75 # Set this to the spacing between filled bu
 # Set some of the global flags. Like eg the DD version:
 #--------------------------------------------------------------
 from AthenaCommon.GlobalFlags import globalflags
-globalflags.DetDescrVersion = "ATLAS-R2-2015-03-01-00"
+globalflags.DetDescrVersion = "ATLAS-R2-2016-01-00-01"
 
 #FIXME should come from AthenaCommon
 from AthenaCommon.Resilience import treatException,protectedInclude
 athenaCommonFlags.AllowIgnoreConfigError=True
 
-# for Paolo/Weiming: doing the imports below at this time eventually leaks to problem with PixelCalibSvc!! We had a similar problem in the past... 
+# for Paolo/Weiming: doing the imports below at this time eventually leaks to problem with PixelCalibSvc!! We had a similar problem in the past...
 #from AtlasGeoModel import SetGeometryVersion
-#from AtlasGeoModel import GeoModelInit 
+#from AtlasGeoModel import GeoModelInit
 
 #select detectors
 from AthenaCommon.DetFlags import DetFlags
@@ -82,7 +83,6 @@ if digitizationFlags.doXingByXingPileUp():
     puAlg.PileUpTools["TestPileUpTool"].FirstXing=-300
     puAlg.PileUpTools["TestPileUpTool"].LastXing=+300
 
-
 #--------------------------------------------------------------
 # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
 #--------------------------------------------------------------
@@ -95,11 +95,11 @@ if hasattr(ServiceMgr,"ArrayBM") :
     ServiceMgr.ArrayBM.OutputLevel=VERBOSE
 if hasattr(ServiceMgr,"FixedArrayBM") :
     ServiceMgr.FixedArrayBM.OutputLevel=VERBOSE
-if digitizationFlags.doLowPtMinBias: 
+if digitizationFlags.doLowPtMinBias:
     pupElm.bkgCaches["LowPtMinBiasCache"].OutputLevel = VERBOSE
 ##     pupElm.bkgCaches["LowPtMinBiasCache"].NonIntersectingRings = ["-1:1","-3:5", "-2:1"]
 ##     pupElm.bkgCaches["LowPtMinBiasCache"].AllowRingMigration = True
-if digitizationFlags.doCavern: 
+if digitizationFlags.doCavern:
     pupElm.bkgCaches["CavernCache"].OutputLevel = VERBOSE
 ##     pupElm.bkgCaches["CavernCache"].NonIntersectingRings = ["-1:1","-3:5", "-2:1"]
 ##     pupElm.bkgCaches["CavernCache"].AllowRingMigration = True
@@ -123,7 +123,7 @@ except Exception:
 #print resource usage summary at the end of the job
 #--------------------------------------------------------------
 theApp.AuditServices=True
-theApp.AuditAlgorithms=True 
+theApp.AuditAlgorithms=True
 from AthenaCommon.AppMgr import theAuditorSvc
 from AthenaCommon.ConfigurableDb import getConfigurable
 #theAuditorSvc += getConfigurable("ChronoAuditor")()
@@ -156,4 +156,3 @@ jobproperties.print_JobProperties()
 from AthenaCommon.AlgSequence import AlgSequence
 print AlgSequence()
 print ServiceMgr
-
diff --git a/Simulation/Digitization/test/TestDigitization.xml b/Simulation/Digitization/test/TestDigitization.xml
deleted file mode 100755
index 217b86e3708117722d6e29dc2138d9440c70c4df..0000000000000000000000000000000000000000
--- a/Simulation/Digitization/test/TestDigitization.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-<atn>
-   <TEST name="TestDigitization" type="athena">
-      <options> Digitization/DigitizationRTT_all_noLVL1.py</options>
-      <timelimit>20</timelimit>
-      <author> Paolo Calafiura </author>
-      <mailto> chapman@hep.phy.cam.ac.uk, PCalafiura@lbl.gov </mailto>
-      <expectations>
-         <errorMessage>FAILURE</errorMessage>
-         <successMessage>leaving with code 0</successMessage>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-</atn>
-
diff --git a/Simulation/Digitization/test/TestPileUp.xml b/Simulation/Digitization/test/TestPileUp.xml
deleted file mode 100755
index 0f4485c0e6c3b1af2c0bc9427e4cce5836414f64..0000000000000000000000000000000000000000
--- a/Simulation/Digitization/test/TestPileUp.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-<atn>
-   <TEST name="TestPileUp" type="athena">
-      <options> Digitization/NightlyPileUp.py</options>
-      <timelimit>20</timelimit>
-      <author> Paolo Calafiura </author>
-      <mailto>chapman@hep.phy.cam.ac.uk, PCalafiura@lbl.gov </mailto>
-      <expectations>
-         <errorMessage>FAILURE</errorMessage>
-         <successMessage>leaving with code 0</successMessage>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-</atn>
-
diff --git a/Simulation/Digitization/test/test_Digitization.sh b/Simulation/Digitization/test/test_Digitization.sh
new file mode 100755
index 0000000000000000000000000000000000000000..04db202e4e2d6fcc7142f9649becca2a9cebb4ce
--- /dev/null
+++ b/Simulation/Digitization/test/test_Digitization.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# art-description: Run digitization of an MC16a ttbar sample with 2016a geometry and conditions, without pile-up
+# art-type: build
+# art-include: 21.0/Athena
+# art-include: 21.3/Athena
+# art-include: 21.9/Athena
+# art-include: master/Athena
+
+athena Digitization/DigitizationRTT_all_noLVL1.py
+
+echo "art-result: $? digitization"
diff --git a/Simulation/Digitization/test/test_MC16a_Digi_tf_configuration.py b/Simulation/Digitization/test/test_MC16a_Digi_tf_configuration.py
index 9e4525789d7dd5af7f422304010ea511bde5e6f9..be2bf616bf4136240748be38cd47a6d2408a45a7 100755
--- a/Simulation/Digitization/test/test_MC16a_Digi_tf_configuration.py
+++ b/Simulation/Digitization/test/test_MC16a_Digi_tf_configuration.py
@@ -25,7 +25,7 @@ class TestDigitizationMC16a(unittest.TestCase):
             '--numberOfLowPtMinBias', '44.3839246425',
             '--outputRDOFile', 'mc16a_ttbar.RDO.pool.root',
             '--digiSteeringConf', 'StandardSignalOnlyTruth',
-            '--postExec', 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]', 'ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1',
+            '--postExec', 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]', 'condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1',
             '--postInclude', 'default:PyJobTransforms/UseFrontier.py',
             '--pileupFinalBunch', '6',
             '--preExec', 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)',
@@ -152,7 +152,7 @@ class TestDigitizationMC16a(unittest.TestCase):
 
 
     def test___PileUpToolsAlg_is_second_in_AthAlgSeq(self):
-        expected_AlgSequence = ['TimingAlg/DigiTimerBegin', 'PileUpToolsAlg/StandardSignalOnlyTruthPileUpToolsAlg', 'LArRawChannelBuilder/LArRawChannelBuilder', 'LArDigitThinner/LArDigitThinner', 'TileDigitsMaker/TileDigitsMaker', 'TileRawChannelMaker/TileRChMaker', 'TileRawChannelToL2/TileRawChannelToL2', 'CscDigitToCscRDO/CscDigitToCscRDO', 'MdtDigitToMdtRDO/MdtDigitToMdtRDO', 'RpcDigitToRpcRDO/RpcDigitToRpcRDO', 'TgcDigitToTgcRDO/TgcDigitToTgcRDO', 'LArTTL1Maker/LArTTL1Maker', 'TileHitToTTL1/TileHitToTTL1', 'TilePulseForTileMuonReceiver/TilePulseForTileMuonReceiver', 'TileMuonReceiverDecision/TileMuonReceiverDecision', 'AthenaOutputStream/StreamRDO']
+        expected_AlgSequence = ['TimingAlg/DigiTimerBegin', 'PileUpToolsAlg/StandardSignalOnlyTruthPileUpToolsAlg', 'LArRawChannelBuilderAlg/LArRawChannelBuilder', 'LArDigitThinner/LArDigitThinner', 'TileDigitsMaker/TileDigitsMaker', 'TileRawChannelMaker/TileRChMaker', 'TileRawChannelToL2/TileRawChannelToL2', 'CscDigitToCscRDO/CscDigitToCscRDO', 'MdtDigitToMdtRDO/MdtDigitToMdtRDO', 'RpcDigitToRpcRDO/RpcDigitToRpcRDO', 'TgcDigitToTgcRDO/TgcDigitToTgcRDO', 'LArTTL1Maker/LArTTL1Maker', 'TileHitToTTL1/TileHitToTTL1', 'TilePulseForTileMuonReceiver/TilePulseForTileMuonReceiver', 'TileMuonReceiverDecision/TileMuonReceiverDecision', 'AthenaOutputStream/StreamRDO']
         ath_alg_seqence_as_str = self._job_config_dict['AthAlgSeq']['Members']
         # need to evaluate to obtain actual Python object
         ath_alg_seqence_list = eval(ath_alg_seqence_as_str)
@@ -271,7 +271,7 @@ class TestDigitizationMC16a(unittest.TestCase):
 
     def test___LArPileUpTool_properties(self):
         tested_configurable_name = 'ToolSvc.LArPileUpTool'
-        expected_property_list = ['ADC2MeVTool', 'AutoCorrNoiseTool', 'BadChannelTool', 'DetStore', 'DigitContainer', 'EmBarrelHitContainerName', 'EmEndCapHitContainerName', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'ForWardHitContainerName', 'HecHitContainerName', 'HighGainThreshFCAL', 'LastXing', 'MaskingTool', 'NoiseOnOff', 'Nsamples', 'RndmEvtOverlay', 'RndmSvc', 'TriggerTimeToolName', 'firstSample', 'useLArFloat']
+        expected_property_list = ['AutoCorrNoiseTool', 'DetStore', 'DigitContainer', 'EmBarrelHitContainerName', 'EmEndCapHitContainerName', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'ForWardHitContainerName', 'HecHitContainerName', 'HighGainThreshFCAL', 'LastXing', 'MaskingTool', 'NoiseOnOff', 'Nsamples', 'RndmEvtOverlay', 'RndmSvc', 'TriggerTimeToolName', 'firstSample', 'useLArFloat']
         expected_nonstring_properties = {'LastXing': '101', 'FirstXing': '-751', 'Nsamples': '4', 'EmBarrelHitContainerName': '["LArHitEMB"]', 'EmEndCapHitContainerName': '["LArHitEMEC"]', 'ForWardHitContainerName': '["LArHitFCAL"]', 'HecHitContainerName': '["LArHitHEC"]'}
         expected_string_properties = {'DigitContainer': 'LArDigitContainer_MC'}
         self._detailed_ConfigurablePropertiesCheck(
diff --git a/Simulation/Digitization/test/test_PileUp.sh b/Simulation/Digitization/test/test_PileUp.sh
new file mode 100755
index 0000000000000000000000000000000000000000..f840cb2b92ad051c72968680b6ffa96965ee6c8f
--- /dev/null
+++ b/Simulation/Digitization/test/test_PileUp.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# art-description: Test of core pile-up digitization code using an MC16a ttbar sample with 2016a geometry and conditions, 25ns pile-up
+# art-type: build
+# art-include: 21.0/Athena
+# art-include: 21.3/Athena
+# art-include: 21.9/Athena
+# art-include: master/Athena
+
+athena Digitization/NightlyPileUp.py
+
+echo "art-result: $? digitization"
diff --git a/Simulation/G4Atlas/G4AtlasApps/python/atlas_flags.py b/Simulation/G4Atlas/G4AtlasApps/python/atlas_flags.py
index f9df1d6ecf2f27606078ce19962ff352cfc617b2..132a437d3c067aa679f34c24b17eb926a89cd826 100644
--- a/Simulation/G4Atlas/G4AtlasApps/python/atlas_flags.py
+++ b/Simulation/G4Atlas/G4AtlasApps/python/atlas_flags.py
@@ -153,7 +153,7 @@ class WorldRRange(JobProperty):
     R dimension of the ATLAS envelope
     """
     statusOn = False
-    allowerTypes = ['int','float']
+    allowedTypes = ['int','float']
     StoredValue = 12500.
 
 class WorldZRange(JobProperty):
diff --git a/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfig.py b/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfig.py
index e9f19581833eaebfc5720af5257a7ba623323c73..9c8614ac23bfddb5b4d5669a39841346e80b6095 100644
--- a/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfig.py
+++ b/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfig.py
@@ -89,6 +89,9 @@ def TileDMCaloCalibHitsTestTool(name="TileDMCaloCalibHitsTestTool", **kwargs):
 def TileCellCaloCalibHitsTestTool(name="TileCellCaloCalibHitsTestTool", **kwargs):
     kwargs.setdefault("CalibHitType","TileCell")
     return CfgMgr.CaloCalibrationHitsTestTool(name, **kwargs)
+def BeamTruthTestTool(name="BeamTruthTestTool", **kwargs):
+    kwargs.setdefault("McEventKey", "BeamTruthEvent")
+    return CfgMgr.TruthTestTool(name, **kwargs)
 def TruthTestTool(name="TruthTestTool", **kwargs):
     kwargs.setdefault("McEventKey", "TruthEvent")
     return CfgMgr.TruthTestTool(name, **kwargs)
diff --git a/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfigDb.py b/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfigDb.py
index 5f246952b8b590be7b2b1e2dd750ecc8936b7a5d..045924a28a232e3415cc845307c6ce0be10e0915 100644
--- a/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfigDb.py
+++ b/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfigDb.py
@@ -30,6 +30,7 @@ addTool("G4AtlasTests.G4AtlasTestsConfig.TileDeadMaterialCaloCalibHitsTestTool",
 addTool("G4AtlasTests.G4AtlasTestsConfig.TileCellCaloCalibHitsTestTool", "TileCellCaloCalibHitsTestTool") #old name
 addTool("G4AtlasTests.G4AtlasTestsConfig.TileDMCaloCalibHitsTestTool", "TileDMCaloCalibHitsTestTool") #old name
 addTool("G4AtlasTests.G4AtlasTestsConfig.EvgenTruthTestTool", "EvgenTruthTestTool")
+addTool("G4AtlasTests.G4AtlasTestsConfig.BeamTruthTestTool", "BeamTruthTestTool")
 addTool("G4AtlasTests.G4AtlasTestsConfig.TruthTestTool", "TruthTestTool")
 addTool("G4AtlasTests.G4AtlasTestsConfig.PileupEvgenTruthTestTool", "PileupEvgenTruthTestTool")
 addTool("G4AtlasTests.G4AtlasTestsConfig.PileupTruthTestTool", "PileupTruthTestTool")
diff --git a/Simulation/G4Atlas/G4AtlasTests/share/postInclude.DCubeTest.py b/Simulation/G4Atlas/G4AtlasTests/share/postInclude.DCubeTest.py
index 4968f05710bec03243e2fb77c91db9fb7cb3930e..21b8aa468ed2cecd2c90193b372b7ae3d008eee9 100644
--- a/Simulation/G4Atlas/G4AtlasTests/share/postInclude.DCubeTest.py
+++ b/Simulation/G4Atlas/G4AtlasTests/share/postInclude.DCubeTest.py
@@ -22,6 +22,7 @@ simFlags.ReleaseGeoModel=False;
 from AthenaCommon import CfgGetter
 if DetFlags.Truth_on():
     job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool("TruthTestTool", checkType=True)]
+    job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool("BeamTruthTestTool", checkType=True)]
     job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool("EvgenTruthTestTool", checkType=True)]
 if DetFlags.pixel_on():
     job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool("PixelHitsTestTool", checkType=True)]
diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx b/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx
index fbd12cf850b1b220a9e5a324985d49bf27fba82b..3ff3e891ecb595fc45683867478e103268d866dc 100644
--- a/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx
@@ -451,13 +451,13 @@ HepMC::GenVertex *ISF::TruthSvc::createGenVertexFromTruthIncident( ISF::ITruthIn
       this->deleteChildVertex(oldVertex);
     }
     else {
-#ifdef DEBUG_TRUTHSVC
-      ATH_MSG_VERBOSE("createGVfromTI Existing QS GenVertex 2: " << *oldVertex );
-#endif
       //oldVertex->suggest_barcode( vtxbcode );
       oldVertex->set_position( ti.position() );
       oldVertex->set_id( vtxID );
       oldVertex->weights() = weights;
+#ifdef DEBUG_TRUTHSVC
+      ATH_MSG_VERBOSE("createGVfromTI Existing QS GenVertex 2: " << *oldVertex );
+#endif
     }
 #ifdef DEBUG_TRUTHSVC
     ATH_MSG_VERBOSE ( "createGVfromTI QS End Vertex representing process: " << processCode << ", for parent with barcode "<<parentBC<<". Creating." );
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyBinParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyBinParametrization.h
index a7a1445d13f162346ddb37c92c815322e78b3718..426fdf0c55fd6a724b746829db2fd77bed73b5a4 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyBinParametrization.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyBinParametrization.h
@@ -14,12 +14,12 @@ class TFCSEnergyBinParametrization:public TFCSEnergyParametrization
  public:
   TFCSEnergyBinParametrization(const char* name=nullptr, const char* title=nullptr);
 
-  virtual void set_pdgid(int id);
-  virtual void set_pdgid(const std::set< int > &ids);
-  virtual void add_pdgid(int id);
-  virtual void clear_pdgid();
+  virtual void set_pdgid(int id) override;
+  virtual void set_pdgid(const std::set< int > &ids) override;
+  virtual void add_pdgid(int id) override;
+  virtual void clear_pdgid() override;
   
-  virtual int n_bins() const {return m_number_of_Ekin_bins;};
+  virtual int n_bins() const override {return m_number_of_Ekin_bins;};
 
   /// current convention is to start Ekin_bin counting at 1, to be updated to start counting with 0
   void set_number_of_Ekin_bins(int n_Ekin_bin) {m_number_of_Ekin_bins=n_Ekin_bin;resize();};
@@ -31,18 +31,18 @@ class TFCSEnergyBinParametrization:public TFCSEnergyParametrization
   /// current convention is to start Ekin_bin counting at 1, to be updated to start counting with 0
   virtual void set_pdgid_Ekin_bin_probability(int id,std::vector< float > prob);
   
-  virtual void simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
-  virtual bool is_match_Ekin_bin(int Ekin_bin) const;
+  virtual bool is_match_Ekin_bin(int Ekin_bin) const override;
   
-  void Print(Option_t *option = "") const;
+  void Print(Option_t *option = "") const override;
  private:
   int m_number_of_Ekin_bins;
   std::map< int, std::vector< float > > m_pdgid_Ebin_probability;
   
   void resize();
   
-  ClassDef(TFCSEnergyBinParametrization,1)  //TFCSEnergyBinParametrization
+  ClassDefOverride(TFCSEnergyBinParametrization,1)  //TFCSEnergyBinParametrization
  
 };
 
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyInterpolationLinear.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyInterpolationLinear.h
index 863f1fef0dc8c2700696c143c751f1c8aeb4822c..863d4265c38d1638700cb116b4ff3cf68dd686c5 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyInterpolationLinear.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyInterpolationLinear.h
@@ -11,23 +11,23 @@ class TFCSEnergyInterpolationLinear:public TFCSParametrization {
 public:
   TFCSEnergyInterpolationLinear(const char* name=nullptr, const char* title=nullptr);
 
-  virtual bool is_match_Ekin_bin(int /*Ekin_bin*/) const {return true;};
-  virtual bool is_match_calosample(int /*calosample*/) const {return true;};
+  virtual bool is_match_Ekin_bin(int /*Ekin_bin*/) const override {return true;};
+  virtual bool is_match_calosample(int /*calosample*/) const override {return true;};
   
   void set_slope(float slope) {m_slope=slope;};
   void set_offset(float offset) {m_offset=offset;};
 
   // Initialize simulstate with the mean reconstructed energy in the calorimater expeted from the true kinetic energy
-  virtual void simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
-  void Print(Option_t *option="") const;
+  void Print(Option_t *option="") const override;
 
   static void unit_test(TFCSSimulationState* simulstate=nullptr,TFCSTruthState* truth=nullptr, const TFCSExtrapolationState* extrapol=nullptr);
 private:
   float m_slope;
   float m_offset;
 
-  ClassDef(TFCSEnergyInterpolationLinear,1)  //TFCSEnergyInterpolationLinear
+  ClassDefOverride(TFCSEnergyInterpolationLinear,1)  //TFCSEnergyInterpolationLinear
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyInterpolationSpline.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyInterpolationSpline.h
index 8dbd11647b858164b11411eb3c35806b51a3a496..dab7cf0e8009fca1aa74df36b06b28f3eebedf01 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyInterpolationSpline.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyInterpolationSpline.h
@@ -14,8 +14,8 @@ class TFCSEnergyInterpolationSpline:public TFCSParametrization {
 public:
   TFCSEnergyInterpolationSpline(const char* name=nullptr, const char* title=nullptr);
 
-  virtual bool is_match_Ekin_bin(int /*Ekin_bin*/) const {return true;};
-  virtual bool is_match_calosample(int /*calosample*/) const {return true;};
+  virtual bool is_match_Ekin_bin(int /*Ekin_bin*/) const override {return true;};
+  virtual bool is_match_calosample(int /*calosample*/) const override {return true;};
   
   ///Initialize interpolation from spline
   ///x values should be log(Ekin), y values should <E(reco)/Ekin(true)>
@@ -32,15 +32,15 @@ public:
   const TSpline3& spline() const {return m_spline;};
 
   ///Initialize simulstate with the mean reconstructed energy in the calorimater expeted from the true kinetic energy
-  virtual void simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
-  void Print(Option_t *option="") const;
+  void Print(Option_t *option="") const override;
 
   static void unit_test(TFCSSimulationState* simulstate=nullptr,TFCSTruthState* truth=nullptr, const TFCSExtrapolationState* extrapol=nullptr,TGraph* grspline=nullptr);
 private:
   TSpline3 m_spline;
 
-  ClassDef(TFCSEnergyInterpolationSpline,1)  //TFCSEnergyInterpolationSpline
+  ClassDefOverride(TFCSEnergyInterpolationSpline,1)  //TFCSEnergyInterpolationSpline
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyParametrization.h
index 265a4fe64236be178ac472ba824da265018b3226..35c19369c324fe251128aa3e145be4d019c3c96c 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyParametrization.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyParametrization.h
@@ -11,15 +11,15 @@ class TFCSEnergyParametrization:public TFCSParametrization {
 public:
   TFCSEnergyParametrization(const char* name=nullptr, const char* title=nullptr);
 
-  virtual bool is_match_Ekin_bin(int /*Ekin_bin*/) const {return true;};
-  virtual bool is_match_calosample(int /*calosample*/) const {return true;};
+  virtual bool is_match_Ekin_bin(int /*Ekin_bin*/) const override {return true;};
+  virtual bool is_match_calosample(int /*calosample*/) const override {return true;};
 
   // return number of energy parametrization bins
   virtual int n_bins() const {return 0;};
 
 private:
 
-  ClassDef(TFCSEnergyParametrization,1)  //TFCSEnergyParametrization
+  ClassDefOverride(TFCSEnergyParametrization,1)  //TFCSEnergyParametrization
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSFunction.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSFunction.h
index 765b4e6dd7bbb81fa3b445a57270522e3d79acac..0fc827a195d340566663c96bed922d0e74b721c3 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSFunction.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSFunction.h
@@ -7,7 +7,7 @@
 
 #include "TObject.h"
 
-class TFCSFunction
+class TFCSFunction: public TObject 
 {
   public:
     TFCSFunction() {};
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h
index e7c96829bc327e389ca701700f62074c66559fe5..6066bad3d8f24b58b8ec4a9609d8d9fe69bb1d5c 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h
@@ -30,12 +30,12 @@ public:
   float get_number_of_expected_hits() const {return m_nhits;};
 
   /// default for this class is to simulate poisson(integral histogram) hits
-  int get_number_of_hits(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const;
+  int get_number_of_hits(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const override;
 
   /// simulated one hit position with weight that should be put into simulstate
   /// sometime later all hit weights should be resacled such that their final sum is simulstate->E(sample)
   /// someone also needs to map all hits into cells
-  virtual void simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
   /// Init from histogram. The integral of the histogram is used as number of expected hits to be generated
   bool Initialize(TH2* hist);
@@ -44,13 +44,13 @@ public:
   TFCS2DFunctionHistogram& histogram() {return m_hist;};
   const TFCS2DFunctionHistogram& histogram() const {return m_hist;};
   
-  void Print(Option_t *option = "") const;
+  void Print(Option_t *option = "") const override;
 private:
   /// Histogram to be used for the shape simulation
   TFCS2DFunctionHistogram m_hist;
   float m_nhits;
 
-  ClassDef(TFCSHistoLateralShapeParametrization,1)  //TFCSHistoLateralShapeParametrization
+  ClassDefOverride(TFCSHistoLateralShapeParametrization,1)  //TFCSHistoLateralShapeParametrization
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMapping.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMapping.h
index 7620f5f311e6da8f69159c2f7605e02714dfba7d..1e0a68ec68b6052289023fb0b6189fe9ba910b40 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMapping.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMapping.h
@@ -13,18 +13,19 @@ class TFCSHitCellMapping:public TFCSLateralShapeParametrizationHitBase {
 public:
   TFCSHitCellMapping(const char* name=nullptr, const char* title=nullptr, ICaloGeometry* geo=nullptr);
   
-  void set_geometry(ICaloGeometry* geo) {m_geo=geo;};
+  virtual void set_geometry(ICaloGeometry* geo) override {m_geo=geo;};
   ICaloGeometry* get_geometry() {return m_geo;};
 
   /// fills all hits into calorimeter cells
-  virtual void simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
-  void Print(Option_t *option) const;
+  void Print(Option_t *option) const override;
 
 protected:
   ICaloGeometry* m_geo; //! do not persistify
+
 private:
-  ClassDef(TFCSHitCellMapping,1)  //TFCSHitCellMapping
+  ClassDefOverride(TFCSHitCellMapping, 1) //TFCSHitCellMapping
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingFCal.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingFCal.h
index 4aee99d8e7e95e5167162f201ee1bcefce9283a5..8e66c2d04cd0a3a6f6dbe60aa6ba2d1cfefa4eff 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingFCal.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingFCal.h
@@ -13,10 +13,10 @@ class TFCSHitCellMappingFCal:public TFCSHitCellMapping {
 public:
   TFCSHitCellMappingFCal(const char* name=nullptr, const char* title=nullptr, ICaloGeometry* geo=nullptr):TFCSHitCellMapping(name,title,geo){}
   
-  virtual void simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
 private:
-  ClassDef(TFCSHitCellMappingFCal,1)  //TFCSHitCellMapping
+  ClassDefOverride(TFCSHitCellMappingFCal,1)  //TFCSHitCellMapping
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h
index d0e009f515f973594b6b463d15e16a9828e5c511..59374d81bb3af36ef281911bdb811b10ddbe02f2 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h
@@ -32,9 +32,9 @@ public:
 
   /// modify one hit position to emulate the LAr accordeon shape
   /// and then fills all hits into calorimeter cells
-  virtual void simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
-  void Print(Option_t *option="") const;
+  void Print(Option_t *option="") const override;
 
   static void unit_test(TFCSSimulationState* simulstate=nullptr,TFCSTruthState* truth=nullptr, TFCSExtrapolationState* extrapol=nullptr);
 
@@ -44,7 +44,7 @@ private:
   std::vector< const TFCS1DFunction* > m_functions = {nullptr};
   std::vector< float > m_bin_low_edge = {0,static_cast<float>(init_eta_max)};
 
-  ClassDef(TFCSHitCellMappingWiggle,1)  //TFCSHitCellMappingWiggle
+  ClassDefOverride(TFCSHitCellMappingWiggle,1)  //TFCSHitCellMappingWiggle
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggleEMB.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggleEMB.h
index 70e4d56c1ff0366d47747d36e9a5ad1bc57d4e40..1624d6a19d6fa6352c7301de8f18719aa413b02e 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggleEMB.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggleEMB.h
@@ -13,7 +13,7 @@ public:
 
   /// modify one hit position to emulate the LAr accordeon shape
   /// and then fills all hits into calorimeter cells
-  virtual void simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 private:
   //** Array for the hit-to-cell assignment accordion structure fix (wiggle)  **//
   //** To be moved to the conditions database at some point **//
@@ -23,7 +23,7 @@ private:
 
   double doWiggle();
 
-  ClassDef(TFCSHitCellMappingWiggleEMB,1)  //TFCSHitCellMappingWiggleEMB
+  ClassDefOverride(TFCSHitCellMappingWiggleEMB,1)  //TFCSHitCellMappingWiggleEMB
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSInitWithEkin.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSInitWithEkin.h
index b782795dbd60cb62021625a0a146bf6143a01439..f3b267ecb4751ea2ee95285c248e786b2465dd92 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSInitWithEkin.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSInitWithEkin.h
@@ -11,16 +11,16 @@ class TFCSInitWithEkin:public TFCSParametrization {
 public:
   TFCSInitWithEkin(const char* name=nullptr, const char* title=nullptr);
 
-  virtual bool is_match_Ekin_bin(int /*Ekin_bin*/) const {return true;};
-  virtual bool is_match_calosample(int /*calosample*/) const {return true;};
-  virtual bool is_match_all_Ekin_bin() const {return true;};
-  virtual bool is_match_all_calosample() const {return true;};
+  virtual bool is_match_Ekin_bin(int /*Ekin_bin*/) const override {return true;};
+  virtual bool is_match_calosample(int /*calosample*/) const override {return true;};
+  virtual bool is_match_all_Ekin_bin() const override {return true;};
+  virtual bool is_match_all_calosample() const override {return true;};
 
   // Initialize simulstate with the kinetic energy Ekin from truth
-  virtual void simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 private:
 
-  ClassDef(TFCSInitWithEkin,1)  //TFCSInitWithEkin
+  ClassDefOverride(TFCSInitWithEkin,1)  //TFCSInitWithEkin
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSInvisibleParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSInvisibleParametrization.h
index cac15460c1802a7a9c9a5dbc6aa282115c44a6ef..ee16a395a9a9765253db856bf414991f9281ec2d 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSInvisibleParametrization.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSInvisibleParametrization.h
@@ -11,13 +11,13 @@ class TFCSInvisibleParametrization:public TFCSParametrization {
 public:
   TFCSInvisibleParametrization(const char* name=nullptr, const char* title=nullptr):TFCSParametrization(name,title) {};
 
-  virtual bool is_match_Ekin_bin(int /*Ekin_bin*/) const {return true;};
-  virtual bool is_match_calosample(int /*calosample*/) const {return true;};
+  virtual bool is_match_Ekin_bin(int /*Ekin_bin*/) const override {return true;};
+  virtual bool is_match_calosample(int /*calosample*/) const override {return true;};
 
-  void simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 private:
 
-  ClassDef(TFCSInvisibleParametrization,1)  //TFCSInvisibleParametrization
+  ClassDefOverride(TFCSInvisibleParametrization,1)  //TFCSInvisibleParametrization
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrization.h
index 743523ec8d8e779c3b7be9ee83ec6bf44b9bfe92..5dd736368d6528f17487ffab52d31d9245c82967 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrization.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrization.h
@@ -11,11 +11,11 @@ class TFCSLateralShapeParametrization:public TFCSParametrization {
 public:
   TFCSLateralShapeParametrization(const char* name=nullptr, const char* title=nullptr);
 
-  bool is_match_Ekin_bin(int bin) const {if(Ekin_bin()==-1) return true;return bin==Ekin_bin();};
-  bool is_match_calosample(int calosample) const {return calosample==m_calosample;};
+  bool is_match_Ekin_bin(int bin) const override {if(Ekin_bin()==-1) return true;return bin==Ekin_bin();};
+  bool is_match_calosample(int calosample) const override {return calosample==m_calosample;};
 
-  virtual bool is_match_all_Ekin_bin() const {if(Ekin_bin()==-1) return true;return false;};
-  virtual bool is_match_all_calosample() const {return false;};
+  virtual bool is_match_all_Ekin_bin() const override {if(Ekin_bin()==-1) return true;return false;};
+  virtual bool is_match_all_calosample() const override {return false;};
   
   int Ekin_bin() const {return m_Ekin_bin;};
   void set_Ekin_bin(int bin);
@@ -25,12 +25,12 @@ public:
 
   virtual void set_pdgid_Ekin_eta_Ekin_bin_calosample(const TFCSLateralShapeParametrization& ref);
   
-  void Print(Option_t *option = "") const;
+  void Print(Option_t *option = "") const override;
 private:
   int m_Ekin_bin;
   int m_calosample;
 
-  ClassDef(TFCSLateralShapeParametrization,1)  //TFCSLateralShapeParametrization
+  ClassDefOverride(TFCSLateralShapeParametrization,1)  //TFCSLateralShapeParametrization
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h
index f53cbc785e794d77b4b8e15463a172e7443dbc62..e37cccf2db9d1b486c4a36096f8cb0501d133275 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h
@@ -19,20 +19,23 @@ public:
   class Hit
   {
     public:
-    Hit():m_eta_x(0.),m_phi_y(0.),m_z(0.),m_E(0.) {}; // for hits with the same energy, m_E should normalized to E(layer)/nhit
-    Hit(float eta, float phi, float E):m_eta_x(eta),m_phi_y(phi),m_E(E) {};
-    Hit(float x, float y, float z, float E):m_eta_x(x),m_phi_y(y),m_z(z),m_E(E) {};
+    Hit():m_eta_x(0.),m_phi_y(0.),m_z(0.),m_E(0.),m_useXYZ(false) {}; // for hits with the same energy, m_E should normalized to E(layer)/nhit
+    Hit(float eta, float phi, float E):m_eta_x(eta),m_phi_y(phi),m_E(E),m_useXYZ(false) {};
+    Hit(float x, float y, float z, float E):m_eta_x(x),m_phi_y(y),m_z(z),m_E(E),m_useXYZ(true) {};
     
-    inline void setEtaPhiE(float eta,float phi, float E){
+    inline void setEtaPhiZE(float eta,float phi,float z, float E){
       m_eta_x=eta;
       m_phi_y=phi;
+      m_z=z;
       m_E=E;
+      m_useXYZ=false;
     }
     inline void setXYZE(float x,float y,float z, float E){
       m_eta_x=x;
       m_phi_y=y;
       m_z=z;
       m_E=E;
+      m_useXYZ=true;
     }
 
     inline void reset(){
@@ -40,6 +43,7 @@ public:
       m_phi_y=0.;
       m_z=0.;
       m_E=0.;
+      m_useXYZ=false;
     }
 
     inline float& eta() {return m_eta_x;};
@@ -48,21 +52,27 @@ public:
     inline float& y() {return m_phi_y;};
     inline float& E() {return m_E;};
     inline float& z() {return m_z;}
+    inline float r() {
+      if(m_useXYZ) return sqrt(m_eta_x*m_eta_x + m_phi_y*m_phi_y);
+      else return m_z/asinh(m_eta_x);
+    }
 
     private:
     float m_eta_x; // eta for barrel and end-cap, x for FCal
     float m_phi_y; // phi for barrel and end-cap, y for FCal
     float m_z;
     float m_E;
+    bool m_useXYZ;
+    
   };
 
   /// simulated one hit position with some energy. As last step in TFCSLateralShapeParametrizationHitChain::simulate, 
   /// the hit should be mapped into a cell and this cell recorded in simulstate. 
   /// All hits/cells should be resacled such that their final sum is simulstate->E(sample)
-  virtual void simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
 private:
 
-  ClassDef(TFCSLateralShapeParametrizationHitBase,1)  //TFCSLateralShapeParametrizationHitBase
+  ClassDefOverride(TFCSLateralShapeParametrizationHitBase,1)  //TFCSLateralShapeParametrizationHitBase
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitChain.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitChain.h
index c101ba418a291147858d53af9e92777c3205ecae..4a912ace0c96c4d832a4fd45f0fb5a54b1b9111a 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitChain.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitChain.h
@@ -14,14 +14,14 @@ public:
   TFCSLateralShapeParametrizationHitChain(const char* name=nullptr, const char* title=nullptr);
   TFCSLateralShapeParametrizationHitChain(TFCSLateralShapeParametrizationHitBase* hitsim);
 
-  virtual void simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
-  virtual void set_geometry(ICaloGeometry* geo);
+  virtual void set_geometry(ICaloGeometry* geo) override;
 
   typedef std::vector< TFCSLateralShapeParametrizationHitBase* > Chain_t;
-  virtual unsigned int size() const {return m_chain.size();};
-  virtual const TFCSParametrizationBase* operator[](unsigned int ind) const {return m_chain[ind];};
-  virtual TFCSParametrizationBase* operator[](unsigned int ind) {return m_chain[ind];};
+  virtual unsigned int size() const override {return m_chain.size();};
+  virtual const TFCSParametrizationBase* operator[](unsigned int ind) const override {return m_chain[ind];};
+  virtual TFCSParametrizationBase* operator[](unsigned int ind) override {return m_chain[ind];};
   const Chain_t& chain() const {return m_chain;};
   Chain_t& chain() {return m_chain;};
   void push_back( const Chain_t::value_type& value ) {m_chain.push_back(value);};
@@ -31,11 +31,11 @@ public:
   /// Call get_number_of_hits() only once, as it could contain a random number
   virtual int get_number_of_hits(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const;
 
-  void Print(Option_t *option = "") const;
+  void Print(Option_t *option = "") const override;
 
 #if defined(__FastCaloSimStandAlone__)
   /// Update outputlevel
-  virtual void setLevel(int level,bool recursive=false) {
+  virtual void setLevel(int level,bool recursive=false) override {
     TFCSLateralShapeParametrization::setLevel(level,recursive);
     if(recursive) if(m_number_of_hits_simul) m_number_of_hits_simul->setLevel(level,recursive);
   }
@@ -45,7 +45,7 @@ public:
 private:
   Chain_t m_chain;
   TFCSLateralShapeParametrizationHitBase* m_number_of_hits_simul;
-  ClassDef(TFCSLateralShapeParametrizationHitChain,1)  //TFCSLateralShapeParametrizationHitChain
+  ClassDefOverride(TFCSLateralShapeParametrizationHitChain,1)  //TFCSLateralShapeParametrizationHitChain
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h
index 1a43b160857533e81fe61b32e6bddafaa707167c..ec4ef2f20d365d47f7485adadb87b4c8014ff7e1 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h
@@ -27,15 +27,15 @@ public:
   ///    constant=0.035;
   TFCSLateralShapeParametrizationHitNumberFromE(const char* name=nullptr, const char* title=nullptr,double stochastic=0.1,double constant=0);
 
-  int get_number_of_hits(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const;
+  int get_number_of_hits(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const override;
 
-  void Print(Option_t *option = "") const;
+  void Print(Option_t *option = "") const override;
 private:
   // simple shape information should be stored as private member variables here
   double m_stochastic;
   double m_constant;
 
-  ClassDef(TFCSLateralShapeParametrizationHitNumberFromE,1)  //TFCSLateralShapeParametrizationHitNumberFromE
+  ClassDefOverride(TFCSLateralShapeParametrizationHitNumberFromE,1)  //TFCSLateralShapeParametrizationHitNumberFromE
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSPCAEnergyParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSPCAEnergyParametrization.h
index 1f9f9d9ce5a723f7e73d7503df5689dfdae643bc..c9556bdf6cae84a7e3152fc5899a68b9dfbbd06f 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSPCAEnergyParametrization.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSPCAEnergyParametrization.h
@@ -19,24 +19,24 @@ class TFCSPCAEnergyParametrization:public TFCSEnergyParametrization
  public:
   TFCSPCAEnergyParametrization(const char* name=nullptr, const char* title=nullptr);
 
-  virtual void simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
   
   int n_pcabins() const { return m_numberpcabins; };
-  virtual int n_bins() const {return m_numberpcabins;};
+  virtual int n_bins() const override {return m_numberpcabins;};
   const std::vector<int>& get_layers() const { return m_RelevantLayers; };
 
-  virtual bool is_match_Ekin_bin(int Ekin_bin) const;
-  virtual bool is_match_calosample(int calosample) const;
-  virtual bool is_match_all_Ekin_bin() const {return true;};
-  virtual bool is_match_all_calosample() const {return false;};
+  virtual bool is_match_Ekin_bin(int Ekin_bin) const override;
+  virtual bool is_match_calosample(int calosample) const override;
+  virtual bool is_match_all_Ekin_bin() const override {return true;};
+  virtual bool is_match_all_calosample() const override {return false;};
   
   void P2X(TVectorD*, TVectorD* , TMatrixD* , int, double* , double* , int);
   bool loadInputs(TFile* file);
   bool loadInputs(TFile* file,std::string);
   void clean();
   
-  void Print(Option_t *option = "") const;
-  
+  void Print(Option_t *option = "") const override;
+
   int                       do_rescale;
   
  private:
@@ -52,7 +52,7 @@ class TFCSPCAEnergyParametrization:public TFCSEnergyParametrization
   
   int m_numberpcabins;
   
-  ClassDef(TFCSPCAEnergyParametrization,1)  //TFCSPCAEnergyParametrization
+  ClassDefOverride(TFCSPCAEnergyParametrization,1)  //TFCSPCAEnergyParametrization
  
 };
 
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrization.h
index e94934f98ff9e1c6519ec64cb5bfa9d37efe51e5..df7e3b95be06781655ff4efb7855d987419794e6 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrization.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrization.h
@@ -12,22 +12,22 @@ public:
   TFCSParametrization(const char* name=nullptr, const char* title=nullptr);
   void clear();
 
-  virtual bool is_match_pdgid(int id) const {return TestBit(kMatchAllPDGID) || m_pdgid.find(id)!=m_pdgid.end();};
-  virtual bool is_match_Ekin(float Ekin) const {return (Ekin>=m_Ekin_min) && (Ekin<m_Ekin_max);};
-  virtual bool is_match_eta(float eta) const {return (eta>=m_eta_min) && (eta<m_eta_max);};
-
-  virtual bool is_match_all_Ekin() const {return Ekin_min()==init_Ekin_min && Ekin_max()==init_Ekin_max;};
-  virtual bool is_match_all_eta() const {return eta_min()==init_eta_min && eta_max()==init_eta_max;};
-  virtual bool is_match_all_Ekin_bin() const {return true;};
-  virtual bool is_match_all_calosample() const {return true;};
-
-  const std::set< int > &pdgid() const {return m_pdgid;};
-  double Ekin_nominal() const {return m_Ekin_nominal;};
-  double Ekin_min() const {return m_Ekin_min;};
-  double Ekin_max() const {return m_Ekin_max;};
-  double eta_nominal() const {return m_eta_nominal;};
-  double eta_min() const {return m_eta_min;};
-  double eta_max() const {return m_eta_max;};
+  virtual bool is_match_pdgid(int id) const override {return TestBit(kMatchAllPDGID) || m_pdgid.find(id)!=m_pdgid.end();};
+  virtual bool is_match_Ekin(float Ekin) const override {return (Ekin>=m_Ekin_min) && (Ekin<m_Ekin_max);};
+  virtual bool is_match_eta(float eta) const override {return (eta>=m_eta_min) && (eta<m_eta_max);};
+
+  virtual bool is_match_all_Ekin() const override {return Ekin_min()==init_Ekin_min && Ekin_max()==init_Ekin_max;};
+  virtual bool is_match_all_eta() const override {return eta_min()==init_eta_min && eta_max()==init_eta_max;};
+  virtual bool is_match_all_Ekin_bin() const override {return true;};
+  virtual bool is_match_all_calosample() const override {return true;};
+
+  const std::set< int > &pdgid() const override {return m_pdgid;};
+  double Ekin_nominal() const override {return m_Ekin_nominal;};
+  double Ekin_min() const override {return m_Ekin_min;};
+  double Ekin_max() const override {return m_Ekin_max;};
+  double eta_nominal() const override {return m_eta_nominal;};
+  double eta_min() const override {return m_eta_min;};
+  double eta_max() const override {return m_eta_max;};
 
   virtual void set_pdgid(int id);
   virtual void set_pdgid(const std::set< int > &ids);
@@ -51,7 +51,7 @@ private:
   double m_Ekin_nominal,m_Ekin_min,m_Ekin_max;
   double m_eta_nominal,m_eta_min,m_eta_max;
 
-  ClassDef(TFCSParametrization,1)  //TFCSParametrization
+  ClassDefOverride(TFCSParametrization,1)  //TFCSParametrization
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationAbsEtaSelectChain.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationAbsEtaSelectChain.h
index 553a729dc114a9db37418d43d4c07a692b82a6fc..d80dc3421cba5e4359e2bf804a4f2041655bdc44 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationAbsEtaSelectChain.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationAbsEtaSelectChain.h
@@ -14,14 +14,14 @@ public:
 
   //selects on |extrapol->IDCaloBoundary_eta()|
   //return -1 if outside range
-  virtual int get_bin(TFCSSimulationState&,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const;
-  virtual const std::string get_bin_text(int bin) const;
+  virtual int get_bin(TFCSSimulationState&,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const override;
+  virtual const std::string get_bin_text(int bin) const override;
 
   static void unit_test(TFCSSimulationState* simulstate=nullptr,TFCSTruthState* truth=nullptr, TFCSExtrapolationState* extrapol=nullptr);
 
 private:
 
-  ClassDef(TFCSParametrizationAbsEtaSelectChain,1)  //TFCSParametrizationAbsEtaSelectChain
+  ClassDefOverride(TFCSParametrizationAbsEtaSelectChain,1)  //TFCSParametrizationAbsEtaSelectChain
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBase.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBase.h
index 55eb9659969e856ed57097f59ff8001f898a1643..5d11ae369f132fcf724d8f6f4d7ea9997c46eabd 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBase.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBase.h
@@ -73,6 +73,15 @@ Several basic types of parametrization exists:
 - a special case of TFCSLateralShapeParametrization is TFCSLateralShapeParametrizationHitBase for hit level shape simulation through the simulate_hit method. Hit level simulation is controlled through the special chain TFCSLateralShapeParametrizationHitChain.
 */
 
+///Return codes for the simulate function
+enum FCSReturnCode {
+  FCSFatal = 0,
+  FCSSuccess = 1,
+  FCSRetry = 2
+};
+
+#define FCS_RETRY_COUNT 3
+
 class TFCSParametrizationBase:public TNamed {
 public:
   TFCSParametrizationBase(const char* name=nullptr, const char* title=nullptr);
@@ -122,7 +131,7 @@ public:
   virtual TFCSParametrizationBase* operator[](unsigned int /*ind*/) {return nullptr;};
 
   ///Method in all derived classes to do some simulation
-  virtual void simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
 
   ///Print object information. 
   void Print(Option_t *option = "") const;
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBinnedChain.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBinnedChain.h
index b6a6adbb164f750c76f22032ee9877d72ab5d2d1..720a5a64fc5bbf3a8ab2884b62cc37ef38e09f91 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBinnedChain.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBinnedChain.h
@@ -25,9 +25,9 @@ public:
   ///print the range of a bin; for bin -1, print the allowed range
   virtual const std::string get_bin_text(int bin) const;
 
-  virtual void simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
-  void Print(Option_t *option = "") const;
+  void Print(Option_t *option = "") const override;
   
   static void unit_test(TFCSSimulationState* simulstate=nullptr,const TFCSTruthState* truth=nullptr, const TFCSExtrapolationState* extrapol=nullptr);
 
@@ -41,7 +41,7 @@ protected:
 
 private:
 
-  ClassDef(TFCSParametrizationBinnedChain,1)  //TFCSParametrizationBinnedChain
+  ClassDefOverride(TFCSParametrizationBinnedChain,1)  //TFCSParametrizationBinnedChain
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationChain.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationChain.h
index 78eb717a7d31ce80c22dd19df227ee03b2c6426a..6d97dc41bc6049cd82d9669b5ec2cdb7830b8112 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationChain.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationChain.h
@@ -13,19 +13,19 @@ public:
   TFCSParametrizationChain(const TFCSParametrizationChain& ref):TFCSParametrization(ref.GetName(),ref.GetTitle()),m_chain(ref.chain()) {};
 
   typedef std::vector< TFCSParametrizationBase* > Chain_t;
-  virtual unsigned int size() const {return m_chain.size();};
-  virtual const TFCSParametrizationBase* operator[](unsigned int ind) const {return m_chain[ind];};
-  virtual TFCSParametrizationBase* operator[](unsigned int ind) {return m_chain[ind];};
+  virtual unsigned int size() const override {return m_chain.size();};
+  virtual const TFCSParametrizationBase* operator[](unsigned int ind) const override {return m_chain[ind];};
+  virtual TFCSParametrizationBase* operator[](unsigned int ind) override {return m_chain[ind];};
   const Chain_t& chain() const {return m_chain;};
   Chain_t& chain() {return m_chain;};
   void push_back(const Chain_t::value_type& param) {m_chain.push_back(param);recalc();};
 
-  virtual bool is_match_Ekin_bin(int Ekin_bin) const;
-  virtual bool is_match_calosample(int calosample) const;
+  virtual bool is_match_Ekin_bin(int Ekin_bin) const override;
+  virtual bool is_match_calosample(int calosample) const override;
 
-  virtual void simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
-  void Print(Option_t *option = "") const;
+  void Print(Option_t *option = "") const override;
 protected:
   void recalc_pdgid_intersect();
   void recalc_pdgid_union();
@@ -40,12 +40,17 @@ protected:
   
   ///Default is to call recalc_pdgid_intersect() and recalc_Ekin_eta_intersect()
   virtual void recalc();
+
+  FCSReturnCode simulate_and_retry(TFCSParametrizationBase* parametrization, TFCSSimulationState& simulstate, const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+
 private:  
   Chain_t m_chain;
 
-  ClassDef(TFCSParametrizationChain,1)  //TFCSParametrizationChain
+  ClassDefOverride(TFCSParametrizationChain,1)  //TFCSParametrizationChain
 };
 
+#include "ISF_FastCaloSimEvent/TFCSParametrizationChain.icc"
+
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
 #pragma link C++ class TFCSParametrizationChain+;
 #endif
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationChain.icc b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationChain.icc
new file mode 100644
index 0000000000000000000000000000000000000000..dbc515fe1ad2d6c0764bb15f3f2f5bdd521ad940
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationChain.icc
@@ -0,0 +1,23 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "ISF_FastCaloSimEvent/TFCSParametrization.h"
+
+inline FCSReturnCode TFCSParametrizationChain::simulate_and_retry(TFCSParametrizationBase* parametrization, TFCSSimulationState& simulstate, const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
+{
+  for (int i = 0; i <= FCS_RETRY_COUNT; i++) {
+    if (i > 0) ATH_MSG_WARNING("TFCSParametrizationChain::simulate(): Retry simulate call " << i << "/" << FCS_RETRY_COUNT);
+
+    FCSReturnCode status = parametrization->simulate(simulstate, truth, extrapol);
+
+    if (status == FCSSuccess)
+      return FCSSuccess;
+    else if (status == FCSFatal)
+      return FCSFatal;
+  }
+
+  ATH_MSG_FATAL("TFCSParametrizationChain::simulate(): Simulate call failed after " << FCS_RETRY_COUNT << "retries");
+
+  return FCSFatal;
+}
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationEbinChain.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationEbinChain.h
index 15aef2976fadcbcfeff6fa01f07194c375a81067..75c6be70555d5b585593c405007b4008fe04d3be 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationEbinChain.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationEbinChain.h
@@ -14,13 +14,13 @@ public:
   TFCSParametrizationEbinChain(const TFCSParametrizationEbinChain& ref):TFCSParametrizationBinnedChain(ref) {};
 
   /// current convention is to start Ebin counting at 1, to be updated to start counting with 0
-  virtual int get_bin(TFCSSimulationState& simulstate,const TFCSTruthState*, const TFCSExtrapolationState*) const {return simulstate.Ebin();};
-  virtual const std::string get_variable_text(TFCSSimulationState& simulstate,const TFCSTruthState*, const TFCSExtrapolationState*) const;
+  virtual int get_bin(TFCSSimulationState& simulstate,const TFCSTruthState*, const TFCSExtrapolationState*) const override {return simulstate.Ebin();};
+  virtual const std::string get_variable_text(TFCSSimulationState& simulstate,const TFCSTruthState*, const TFCSExtrapolationState*) const override;
 
   static void unit_test(TFCSSimulationState* simulstate=nullptr,const TFCSTruthState* truth=nullptr, const TFCSExtrapolationState* extrapol=nullptr);
 private:
 
-  ClassDef(TFCSParametrizationEbinChain,1)  //TFCSParametrizationEbinChain
+  ClassDefOverride(TFCSParametrizationEbinChain,1)  //TFCSParametrizationEbinChain
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationEkinSelectChain.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationEkinSelectChain.h
index 04cefb369498113173a7c0e645c8a4d551992970..ce0378346c025854fe118d884ae6972f1212d7ac 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationEkinSelectChain.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationEkinSelectChain.h
@@ -26,18 +26,18 @@ public:
   virtual void push_back_in_bin(TFCSParametrizationBase* param);
   //selects on truth->Ekin()
   //return -1 if outside range
-  virtual int get_bin(TFCSSimulationState&,const TFCSTruthState* truth, const TFCSExtrapolationState*) const;
-  virtual const std::string get_variable_text(TFCSSimulationState& simulstate,const TFCSTruthState*, const TFCSExtrapolationState*) const;
-  virtual const std::string get_bin_text(int bin) const;
+  virtual int get_bin(TFCSSimulationState&,const TFCSTruthState* truth, const TFCSExtrapolationState*) const override;
+  virtual const std::string get_variable_text(TFCSSimulationState& simulstate,const TFCSTruthState*, const TFCSExtrapolationState*) const override;
+  virtual const std::string get_bin_text(int bin) const override;
 
   static void unit_test(TFCSSimulationState* simulstate=nullptr,TFCSTruthState* truth=nullptr, const TFCSExtrapolationState* extrapol=nullptr);
 
 protected:
-  void recalc();
+  virtual void recalc() override;
 
 private:
 
-  ClassDef(TFCSParametrizationEkinSelectChain,1)  //TFCSParametrizationEkinSelectChain
+  ClassDefOverride(TFCSParametrizationEkinSelectChain,1)  //TFCSParametrizationEkinSelectChain
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationEtaSelectChain.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationEtaSelectChain.h
index 577e28759c6ac7fb17fda3458c39ef93b8c36c42..c7924a8e8464a605efc7d6b2dfb8bc8d4a85d9ae 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationEtaSelectChain.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationEtaSelectChain.h
@@ -16,18 +16,18 @@ public:
   virtual void push_back_in_bin(TFCSParametrizationBase* param);
   //selects on extrapol->IDCaloBoundary_eta()
   //return -1 if outside range
-  virtual int get_bin(TFCSSimulationState&,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const;
-  virtual const std::string get_variable_text(TFCSSimulationState& simulstate,const TFCSTruthState*, const TFCSExtrapolationState*) const;
-  virtual const std::string get_bin_text(int bin) const;
+  virtual int get_bin(TFCSSimulationState&,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const override;
+  virtual const std::string get_variable_text(TFCSSimulationState& simulstate,const TFCSTruthState*, const TFCSExtrapolationState*) const override;
+  virtual const std::string get_bin_text(int bin) const override;
 
   static void unit_test(TFCSSimulationState* simulstate=nullptr,TFCSTruthState* truth=nullptr, TFCSExtrapolationState* extrapol=nullptr);
 
 protected:
-  void recalc();
+  virtual void recalc() override;
 
 private:
 
-  ClassDef(TFCSParametrizationEtaSelectChain,1)  //TFCSParametrizationEtaSelectChain
+  ClassDefOverride(TFCSParametrizationEtaSelectChain,1)  //TFCSParametrizationEtaSelectChain
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationFloatSelectChain.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationFloatSelectChain.h
index 844944e67a0fb73e1f40de59d537890e6e9cfce9..1d7d2a498d6112f22db6ec43abfde9575529a72a 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationFloatSelectChain.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationFloatSelectChain.h
@@ -14,7 +14,7 @@ public:
 
   virtual int push_back_in_bin(TFCSParametrizationBase* param, float low, float up);
   ///Should not be used unless the bin boundaries are already defined!
-  virtual void push_back_in_bin(TFCSParametrizationBase* param, unsigned int bin);
+  virtual void push_back_in_bin(TFCSParametrizationBase* param, unsigned int bin) override;
 
   //return -1 if outside range
   int val_to_bin(float val) const;
@@ -29,7 +29,7 @@ protected:
 
 private:
 
-  ClassDef(TFCSParametrizationFloatSelectChain,1)  //TFCSParametrizationFloatSelectChain
+  ClassDefOverride(TFCSParametrizationFloatSelectChain,1)  //TFCSParametrizationFloatSelectChain
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationPDGIDSelectChain.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationPDGIDSelectChain.h
index 56d8d978ef656925376f7fb6e21cdad5241819d0..766f4bf415fbfd8c412d4efa8ee4610ae20ef904 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationPDGIDSelectChain.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationPDGIDSelectChain.h
@@ -21,15 +21,15 @@ public:
   void set_SimulateOnlyOnePDGID() {SetBit(kSimulateOnlyOnePDGID);};
   void reset_SimulateOnlyOnePDGID() {ResetBit(kSimulateOnlyOnePDGID);};
 
-  virtual void simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
   static void unit_test(TFCSSimulationState* simulstate=nullptr,TFCSTruthState* truth=nullptr,TFCSExtrapolationState* extrapol=nullptr);
 protected:
-  virtual void recalc();
+  virtual void recalc() override;
 
 private:
 
-  ClassDef(TFCSParametrizationPDGIDSelectChain,1)  //TFCSParametrizationPDGIDSelectChain
+  ClassDefOverride(TFCSParametrizationPDGIDSelectChain,1)  //TFCSParametrizationPDGIDSelectChain
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyBinParametrization.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyBinParametrization.cxx
index 22a8252772fd55263b2670dc15d039d8d5ff4eed..ba3db006ec7baa9a30349d5ce2d1b5adcbada951 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyBinParametrization.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyBinParametrization.cxx
@@ -99,24 +99,27 @@ void TFCSEnergyBinParametrization::Print(Option_t *option) const
   }  
 }
 
-void TFCSEnergyBinParametrization::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* /*extrapol*/)
+FCSReturnCode TFCSEnergyBinParametrization::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* /*extrapol*/)
 {
   int pdgid=truth->pdgid();
   if(!is_match_pdgid(pdgid)) {
     ATH_MSG_ERROR("TFCSEnergyBinParametrization::simulate(): cannot simulate pdgid="<<pdgid);
-    return;
+    return FCSFatal;
   }
   float searchRand=gRandom->Rndm();
   int chosenBin=TMath::BinarySearch(n_bins()+1, m_pdgid_Ebin_probability[pdgid].data(), searchRand)+1;
   if(chosenBin<1 || chosenBin>n_bins()) {
     ATH_MSG_ERROR("TFCSEnergyBinParametrization::simulate(): cannot simulate bin="<<chosenBin);
+    ATH_MSG_ERROR("  This error could probably be retried.");
     if(msgLvl(MSG::ERROR)) {
       ATH_MSG(ERROR)<<"in "<<GetName()<<": E="<<simulstate.E()<<" Ebin="<<chosenBin<<" rnd="<<searchRand<<" array=";
       for(int iEbin=0;iEbin<=n_bins();++iEbin) msg()<<m_pdgid_Ebin_probability[pdgid][iEbin]<<" ";
       msg()<<std::endl;
     }  
-    return;
+    return FCSFatal;
   }
   simulstate.set_Ebin(chosenBin);
   ATH_MSG_DEBUG("Ebin="<<chosenBin);
+
+  return FCSSuccess;
 }
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyInterpolationLinear.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyInterpolationLinear.cxx
index 9744d1a9eb82df21e4502af90bb43b6e3c6404eb..a3a25cc8bf47da5337a8839cb7f1b0baf6a804c8 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyInterpolationLinear.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyInterpolationLinear.cxx
@@ -19,12 +19,14 @@ TFCSEnergyInterpolationLinear::TFCSEnergyInterpolationLinear(const char* name, c
 {
 }
 
-void TFCSEnergyInterpolationLinear::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState*)
+FCSReturnCode TFCSEnergyInterpolationLinear::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState*)
 {
   float Emean=m_slope*truth->Ekin()+m_offset;
 
   ATH_MSG_DEBUG("set E="<<Emean<<" for true Ekin="<<truth->Ekin());
   simulstate.set_E(Emean);
+
+  return FCSSuccess;
 }
 
 void TFCSEnergyInterpolationLinear::Print(Option_t *option) const
@@ -67,7 +69,9 @@ void TFCSEnergyInterpolationLinear::unit_test(TFCSSimulationState* simulstate,TF
   for(float Ekin=1000;Ekin<=100000;Ekin*=1.1) {
     //Init LorentzVector for truth. For photon Ekin=E
     truth->SetPxPyPzE(Ekin,0,0,Ekin);
-    test.simulate(*simulstate,truth,extrapol);
+    if (test.simulate(*simulstate,truth,extrapol) != FCSSuccess) {
+      return;
+    }
     gr->SetPoint(ip,Ekin,simulstate->E()/Ekin);
     ++ip;
   }  
@@ -79,4 +83,3 @@ void TFCSEnergyInterpolationLinear::unit_test(TFCSSimulationState* simulstate,TF
   c->SetLogx();
   #endif
 }
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyInterpolationSpline.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyInterpolationSpline.cxx
index f996139e679fef553d6491139da5643ad1715d77..bb5b4f1b136b77ce8871ed6800b71c1737e17305 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyInterpolationSpline.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyInterpolationSpline.cxx
@@ -34,7 +34,7 @@ void TFCSEnergyInterpolationSpline::InitFromArrayInEkin(Int_t np, Double_t Ekin[
   InitFromArrayInLogEkin(np,logEkin.data(),response,opt,valbeg,valend);
 }
 
-void TFCSEnergyInterpolationSpline::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState*)
+FCSReturnCode TFCSEnergyInterpolationSpline::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState*)
 {
   float Emean;
   float logEkin=TMath::Log(truth->Ekin());
@@ -50,6 +50,8 @@ void TFCSEnergyInterpolationSpline::simulate(TFCSSimulationState& simulstate,con
 
   ATH_MSG_DEBUG("set E="<<Emean<<" for true Ekin="<<truth->Ekin());
   simulstate.set_E(Emean);
+
+  return FCSSuccess;
 }
 
 void TFCSEnergyInterpolationSpline::Print(Option_t *option) const
@@ -130,7 +132,9 @@ void TFCSEnergyInterpolationSpline::unit_test(TFCSSimulationState* simulstate,TF
   for(float Ekin=test.Ekin_min()*0.25;Ekin<=test.Ekin_max()*4;Ekin*=1.05) {
     //Init LorentzVector for truth. For photon Ekin=E
     truth->SetPxPyPzE(Ekin,0,0,Ekin);
-    test.simulate(*simulstate,truth,extrapol);
+    if (test.simulate(*simulstate,truth,extrapol) != FCSSuccess) {
+      return;
+    }
     gr->SetPoint(ip,Ekin,simulstate->E()/Ekin);
     ++ip;
   }  
@@ -143,4 +147,3 @@ void TFCSEnergyInterpolationSpline::unit_test(TFCSSimulationState* simulstate,TF
   c->SetLogx();
   #endif
 }
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHistoLateralShapeParametrization.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHistoLateralShapeParametrization.cxx
index 44e7119aa3d9e2c951f815e56b165baead60d7b4..d726ffd45729fcb4c5ad8f836113011127b71036 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHistoLateralShapeParametrization.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHistoLateralShapeParametrization.cxx
@@ -37,7 +37,7 @@ void TFCSHistoLateralShapeParametrization::set_number_of_hits(float nhits)
   m_nhits=nhits;
 }
 
-void TFCSHistoLateralShapeParametrization::simulate_hit(Hit& hit,TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* extrapol)
+FCSReturnCode TFCSHistoLateralShapeParametrization::simulate_hit(Hit& hit,TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* extrapol)
 {
   const int cs=calosample();
   const double center_eta=0.5*( extrapol->eta(cs, CaloSubPos::SUBPOS_ENT) + extrapol->eta(cs, CaloSubPos::SUBPOS_EXT) );
@@ -67,6 +67,9 @@ void TFCSHistoLateralShapeParametrization::simulate_hit(Hit& hit,TFCSSimulationS
     ATH_MSG_ERROR("  Histogram: "<<m_hist.get_HistoBordersx().size()-1<<"*"<<m_hist.get_HistoBordersy().size()-1<<" bins, #hits="<<m_nhits<<" alpha="<<alpha<<" r="<<r<<" rnd1="<<rnd1<<" rnd2="<<rnd2);
     alpha=0;
     r=0.001;
+
+    ATH_MSG_ERROR("  This error could probably be retried");
+    return FCSFatal;
   }
   
   const float delta_eta_mm = r * cos(alpha);
@@ -82,6 +85,8 @@ void TFCSHistoLateralShapeParametrization::simulate_hit(Hit& hit,TFCSSimulationS
   hit.phi() = center_phi + delta_phi;
 
   ATH_MSG_DEBUG("HIT: E="<<hit.E()<<" cs="<<cs<<" eta="<<hit.eta()<<" phi="<<hit.phi()<<" r="<<r<<" alpha="<<alpha);
+
+  return FCSSuccess;
 }
 
 
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMapping.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMapping.cxx
index bd66e0925dca69577d568f7fe7bd1e2b72eb52e9..ce5eac7bc731de0cf8f32ecbd8cd53f76e66b400 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMapping.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMapping.cxx
@@ -17,15 +17,17 @@ TFCSHitCellMapping::TFCSHitCellMapping(const char* name, const char* title, ICal
   set_match_all_pdgid();
 }
 
-void TFCSHitCellMapping::simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/)
+FCSReturnCode TFCSHitCellMapping::simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/)
 {
   int cs=calosample();
   const CaloDetDescrElement* cellele=m_geo->getDDE(cs,hit.eta(),hit.phi());
   ATH_MSG_DEBUG("HIT: cellele="<<cellele<<" E="<<hit.E()<<" cs="<<cs<<" eta="<<hit.eta()<<" phi="<<hit.phi());
   if(cellele) {
     simulstate.deposit(cellele,hit.E());
+    return FCSSuccess;
   } else {
     ATH_MSG_ERROR("TFCSLateralShapeParametrizationHitCellMapping::simulate_hit: cellele="<<cellele<<" E="<<hit.E()<<" cs="<<cs<<" eta="<<hit.eta()<<" phi="<<hit.phi());
+    return FCSFatal;
   }
 }
 
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingFCal.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingFCal.cxx
index 7f493482b30e213507d36a4309abf37033e3c3e3..cc7fc671085e771257646586793cfa4fb150b502 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingFCal.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingFCal.cxx
@@ -11,7 +11,7 @@
 //=============================================
 
 
-void TFCSHitCellMappingFCal::simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/)
+FCSReturnCode TFCSHitCellMappingFCal::simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/)
 {
   int cs=calosample();
   const CaloDetDescrElement* cellele=m_geo->getFCalDDE(cs,hit.x(),hit.y(),hit.z());
@@ -20,5 +20,8 @@ void TFCSHitCellMappingFCal::simulate_hit(Hit& hit,TFCSSimulationState& simulsta
     simulstate.deposit(cellele,hit.E());
   } else {
     ATH_MSG_ERROR("TFCSLateralShapeParametrizationHitCellMapping::simulate_hit: cellele="<<cellele<<" E="<<hit.E()<<" cs="<<cs<<" eta="<<hit.eta()<<" phi="<<hit.phi());
+    return FCSFatal;
   }
+
+  return FCSSuccess;
 }
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggle.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggle.cxx
index fbfa4cac92847be9b219de625207329bf2e27ea2..70f8cf2f0e779933b8bde30b34f08cf939790236 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggle.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggle.cxx
@@ -85,12 +85,11 @@ void TFCSHitCellMappingWiggle::initialize(const std::vector< const TH1* > histog
   initialize(functions,bin_low_edges);
 }
 
-void TFCSHitCellMappingWiggle::simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
+FCSReturnCode TFCSHitCellMappingWiggle::simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
 {
   float eta=fabs(hit.eta());
   if(eta<m_bin_low_edge[0] || eta>=m_bin_low_edge[get_number_of_bins()]) {
-    TFCSHitCellMapping::simulate_hit(hit,simulstate,truth,extrapol);
-    return;
+    return TFCSHitCellMapping::simulate_hit(hit,simulstate,truth,extrapol);
   }  
   
   auto it = std::upper_bound(m_bin_low_edge.begin(),m_bin_low_edge.end(),eta);
@@ -108,7 +107,7 @@ void TFCSHitCellMappingWiggle::simulate_hit(Hit& hit,TFCSSimulationState& simuls
     hit.phi()=TVector2::Phi_mpi_pi(hit_phi_shifted);
   }  
 
-  TFCSHitCellMapping::simulate_hit(hit,simulstate,truth,extrapol);
+  return TFCSHitCellMapping::simulate_hit(hit,simulstate,truth,extrapol);
 }
 
 void TFCSHitCellMappingWiggle::Print(Option_t *option) const
@@ -170,4 +169,3 @@ void TFCSHitCellMappingWiggle::unit_test(TFCSSimulationState* simulstate,TFCSTru
 #endif
 
 }
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggleEMB.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggleEMB.cxx
index bee8b904784af5fc1d769711d5f2dd3edb789d5b..b817853ee81ad3e37eaf1b0d4bc4570f5e7e7a1b 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggleEMB.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggleEMB.cxx
@@ -73,7 +73,7 @@ double TFCSHitCellMappingWiggleEMB::doWiggle()
  return wiggle;
 }
 
-void TFCSHitCellMappingWiggleEMB::simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
+FCSReturnCode TFCSHitCellMappingWiggleEMB::simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
 {
   int cs=calosample();
 
@@ -85,5 +85,5 @@ void TFCSHitCellMappingWiggleEMB::simulate_hit(Hit& hit,TFCSSimulationState& sim
   double hit_phi_shifted=hit.phi()-wiggle;
   hit.phi()=TVector2::Phi_mpi_pi(hit_phi_shifted);
 
-  TFCSHitCellMapping::simulate_hit(hit,simulstate,truth,extrapol);
+  return TFCSHitCellMapping::simulate_hit(hit,simulstate,truth,extrapol);
 }
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSInitWithEkin.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSInitWithEkin.cxx
index 5eeed2cd5cb05c30f0d38083bc7875921dfff2d6..74980f736e3a2b365d94450fb853071eaa43bf33 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSInitWithEkin.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSInitWithEkin.cxx
@@ -15,10 +15,9 @@ TFCSInitWithEkin::TFCSInitWithEkin(const char* name, const char* title):TFCSPara
   set_match_all_pdgid();
 }
 
-void TFCSInitWithEkin::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState*)
+FCSReturnCode TFCSInitWithEkin::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState*)
 {
   ATH_MSG_DEBUG("set E to Ekin="<<truth->Ekin());
   simulstate.set_E(truth->Ekin());
+  return FCSSuccess;
 }
-
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSInvisibleParametrization.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSInvisibleParametrization.cxx
index 2e0bd47d8ce829c0540dafdaaca2e64d9b745a6d..a2d4f8d1cf59e31da144a281c59b71973f22aef9 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSInvisibleParametrization.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSInvisibleParametrization.cxx
@@ -8,8 +8,8 @@
 //======= TFCSInvisibleParametrization =========
 //=============================================
 
-void TFCSInvisibleParametrization::simulate(TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/)
+FCSReturnCode TFCSInvisibleParametrization::simulate(TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/)
 {
   ATH_MSG_VERBOSE("now in TFCSInvisibleParametrization::simulate(). Don't do anything for invisible");
+  return FCSSuccess;
 }
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitBase.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitBase.cxx
index 8692fbc5f4dcfc34961d8ea585854a54e217d4c3..ace709d6cc37beff91c039906f7a6ea15db0fe88 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitBase.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitBase.cxx
@@ -21,9 +21,11 @@ int TFCSLateralShapeParametrizationHitBase::get_number_of_hits(TFCSSimulationSta
   return -1;
 }
 
-void TFCSLateralShapeParametrizationHitBase::simulate_hit(Hit& hit,TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* extrapol)
+FCSReturnCode TFCSLateralShapeParametrizationHitBase::simulate_hit(Hit& hit,TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* extrapol)
 {
   int cs=calosample();
   hit.eta()=0.5*( extrapol->eta(cs, CaloSubPos::SUBPOS_ENT) + extrapol->eta(cs, CaloSubPos::SUBPOS_EXT) );
   hit.phi()=0.5*( extrapol->phi(cs, CaloSubPos::SUBPOS_ENT) + extrapol->phi(cs, CaloSubPos::SUBPOS_EXT) );
+
+  return FCSSuccess;
 }
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx
index aeb539de5f3a51492495d0896126f0ee46f87b3f..798689be0fd32219b3700e00c8dccc9cde50da9f 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx
@@ -42,32 +42,44 @@ int TFCSLateralShapeParametrizationHitChain::get_number_of_hits(TFCSSimulationSt
   return 1;
 }
 
-void TFCSLateralShapeParametrizationHitChain::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
+FCSReturnCode TFCSLateralShapeParametrizationHitChain::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
 {
   // Call get_number_of_hits() only once, as it could contain a random number
   int nhit=get_number_of_hits(simulstate,truth,extrapol);
   float Ehit=simulstate.E(calosample())/nhit;
-  
-  if(msgLvl(MSG::DEBUG)) {
+
+  bool debug = msgLvl(MSG::DEBUG);
+  if (debug) {
     ATH_MSG_DEBUG("E("<<calosample()<<")="<<simulstate.E(calosample())<<" #hits="<<nhit);
-    for(int i=0;i<nhit;++i) {
-      TFCSLateralShapeParametrizationHitBase::Hit hit; 
-      hit.E()=Ehit;
-      for(TFCSLateralShapeParametrizationHitBase* hitsim : m_chain) {
-        if(i<2) hitsim->setLevel(MSG::DEBUG);
-         else hitsim->setLevel(MSG::INFO);
-        hitsim->simulate_hit(hit,simulstate,truth,extrapol);
-      } 
-    }  
-  } else {
-    for(int i=0;i<nhit;++i) {
-      TFCSLateralShapeParametrizationHitBase::Hit hit; 
-      hit.E()=Ehit;
-      for(TFCSLateralShapeParametrizationHitBase* hitsim : m_chain) {
-        hitsim->simulate_hit(hit,simulstate,truth,extrapol);
-      } 
-    }  
-  }  
+  }
+
+  for (int i = 0; i < nhit; ++i) {
+    TFCSLateralShapeParametrizationHitBase::Hit hit; 
+    hit.E()=Ehit;
+    for(TFCSLateralShapeParametrizationHitBase* hitsim : m_chain) {
+      if (debug) {
+        if (i < 2) hitsim->setLevel(MSG::DEBUG);
+        else hitsim->setLevel(MSG::INFO);
+      }
+
+      for (int i = 0; i <= FCS_RETRY_COUNT; i++) {
+        if (i > 0) ATH_MSG_WARNING("TFCSLateralShapeParametrizationHitChain::simulate(): Retry simulate_hit call " << i << "/" << FCS_RETRY_COUNT);
+  
+        FCSReturnCode status = hitsim->simulate_hit(hit, simulstate, truth, extrapol);
+
+        if (status == FCSSuccess)
+          break;
+        else if (status == FCSFatal)
+          return FCSFatal;
+
+        if (i == FCS_RETRY_COUNT) {
+          ATH_MSG_ERROR("TFCSLateralShapeParametrizationHitChain::simulate(): simulate_hit call failed after " << FCS_RETRY_COUNT << "retries");
+        }
+      }
+    }
+  }
+
+  return FCSSuccess;
 }
 
 void TFCSLateralShapeParametrizationHitChain::Print(Option_t *option) const
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSPCAEnergyParametrization.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSPCAEnergyParametrization.cxx
index bf3695b474dcfc300ea31d6a24d7215518233c31..29a2e44b841f7b65bd9d93f9ce65f9665f38ae10 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSPCAEnergyParametrization.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSPCAEnergyParametrization.cxx
@@ -58,7 +58,7 @@ void TFCSPCAEnergyParametrization::Print(Option_t *option) const
   }  
 }
 
-void TFCSPCAEnergyParametrization::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/)
+FCSReturnCode TFCSPCAEnergyParametrization::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/)
 {
 
   int pcabin=simulstate.Ebin();
@@ -134,6 +134,7 @@ void TFCSPCAEnergyParametrization::simulate(TFCSSimulationState& simulstate,cons
   delete [] input_data;
   delete [] simdata;
 
+  return FCSSuccess;
 }
 
 void TFCSPCAEnergyParametrization::P2X(TVectorD* SigmaValues, TVectorD* MeanValues, TMatrixD *EV, int gNVariables, double *p, double *x, int nTest)
@@ -262,4 +263,3 @@ void TFCSPCAEnergyParametrization::clean()
  for(unsigned int i=0;i<m_EV.size();i++)
   delete m_EV[i];
 }
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBase.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBase.cxx
index 9d9723d1095b86e1f17e40cced8769f8ab64f55f..2b5ec52785edecab66065bca78eb0f43532888b0 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBase.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBase.cxx
@@ -35,9 +35,10 @@ void TFCSParametrizationBase::set_geometry(ICaloGeometry* geo)
 ///Result should be returned in simulstate.
 ///Simulate all energies in calo layers for energy parametrizations.
 ///Simulate cells for shape simulation.
-void TFCSParametrizationBase::simulate(TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/)
+FCSReturnCode TFCSParametrizationBase::simulate(TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/)
 {
   ATH_MSG_ERROR("now in TFCSParametrizationBase::simulate(). This should normally not happen");
+  return FCSFatal;
 }
 
 ///If called with argument "short", only a one line summary will be printed
@@ -74,4 +75,3 @@ void TFCSParametrizationBase::Print(Option_t *option) const
     ATH_MSG_INFO(optprint<<GetTitle());
   }
 }
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBinnedChain.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBinnedChain.cxx
index 5bbcafad86342b1a9e84dbfe0b68b9bbcfffca38..7f3b87389be0e9537750d9b7ad4d42a3e614dd8b 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBinnedChain.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBinnedChain.cxx
@@ -57,18 +57,22 @@ const std::string TFCSParametrizationBinnedChain::get_bin_text(int bin) const
   return std::string(Form("bin %d",bin));
 }
 
-void TFCSParametrizationBinnedChain::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
+FCSReturnCode TFCSParametrizationBinnedChain::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
 {
   for(unsigned int ichain=0;ichain<m_bin_start[0];++ichain) {
     ATH_MSG_DEBUG("now run for all bins: "<<chain()[ichain]->GetName());
-    chain()[ichain]->simulate(simulstate,truth,extrapol);
+    if (simulate_and_retry(chain()[ichain], simulstate, truth, extrapol) != FCSSuccess) {
+      return FCSFatal;
+    }
   }
   if(get_number_of_bins()>0) {
     int bin=get_bin(simulstate,truth,extrapol);
     if(bin>=0 && bin<(int)get_number_of_bins()) {
       for(unsigned int ichain=m_bin_start[bin];ichain<m_bin_start[bin+1];++ichain) {
         ATH_MSG_DEBUG("for "<<get_variable_text(simulstate,truth,extrapol)<<" run "<<get_bin_text(bin)<<": "<<chain()[ichain]->GetName());
-        chain()[ichain]->simulate(simulstate,truth,extrapol);
+        if (simulate_and_retry(chain()[ichain], simulstate, truth, extrapol) != FCSSuccess) {
+          return FCSFatal;
+        }
       }
     } else {
       ATH_MSG_WARNING("for "<<get_variable_text(simulstate,truth,extrapol)<<": "<<get_bin_text(bin));
@@ -78,8 +82,12 @@ void TFCSParametrizationBinnedChain::simulate(TFCSSimulationState& simulstate,co
   }  
   for(unsigned int ichain=m_bin_start.back();ichain<size();++ichain) {
     ATH_MSG_DEBUG("now run for all bins: "<<chain()[ichain]->GetName());
-    chain()[ichain]->simulate(simulstate,truth,extrapol);
+    if (simulate_and_retry(chain()[ichain], simulstate, truth, extrapol) != FCSSuccess) {
+      return FCSFatal;
+    }
   }
+
+  return FCSSuccess;
 }
 
 void TFCSParametrizationBinnedChain::Print(Option_t *option) const
@@ -164,4 +172,3 @@ void TFCSParametrizationBinnedChain::unit_test(TFCSSimulationState* simulstate,c
   chain.simulate(*simulstate,truth,extrapol);
   std::cout<<"==================================="<<std::endl<<std::endl;
 }
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationChain.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationChain.cxx
index 34d26f82a518d83580dafde06feca76d9120aad4..0fa9806b76e5fe45af8253935bcf4cf77741b794 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationChain.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationChain.cxx
@@ -125,11 +125,15 @@ bool TFCSParametrizationChain::is_match_calosample(int calosample) const
   return true;
 }
 
-void TFCSParametrizationChain::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
+FCSReturnCode TFCSParametrizationChain::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
 {
   for(auto param: m_chain) {
-    param->simulate(simulstate,truth,extrapol);
+    if (simulate_and_retry(param, simulstate, truth, extrapol) != FCSSuccess) {
+      return FCSFatal;
+    }
   }
+
+  return FCSSuccess;
 }
 
 void TFCSParametrizationChain::Print(Option_t *option) const
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationPDGIDSelectChain.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationPDGIDSelectChain.cxx
index 92f95764f7d00e1fd53d77873ef06edc66d44ebf..4fe3ddddc13d1088ec082e094df1230302aebe38 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationPDGIDSelectChain.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationPDGIDSelectChain.cxx
@@ -24,15 +24,21 @@ void TFCSParametrizationPDGIDSelectChain::recalc()
   chain().shrink_to_fit();
 }
 
-void TFCSParametrizationPDGIDSelectChain::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
+FCSReturnCode TFCSParametrizationPDGIDSelectChain::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
 {
   for(auto param: chain()) {
     if(param->is_match_pdgid(truth->pdgid())) {
       ATH_MSG_DEBUG("pdgid="<<truth->pdgid()<<", now run: "<<param->GetName()<< ((SimulateOnlyOnePDGID()==true) ? ", abort PDGID loop afterwards" : ", continue PDGID loop afterwards"));
-      param->simulate(simulstate,truth,extrapol);
+
+      if (simulate_and_retry(param, simulstate,truth,extrapol) != FCSSuccess) {
+        return FCSFatal;
+      }
+
       if(SimulateOnlyOnePDGID()) break;
     }  
   }
+
+  return FCSSuccess;
 }
 
 void TFCSParametrizationPDGIDSelectChain::unit_test(TFCSSimulationState* simulstate,TFCSTruthState* truth,TFCSExtrapolationState* extrapol)
@@ -104,4 +110,3 @@ void TFCSParametrizationPDGIDSelectChain::unit_test(TFCSSimulationState* simulst
   chain.simulate(*simulstate,truth,extrapol);
   
 }
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/TFCSNNLateralShapeParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/TFCSNNLateralShapeParametrization.h
index 172791c4b47a8cc9f9b749c92e8e6c449091e69d..d68ea1bf2c1702163eb3189a39467c5c88c370ef 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/TFCSNNLateralShapeParametrization.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/TFCSNNLateralShapeParametrization.h
@@ -14,11 +14,11 @@ public:
   // simulated one hit position with weight that should be put into simulstate
   // sometime later all hit weights should be resacled such that their final sum is simulstate->E(sample)
   // someone also needs to map all hits into cells
-  virtual void simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 private:
   // NN shape information should be stored as private member variables here
 
-  ClassDef(TFCSNNLateralShapeParametrization,1)  //TFCSNNLateralShapeParametrization
+  ClassDefOverride(TFCSNNLateralShapeParametrization,1)  //TFCSNNLateralShapeParametrization
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/TFCSSimpleLateralShapeParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/TFCSSimpleLateralShapeParametrization.h
index ba5e6920061671b8a644a2689b0c5ec7ea7d41b8..9b2ff0a30540fb3179dd3c62080e4561047b0fea 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/TFCSSimpleLateralShapeParametrization.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/TFCSSimpleLateralShapeParametrization.h
@@ -20,7 +20,7 @@ public:
   // simulated one hit position with weight that should be put into simulstate
   // sometime later all hit weights should be resacled such that their final sum is simulstate->E(sample)
   // someone also needs to map all hits into cells
-  virtual void simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol);
+  virtual FCSReturnCode simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override;
 
   // Init and fill sigma
   bool Initialize(const char* filepath, const char* histname);
@@ -45,7 +45,7 @@ private:
   TRandom3 *m_rnd;
 
 
-  ClassDef(TFCSSimpleLateralShapeParametrization,1)  //TFCSSimpleLateralShapeParametrization
+  ClassDefOverride(TFCSSimpleLateralShapeParametrization,1)  //TFCSSimpleLateralShapeParametrization
 };
 
 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/Root/TFCSNNLateralShapeParametrization.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/Root/TFCSNNLateralShapeParametrization.cxx
index eb3959990df0f8905941372740d66e12cca4fde2..08400981503fd020b3991c859f15731369a8d147 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/Root/TFCSNNLateralShapeParametrization.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/Root/TFCSNNLateralShapeParametrization.cxx
@@ -14,10 +14,11 @@ TFCSNNLateralShapeParametrization::TFCSNNLateralShapeParametrization(const char*
 {
 }
 
-void TFCSNNLateralShapeParametrization::simulate_hit(Hit& hit,TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* extrapol)
+FCSReturnCode TFCSNNLateralShapeParametrization::simulate_hit(Hit& hit,TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* extrapol)
 {
   int cs=calosample();
   hit.eta()=0.5*( extrapol->eta(cs, CaloSubPos::SUBPOS_ENT) + extrapol->eta(cs, CaloSubPos::SUBPOS_EXT) );
   hit.phi()=0.5*( extrapol->phi(cs, CaloSubPos::SUBPOS_ENT) + extrapol->phi(cs, CaloSubPos::SUBPOS_EXT) );
-}
 
+  return FCSSuccess;
+}
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/Root/TFCSSimpleLateralShapeParametrization.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/Root/TFCSSimpleLateralShapeParametrization.cxx
index f3524186d16a8909c722d6b115408e5cbeb5e1fb..fcd88efcdcc8ddc6b28548bd977dd4e923b6de3c 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/Root/TFCSSimpleLateralShapeParametrization.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/Root/TFCSSimpleLateralShapeParametrization.cxx
@@ -26,7 +26,7 @@ TFCSSimpleLateralShapeParametrization::~TFCSSimpleLateralShapeParametrization()
 }
 
 
-void TFCSSimpleLateralShapeParametrization::simulate_hit(Hit& hit,TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* extrapol)
+FCSReturnCode TFCSSimpleLateralShapeParametrization::simulate_hit(Hit& hit,TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* extrapol)
 {
   int cs=calosample();
   hit.eta()=0.5*( extrapol->eta(cs, CaloSubPos::SUBPOS_ENT) + extrapol->eta(cs, CaloSubPos::SUBPOS_EXT) );
@@ -42,6 +42,8 @@ void TFCSSimpleLateralShapeParametrization::simulate_hit(Hit& hit,TFCSSimulation
 
   hit.eta() += delta_eta;
   hit.phi() += delta_phi;
+
+  return FCSSuccess;
 }
 
 
@@ -138,4 +140,3 @@ void TFCSSimpleLateralShapeParametrization::getHitXY(double &x, double &y)
     y = m_rnd->Gaus(0, m_sigmaY);
 
 }
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcV2.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcV2.cxx
index 7111db031accce387f600437507b5842df53728b..4513a725306d2909a7e5d4afad30def11fedac1e 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcV2.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcV2.cxx
@@ -219,7 +219,10 @@ StatusCode ISF::FastCaloSimSvcV2::simulate(const ISF::ISFParticle& isfp)
   m_FastCaloSimCaloExtrapolation->extrapolate(extrapol,&truth);
   TFCSSimulationState simulstate;
 
-  m_param->simulate(simulstate, &truth, &extrapol);
+  FCSReturnCode status = m_param->simulate(simulstate, &truth, &extrapol);
+  if (status != FCSSuccess) {
+    return StatusCode::FAILURE;
+  }
 
   ATH_MSG_INFO("Energy returned: " << simulstate.E());
   ATH_MSG_INFO("Energy fraction for layer: ");
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/ISF_FatrasDetDescrTools/PlanarDetLayerBuilder.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/ISF_FatrasDetDescrTools/PlanarDetLayerBuilder.h
index 3a834401ebe4eadbd655bc58707322907a07faaf..a3f37d4aa7ce82f874691fc9b0b961a6c3f38c76 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/ISF_FatrasDetDescrTools/PlanarDetLayerBuilder.h
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/ISF_FatrasDetDescrTools/PlanarDetLayerBuilder.h
@@ -42,9 +42,6 @@ namespace Trk {
   typedef std::pair< SharedObject<const Surface>, Amg::Vector3D > SurfaceOrderPosition;
 }
 
-namespace InDetDD {
-  class SiDetectorManager;
-}
 
 namespace iFatras {
 
@@ -102,8 +99,6 @@ namespace iFatras {
     void computeRadiusMinMax(Amg::Transform3D trf, iFatras::PlanarDetElement* moduleTmp, double &rMin, double &rMax) const;
     
     bool                                           m_pixelCase;                      //!< flag for pixel/sct
-    const InDetDD::SiDetectorManager*              m_siMgr;                          //!< the Si Detector Manager
-    std::string                                    m_siMgrLocation;                  //!< the location of the Pixel Manager
     const PixelID*                                 m_pixIdHelper;                    //!< pixel Id Helper 
     const SCT_ID*                                  m_sctIdHelper;                    //!< sct Id Helper
 
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/python/CustomInDetTrackingGeometryBuilder.py b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/python/CustomInDetTrackingGeometryBuilder.py
index 14d8f3a86c448378ade3a0deec4aba284bda69d5..4b883e17cd79708846edcf65071094e223c43f20 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/python/CustomInDetTrackingGeometryBuilder.py
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/python/CustomInDetTrackingGeometryBuilder.py
@@ -305,7 +305,6 @@ class CustomInDetTrackingGeometryBuilder( InDet__StagedTrackingGeometryBuilder )
             SCT_LayerBuilder.PixelCase                       = False
             SCT_LayerBuilder.Identification                  = 'SCT'
             SCT_LayerBuilder.InputLayerMaterialProvider      = ISF_InputLayerMaterialProvider  
-            SCT_LayerBuilder.SiDetManagerLocation            = 'SCT'
             # SCT barrel specifications
             SCT_LayerBuilder.BarrelLayerBinsZ                = TrkDetFlags.SCT_BarrelLayerMaterialBinsZ()
             SCT_LayerBuilder.BarrelLayerBinsPhi              = TrkDetFlags.SCT_BarrelLayerMaterialBinsPhi()
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/src/PlanarDetLayerBuilder.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/src/PlanarDetLayerBuilder.cxx
index 8ab9e2c7acb344631798b65ea601f70f1d0bbd62..90b30c1912bffa954a835e9eac3b69a0c4a72ccc 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/src/PlanarDetLayerBuilder.cxx
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/src/PlanarDetLayerBuilder.cxx
@@ -39,8 +39,6 @@
 // InDet 
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/PixelID.h"
-#include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 // Root
 #include "TTree.h"
 #include "TFile.h"
@@ -54,8 +52,6 @@
 iFatras::PlanarDetLayerBuilder::PlanarDetLayerBuilder(const std::string& t, const std::string& n, const IInterface* p) :
   base_class(t,n,p),
   m_pixelCase(true),
-  m_siMgr(0),
-  m_siMgrLocation("Pixel"),
   m_pixIdHelper(0),
   m_sctIdHelper(0),
   m_detElementMapName("Pixel_IdHashDetElementMap"),
@@ -97,7 +93,6 @@ iFatras::PlanarDetLayerBuilder::PlanarDetLayerBuilder(const std::string& t, cons
 {
   // general steering
   declareProperty("PixelCase"                        , m_pixelCase);
-  declareProperty("SiDetManagerLocation"             , m_siMgrLocation);
   declareProperty("SetLayerAssociation"              , m_setLayerAssociation);
   
   // identification
@@ -202,27 +197,11 @@ StatusCode iFatras::PlanarDetLayerBuilder::initialize()
 
   // get Pixel Detector Description Manager
   if (m_pixelCase) {
-    const InDetDD::PixelDetectorManager* pixMgr = 0;
-    if ((detStore()->retrieve(pixMgr, m_siMgrLocation)).isFailure()) {
-      ATH_MSG_ERROR( "Could not get PixelDetectorManager '" << m_siMgrLocation << "', no layers for Pixel Detector will be built. " );
-    } else {
-      ATH_MSG_VERBOSE( "PlanarDetLayerBuilder: PixelDetectorManager retrieved with key '" << m_siMgrLocation <<"'." );
-      // assign the detector manager to the silicon manager
-      m_siMgr = pixMgr;
-      if (detStore()->retrieve(m_pixIdHelper, "PixelID").isFailure())
-	ATH_MSG_ERROR("Could not get Pixel ID helper");
-    }
+    if (detStore()->retrieve(m_pixIdHelper, "PixelID").isFailure())
+      ATH_MSG_ERROR("Could not get Pixel ID helper");
   } else {
-    const InDetDD::SCT_DetectorManager* sctMgr = 0;
-    if ((detStore()->retrieve(sctMgr, m_siMgrLocation)).isFailure()) {
-      ATH_MSG_ERROR( "Could not get SCT_DetectorManager '" << m_siMgrLocation << "', no layers for SCT Detector will be built." );
-    } else {
-      ATH_MSG_VERBOSE( "SCT_DetectorManager retrieved with key '" << m_siMgrLocation <<"'." );
-      // assign the detector manager to the silicon manager
-      m_siMgr = sctMgr;
-      if (detStore()->retrieve(m_sctIdHelper, "SCT_ID").isFailure())
-	ATH_MSG_ERROR("Could not get SCT ID helper");
-    }
+    if (detStore()->retrieve(m_sctIdHelper, "SCT_ID").isFailure())
+      ATH_MSG_ERROR("Could not get SCT ID helper");
   }
  
   if (!m_layerEquidistantBinning)
diff --git a/Simulation/ISF/ISF_ParametricSim/ISF_ParSimTools/ISF_ParSimTools/TrackParticleSmearer.h b/Simulation/ISF/ISF_ParametricSim/ISF_ParSimTools/ISF_ParSimTools/TrackParticleSmearer.h
index 5da377558fd1306000ffc6777d56bc4f3890c43b..e47cc7faa1cf7d7a738b7e5c05ef5c4d79d7a68b 100644
--- a/Simulation/ISF/ISF_ParametricSim/ISF_ParSimTools/ISF_ParSimTools/TrackParticleSmearer.h
+++ b/Simulation/ISF/ISF_ParametricSim/ISF_ParSimTools/ISF_ParSimTools/TrackParticleSmearer.h
@@ -3,7 +3,7 @@
 */
 
 ///////////////////////////////////////////////////////////////////
-// TrackParticleSmearer.h, (c) ATLAS Detector software
+// TrackParticleSmearer.h
 ///////////////////////////////////////////////////////////////////
 
 #ifndef ISF_PARSIMTOOLS_TRACKPARTICLESMEARER_H
@@ -24,69 +24,68 @@
 #include "xAODTracking/TrackParticleContainer.h"
 #include "xAODTracking/TrackParticleAuxContainer.h"
 #include "ISF_ParSimInterfaces/IChargedSmearer.h"
+
+#include "TrkExInterfaces/IExtrapolationEngine.h"
+
 // CLHEP
 //#include "CLHEP/Random/RandomEngine.h"
 namespace ISF {
-    class ISFParticle;
+  class ISFParticle;
 }
 
-namespace Trk {
-    class IExtrapolationEngine;
-}
 
 namespace iParSim {
-      
-  /** 
-   @class TrackParticleSmearer
 
-   Create xAOD::TrackParticles from ISFParticles,
-   the IIncidentListener handles the TrackParticleCollection
+  /**
+     @class TrackParticleSmearer
+
+     Create xAOD::TrackParticles from ISFParticles,
+     the IIncidentListener handles the TrackParticleCollection
+
+     @author Andreas.Salzburger -at- cern.ch
+  */
 
-   @author Andreas.Salzburger -at- cern.ch 
-   */
-      
   class TrackParticleSmearer : public extends<AthAlgTool, ISF::IParticleProcessor, IIncidentListener>
   {
-    public:
-
-      /**Constructor */
-      TrackParticleSmearer(const std::string&,const std::string&,const IInterface*);
-      
-      /**Destructor*/
-      ~TrackParticleSmearer();
-      
-      /** AlgTool initailize method.*/
-      StatusCode initialize();
-      
-      /** AlgTool finalize method */
-      StatusCode finalize();
-    
-      /** handle for incident service */
-      void handle(const Incident& inc); 
-      
-      /** Creates a new ISFParticle from a given ParticleState, universal transport tool */
-      virtual ISF::ISFParticle* process(const ISF::ISFParticle& isp); 
-
-    protected:
-      
-      /* Incident Service */  
-      ServiceHandle<IIncidentSvc>                   m_incidentSvc; 
-      
-      std::string                                   m_tpContainerName;            //!< output collection name
-      xAOD::TrackParticleContainer*                 m_trackParticleContainer;     //!< this is the output container      
-      xAOD::TrackParticleAuxContainer*              m_trackParticleAuxContainer;  //!< this is the output container      
-
-      ToolHandleArray<IChargedSmearer>              m_chargedSmearers;            //!< the Charged smearers to be retrieved
-      std::map<unsigned int, const IChargedSmearer*>      m_chargedSmearerMap;    //!< reordered in a map for look-up
-            
-      ToolHandle<Trk::IExtrapolationEngine>         m_extrapolationEngine;        //!< the extrapolation engine to create the parameters 
-
-      ToolHandle<IISPtoPerigeeTool>                 m_ISPtoPerigeeTool; 
-     
-      
+  public:
+
+    /**Constructor */
+    TrackParticleSmearer(const std::string&,const std::string&,const IInterface*);
+
+    /**Destructor*/
+    ~TrackParticleSmearer();
+
+    /** AlgTool initailize method.*/
+    StatusCode initialize();
+
+    /** AlgTool finalize method */
+    StatusCode finalize();
+
+    /** handle for incident service */
+    void handle(const Incident& inc);
+
+    /** Creates a new ISFParticle from a given ParticleState, universal transport tool */
+    virtual ISF::ISFParticle* process(const ISF::ISFParticle& isp);
+
+  protected:
+
+    /* Incident Service */
+    ServiceHandle<IIncidentSvc>                   m_incidentSvc{this, "IncidentSvc", "IncidentSvc", ""};
+
+    Gaudi::Property<std::string>                  m_tpContainerName{this, "TrackParticleCollection", "SmearedTrackParticles", "The collection to be written out"};            //!< output collection name
+    xAOD::TrackParticleContainer*                 m_trackParticleContainer{};     //!< this is the output container
+    xAOD::TrackParticleAuxContainer*              m_trackParticleAuxContainer{};  //!< this is the output container
+
+    ToolHandleArray<IChargedSmearer>              m_chargedSmearers;            //!< the Charged smearers to be retrieved
+    std::map<unsigned int, const IChargedSmearer*>      m_chargedSmearerMap;    //!< reordered in a map for look-up
+
+    PublicToolHandle<Trk::IExtrapolationEngine>  m_extrapolationEngine{this, "ExtrapolationEngine", "", "The extrapolation engine to create the parameters"};        //!< the extrapolation engine to create the parameters
+
+    PublicToolHandle<IISPtoPerigeeTool>          m_ISPtoPerigeeTool{this, "ISPtoPerigeeTool", "", ""};
+
+
   };
 
 } // end of namespace
 
-#endif 
-
+#endif
diff --git a/Simulation/ISF/ISF_ParametricSim/ISF_ParSimTools/src/TrackParticleSmearer.cxx b/Simulation/ISF/ISF_ParametricSim/ISF_ParSimTools/src/TrackParticleSmearer.cxx
index 72b765c17817895fde87b189fc8a7a8f86a730eb..eb1a0689b948a5ac34be3efcfb1cce7f15ef04ab 100644
--- a/Simulation/ISF/ISF_ParametricSim/ISF_ParSimTools/src/TrackParticleSmearer.cxx
+++ b/Simulation/ISF/ISF_ParametricSim/ISF_ParSimTools/src/TrackParticleSmearer.cxx
@@ -3,7 +3,7 @@
 */
 
 ///////////////////////////////////////////////////////////////////
-// TrackParticleSmearer.cxx, (c) ATLAS Detector software
+// TrackParticleSmearer.cxx
 ///////////////////////////////////////////////////////////////////
 
 // class header
@@ -11,27 +11,15 @@
 // ISF
 #include "ISF_Event/ISFParticle.h"
 // Trk
-#include "TrkExInterfaces/IExtrapolationEngine.h"
 #include "TrkParameters/TrackParameters.h"
 
 
 //================ Constructor ====================================================
 iParSim::TrackParticleSmearer::TrackParticleSmearer(const std::string& t, const std::string& n, const IInterface*  p ) :
-  base_class(t,n,p),
-  m_incidentSvc("IncidentSvc", n),
-  m_tpContainerName("SmearedTrackParticles"),
-  m_extrapolationEngine(""),
-  m_ISPtoPerigeeTool("")
+  base_class(t,n,p)
 {
-    // The collection to be written out
-    declareProperty("TrackParticleCollection"  ,      m_tpContainerName);
-    // The Tools for the smearers
-    declareProperty("ChargedSmearers"          ,      m_chargedSmearers);
-    // extrapolation engine
-    declareProperty("ExtrapolationEngine"      ,      m_extrapolationEngine);
-    // ISP to Perigee Parameters tool
-    declareProperty("ISPtoPerigeeTool"         ,      m_ISPtoPerigeeTool);
-
+  // The Tools for the smearers
+  declareProperty("ChargedSmearers"          ,      m_chargedSmearers);
 }
 
 //================ Destructor =====================================================
@@ -42,61 +30,37 @@ iParSim::TrackParticleSmearer::~TrackParticleSmearer()
 //================ Initialisation =================================================
 StatusCode iParSim::TrackParticleSmearer::initialize()
 {
-    ATH_MSG_DEBUG("::: TrackParticleSmearer ::: initialize()");
-
-    // Random number service
-    //if ( m_randomSvc.retrieve().isFailure() ) {
-    //    ATH_MSG_ERROR( "Could not retrieve " << m_randomSvc );
-    //    return StatusCode::FAILURE;
-    //}
-    //Get own engine with own seeds:
-    //m_randomEngine = m_randomSvc->GetEngine(m_randomEngineName);
-    //if (!m_randomEngine) {
-    //    ATH_MSG_ERROR( "Could not get random engine '" << m_randomEngineName << "'" );
-    //    return StatusCode::FAILURE;
-    //}
-    
-    // Athena/Gaudi framework
-    if (m_incidentSvc.retrieve().isFailure()){
-        ATH_MSG_ERROR("Could not retrieve " << m_incidentSvc << ". Exiting.");
-        return StatusCode::FAILURE;
-    }
-    // register to the incident service: BeginEvent for TrackCollection
-    m_incidentSvc->addListener( this, IncidentType::BeginEvent);
-    
-    // retrieve the smearers (DefaultSmearer, MuonSmearer, ...)
-    if (m_chargedSmearers.retrieve().isFailure()){
-        ATH_MSG_ERROR("Could not retrieve " << m_chargedSmearers << ". Exiting.");
-        return StatusCode::FAILURE; 
-    } else {
-        // reorder the smearers
-        // screen output
-        ATH_MSG_INFO("Retrieved in total "  << m_chargedSmearers.size() << " smearers.");
-        for (auto& smearer: m_chargedSmearers){
-            // get the pointer to the smearer
-            const iParSim::IChargedSmearer* ics = &*smearer;
-            m_chargedSmearerMap[ics->pdg()] = ics;
-            ATH_MSG_VERBOSE("- retrieved "  << ics->name() << " for pdg = " << ics->pdg() <<  " as a " 
-                                            << (ics->pdg() ?  "specific smearer." : "default smearer.") );
-        }
-     }
+  ATH_MSG_DEBUG("::: TrackParticleSmearer ::: initialize()");
+
+  // Athena/Gaudi framework
+  ATH_CHECK(m_incidentSvc.retrieve());
+  // register to the incident service: BeginEvent for TrackCollection
+  m_incidentSvc->addListener( this, IncidentType::BeginEvent);
+
+  // retrieve the smearers (DefaultSmearer, MuonSmearer, ...)
+  ATH_CHECK(m_chargedSmearers.retrieve());
+
+  // reorder the smearers
+  // screen output
+  ATH_MSG_INFO("Retrieved in total "  << m_chargedSmearers.size() << " smearers.");
+  for (auto& smearer: m_chargedSmearers) {
+    // get the pointer to the smearer
+    const iParSim::IChargedSmearer* ics = &*smearer;
+    m_chargedSmearerMap[ics->pdg()] = ics;
+    ATH_MSG_VERBOSE("- retrieved "  << ics->name() << " for pdg = " << ics->pdg() <<  " as a "
+                    << (ics->pdg() ?  "specific smearer." : "default smearer.") );
+  }
 
-    // ISP to Perigee Parameters tool
-    if (m_ISPtoPerigeeTool.retrieve().isFailure()){
-        ATH_MSG_ERROR("Could not retrieve " << m_ISPtoPerigeeTool << ". Exiting.");
-        return StatusCode::FAILURE;
-    }
+  // ISP to Perigee Parameters tool
+  ATH_CHECK(m_ISPtoPerigeeTool.retrieve());
 
-    // retrieve the extrapolation engine
-    /* not for now...
-    if (m_extrapolationEngine.retrieve().isFailure()){
-       ATH_MSG_WARNING("Could not retrieve the ExtrapolationEngine " << m_extrapolationEngine);
-       return StatusCode::FAILURE;
-    }
-    */
+  // retrieve the extrapolation engine
+  /* not for now...
+     ATH_CHECK(m_extrapolationEngine.retrieve());
+  */
 
-    ATH_MSG_INFO( "initialize() successful." );
-    return StatusCode::SUCCESS;
+  ATH_MSG_INFO( "initialize() successful." );
+  return StatusCode::SUCCESS;
 }
 
 /** Creates a new ISFParticle from a given ParticleState, universal transport tool */
@@ -107,11 +71,11 @@ ISF::ISFParticle* iParSim::TrackParticleSmearer::process(const ISF::ISFParticle&
   const unsigned int ispPdgCode = std::abs(isp.pdgCode());
   if (ispPdgCode != 13) {
     ATH_MSG_DEBUG("ISF Particle is not a muon. Skipping this particle...");
-    return 0;
+    return nullptr;
   }
   const iParSim::IChargedSmearer* ics = ( m_chargedSmearerMap.find(ispPdgCode) == m_chargedSmearerMap.end() )
-                                      ?   m_chargedSmearerMap[0]
-                                      :   m_chargedSmearerMap[ispPdgCode];
+    ?   m_chargedSmearerMap[0]
+    :   m_chargedSmearerMap[ispPdgCode];
   if (ics->pdg() == 0) ATH_MSG_DEBUG("     No existing smearer for ISF particle. DefaultSmearer will be used.");
 
   // create a new xAOD::TrackParticle and push it into the container
@@ -122,15 +86,15 @@ ISF::ISFParticle* iParSim::TrackParticleSmearer::process(const ISF::ISFParticle&
   const Trk::TrackParameters* tP = m_ISPtoPerigeeTool->extractTrkParameters(isp);
   if (tP==0) {
     ATH_MSG_WARNING("Trk::Extrapolator failed to extrapolate the cParameters. Will not smear this particle.");
-    return 0;
-    }
+    return nullptr;
+  }
 
   // Defining parameters of the Truth Particle (they need to be smeared later)
   xaodTP->setDefiningParameters(
-        tP->parameters()[Trk::d0] , tP->parameters()[Trk::z0],
-        tP->parameters()[Trk::phi], tP->parameters()[Trk::theta],
-        tP->parameters()[Trk::qOverP]                                 
-  );
+                                tP->parameters()[Trk::d0] , tP->parameters()[Trk::z0],
+                                tP->parameters()[Trk::phi], tP->parameters()[Trk::theta],
+                                tP->parameters()[Trk::qOverP]
+                                );
 
   // Origin of the parameters (Beam Spot) (vx, vy, vz)
   const Amg::Vector3D Origin( m_ISPtoPerigeeTool->getPerigee() );
@@ -142,53 +106,53 @@ ISF::ISFParticle* iParSim::TrackParticleSmearer::process(const ISF::ISFParticle&
   }
 
   //ATH_MSG_VERBOSE("     Track Parameters Covariance Matrix: "     << "\n" << xaodTP->definingParametersCovMatrix());
-  
+
   /* EXTRAPOLATION ... not implemented for now
-  ===========================================================================================================================
-  Trk::CurvilinearParameters csp(isp.position(), isp.momentum(), isp.charge()); // needs to be updated to smeared parameters
-  // the extrapolation cell with it
-  Trk::ExtrapolationCell<Trk::TrackParameters> ecc(csp);
-  ecc.addConfigurationMode(Trk::ExtrapolationMode::StopAtBoundary);
-  ecc.addConfigurationMode(Trk::ExtrapolationMode::Direct);
-  // and extrapolate to the Perigee surface (at 0,0,0 for the moment, may be changed to BS )
-  Trk::ExtrapolationCode eCode = m_extrapolationEngine->extrapolate(ecc);
-  if (eCode.isSuccess()){
-      // code to be filled -> use particle creator 
-  } else {
-      // take this as an inefficiency
-  }
-  ===========================================================================================================================*/
+     ===========================================================================================================================
+     Trk::CurvilinearParameters csp(isp.position(), isp.momentum(), isp.charge()); // needs to be updated to smeared parameters
+     // the extrapolation cell with it
+     Trk::ExtrapolationCell<Trk::TrackParameters> ecc(csp);
+     ecc.addConfigurationMode(Trk::ExtrapolationMode::StopAtBoundary);
+     ecc.addConfigurationMode(Trk::ExtrapolationMode::Direct);
+     // and extrapolate to the Perigee surface (at 0,0,0 for the moment, may be changed to BS )
+     Trk::ExtrapolationCode eCode = m_extrapolationEngine->extrapolate(ecc);
+     if (eCode.isSuccess()){
+     // code to be filled -> use particle creator
+     } else {
+     // take this as an inefficiency
+     }
+     ===========================================================================================================================*/
 
-  return 0; // Will return an extrapolated smeared ISF particle someday
+  return nullptr; // Will return an extrapolated smeared ISF particle someday
 }
 
 StatusCode iParSim::TrackParticleSmearer::finalize()
-{ 
-    ATH_MSG_INFO( "finalize() successful " );
-    return StatusCode::SUCCESS;
+{
+  ATH_MSG_INFO( "finalize() successful " );
+  return StatusCode::SUCCESS;
 }
 
 void iParSim::TrackParticleSmearer::handle( const Incident& inc ) {
-  // check the incident type 
+  // check the incident type
   if ( inc.type() == IncidentType::BeginEvent ){
     // create a new xAOD::TrackParticle collection
     ATH_MSG_VERBOSE("::: TrackParticleSmearer ::: Creating TrackParticleCollection " << m_tpContainerName);
-    m_trackParticleContainer = new xAOD::TrackParticleContainer; 
+    m_trackParticleContainer = new xAOD::TrackParticleContainer;
     if ( (evtStore()->record(m_trackParticleContainer, m_tpContainerName, true)).isFailure() ) {
-        ATH_MSG_ERROR( "Unable to record TrackParticleCollection " << m_tpContainerName);
-        delete m_trackParticleContainer; m_trackParticleContainer=0;
+      ATH_MSG_ERROR( "Unable to record TrackParticleCollection " << m_tpContainerName);
+      delete m_trackParticleContainer; m_trackParticleContainer=0;
     }
     // create a new xAOD::TrackParticle AUX collection
     ATH_MSG_VERBOSE("::: TrackParticleSmearer ::: Creating TrackParticleAuxCollection " << m_tpContainerName +"Aux.");
-    m_trackParticleAuxContainer = new xAOD::TrackParticleAuxContainer; 
+    m_trackParticleAuxContainer = new xAOD::TrackParticleAuxContainer;
     if ( (evtStore()->record(m_trackParticleAuxContainer, m_tpContainerName + "Aux.", true)).isFailure() ) {
-        ATH_MSG_ERROR( "Unable to record TrackParticleAuxCollection " << m_tpContainerName + "Aux.");
-        delete m_trackParticleAuxContainer; m_trackParticleAuxContainer=0;
+      ATH_MSG_ERROR( "Unable to record TrackParticleAuxCollection " << m_tpContainerName + "Aux.");
+      delete m_trackParticleAuxContainer; m_trackParticleAuxContainer=0;
     }
-    else { 
-        m_trackParticleContainer->setStore( m_trackParticleAuxContainer ); 
+    else {
+      m_trackParticleContainer->setStore( m_trackParticleAuxContainer );
     }
 
   }
   return;
-}
\ No newline at end of file
+}
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_minbias.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_minbias.sh
index cbcd0e63dc63f9b78629910b55156aedb7222b66..76cb6378324bb01edb88e5765ca1b0d5b3306c64 100755
--- a/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_minbias.sh
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_minbias.sh
@@ -12,7 +12,7 @@
 Sim_tf.py \
 --conditionsTag 'default:OFLCOND-RUN12-SDR-19' \
 --physicsList 'FTFP_BERT' \
---truthStrategy 'MC15aPlus' \
+--truthStrategy 'MC12' \
 --simulator 'ATLFASTIIF' \
 --postInclude 'default:PyJobTransforms/UseFrontier.py' 'G4AtlasTests/postInclude.DCubeTest.py' \
 --DataRunNumber '222525' \
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_ttbar.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_ttbar.sh
index 9970bea38571e2b37feba8a0ba496115e4270eda..713c17cc327f7a23fbb83ccf24ba92ced368569b 100755
--- a/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_ttbar.sh
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_ttbar.sh
@@ -12,7 +12,7 @@
 Sim_tf.py \
 --conditionsTag 'default:OFLCOND-RUN12-SDR-19' \
 --physicsList 'FTFP_BERT' \
---truthStrategy 'MC15aPlus' \
+--truthStrategy 'MC12' \
 --simulator 'ATLFASTIIF' \
 --postInclude 'default:PyJobTransforms/UseFrontier.py' 'G4AtlasTests/postInclude.DCubeTest.py' \
 --DataRunNumber '222525' \
diff --git a/Simulation/SimuJobTransforms/python/SimBeamSpotShapeFilter.py b/Simulation/SimuJobTransforms/python/SimBeamSpotShapeFilter.py
new file mode 100644
index 0000000000000000000000000000000000000000..f03aae2d750a70f3b53d89ac762f05701d2095ce
--- /dev/null
+++ b/Simulation/SimuJobTransforms/python/SimBeamSpotShapeFilter.py
@@ -0,0 +1,212 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# $Id $
+"""
+This library defines a class for filtering events based on the beamspot size in athena.
+"""
+__author__  = 'Anthony Morley'
+__version__ = '$Id $'
+
+
+# General setup
+from AthenaPython.PyAthena import StatusCode
+import AthenaPython.PyAthena as PyAthena
+from AthenaCommon.AppMgr import ServiceMgr
+
+#
+# Event filtering based on signal vertex position
+#
+import ROOT
+import math
+
+class SimBeamSpotShapeFilter( PyAthena.AthFilterAlgorithm ):
+
+    """
+    This class is a short algorithm to change the beamspot size.
+    By default it will obatain the simulated beamspot from tag associated to the file unless an 
+    initialBStag is specified.
+
+    Target BS size will be taken from either the sepcified values or a supplied BS tag.
+
+    Possible inputs are
+    targetSigmaX
+    targetSigmaY
+    targetSigmaZ
+    targetBStag
+    initialBStag
+    """ 
+
+    # Constructor
+    def __init__(self,name='SimBeamSpotShapeFilter', **kw):
+        kw['name'] = name
+        super(SimBeamSpotShapeFilter,self).__init__(**kw)
+        self.targetSigmaX = kw.get('targetSigmaX', -999. )
+        self.targetSigmaY = kw.get('targetSigmaY', -999. )
+        self.targetSigmaZ = kw.get('targetSigmaZ', -999. )
+        self.targetBStag  = kw.get('targetBStag', '' )
+        self.initialBStag = kw.get('initialBStag', '' )
+        self.initialSigmaX = -999.
+        self.initialSigmaY = -999.
+        self.initialSigmaZ = -999.
+        self.initialPosX   = -999.
+        self.initialPosY   = -999.
+        self.initialPosZ   = -999.
+        self.initialTiltXZ = -999.
+        self.initialTiltYZ = -999.
+
+        return
+
+    # Initialize function --  get services  
+    def initialize(self):
+        self.msg.info( '==> Initialize  %s...' % self.name() )
+
+        ## Initialize the counters
+        self.nProcessed = 0
+        self.nEventPassed  = 0
+
+        if self.initialBStag == '' :
+          self.msg.info('Initial width will be taken from associated BS tag'  )
+        else:
+          self.msg.info('Initial width will be taken from BS tag:  %s' % ( self.initialBStag ) )
+
+        if self.targetBStag == '' :
+          self.msg.info('Target width (%f, %f, %f)' % (self.targetSigmaX,self.targetSigmaY,self.targetSigmaZ) )
+        else: 
+          self.msg.info('Target width will be taken from BS tag:  %s' % ( self.targetBStag ) )
+          
+        self.sg = PyAthena.py_svc('StoreGateSvc')
+        self.bs = PyAthena.py_svc('BeamCondSvc', iface='IBeamCondSvc' )
+        return StatusCode.Success
+
+    # Calculate the prob a event falling in the window given the original and target widths
+    def calcScale(self, sigmaO, sigmaT, x):
+        if sigmaO < sigmaT:
+          self.msg.error( 'This will not work target width larger than original width: %f <  %f'  %(sigmaO, sigmaT) )
+          return 1.
+        value =   math.exp( -0.5*(x*x)*(1./(sigmaT*sigmaT) - 1./(sigmaO*sigmaO)))
+        #print 'Targetn Original Prob ',x, ' ', sigmaT, ' ',  sigmaO, ' ', value
+        return value
+
+    # Event execute
+    def execute(self):
+
+        initialPosX = self.bs.beamPos().x()
+        initialPosY = self.bs.beamPos().y()
+        initialPosZ = self.bs.beamPos().z()
+        initialSigmaX = self.bs.beamSigma(0)
+        initialSigmaY = self.bs.beamSigma(1)
+        initialSigmaZ = self.bs.beamSigma(2)
+        initialTiltXZ = self.bs.beamTilt(0)
+        initialTiltYZ = self.bs.beamTilt(1)       
+
+        self.msg.verbose('Intial position from DB (%f, %f, %f)' % ( initialPosX, initialPosY, initialPosZ ) )
+        self.msg.verbose('Intial width from DB (%f, %f, %f)' % ( initialSigmaX, initialSigmaY, initialSigmaZ ) )
+
+        if self.targetBStag != '' or self.initialBStag != '' :
+          #Get Event info object
+          eventInfo = self.sg.retrieve( 'EventInfo',"McEventInfo")
+          iov = eventInfo.event_ID().run_number() << 32 | ( eventInfo.event_ID().lumi_block() & 0xFFFFFFFF ) 
+          
+          #Get BS from database
+          from CoolConvUtilities import AtlCoolLib
+          from PyCool import cool
+          cooldbBS = AtlCoolLib.indirectOpen('COOLOFL_INDET/OFLP200', True, True, False)
+          folderBS = cooldbBS.getFolder('/Indet/Beampos')
+
+          if self.initialBStag != '': 
+            self.msg.info('Taking initial beamspot information from conditions database: %s' % self.initialBStag )
+            itrBS = folderBS.browseObjects(iov, iov, cool.ChannelSelection.all(), self.initialBStag )
+            while itrBS.goToNext():
+              obj = itrBS.currentRef()
+              self.initialSigmaX = float(obj.payloadValue("sigmaX"))
+              self.initialSigmaY = float(obj.payloadValue("sigmaY"))
+              self.initialSigmaZ = float(obj.payloadValue("sigmaZ"))
+              self.initialTiltXZ = float(obj.payloadValue("tiltX"))
+              self.initialTiltYZ = float(obj.payloadValue("tiltY"))
+              self.initialPosX = float(obj.payloadValue("posX"))
+              self.initialPosY = float(obj.payloadValue("posY"))
+              self.initialPosZ = float(obj.payloadValue("posZ"))
+              break
+            self.initialBStag = ''
+            self.msg.info('Intial BS position from tag  (%f, %f, %f)' % (self.initialPosX,self.initialPosY,self.initialPosZ ) )
+            self.msg.info('Intial BS width from tag (%f, %f, %f)' % (self.initialSigmaX,self.initialSigmaY,self.initialSigmaZ ) ) 
+
+          if self.targetBStag != '': 
+        
+            self.msg.info('Taking target beamspot information from conditions database: %s' % self.targetBStag )
+            self.msg.info('Only widths are considered not positions!!!')
+            itrBS = folderBS.browseObjects(iov, iov, cool.ChannelSelection.all(), self.targetBStag )
+            while itrBS.goToNext():
+              obj = itrBS.currentRef()
+              self.targetSigmaX = float(obj.payloadValue("sigmaX"))
+              self.targetSigmaY = float(obj.payloadValue("sigmaY"))
+              self.targetSigmaZ = float(obj.payloadValue("sigmaZ"))
+              break
+            self.targetBStag = ''
+            self.msg.info('Target width (%f, %f, %f)' % (self.targetSigmaX,self.targetSigmaY,self.targetSigmaZ ) )  
+   
+        targetSigmaX = self.targetSigmaX if self.targetSigmaX > 0. else initialSigmaX
+        targetSigmaY = self.targetSigmaY if self.targetSigmaY > 0. else initialSigmaY
+        targetSigmaZ = self.targetSigmaZ if self.targetSigmaZ > 0. else initialSigmaZ
+ 
+        initialSigmaX = self.initialSigmaX if self.initialSigmaX > 0. else initialSigmaX
+        initialSigmaY = self.initialSigmaY if self.initialSigmaY > 0. else initialSigmaY
+        initialSigmaZ = self.initialSigmaZ if self.initialSigmaZ > 0. else initialSigmaZ
+        initialPosX = self.initialPosX if self.initialPosX > -999. else initialPosX
+        initialPosY = self.initialPosY if self.initialPosY > -999. else initialPosY
+        initialPosZ = self.initialPosZ if self.initialPosZ > -999. else initialPosZ
+        initialTiltXZ = self.initialTiltXZ if self.initialTiltXZ > -999. else initialTiltXZ
+        initialTiltYZ = self.initialTiltYZ if self.initialTiltYZ > -999. else initialTiltYZ
+
+
+        self.msg.verbose('Intial position used (%f, %f, %f)' % ( initialPosX, initialPosY, initialPosZ ) )
+        self.msg.verbose('Intial width used (%f, %f, %f)' % ( initialSigmaX, initialSigmaY, initialSigmaZ ) )
+        self.msg.verbose('Target width used (%f, %f, %f)' % ( targetSigmaX,  targetSigmaY,  targetSigmaZ ) )
+
+        #Get Signa event
+        truthEventCollection = self.sg.retrieve( "McEventCollection", "TruthEvent")
+        # get GenEvent
+        genEvent  = truthEventCollection[0]
+        # get Signal Vertex
+        sigVtx  = genEvent.signal_process_vertex()
+
+        deltaZ = initialPosZ - sigVtx.point3d().z()
+        deltaX = initialPosX + deltaZ * initialTiltXZ - sigVtx.point3d().x()
+        deltaY = initialPosY + deltaZ * initialTiltYZ - sigVtx.point3d().y()
+        # Calculate prob of keeping this event
+        weight =  self.calcScale( initialSigmaX, targetSigmaX, deltaX) \
+                  * self.calcScale( initialSigmaY, targetSigmaY, deltaY) \
+                  * self.calcScale( initialSigmaZ, targetSigmaZ, deltaZ)
+
+        # Decide if you keep 
+        accept =  weight > ROOT.gRandom.Rndm()
+        self.setFilterPassed(accept)
+        
+        self.nProcessed += 1
+        if accept:
+          self.nEventPassed  += 1
+        
+        return StatusCode.Success
+
+    # Finilize
+    def finalize(self):
+        effiEvents    = 0.0
+        effiErrEvents = 0.0
+        try :
+          effiEvents    = self.nEventPassed / float(self.nProcessed)
+          effiErrEvents = 100.0 * math.sqrt(effiEvents*(1.-effiEvents)/float(self.nProcessed))
+          effiEvents   *= 100.0 
+
+
+        except ZeroDivisionError :
+          self.msg.warning( 'Division by zero error when calculating the uncertainties on the pass efficiencies...' )
+        
+        
+        self.msg.info( '==> Finalize %s...' % self.name() )
+        self.msg.info( '**********************************************************************' )
+        self.msg.info( ' Number of processed events: %r' % self.nProcessed )
+        self.msg.info( ' Events accepted:  %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventPassed, effiEvents, effiErrEvents ) )
+        self.msg.info( '**********************************************************************' )
+
+        return StatusCode.Success
+
+
diff --git a/Simulation/SimuJobTransforms/share/preinclude.BeamSpotShapeFilter.py b/Simulation/SimuJobTransforms/share/preinclude.BeamSpotShapeFilter.py
new file mode 100644
index 0000000000000000000000000000000000000000..830b57f50c5aff79f0736f46efa650f6afbd488e
--- /dev/null
+++ b/Simulation/SimuJobTransforms/share/preinclude.BeamSpotShapeFilter.py
@@ -0,0 +1,31 @@
+# Example command 
+# HITSMerge_tf.py --inputHITSFile=XXXX --outputHITS_MRGFile=XXXX --maxEvents=20 --preExec 'targetSigmaZ=20' --preInclude SimuJobTransforms/preinclude.BeamSpotShapeFilter.py --checkEventCount False
+
+
+from AthenaCommon.AlgSequence import AthSequencer
+
+from AthenaCommon.AppMgr import ServiceMgr
+
+from SimuJobTransforms.SimBeamSpotShapeFilter import *
+
+include("InDetBeamSpotService/BeamCondSvc.py")
+if not hasattr(ServiceMgr, 'BeamCondSvc'):
+  from InDetBeamSpotService.InDetBeamSpotServiceConf import BeamCondSvc
+  beamcondsvc = BeamCondSvc('BeamCondSvc')
+  ServiceMgr += beamcondsvc
+
+bsFilter = SimBeamSpotShapeFilter()
+if 'targetSigmaX' in locals():
+  bsFilter.targetSigmaX = targetSigmaX
+if 'targetSigmaY' in locals():
+  bsFilter.targetSigmaY = targetSigmaY
+if 'targetSigmaZ' in locals():
+  bsFilter.targetSigmaZ = targetSigmaZ
+if 'initialBStag' in locals():
+  bsFilter.initialBStag = initialBStag
+if 'targetBStag' in locals():  
+  bsFilter.targetBStag = targetBStag
+
+topSequence += bsFilter
+AcceptList = [ bsFilter.name() ]
+
diff --git a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_ISF.py b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_ISF.py
index 8f812a7425fb9898fc2c4f35a4da80213ee773bd..bb5445379fefa21a54638df304f71fba996d2465 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_ISF.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_ISF.py
@@ -246,10 +246,9 @@ try:
 except:
     atlasG4log.warning('Could not add TimingAlg, no timing info will be written out.')
 
-## Always enable the looper killer, unless it's been disabled
-if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
-    simFlags.OptionalUserActionList.addAction('G4UA::LooperKillerTool')
-else:
+## The looper killer is on by default. Disable it if this is requested.
+if hasattr(runArgs, "enableLooperKiller") and not runArgs.enableLooperKiller:
+    simFlags.OptionalUserActionList.removeAction('G4UA::LooperKillerTool')
     atlasG4log.warning("The looper killer will NOT be run in this job.")
 
 #### *********** import ISF_Example code here **************** ####
diff --git a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_MC12.py b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_MC12.py
index cc3c0a672ad8f4b38d0735183c87dceee4862fa2..af14d358ac2e7c7e3c92f06730c6d257fd234519 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_MC12.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_MC12.py
@@ -222,10 +222,9 @@ if jobproperties.Beam.beamType.get_Value() != 'cosmics':
 
 include("G4AtlasApps/G4Atlas.flat.configuration.py")
 
-## Always enable the looper killer, unless it's been disabled
-if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
-    simFlags.OptionalUserActionList.addAction('G4UA::LooperKillerTool')
-else:
+## The looper killer is on by default. Disable it if this is requested.
+if hasattr(runArgs, "enableLooperKiller") and not runArgs.enableLooperKiller:
+    simFlags.OptionalUserActionList.removeAction('G4UA::LooperKillerTool')
     atlasG4log.warning("The looper killer will NOT be run in this job.")
 
 try:
diff --git a/Simulation/SimuJobTransforms/share/skeleton.HITtoRDO.py b/Simulation/SimuJobTransforms/share/skeleton.HITtoRDO.py
index 96b4e8d2406a976c5a8f728ec57ab6c0b2ab1d9c..99c927fbe18e85a82bfabab416bbcbd1680596c7 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.HITtoRDO.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.HITtoRDO.py
@@ -87,7 +87,7 @@ if hasattr(runArgs,"numberOfBeamGas"):
         digitizationFlags.numberOfBeamGas=float(runArgs.numberOfBeamGas)
         PileUpConfigOverride=True
 if hasattr(runArgs,"numberOfCavernBkg"):
-    if not math.fabs(digitizationFlags.numberOfCavern.get_Value()==runArgs.numberOfCavernBkg):
+    if not digitizationFlags.numberOfCavern.get_Value()==runArgs.numberOfCavernBkg:
         digilog.info( "Changing digitizationFlags.cavernEvents from %s to %s", digitizationFlags.numberOfCavern.get_Value(),runArgs.numberOfCavernBkg)
         digitizationFlags.numberOfCavern=runArgs.numberOfCavernBkg
         PileUpConfigOverride=True
diff --git a/Simulation/SimuJobTransforms/share/skeleton.TestBeam.py b/Simulation/SimuJobTransforms/share/skeleton.TestBeam.py
index 2c88541b26e4c4ce5cc70e0ff3283d12422d96e1..b31eb4228c51ddfdd4397b95c3daaa5bd3f577ab 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.TestBeam.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.TestBeam.py
@@ -216,10 +216,9 @@ except:
 
 include('G4AtlasApps/Tile2000_2003.flat.configuration.py')#HACK - has to be here for TBDetDescrLoader
 
-## Always enable the looper killer, unless it's been disabled
-if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
-    simFlags.OptionalUserActionList.addAction('G4UA::LooperKillerTool')
-else:
+## The looper killer is on by default. Disable it if this is requested.
+if hasattr(runArgs, "enableLooperKiller") and not runArgs.enableLooperKiller:
+    simFlags.OptionalUserActionList.removeAction('G4UA::LooperKillerTool')
     atlasG4log.warning("The looper killer will NOT be run in this job.")
 
 ## Add G4 alg to alg sequence
diff --git a/Simulation/SimuJobTransforms/test/SimuJobTransforms_TestConfiguration.xml b/Simulation/SimuJobTransforms/test/SimuJobTransforms_TestConfiguration.xml
deleted file mode 100644
index 4bed4ec44e81cf24105971bf66f23cb298ca2d2e..0000000000000000000000000000000000000000
--- a/Simulation/SimuJobTransforms/test/SimuJobTransforms_TestConfiguration.xml
+++ /dev/null
@@ -1,457 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd">
-
-<unifiedTestConfiguration>
-  <atn>
-    <TEST name="Digit" type="script" suite="SimuJobTransforms-Core">
-      <doc>Digit trf reading muon hits</doc>
-      <classification>
-        <displayClass>OfflineValidation</displayClass>
-        <displayProcess>Simu</displayProcess>
-        <displayComponent>Athena-Core</displayComponent>
-      </classification>
-      <options_atn>${ATN_PACKAGE}/test/test_digi_mu</options_atn>
-      <timelimit>15</timelimit>
-      <author>John Chapman</author>
-      <mailto>atlas-simulation-testreports@cern.ch</mailto>
-      <prescript>source ${ATN_PACKAGE}/test/test_setup</prescript>
-      <expectations>
-        <errorMessage>FAILURE </errorMessage>
-        <returnValue>0</returnValue>
-      </expectations>
-    </TEST>
-    <TEST name="G4Param" type="script" suite="SimuJobTransforms-Core">
-      <doc>Simulation trf reading muon events and using parametrization</doc>
-      <classification>
-        <displayClass>OfflineValidation</displayClass>
-        <displayProcess>Simu</displayProcess>
-        <displayComponent>Athena-Core</displayComponent>
-      </classification>
-      <options_atn>${ATN_PACKAGE}/test/test_G4param</options_atn>
-      <timelimit>20</timelimit>
-      <author>John Chapman</author>
-      <mailto>atlas-simulation-testreports@cern.ch</mailto>
-      <prescript>source ${ATN_PACKAGE}/test/test_setup</prescript>
-      <expectations>
-        <errorMessage>FAILURE </errorMessage>
-        <returnValue>0</returnValue>
-      </expectations>
-    </TEST>
-    <TEST name="FilterMinbias" type="script" suite="SimuJobTransforms-Core">
-      <doc>Filtering minbias hits files</doc>
-      <classification>
-        <displayClass>OfflineValidation</displayClass>
-        <displayProcess>Simu</displayProcess>
-        <displayComponent>Athena-Core</displayComponent>
-      </classification>
-      <options_atn>${ATN_PACKAGE}/test/test_filterHIT</options_atn>
-      <timelimit>15</timelimit>
-      <author>John Chapman</author>
-      <mailto>atlas-simulation-testreports@cern.ch</mailto>
-      <prescript>source ${ATN_PACKAGE}/test/test_setup</prescript>
-      <expectations>
-        <errorMessage>FAILURE </errorMessage>
-        <returnValue>0</returnValue>
-      </expectations>
-    </TEST>
-    <TEST name="HitMerge" type="script" suite="SimuJobTransforms-Core">
-      <doc>Merge two hits files</doc>
-      <classification>
-        <displayClass>OfflineValidation</displayClass>
-        <displayProcess>Simu</displayProcess>
-        <displayComponent>Athena-Core</displayComponent>
-      </classification>
-      <options_atn>${ATN_PACKAGE}/test/test_mergeHIT</options_atn>
-      <timelimit>15</timelimit>
-      <author>John Chapman</author>
-      <mailto>atlas-simulation-testreports@cern.ch</mailto>
-      <prescript>source ${ATN_PACKAGE}/test/test_setup</prescript>
-      <expectations>
-        <errorMessage>FAILURE </errorMessage>
-        <returnValue>0</returnValue>
-      </expectations>
-    </TEST>
-    <TEST name="DigiMerge" type="script" suite="SimuJobTransforms-Core">
-      <doc>Digitize ev=13,14 or output of HitMerge</doc>
-      <classification>
-        <displayClass>OfflineValidation</displayClass>
-        <displayProcess>Simu</displayProcess>
-        <displayComponent>Athena-Core</displayComponent>
-      </classification>
-      <options_atn>${ATN_PACKAGE}/test/test_digi_mergeHIT</options_atn>
-      <timelimit>15</timelimit>
-      <author>John Chapman</author>
-      <mailto>atlas-simulation-testreports@cern.ch</mailto>
-      <prescript>source ${ATN_PACKAGE}/test/test_setup</prescript>
-      <expectations>
-        <errorMessage>FAILURE </errorMessage>
-        <returnValue>0</returnValue>
-      </expectations>
-    </TEST>
-    <TEST name="DigiUnMerge" type="script" suite="SimuJobTransforms-Core">
-      <doc>Digitize ev=13,14 or input of HitMerge</doc>
-      <classification>
-        <displayClass>OfflineValidation</displayClass>
-        <displayProcess>Simu</displayProcess>
-        <displayComponent>Athena-Core</displayComponent>
-      </classification>
-      <options_atn>${ATN_PACKAGE}/test/test_digi_unmergeHIT</options_atn>
-      <timelimit>15</timelimit>
-      <author>John Chapman</author>
-      <mailto>atlas-simulation-testreports@cern.ch</mailto>
-      <prescript>source ${ATN_PACKAGE}/test/test_setup</prescript>
-      <expectations>
-        <errorMessage>FAILURE </errorMessage>
-        <returnValue>0</returnValue>
-      </expectations>
-    </TEST>
-    <TEST name="DiffHitMerge" type="script" suite="SimuJobTransforms-Core">
-      <doc>Do a diff of output of DigiMerge and DigiUnMerge</doc>
-      <classification>
-        <displayClass>OfflineValidation</displayClass>
-        <displayProcess>Simu</displayProcess>
-        <displayComponent>Athena-Core</displayComponent>
-      </classification>
-      <options_atn>${ATN_PACKAGE}/test/test_diffmerged</options_atn>
-      <timelimit>5</timelimit>
-      <author>John Chapman</author>
-      <mailto>atlas-simulation-testreports@cern.ch</mailto>
-      <prescript>source ${ATN_PACKAGE}/test/test_setup</prescript>
-      <expectations>
-        <errorMessage>ERR</errorMessage>
-        <errorMessage>FAILURE (ERROR) </errorMessage>
-        <returnValue>0</returnValue>
-      </expectations>
-    </TEST>
-    <TEST name="PileUp" type="script" suite="SimuJobTransforms-Core">
-      <doc>Run a pile-up digi job on a single particle event</doc>
-      <classification>
-        <displayClass>OfflineValidation</displayClass>
-        <displayProcess>Simu</displayProcess>
-        <displayComponent>Athena-Core</displayComponent>
-      </classification>
-      <options_atn>${ATN_PACKAGE}/test/test_pileup</options_atn>
-      <timelimit>20</timelimit>
-      <author>John Chapman</author>
-      <mailto>atlas-simulation-testreports@cern.ch</mailto>
-      <prescript>source ${ATN_PACKAGE}/test/test_setup</prescript>
-      <expectations>
-        <errorMessage>ERR</errorMessage>
-        <errorMessage>FAILURE (ERROR) </errorMessage>
-        <returnValue>0</returnValue>
-      </expectations>
-    </TEST>
-  </atn>
-
-  <kv>
-    <kvtest name='MC15ISF_G4SelePyJT' enabled='true'>
-      <release>ALL</release>
-      <priority>20</priority>
-      <kvsuite>MC15</kvsuite>
-      <trf>Sim_tf.py</trf>
-      <desc>MC15 2015 ATLAS detector - single electron G4 event atlasG4 (python JT)</desc>
-      <author>John Chapman [atlas-simulation-testreports@cern.ch]</author>
-      <inpath></inpath>
-      <infile></infile>
-      <inpool></inpool>
-      <outpath>${T_DATAPATH}/MC15SimulHITSSelePyJT-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-MC15SimulHITSSelePyJT-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-MC15SimulHITSSelePyJT-${T_RELEASE}.log</logfile>
-      <signature>
-        --outputHITSFile="${T_OUTFILE}" --preInclude=SimulationJobOptions/preInclude.SingleElectronGenerator.py --simulator FullG4 --maxEvents=10 --skipEvents=0 --randomSeed=26741007 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-19 --DataRunNumber 222525
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml jobInfo.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-    <kvtest name='MC15digitSelePyJT' enabled='true'>
-      <release>ALL</release>
-      <priority>30</priority>
-      <kvsuite>MC15</kvsuite>
-      <trf>Digi_tf.py</trf>
-      <desc>MC15 2015 ATLAS detector - single electron Digitization (python JT)</desc>
-      <author>John Chapman [atlas-simulation-testreports@cern.ch]</author>
-      <version>1.0.0</version>
-      <inpath>${T_DATAPATH}/MC15SimulHITSSelePyJT-${T_RELEASE}</inpath>
-      <infile>${T_PREFIX}-MC15SimulHITSSelePyJT-${T_RELEASE}.pool.root</infile>
-      <inpool>PoolFileCatalog.xml</inpool>
-      <outpath>${T_DATAPATH}/MC15digitSelePyJT-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-MC15digitSelePyJT-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-MC15digitSelePyJT-${T_RELEASE}.log</logfile>
-      <signature>
-        --inputHITSFile="${T_INFILE}" --outputRDOFile="${T_OUTFILE}" --maxEvents=10 --skipEvents=0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-25 --digiSeedOffset1=11 --digiSeedOffset2=22
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-    <kvtest name='MC15ISF_G4SmuonPyJT' enabled='true'>
-      <release>ALL</release>
-      <priority>20</priority>
-      <kvsuite>MC15</kvsuite>
-      <trf>Sim_tf.py</trf>
-      <desc>MC15 2015 ATLAS detector - single muon G4 event atlasG4 (python JT)</desc>
-      <author>John Chapman [atlas-simulation-testreports@cern.ch]</author>
-      <inpath></inpath>
-      <infile></infile>
-      <inpool></inpool>
-      <outpath>${T_DATAPATH}/MC15SimulHITSSmuonPyJT-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-MC15SimulHITSSmuonPyJT-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-MC15SimulHITSSmuonPyJT-${T_RELEASE}.log</logfile>
-      <signature>
-        --outputHITSFile="${T_OUTFILE}" --preInclude=SimulationJobOptions/preInclude.SingleMuonGenerator.py  --simulator FullG4 --maxEvents=10 --skipEvents=0 --randomSeed=26741007 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-19 --DataRunNumber 222525
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml jobInfo.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-    <kvtest name='MC15digitSmuonPyJT' enabled='true'>
-      <release>ALL</release>
-      <priority>30</priority>
-      <kvsuite>MC15</kvsuite>
-      <trf>Digi_tf.py</trf>
-      <desc>MC15 2015 ATLAS detector - single muon Digitization (python JT)</desc>
-      <author>John Chapman [atlas-simulation-testreports@cern.ch]</author>
-      <version>1.0.0</version>
-      <inpath>${T_DATAPATH}/MC15SimulHITSSmuonPyJT-${T_RELEASE}</inpath>
-      <infile>${T_PREFIX}-MC15SimulHITSSmuonPyJT-${T_RELEASE}.pool.root</infile>
-      <inpool>PoolFileCatalog.xml</inpool>
-      <outpath>${T_DATAPATH}/MC15digitSmuonPyJT-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-MC15digitSmuonPyJT-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-MC15digitSmuonPyJT-${T_RELEASE}.log</logfile>
-      <signature>
-        --inputHITSFile="${T_INFILE}" --outputRDOFile="${T_OUTFILE}" --maxEvents=10 --skipEvents=0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-25 --digiSeedOffset1=11 --digiSeedOffset2=22
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-    <kvtest name='MC15ISF_G4SpionPyJT' enabled='true'>
-      <release>ALL</release>
-      <priority>20</priority>
-      <kvsuite>MC15</kvsuite>
-      <trf>Sim_tf.py</trf>
-      <desc>MC15 2012 ATLAS detector - single pion G4 event atlasG4 (python JT)</desc>
-      <author>John Chapman [atlas-simulation-testreports@cern.ch]</author>
-      <inpath></inpath>
-      <infile></infile>
-      <inpool></inpool>
-      <outpath>${T_DATAPATH}/MC15SimulHITSSpionPyJT-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-MC15SimulHITSSpionPyJT-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-MC15SimulHITSSpionPyJT-${T_RELEASE}.log</logfile>
-      <signature>
-        --outputHITSFile="${T_OUTFILE}" --preInclude=SimulationJobOptions/preInclude.SinglePionGenerator.py  --simulator FullG4 --maxEvents=5 --skipEvents=0 --randomSeed=26741007 --geometryVersion ATLAS-R1-2012-03-00-00_VALIDATION --conditionsTag OFLCOND-RUN12-SDR-19 --DataRunNumber 212272
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml jobInfo.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-    <kvtest name='MC15digitSpionPyJT' enabled='true'>
-      <release>ALL</release>
-      <priority>30</priority>
-      <kvsuite>MC15</kvsuite>
-      <trf>Digi_tf.py</trf>
-      <desc>MC15 2012 ATLAS detector - single pion Digitization (python JT)</desc>
-      <author>John Chapman [atlas-simulation-testreports@cern.ch]</author>
-      <version>1.0.0</version>
-      <inpath>${T_DATAPATH}/MC15SimulHITSSpionPyJT-${T_RELEASE}</inpath>
-      <infile>${T_PREFIX}-MC15SimulHITSSpionPyJT-${T_RELEASE}.pool.root</infile>
-      <inpool>PoolFileCatalog.xml</inpool>
-      <outpath>${T_DATAPATH}/MC15digitSpionPyJT-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-MC15digitSpionPyJT-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-MC15digitSpionPyJT-${T_RELEASE}.log</logfile>
-      <signature>
-        --inputHITSFile="${T_INFILE}" --outputRDOFile="${T_OUTFILE}" --maxEvents=10 --skipEvents=0 --geometryVersion ATLAS-R1-2012-03-00-00 --conditionsTag OFLCOND-RUN12-SDR-25 --digiSeedOffset1=11 --digiSeedOffset2=22
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-
-    <kvtest name='MC12AtlasG4ZeePyJT' enabled='true'>
-      <release>ALL</release>
-      <priority>20</priority>
-      <kvsuite>MC12</kvsuite>
-      <trf>AtlasG4_tf.py</trf>
-      <desc>MC12 Z -> e e G4 event atlasG4 (python JT)</desc>
-      <author>John Chapman [atlas-simulation-testreports@cern.ch]</author>
-      <inpath>${T_DATAPATH}/EvgenZeePyJT-${T_RELEASE}</inpath>
-      <infile>${T_PREFIX}-EvgenZeePyJT-${T_RELEASE}.pool.root</infile>
-
-      <inpool>PoolFileCatalog.xml</inpool>
-      <outpath>${T_DATAPATH}/MC12SimulHITSZeePyJT-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-MC12SimulHITSZeePyJT-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-MC12SimulHITSZeePyJT-${T_RELEASE}.log</logfile>
-      <signature>
-        --inputEVNTFile="${T_INFILE}" --outputHITSFile="${T_OUTFILE}" --maxEvents=10 --skipEvents=0 --randomSeed=26741007 --geometryVersion=ATLAS-GEO-20-00-01_VALIDATION --conditionsTag=OFLCOND-MC12-SIM-00
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml jobInfo.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-    <kvtest name='MC12digitZeePyJT' enabled='true'>
-      <release>ALL</release>
-      <priority>30</priority>
-      <kvsuite>MC12</kvsuite>
-      <trf>Digi_tf.py</trf>
-      <desc>MC12 Z -> e e Digitization (python JT)</desc>
-      <author>John Chapman [atlas-simulation-testreports@cern.ch]</author>
-      <version>1.0.0</version>
-      <inpath>${T_DATAPATH}/MC12SimulHITSZeePyJT-${T_RELEASE}</inpath>
-      <infile>${T_PREFIX}-MC12SimulHITSZeePyJT-${T_RELEASE}.pool.root</infile>
-      <inpool>PoolFileCatalog.xml</inpool>
-      <outpath>${T_DATAPATH}/MC12digitZeePyJT-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-MC12digitZeePyJT-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-MC12digitZeePyJT-${T_RELEASE}.log</logfile>
-      <signature>
-        --inputHITSFile="${T_INFILE}" --outputRDOFile="${T_OUTFILE}" --maxEvents=10 --skipEvents=0 --geometryVersion=ATLAS-GEO-20-00-01 --conditionsTag=OFLCOND-MC12-SIM-00 --digiSeedOffset1=11 --digiSeedOffset2=22
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-
-    <kvtest name='MC15ISF_G4ZeePyJT' enabled='true'>
-      <release>ALL</release>
-      <priority>20</priority>
-      <kvsuite>MC15</kvsuite>
-      <trf>Sim_tf.py</trf>
-      <desc>MC15 2015 ATLAS detector - Z->ee G4 event atlasG4 (python JT)</desc>
-      <author>John Chapman [atlas-simulation-testreports@cern.ch]</author>
-      <inpath>${T_DATAPATH}/EvgenZeePyJT-${T_RELEASE}</inpath>
-      <infile>${T_PREFIX}-EvgenZeePyJT-${T_RELEASE}.pool.root</infile>
-
-      <inpool>PoolFileCatalog.xml</inpool>
-      <outpath>${T_DATAPATH}/MC15SimulHITSZeePyJT-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-MC15SimulHITSZeePyJT-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-MC15SimulHITSZeePyJT-${T_RELEASE}.log</logfile>
-      <signature>
-        --inputEVNTFile="${T_INFILE}" --outputHITSFile="${T_OUTFILE}"  --simulator FullG4 --maxEvents=10 --skipEvents=0 --randomSeed=26741007 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-19 --DataRunNumber 222525
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml jobInfo.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-    <kvtest name='MC15digitZeePyJT' enabled='true'>
-      <release>ALL</release>
-      <priority>30</priority>
-      <kvsuite>MC15</kvsuite>
-      <trf>Digi_tf.py</trf>
-      <desc>MC15 2015 ATLAS detector - Z->ee Digitization (python JT)</desc>
-      <author>John Chapman [atlas-simulation-testreports@cern.ch]</author>
-      <version>1.0.0</version>
-      <inpath>${T_DATAPATH}/MC15SimulHITSZeePyJT-${T_RELEASE}</inpath>
-      <infile>${T_PREFIX}-MC15SimulHITSZeePyJT-${T_RELEASE}.pool.root</infile>
-      <inpool>PoolFileCatalog.xml</inpool>
-      <outpath>${T_DATAPATH}/MC15digitZeePyJT-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-MC15digitZeePyJT-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-MC15digitZeePyJT-${T_RELEASE}.log</logfile>
-      <signature>
-        --inputHITSFile="${T_INFILE}" --outputRDOFile="${T_OUTFILE}" --maxEvents=10 --skipEvents=0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-25 --digiSeedOffset1=11 --digiSeedOffset2=22
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-
-    <kvtest name='AtlasG4ZeeJet' enabled='false'>
-      <release>ALL</release>
-      <priority>20</priority>
-      <kvsuite>MC15</kvsuite>
-      <trf>Sim_tf.py</trf>
-      <desc>Z -> e e jet Simulation</desc>
-      <author>Alessandro De Salvo [Alessandro.DeSalvo@roma1.infn.it]</author>
-      <inpath>${T_DATAPATH}/EvgenZeeJet-${T_RELEASE}</inpath>
-      <infile>${T_PREFIX}-EvgenZeeJet-${T_RELEASE}.pool.root</infile>
-      <inpool>PoolFileCatalog.xml</inpool>
-      <outpath>${T_DATAPATH}/SimulHITSZeeJet-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-SimulHITSZeeJet-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-SimulHITSZeeJet-${T_RELEASE}.log</logfile>
-      <signature>
-        --inputEVNTFile="${T_INFILE}" --outputHITSFile="${T_OUTFILE}"  --simulator FullG4 --maxEvents=3 --skipEvents=0 --randomSeed=26741007 --preInclude=KitValidation/kv_reflex.py --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-19 --DataRunNumber 222525
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml jobInfo.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-    <kvtest name='DigitZeeJet' enabled='false'>
-      <release>ALL</release>
-      <priority>30</priority>
-      <kvsuite>MC15</kvsuite>
-      <trf>Digi_tf.py</trf>
-      <desc>Z -> e e jet Digitization</desc>
-      <author>Alessandro De Salvo [Alessandro.DeSalvo@roma1.infn.it]</author>
-      <version>1.0.0</version>
-      <inpath>${T_DATAPATH}/SimulHITSZeeJet-${T_RELEASE}</inpath>
-      <infile>${T_PREFIX}-SimulHITSZeeJet-${T_RELEASE}.pool.root</infile>
-      <inpool>PoolFileCatalog.xml</inpool>
-      <outpath>${T_DATAPATH}/DigitZeeJet-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-DigitZeeJet-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-DigitZeeJet-${T_RELEASE}.log</logfile>
-      <signature>
-        --inputHITSFile="${T_INFILE}" --outputRDOFile="${T_OUTFILE}" --maxEvents=3 --skipEvents=0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-25 --digiSeedOffset1=11 --digiSeedOffset2=22 --preInclude=KitValidation/kv_reflex.py
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-    <kvtest name='MC15ISF_G4TT' enabled='false'>
-      <release>ALL</release>
-      <priority>20</priority>
-      <kvsuite>MC15</kvsuite>
-      <trf>Sim_tf.py</trf>
-      <desc>Benchmark[1] tt Simulation</desc>
-      <author>Alessandro De Salvo [Alessandro.DeSalvo@roma1.infn.it]</author>
-      <inpath>${T_DATAPATH}/MC15EvgenTT-${T_RELEASE}</inpath>
-      <infile>${T_PREFIX}-MC15EvgenTT-${T_RELEASE}.pool.root</infile>
-      <inpool>PoolFileCatalog.xml</inpool>
-      <outpath>${T_DATAPATH}/MC15SimulHITSTT-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-MC15SimulHITSTT-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-MC15SimulHITSTT-${T_RELEASE}.log</logfile>
-      <signature>
-        --inputEVNTFile="${T_INFILE}" --outputHITSFile="${T_OUTFILE}"  --simulator FullG4 --maxEvents=10 --skipEvents=0 --randomSeed=26741007 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-19 --DataRunNumber 222525 --preInclude=KitValidation/kv_perfmon.py
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml jobInfo.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-    <kvtest name='MC15digitTT' enabled='false'>
-      <release>ALL</release>
-      <priority>30</priority>
-      <kvsuite>MC15</kvsuite>
-      <trf>Digi_tf.py</trf>
-      <desc>Benchmark[1] tt Digitization</desc>
-      <author>Alessandro De Salvo [Alessandro.DeSalvo@roma1.infn.it]</author>
-      <version>1.0.0</version>
-      <inpath>${T_DATAPATH}/MC15SimulHITSTT-${T_RELEASE}</inpath>
-      <infile>${T_PREFIX}-MC15SimulHITSTT-${T_RELEASE}.pool.root</infile>
-      <inpool>PoolFileCatalog.xml</inpool>
-      <outpath>${T_DATAPATH}/MC15digitTT-${T_RELEASE}</outpath>
-      <outfile>${T_PREFIX}-MC15digitTT-${T_RELEASE}.pool.root</outfile>
-      <logfile>${T_PREFIX}-MC15digitTT-${T_RELEASE}.log</logfile>
-      <signature>
-        --inputHITSFile="${T_INFILE},${T_INFILE},${T_INFILE},${T_INFILE},${T_INFILE},${T_INFILE},${T_INFILE},${T_INFILE},${T_INFILE},${T_INFILE},${T_INFILE},${T_INFILE}" --outputRDOFile="${T_OUTFILE}" --maxEvents=100 --skipEvents=0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-25 --digiSeedOffset1=11 --digiSeedOffset2=22 --preInclude=KitValidation/kv_perfmon.py
-      </signature>
-      <copyfiles>
-        ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml
-      </copyfiles>
-      <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles>
-    </kvtest>
-  </kv>
-
-  <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt" />
-
-</unifiedTestConfiguration>
diff --git a/Simulation/SimuJobTransforms/test/test_G4param b/Simulation/SimuJobTransforms/test/test_G4param
deleted file mode 100755
index f1728e1be2da86d1795a864061cf1db6127b64f8..0000000000000000000000000000000000000000
--- a/Simulation/SimuJobTransforms/test/test_G4param
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /usr/bin/env bash
-
-# Any arguments are considered options and are added at the beginning of the argument list to the transform
-# take default file for $TESTDATA area
-if [[ x$TESTDATA == x ]]; then
-  echo "ERROR: TESTDATA not defined"
-  exit 1
-fi
-
-INPUTFILE=$TESTDATA/mu_E50_eta0-25.evgen.pool.root
-JOBCONFIG=SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py
-FILENAME=`basename ${INPUTFILE}`
-FILEBASE=${FILENAME%.*.pool.root}
-if [[ "$JOBCONFIG" != "NONE" ]]; then
-  JCBASE=`basename ${JOBCONFIG}`
-  FILEBASE=${JCBASE%.py}_$FILEBASE
-fi
-HITSFILE=${FILEBASE}.hits.pool.root
-PHYSICSLIST=QGSP_BERT
-DIGIOFFSET1=10
-DIGIOFFSET2=20
-
-TRF=AtlasG4_tf.py
-which $TRF
-if [[ $? -ne 0 ]]; then
-  echo "ERROR: $TRF not found"
-  exit 2
-fi
-cmd="$TRF --inputEVNTFile=$INPUTFILE --outputHITSFile=$HITSFILE --maxEvents=5 --skipEvents=0 --randomSeed=5332532 --geometryVersion=$GEOMETRY$SIMVALIDATION --physicsList=$PHYSICSLIST --preInclude=$JOBCONFIG --conditionsTag=$IOVDBGLOBALTAG --DataRunNumber $DATARUNNUMBER $@"
-echo $cmd
-$cmd
diff --git a/Simulation/SimuJobTransforms/test/test_G4param.sh b/Simulation/SimuJobTransforms/test/test_G4param.sh
new file mode 100755
index 0000000000000000000000000000000000000000..6ba9bbea2555b31f2c5f47673c6f2712f0c3ae3d
--- /dev/null
+++ b/Simulation/SimuJobTransforms/test/test_G4param.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# art-description: MC15-style simulation using frozen showers
+# art-type: build
+# art-include: 21.0/Athena
+# art-include: 21.0/AthSimulation
+# art-include: 21.3/Athena
+# art-include: 21.9/Athena
+# art-include: master/Athena
+# art-include: master/AthSimulation
+
+# MC15 setup
+# ATLAS-R2-2015-03-01-00 and OFLCOND-RUN12-SDR-30
+export TRF_ECHO=1
+AtlasG4_tf.py \
+--inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/mu_E200_eta0-25.evgen.pool.root' \
+--outputHITSFile 'mu_E200_eta0-25.HITS.pool.root' \
+--maxEvents 5 \
+--skipEvents 0 \
+--geometryVersion 'ATLAS-R2-2015-03-01-00' \
+--physicsList 'FTFP_BERT_ATL' \
+--preInclude 'SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' \
+--conditionsTag OFLCOND-RUN12-SDR-30 \
+--DataRunNumber 222525
+
+echo  "art-result: $? simulation"
diff --git a/Simulation/SimuJobTransforms/test/test_diffmerged b/Simulation/SimuJobTransforms/test/test_diffmerged
deleted file mode 100755
index 018dc325905145e7b85b3d6cc2aaf1b7e7ed0c4c..0000000000000000000000000000000000000000
--- a/Simulation/SimuJobTransforms/test/test_diffmerged
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /usr/bin/env bash
-
-# ERROR_MESSAGE :FAILURE (ERROR)
-# ERROR_MESSAGE :[ERR]
-# SUCCESS_MESSAGE :[OK]
-
-## Diff the output files from test_digi_mergeHIT and test_digi_unmergeHIT
-## TODO: Reinstate with new input files
-
-skip_if_AthSimulation.sh diffPoolFiles.py mu_E50_eta0-25_${GEOMETRY}.merged.rdo.pool.root mu_E50_eta0-25_${GEOMETRY}.unmerged.rdo.pool.root | \
-    sed 's/\[ERR\]\(.*\)POOLContainer_DataHeaderForm$/\[WARN\]\1POOLContainer_DataHeaderForm/g' | \
-    sed 's/## Comparison : \[ERR\]/## Comparison : \[WARN\]/g'
diff --git a/Simulation/SimuJobTransforms/test/test_diffmerged.sh b/Simulation/SimuJobTransforms/test/test_diffmerged.sh
new file mode 100755
index 0000000000000000000000000000000000000000..0d0fe135d4dfe5db68f4ec6f6a5c2f0949c51f21
--- /dev/null
+++ b/Simulation/SimuJobTransforms/test/test_diffmerged.sh
@@ -0,0 +1,85 @@
+#!/bin/sh
+#
+# art-description: MC15-style simulation using frozen showers, then merge two copies of the HITS file
+# art-type: build
+# art-include: 21.0/Athena
+# art-include: 21.3/Athena
+# art-include: 21.9/Athena
+# art-include: master/Athena
+
+# MC15 setup
+# ATLAS-R2-2015-03-01-00 and OFLCOND-RUN12-SDR-30
+export TRF_ECHO=1
+export GEOMETRY=ATLAS-R2-2015-03-01-00
+
+AtlasG4_tf.py \
+--inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/mu_E200_eta0-25.evgen.pool.root \
+--outputHITSFile mu_E200_eta0-25_${GEOMETRY}.HITS.pool.root \
+--maxEvents 5 \
+--skipEvents 0 \
+--geometryVersion ${GEOMETRY} \
+--physicsList 'FTFP_BERT_ATL' \
+--preInclude 'SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' \
+--conditionsTag OFLCOND-RUN12-SDR-30 \
+--DataRunNumber 222525
+
+echo  "art-result: $? simulation"
+
+INPUTFILE=mu_E200_eta0-25_${GEOMETRY}.HITS.pool.root
+FILENAME=`basename ${INPUTFILE}`
+FILEBASE=${FILENAME%.HITS.pool.root}
+INPUTFILE2=${FILEBASE}.2.HITS.pool.root
+RDOFILE1=${FILEBASE}.unmerged.RDO.pool.root
+RDOFILE2=${FILEBASE}.merged.RDO.pool.root
+# Copy the file.  We can't use cp here, since we need the copy to get
+# a new GUID.  Otherwise, we'll get errors about duplicate GUIDs
+# in the file catalog.
+mergePOOL -o $INPUTFILE2 -i $INPUTFILE
+
+echo  "art-result: $? copyHITS"
+
+INPUTLIST=$INPUTFILE,$INPUTFILE2
+MERGEHITSFILE=${FILEBASE}.merged.HITS.pool.root
+echo $INPUTLIST
+
+## TODO: Temporary hack until log files are found!
+cp log.AtlasG4Tf log.AtlasG4Tf2
+INPUTLOGLIST=log.AtlasG4Tf,log.AtlasG4Tf2
+
+HITSMerge_tf.py \
+--inputHITSFile "$INPUTLIST" \
+--inputLogsFile "$INPUTLOGLIST" \
+--outputHITS_MRGFile $MERGEHITSFILE \
+--maxEvents 20 \
+--skipEvents 0 \
+--geometryVersion ${GEOMETRY}
+
+echo  "art-result: $? mergeHITS"
+
+Digi_tf.py \
+--inputHITSFile $MERGEHITSFILE \
+--outputRDOFile $RDOFILE2 \
+--maxEvents 2 \
+--skipEvents 6 \
+--geometryVersion ${GEOMETRY} \
+--conditionsTag 'OFLCOND-RUN12-SDR-30' \
+--DataRunNumber 222525
+
+echo  "art-result: $? mergeDigi"
+
+Digi_tf.py \
+--inputHITSFile "$INPUTLIST" \
+--outputRDOFile $RDOFILE1 \
+--maxEvents 2 \
+--skipEvents 6 \
+--geometryVersion ${GEOMETRY} \
+--conditionsTag 'OFLCOND-RUN12-SDR-30' \
+--DataRunNumber 222525
+
+echo  "art-result: $? unmergeDigi"
+
+diffPoolFiles.py $RDOFILE2 $RDOFILE1 | \
+    sed 's/\[ERR\]\(.*\)POOLContainer_DataHeaderForm$/\[WARN\]\1POOLContainer_DataHeaderForm/g' | \
+    sed 's/## Comparison : \[ERR\]/## Comparison : \[WARN\]/g'
+
+echo  "art-result: $? diffRDO"
diff --git a/Simulation/SimuJobTransforms/test/test_digi_mergeHIT b/Simulation/SimuJobTransforms/test/test_digi_mergeHIT
deleted file mode 100755
index 2c0b754677ddfcf557e4de2066ab172b9ca3eb85..0000000000000000000000000000000000000000
--- a/Simulation/SimuJobTransforms/test/test_digi_mergeHIT
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /usr/bin/env bash
-
-## Any arguments to the script are overrides or options (added at the end)
-if [[ $# -ge 1 ]]; then
-  ARGS=$@
-else
-  ARGS=''
-fi
-
-if [[ x$TESTDATA == x ]]; then
-  echo "ERROR: TESTDATA not defined"
-  exit 1
-fi
-
-DIGIOFFSET1=10
-DIGIOFFSET2=20
-INPUTFILE=mu_E50_eta0-25_${GEOMETRY}.merged.hits.pool.root
-FILENAME=`basename ${INPUTFILE}`
-FILEBASE=${FILENAME%.hits.pool.root}
-RDOFILE=${FILEBASE}.rdo.pool.root
-MINBIASFILE=NONE
-CAVERNFILE=NONE
-JOBCONFIG=NONE
-DBRELEASETARBALL='current'
-
-TRF=Digi_tf.py
-which $TRF
-if [[ $? -ne 0 ]]; then
-  echo "ERROR: $TRF not found"
-  exit 2
-fi
-cmd="skip_if_AthSimulation.sh $TRF --inputHITSFile=$INPUTFILE --outputRDOFile=$RDOFILE --maxEvents=2 --skipEvents=11 --geometryVersion=$GEOMETRY --digiSeedOffset1=$DIGIOFFSET1 --digiSeedOffset2=$DIGIOFFSET2 --conditionsTag=$IOVDBGLOBALTAG --DataRunNumber $DATARUNNUMBER $ARGS"
-echo $cmd
-$cmd
diff --git a/Simulation/SimuJobTransforms/test/test_digi_mu b/Simulation/SimuJobTransforms/test/test_digi_mu
deleted file mode 100755
index a0516c6960ddb4b9336b6df18b8e491f92af2145..0000000000000000000000000000000000000000
--- a/Simulation/SimuJobTransforms/test/test_digi_mu
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /usr/bin/env bash
-
-## Any arguments to the script are overrides or options (added at the end)
-#if [[ $# -ge 1 ]]; then
-#  ARGS=$@
-#else
-#  ARGS=''
-#fi
-
-if [[ x$TESTDATA == x ]]; then
-  echo "ERROR: TESTDATA not defined"
-  exit 1
-fi
-
-DIGIOFFSET1=10
-DIGIOFFSET2=20
-INPUTFILE=${TESTDATA}/mu_E50_eta0-25_${GEOMETRY}.hits.pool.root
-FILENAME=`basename ${INPUTFILE}`
-FILEBASE=${FILENAME%.hits.pool.root}
-RDOFILE=${FILEBASE}.rdo.pool.root
-MINBIASFILE=NONE
-CAVERNFILE=NONE
-JOBCONFIG=NONE
-DBRELEASETARBALL='current'
-
-TRF=Digi_tf.py
-which $TRF
-if [[ $? -ne 0 ]]; then
-  echo "ERROR: $TRF not found"
-  exit 2
-fi
-cmd="skip_if_AthSimulation.sh $TRF --inputHITSFile=$INPUTFILE --outputRDOFile=$RDOFILE --maxEvents=5 --skipEvents=0 --geometryVersion=$GEOMETRY --digiSeedOffset1=$DIGIOFFSET1 --digiSeedOffset2=$DIGIOFFSET2 --conditionsTag=$IOVDBGLOBALTAG --DataRunNumber $DATARUNNUMBER $@"
-echo $cmd
-$cmd
diff --git a/Simulation/SimuJobTransforms/test/test_digi_unmergeHIT b/Simulation/SimuJobTransforms/test/test_digi_unmergeHIT
deleted file mode 100755
index 9cac12061e35be795ec77e058b91a4cfbd1ce5f7..0000000000000000000000000000000000000000
--- a/Simulation/SimuJobTransforms/test/test_digi_unmergeHIT
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /usr/bin/env bash
-
-## Any arguments to the script are overrides or options (added at the end)
-if [[ $# -ge 1 ]]; then
-  ARGS=$@
-else
-  ARGS=''
-fi
-
-if [[ x$TESTDATA == x ]]; then
-  echo "ERROR: TESTDATA not defined"
-  exit 1
-fi
-DIGIOFFSET1=10
-DIGIOFFSET2=20
-INPUTFILE=${TESTDATA}/mu_E50_eta0-25_${GEOMETRY}.hits.pool.root
-FILENAME=`basename ${INPUTFILE}`
-FILEBASE=${FILENAME%.hits.pool.root}
-INPUTFILE2=${FILEBASE}.3.hits.pool.root
-# Copy the file.  We can't use cp here, since we need the copy to get
-# a new GUID.  Otherwise, we'll get errors about duplicate GUIDs
-# in the file catalog.
-mergePOOL -o $INPUTFILE2 -i $INPUTFILE
-INPUTLIST=$INPUTFILE,$INPUTFILE2
-RDOFILE=${FILEBASE}.unmerged.rdo.pool.root
-MINBIASFILE=NONE
-CAVERNFILE=NONE
-JOBCONFIG=NONE
-DBRELEASETARBALL='current'
-
-TRF=Digi_tf.py
-which $TRF
-if [[ $? -ne 0 ]]; then
-  echo "ERROR: $TRF not found"
-  exit 2
-fi
-cmd="skip_if_AthSimulation.sh $TRF --inputHITSFile=$INPUTLIST --outputRDOFile=$RDOFILE --maxEvents=2 --skipEvents=11 --geometryVersion=$GEOMETRY --digiSeedOffset1=$DIGIOFFSET1 --digiSeedOffset2=$DIGIOFFSET2 --conditionsTag=$IOVDBGLOBALTAG --DataRunNumber $DATARUNNUMBER $ARGS"
-echo $cmd
-$cmd
diff --git a/Simulation/SimuJobTransforms/test/test_filterHIT b/Simulation/SimuJobTransforms/test/test_filterHIT
deleted file mode 100755
index c16eaca26f01cab276e74b8ce11905a4df7465c1..0000000000000000000000000000000000000000
--- a/Simulation/SimuJobTransforms/test/test_filterHIT
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /usr/bin/env bash
-
-## Any arguments will be added at the end.
-## They can be either options or named arguments, which will override the default arguments
-if [[ $# -ge 1 ]]; then
-   ARGS=$@
-else
-   ARGS=""
-fi
-
-if [[ x$TESTDATA == x ]]; then
-  echo "ERROR: TESTDATA not defined"
-  exit 1
-fi
-INPUTFILE=$TESTDATA/minbias_Inelastic-pythia8-7000_${GEOMETRY}.hits.pool.root
-FILENAME=`basename ${INPUTFILE}`
-FILEBASE=${FILENAME%.hits.pool.root}
-FILTERHITSFILE=${FILEBASE}.filtered.hits.pool.root
-JOBCONFIG=NONE
-
-TRF=FilterHit_tf.py
-which $TRF
-if [[ $? -ne 0 ]]; then
-  echo "ERROR: $TRF not found"
-  exit 2
-fi
-cmd="$TRF\
- --inputHITSFile=$INPUTFILE\
- --outputHITS_FILTFile=$FILTERHITSFILE\
- --maxEvents=5\
- --skipEvents=0\
- --geometryVersion=$GEOMETRY \
- $ARGS"
-echo $cmd
-$cmd
diff --git a/Simulation/SimuJobTransforms/test/test_filterHIT.sh b/Simulation/SimuJobTransforms/test/test_filterHIT.sh
new file mode 100755
index 0000000000000000000000000000000000000000..0931021e8ececafe8ced04cbf418529b7055309c
--- /dev/null
+++ b/Simulation/SimuJobTransforms/test/test_filterHIT.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# art-description: Create a minbias HITS file then run FilterHit_tf.py on it
+# art-type: build
+# art-include: 21.0/Athena
+# art-include: 21.3/Athena
+# art-include: 21.9/Athena
+# art-include: master/Athena
+
+# MC15 setup
+# ATLAS-R2-2015-03-01-00 and OFLCOND-RUN12-SDR-30
+export TRF_ECHO=1
+AtlasG4_tf.py \
+--inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/minbias_Inelastic-pythia8-7000.evgen.pool.root' \
+--outputHITSFile 'minbias_Inelastic-pythia8-7000_ATLAS-R2-2015-03-01-00.HITS.pool.root' \
+--maxEvents 5 \
+--skipEvents 0 \
+--geometryVersion 'ATLAS-R2-2015-03-01-00' \
+--physicsList 'FTFP_BERT_ATL' \
+--preInclude 'SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' \
+--conditionsTag OFLCOND-RUN12-SDR-30 \
+--DataRunNumber 222525
+
+echo  "art-result: $? simulation"
+
+FilterHit_tf.py \
+ --inputHITSFile 'minbias_Inelastic-pythia8-7000_ATLAS-R2-2015-03-01-00.HITS.pool.root' \
+ --outputHITS_FILTFile 'minbias_Inelastic-pythia8-7000_ATLAS-R2-2015-03-01-00.filtered.HITS.pool.root'\
+ --maxEvents 5 \
+ --skipEvents 0 \
+ --geometryVersion 'ATLAS-R2-2015-03-01-00'
+
+echo  "art-result: $? filter"
diff --git a/Simulation/SimuJobTransforms/test/test_mergeHIT b/Simulation/SimuJobTransforms/test/test_mergeHIT
deleted file mode 100755
index f3394a743b9c73a28fb316c6c11656b286d435f1..0000000000000000000000000000000000000000
--- a/Simulation/SimuJobTransforms/test/test_mergeHIT
+++ /dev/null
@@ -1,47 +0,0 @@
-#! /usr/bin/env bash
-
-## Any arguments will be added at the end.
-## They can be either options or named arguments, which will override the default arguments
-if [[ $# -ge 1 ]]; then
-   ARGS=$@
-else
-   ARGS=""
-fi
-
-if [[ x$TESTDATA == x ]]; then
-  echo "ERROR: TESTDATA not defined"
-  exit 1
-fi
-INPUTFILE=$TESTDATA/mu_E50_eta0-25_${GEOMETRY}.hits.pool.root
-FILENAME=`basename ${INPUTFILE}`
-FILEBASE=${FILENAME%.hits.pool.root}
-INPUTFILE2=${FILEBASE}.2.hits.pool.root
-# Copy the file.  We can't use cp here, since we need the copy to get
-# a new GUID.  Otherwise, we'll get errors about duplicate GUIDs
-# in the file catalog.
-mergePOOL -o $INPUTFILE2 -i $INPUTFILE
-INPUTLIST=$INPUTFILE,$INPUTFILE2
-MERGEHITSFILE=${FILEBASE}.merged.hits.pool.root
-JOBCONFIG=NONE
-echo $INPUTLIST
-
-## TODO: Temporary hack until log files are found!
-touch temp1.log temp2.log
-INPUTLOGLIST=temp1.log,temp2.log
-
-TRF=HITSMerge_tf.py
-which $TRF
-if [[ $? -ne 0 ]]; then
-  echo "ERROR: $TRF not found"
-  exit 2
-fi
-cmd="$TRF\
- --inputHITSFile=$INPUTLIST\
- --inputLogsFile=$INPUTLOGLIST\
- --outputHITS_MRGFile=$MERGEHITSFILE\
- --maxEvents=20\
- --skipEvents=0\
- --geometryVersion=$GEOMETRY \
- $ARGS"
-echo $cmd
-$cmd
diff --git a/Simulation/SimuJobTransforms/test/test_pileup b/Simulation/SimuJobTransforms/test/test_pileup
deleted file mode 100755
index 36ebf396d33e6f1ede8e743f5b5fe580d1c63436..0000000000000000000000000000000000000000
--- a/Simulation/SimuJobTransforms/test/test_pileup
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /usr/bin/env bash
-
-## Any arguments to the script are overrides or options (added at the end)
-if [[ $# -ge 1 ]]; then
-  ARGS=$@
-else
-  ARGS=''
-fi
-
-if [[ x$TESTDATA == x ]]; then
-  echo "ERROR: TESTDATA not defined"
-  exit 1
-fi
-DIGIOFFSET1=10
-DIGIOFFSET2=20
-INPUTFILE=$TESTDATA/mu_E50_eta0-25_${GEOMETRY}.hits.pool.root
-FILENAME=`basename ${INPUTFILE}`
-FILEBASE=${FILENAME%.*.pool.root}
-RDOFILE=${FILEBASE}-pileup.rdo.pool.root
-LUMI=Test
-DBRELEASETARBALL=NONE
-
-MINBIASFILE=$TESTDATA/minbias_Inelastic-pythia8-7000_${GEOMETRY}.hits.pool.root
-#CAVERNFILE=$TESTDATA/cavernbg-pythia8-7000_${GEOMETRY}.hits.pool.root
-
-TRF=Digi_tf.py
-which $TRF
-if [[ $? -ne 0 ]]; then
-  echo "ERROR: $TRF not found"
-  exit 2
-fi
-cmd="skip_if_AthSimulation.sh $TRF --inputHITSFile $INPUTFILE --outputRDOFile $RDOFILE --maxEvents 10 --skipEvents 0 --geometryVersion $GEOMETRY --digiSeedOffset1 $DIGIOFFSET1 --digiSeedOffset2 $DIGIOFFSET2 --inputLowPtMinbiasHitsFile $MINBIASFILE --numberOfLowPtMinBias 1.0 --bunchSpacing 450 --pileupInitialBunch -1 --pileupFinalBunch 1 --conditionsTag $IOVDBGLOBALTAG --DataRunNumber $DATARUNNUMBER $ARGS"
-echo $cmd
-$cmd
diff --git a/Simulation/SimuJobTransforms/test/test_pileup.sh b/Simulation/SimuJobTransforms/test/test_pileup.sh
new file mode 100755
index 0000000000000000000000000000000000000000..8d8ee94179b02dc3fbf572d0ff48265e891f8a24
--- /dev/null
+++ b/Simulation/SimuJobTransforms/test/test_pileup.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# art-description: Modified/Simplified MC16a digitization job
+# art-type: build
+# art-include: 21.0/Athena
+# art-include: 21.3/Athena
+# art-include: 21.9/Athena
+# art-include: master/Athena
+
+HighPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/*"
+LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/*"
+
+Digi_tf.py \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
+--conditionsTag default:OFLCOND-MC16-SDR-16 \
+--geometryVersion default:ATLAS-R2-2016-01-00-01 \
+--inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} \
+--inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} \
+--maxEvents 10 \
+--numberOfCavernBkg 0 \
+--numberOfHighPtMinBias 0.01 \
+--numberOfLowPtMinBias 0.99 \
+--outputRDOFile test.RDO.pool.root \
+--skipEvents 0 \
+--bunchSpacing 450 \
+--pileupInitialBunch -1 \
+--pileupFinalBunch 1 \
+--DataRunNumber 284500
+
+echo  "art-result: $? digitization"
diff --git a/Simulation/SimuJobTransforms/test/test_setup b/Simulation/SimuJobTransforms/test/test_setup
deleted file mode 100644
index 03908c1599d15d334474530bf316a4ab9dc2b3ae..0000000000000000000000000000000000000000
--- a/Simulation/SimuJobTransforms/test/test_setup
+++ /dev/null
@@ -1,10 +0,0 @@
-# MC15 setup
-# ATLAS-R2-2015-03-01-00 and OFLCOND-RUN12-SDR-30
-export TESTDATA=/afs/cern.ch/atlas/offline/ProdData/19.2.X
-export GEOMETRY=ATLAS-R2-2015-03-01-00
-export SIMVALIDATION=_VALIDATION
-export IOVDBGLOBALTAG=OFLCOND-RUN12-SDR-30
-export FSRELEASE=1.0.0
-export DATAPATH=$DATAPATH:/afs/cern.ch/atlas/software/FSreleases/DD0/FSRelease/1.0.0
-export TRF_ECHO=1
-export DATARUNNUMBER=222525
\ No newline at end of file
diff --git a/Simulation/SimuJobTransforms/test/test_simul_cavernbg b/Simulation/SimuJobTransforms/test/test_simul_cavernbg
deleted file mode 100644
index b62131c718b279d539dc339f6c7a22e27b3553ef..0000000000000000000000000000000000000000
--- a/Simulation/SimuJobTransforms/test/test_simul_cavernbg
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /usr/bin/env bash
-
-## Any arguments are overrides and can either be options or named arguments
-if [[ x$TESTDATA == x ]]; then
-  echo "ERROR: TESTDATA not defined"
-  exit 1
-fi
-
-INPUTFILE=${TESTDATA}/cavernbg-pythia8-7000.evgen.pool.root
-FILENAME=`basename ${INPUTFILE}`
-FILEBASE=${FILENAME%.*.pool.root}_${GEOMETRY}
-HITSFILE=${FILEBASE}.hits.pool.root
-RDOFILE=${FILEBASE}.rdo.pool.root
-DIGIOFFSET1=10
-DIGIOFFSET2=20
-PHYSICSLIST=QGSP_BERT
-DBRELEASETARBALL=NONE
-
-if [[ -n "$DBRELEASE_REQUESTED" ]]; then
-  DBRELEASETARBALL=/afs/cern.ch/atlas/www/GROUPS/DATABASE/pacman4/DBRelease/DBRelease-${DBRELEASE_REQUESTED}.tar.gz
-  if [[ ! -r $DBRELEASETARBALL ]]; then
-      echo "DBRelease tarball not found, not using it: $DBRELEASETARBALL"
-      DBRELEASETARBALL=NONE
-  fi
-fi
-
-TRF=AtlasG4_tf.py
-which $TRF
-if [[ $? -ne 0 ]]; then
-  echo "ERROR: $TRF not found"
-  exit 2
-fi
-cmd="$TRF --inputEVNTFile=$INPUTFILE --outputHitsFile=$HITSFILE --maxEvents=10 --skipEvents=0 --randomSeed=5332532 --geometryVersion=$GEOMETRY$SIMVALIDATION --digiSeedOffset1=$DIGIOFFSET1 --digiSeedOffset2=$DIGIOFFSET2 --physicsList=$PHYSICSLIST --DBRelease=current --conditionsTag=$IOVDBGLOBALTAG $@"
-echo $cmd
-$cmd
diff --git a/Simulation/SimuJobTransforms/test/test_simul_minbias b/Simulation/SimuJobTransforms/test/test_simul_minbias
deleted file mode 100644
index 3c3dea07054c6424f935b75bfc7e2ef2d03f21c6..0000000000000000000000000000000000000000
--- a/Simulation/SimuJobTransforms/test/test_simul_minbias
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /usr/bin/env bash
-
-## Any arguments are overrides and can either be options or named arguments
-if [[ x$TESTDATA == x ]]; then
-  echo "ERROR: TESTDATA not defined"
-  exit 1
-fi
-
-INPUTFILE=${TESTDATA}/minbias_Inelastic-pythia8-7000.evgen.pool.root
-FILENAME=`basename ${INPUTFILE}`
-FILEBASE=${FILENAME%.*.pool.root}_${GEOMETRY}
-HITSFILE=${FILEBASE}.hits.pool.root
-RDOFILE=${FILEBASE}.rdo.pool.root
-DIGIOFFSET1=10
-DIGIOFFSET2=20
-PHYSICSLIST=QGSP_BERT
-DBRELEASETARBALL=NONE
-
-if [[ -n "$DBRELEASE_REQUESTED" ]]; then
-  DBRELEASETARBALL=/afs/cern.ch/atlas/www/GROUPS/DATABASE/pacman4/DBRelease/DBRelease-${DBRELEASE_REQUESTED}.tar.gz
-  if [[ ! -r $DBRELEASETARBALL ]]; then
-      echo "DBRelease tarball not found, not using it: $DBRELEASETARBALL"
-      DBRELEASETARBALL=NONE
-  fi
-fi
-
-TRF=AtlasG4_tf.py
-which $TRF
-if [[ $? -ne 0 ]]; then
-  echo "ERROR: $TRF not found"
-  exit 2
-fi
-cmd="$TRF --inputEVNTFile=$INPUTFILE --outputHITSFile=$HITSFILE --maxEvents=10 --skipEvents=0 --randomSeed=5332532 --geometryVersion=$GEOMETRY$SIMVALIDATION --digiSeedOffset1=$DIGIOFFSET1 --digiSeedOffset2=$DIGIOFFSET2 --physicsList=$PHYSICSLIST --DBRelease=current --conditionsTag=$IOVDBGLOBALTAG $@"
-echo $cmd
-$cmd
diff --git a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.AMSB.py b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.AMSB.py
index 005338d89e20ff63c8193b91016b44af90f02d56..f03999d55fdfbccb75cbc12f1407bac170f6936e 100644
--- a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.AMSB.py
+++ b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.AMSB.py
@@ -14,10 +14,10 @@ def get_and_fix_PDGTABLE(replace):
             lines.append('M' + str(pdgid).rjust(8) +''.ljust(26) +
                          ('%11.5E' % mass).ljust(15) +
                          '+0.0E+00'.ljust(9) + '-0.0E+00'.ljust(9) +
-                         name.strip() + ''.ljust(6) + charge.strip() + '\n')
+                         name.strip() + ''.ljust(6) + charge.strip()+''.rjust(20-len(name.strip())) + '\n')
             lines.append('W' + str(pdgid).rjust(8) +''.ljust(26) +
                          '0.E+00'.ljust(15) + '+0.0E+00'.ljust(9) + '-0.0E+00'.ljust(9) +
-                         name.strip() + ''.ljust(6) + charge.strip() + '\n')
+                         name.strip() + ''.ljust(6) + charge.strip()+''.rjust(20-len(name.strip())) + '\n')
         else:
             for i in xrange(len(lines)):
                 if re.search(r'M\s+'+str(pdgid)+'\s+\S+', lines[i]):
diff --git a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.GMSB.py b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.GMSB.py
index ed6ab712c05848e0cff3d6c9f922554089f4b124..d791a35655da0d76140216ee43aa18d0ce224c6b 100644
--- a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.GMSB.py
+++ b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.GMSB.py
@@ -18,10 +18,10 @@ def get_and_fix_PDGTABLE(replace):
             lines.append('M' + str(pdgid).rjust(8) +''.ljust(26) +
                          ('%11.5E' % mass).ljust(15) +
                          '+0.0E+00'.ljust(9) + '-0.0E+00'.ljust(9) +
-                         name.strip() + ''.ljust(6) + charge.strip() + '\n')
+                         name.strip() + ''.ljust(6) + charge.strip()+''.rjust(20-len(name.strip())) + '\n')
             lines.append('W' + str(pdgid).rjust(8) +''.ljust(26) +
                          '0.E+00'.ljust(15) + '+0.0E+00'.ljust(9) + '-0.0E+00'.ljust(9) +
-                         name.strip() + ''.ljust(6) + charge.strip() + '\n')
+                         name.strip() + ''.ljust(6) + charge.strip()+''.rjust(20-len(name.strip())) + '\n')
         else:
             for i in xrange(len(lines)):
                 if re.search(r'M\s+'+str(pdgid)+'\s+\S+', lines[i]):
@@ -33,6 +33,7 @@ def get_and_fix_PDGTABLE(replace):
     update.close()
 
     print 'modfied PDGTABLE\n%s\n' % ''.join(lines)
+    sys.stdout.flush()
 
 def load_files_for_GMSB_scenario(simdict):
 
diff --git a/Simulation/Tests/DigitizationTests/src/SCT_RDOsTestTool.cxx b/Simulation/Tests/DigitizationTests/src/SCT_RDOsTestTool.cxx
index c34d051b297e4acfb00cb1879e4fb4ab468645a5..d231291302bedf7de27e4e2a4521926b52f03f8c 100644
--- a/Simulation/Tests/DigitizationTests/src/SCT_RDOsTestTool.cxx
+++ b/Simulation/Tests/DigitizationTests/src/SCT_RDOsTestTool.cxx
@@ -19,9 +19,6 @@ SCT_RDOsTestTool::SCT_RDOsTestTool(const std::string& type,
                                    const std::string& name,
                                    const IInterface* parent)
   : DigiTestToolBase(type, name, parent),
-    //m_siConditionsSvc("SCT_SiliconConditionsSvc",name),
-    //m_siPropertiesSvc("SCT_SiPropertiesSvc",name),
-    //m_sctmgr(NULL),
     m_sctID(NULL),
     m_numberOfEventsSelected(0),
     m_collection("SCT_RDOs"),
@@ -44,8 +41,6 @@ SCT_RDOsTestTool::SCT_RDOsTestTool(const std::string& type,
     m_EndCapC_OccupancyByDisk(0),
     m_SCT_OccupancyByModuleType(0)
 {
-  //declareProperty("SiConditionsSvc", m_siConditionsSvc);
-  //declareProperty("SiPropertiesSvc", m_siPropertiesSvc);
   for(unsigned int i(0); i<9; ++i)
     {
       m_h_sct_endcapA_occ_layer[i]=NULL;
@@ -58,23 +53,6 @@ SCT_RDOsTestTool::SCT_RDOsTestTool(const std::string& type,
 
 StatusCode SCT_RDOsTestTool::initialize()
 {
-  //Get ISiPropertiesSvc
-  //   if( m_siPropertiesSvc.retrieve().isFailure() )
-  //     {
-  //       return StatusCode::FAILURE;
-  //     }
-
-  //Get ISiliconConditionsSvc
-  //   if( m_siConditionsSvc.retrieve().isFailure() )
-  //     {
-  //       return StatusCode::FAILURE;
-  //     }
-  // get the SCT detector manager
-  //   if(detStore()->retrieve(m_sctmgr,"SCT").isFailure())
-  //     {
-  //       return StatusCode::FAILURE;
-  //     }
-
   // get the SCT ID Helper
   if (detStore()->retrieve(m_sctID, "SCT_ID").isFailure())
     {
diff --git a/Simulation/Tests/DigitizationTests/src/SCT_RDOsTestTool.h b/Simulation/Tests/DigitizationTests/src/SCT_RDOsTestTool.h
index 4d40ddc8cb0e57f49ddc72545dba922e9bbdd7d4..32212317474ab688f2f008959357106acb8f5a8b 100644
--- a/Simulation/Tests/DigitizationTests/src/SCT_RDOsTestTool.h
+++ b/Simulation/Tests/DigitizationTests/src/SCT_RDOsTestTool.h
@@ -8,8 +8,6 @@
 #include "DigiTestToolBase.h"
 
 class SCT_ID;
-//class ISiliconConditionsSvc;
-//class ISiPropertiesSvc;
 
 class SCT_RDOsTestTool : public DigiTestToolBase {
 
@@ -29,9 +27,6 @@ public:
   StatusCode CheckSDOs();
   double GetBarrelOccupancy(const TH2* hist, const int layer, const double basescale, double& error);
   double GetEndcapOccupancy(const TH2* hist, const int disk, const double basescale, double& error);
-  //ServiceHandle<ISiliconConditionsSvc> m_siConditionsSvc;
-  //ServiceHandle<ISiPropertiesSvc> m_siPropertiesSvc;
-  //const InDetDD::SCT_DetectorManager *m_sctmgr; //!< Pointer to the SCT detector manager
   const SCT_ID *m_sctID;        //!<  Pointer to the SCT ID helper
   unsigned int m_numberOfEventsSelected;
 
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_nu_25ns_premixing.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_nu_25ns_premixing.sh
index e362447ac62c93f8fc1b5f85caafb599ec56ae03..b63693b9063b35569746241569b6bdd3cef22db1 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_nu_25ns_premixing.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_nu_25ns_premixing.sh
@@ -16,7 +16,7 @@ LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Digitiz
 
 
 
-Digi_tf.py --PileUpPremixing True --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ParticleGenerator_nu_E50.HITS.05232174._000001.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles}  --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194 --outputRDOFile ${DigiOutFileName} --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1' --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec    'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run222525_v1.py' --skipEvents 0
+Digi_tf.py --PileUpPremixing True --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ParticleGenerator_nu_E50.HITS.05232174._000001.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles}  --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194 --outputRDOFile ${DigiOutFileName} --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec    'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run222525_v1.py' --skipEvents 0
 
 echo  "art-result: $? Digi_tf.py"
 
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_algs_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_algs_pileup.sh
index 7d3b08e20a82fa2311e52253767aced0a73d05fe..1a7f3f72cd2f28d75c093c4240e122fde778431b 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_algs_pileup.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_algs_pileup.sh
@@ -16,7 +16,7 @@ LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Digitiz
 
 
 
-Digi_tf.py  --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194 --outputRDOFile ${DigiOutFileName}  --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1'  --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6  --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --preInclude 'HITtoRDO:Digitization/ForceUseOfAlgorithms.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run222525_v1.py' --skipEvents 0
+Digi_tf.py  --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194 --outputRDOFile ${DigiOutFileName}  --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1'  --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6  --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --preInclude 'HITtoRDO:Digitization/ForceUseOfAlgorithms.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run222525_v1.py' --skipEvents 0
 
 echo  "art-result: $? Digi_tf.py"
 
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup.sh
index 134ff95a64edfd2ee006f1284ccb340c9ca96a3f..f64498f9c2d1ba182b8ab50a6ce4ad8a055fbd61 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup.sh
@@ -13,7 +13,7 @@ HighPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Digiti
 LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/mc15a/mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/HITS.05098374.*.pool.root.?"
 
 
-Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles}  --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194 --outputRDOFile ${DigiOutFileName} --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1' --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec    'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run222525_v1.py' --skipEvents 0
+Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles}  --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194 --outputRDOFile ${DigiOutFileName} --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec    'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run222525_v1.py' --skipEvents 0
 
 
 echo  "art-result: $? Digi_tf.py"
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup_noNoise.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup_noNoise.sh
index e7de47a5ede4027718a8885f8bd0dff28d5b1b57..83db2534a993a335d51f910070d90379f13a2413 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup_noNoise.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup_noNoise.sh
@@ -14,7 +14,7 @@ HighPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Digiti
 LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/mc15a/mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/HITS.05098374.*.pool.root.?"
 
 
-Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --doAllNoise False --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194 --outputRDOFile ${DigiOutFileName}   --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1'  --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)'  --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run222525_v1.py' --skipEvents 0
+Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --doAllNoise False --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194 --outputRDOFile ${DigiOutFileName}   --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1'  --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)'  --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run222525_v1.py' --skipEvents 0
 
 echo  "art-result: $? Digi_tf.py"
 
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_50ns_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_50ns_pileup.sh
index 094fdc6bca682218962289ccd65eb67cff308b12..7c971a328c48547d5fea00b8343447cf54c24654 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_50ns_pileup.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_50ns_pileup.sh
@@ -14,7 +14,7 @@ HighPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Digiti
 LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/mc15a/mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/HITS.05098374.*.pool.root.?"
 
 
-Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1  --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2=170  --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194  --outputRDOFile ${DigiOutFileName} --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1' --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_50ns_Config1.py,RunDependentSimData/configLumi_run222510.py' --skipEvents 0
+Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1  --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2=170  --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194  --outputRDOFile ${DigiOutFileName} --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_50ns_Config1.py,RunDependentSimData/configLumi_run222510.py' --skipEvents 0
 
 echo  "art-result: $? Digi_tf.py"
 
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_ttbar.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_ttbar.sh
index 58f8cfbcd369602908ae5a3a74d22b025061b659..275b2a6fb8416a5ada1d5a0e392801107590be3e 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_ttbar.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_ttbar.sh
@@ -14,7 +14,7 @@ HighPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0C
 LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/*"
 
 
-Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 --conditionsTag default:OFLCOND-MC16-SDR-16 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion default:ATLAS-R2-2016-01-00-01 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.116075313 --numberOfLowPtMinBias 44.3839246425 --outputRDOFile ${DigiOutFileName} --digiSteeringConf "StandardSignalOnlyTruth" --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1' --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run284500_mc16a.py' --skipEvents 0
+Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 --conditionsTag default:OFLCOND-MC16-SDR-16 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion default:ATLAS-R2-2016-01-00-01 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.116075313 --numberOfLowPtMinBias 44.3839246425 --outputRDOFile ${DigiOutFileName} --digiSteeringConf "StandardSignalOnlyTruth" --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run284500_mc16a.py' --skipEvents 0
 echo  "art-result: $? Digi_tf.py"
 
 
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_ttbar.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_ttbar.sh
index 46e2d75eb964a0573fae5d72477ebf27c73cfcc8..4b8cc7dd013d90886c3b73fbb950c665a419e936 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_ttbar.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_ttbar.sh
@@ -20,7 +20,7 @@ LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0Ch
 
 #--digiSteeringConf "StandardSignalOnlyTruth"
 
-Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 --conditionsTag default:OFLCOND-MC16-SDR-20 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion default:ATLAS-R2-2016-01-00-01 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.2099789464 --numberOfLowPtMinBias 80.290021063135 --outputRDOFile ${DigiOutFileName} --digiSteeringConf "StandardSignalOnlyTruth" --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1' --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInlcude.PileUpBunchTrainsMC16c_2017_Config1.py,RunDependentSimData/configLumi_run300000_mc16d.py' --skipEvents 0
+Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 --conditionsTag default:OFLCOND-MC16-SDR-20 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion default:ATLAS-R2-2016-01-00-01 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} --inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.2099789464 --numberOfLowPtMinBias 80.290021063135 --outputRDOFile ${DigiOutFileName} --digiSteeringConf "StandardSignalOnlyTruth" --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInlcude.PileUpBunchTrainsMC16c_2017_Config1.py,RunDependentSimData/configLumi_run300000_mc16d.py' --skipEvents 0
 
 
 echo  "art-result: $? Digi_tf.py"
diff --git a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py
index 2f9bd99f866a8397dda4a18f4b7c7f0feec488a7..fde12ad917fc9652f1a5bcb27957abf75fc7d78e 100644
--- a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py
+++ b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py
@@ -290,10 +290,9 @@ else:
 ## Don't use the SeedsG4 override
 simFlags.SeedsG4.set_Off()
 
-## Always enable the looper killer, unless it's been disabled
-if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
-    simFlags.OptionalUserActionList.addAction('G4UA::LooperKillerTool', ['Step'])
-else:
+## The looper killer is on by default. Disable it if this is requested.
+if hasattr(runArgs, "enableLooperKiller") and not runArgs.enableLooperKiller:
+    simFlags.OptionalUserActionList.removeAction('G4UA::LooperKillerTool')
     fast_chain_log.warning("The looper killer will NOT be run in this job.")
 
 
diff --git a/Tools/FullChainTransforms/share/skeleton.EVGENtoRDO.py b/Tools/FullChainTransforms/share/skeleton.EVGENtoRDO.py
index 946160525a84c2901469f8ef6a5404ae6b203573..422b4986599d50f436e4e5c101c385071daaf692 100644
--- a/Tools/FullChainTransforms/share/skeleton.EVGENtoRDO.py
+++ b/Tools/FullChainTransforms/share/skeleton.EVGENtoRDO.py
@@ -172,10 +172,9 @@ else:
 ## Don't use the SeedsG4 override
 simFlags.SeedsG4.set_Off()
 
-## Always enable the looper killer, unless it's been disabled
-if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
-    simFlags.OptionalUserActionList.addAction('G4UA::LooperKillerTool')
-else:
+## The looper killer is on by default. Disable it if this is requested.
+if hasattr(runArgs, "enableLooperKiller") and not runArgs.enableLooperKiller:
+    simFlags.OptionalUserActionList.removeAction('G4UA::LooperKillerTool')
     fast_chain_log.warning("The looper killer will NOT be run in this job.")
 
 
diff --git a/Tools/PyUtils/python/MetaReader.py b/Tools/PyUtils/python/MetaReader.py
index 93aabdd20a3b8729f817a05a061d9596a3f9b712..36e320f1c1eda3c335ca1867c1aa5f426df2d3b6 100644
--- a/Tools/PyUtils/python/MetaReader.py
+++ b/Tools/PyUtils/python/MetaReader.py
@@ -66,7 +66,10 @@ def read_metadata(filenames, file_type=None, mode='lite', meta_key_filter= []):
 			current_file = ROOT.TFile(filename)
 
 			# open the tree 'POOLContainer' to read the number of entries
-			meta_dict[filename]['nentries'] = current_file.Get('POOLContainer').GetEntriesFast()
+			if current_file.GetListOfKeys().Contains('POOLContainer'):
+				meta_dict[filename]['nentries'] = current_file.Get('POOLContainer').GetEntriesFast()
+			else:
+				meta_dict[filename]['nentries'] = None
 
 			# read and add the 'GUID' value
 			meta_dict[filename]['file_guid'] = _read_guid(filename)
diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/KitManager.h b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/KitManager.h
index 521fccfc534d27aade1435636c0a89f4e5e3c19f..f854e0300b29816bc3d6050e4053982ab605567f 100644
--- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/KitManager.h
+++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/KitManager.h
@@ -54,4 +54,7 @@ private:
   static std::unique_ptr< KitManager<T_KitInterface> > s_instance;
 };
 
+template <class T_KitInterface>
+std::unique_ptr< KitManager<T_KitInterface> > KitManager<T_KitInterface>::s_instance;
+
 #endif
diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.cxx
index a4ebe1cb324c649ddf9e9e5558c267f82e192f41..9b995f0effb699257ecd3d46c0174771ff6fbfdc 100644
--- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.cxx
+++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.cxx
@@ -1,10 +1,5 @@
 #include "RIO_OnTrackErrorScalingKit.h"
 
-// need toinstantiate static instance pointer
-template <>
-std::unique_ptr< KitManager<RIO_OnTrackErrorScalingKit> >
-KitManager<RIO_OnTrackErrorScalingKit>::s_instance {};
-
 size_t RIO_OnTrackErrorScalingKit::getParamIndex(const std::string &name) const {
   const char **param_names = paramNames();
   for(size_t idx=0; idx<nParametres(); ++idx) {
diff --git a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITrackSlimmingTool.h b/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITrackSlimmingTool.h
index 6884c9f208363b72f27a0caa2f7818e0b4a41c8d..b87f50337134604bc2dedb1b1a615060caff399b 100755
--- a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITrackSlimmingTool.h
+++ b/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITrackSlimmingTool.h
@@ -28,7 +28,7 @@ namespace Trk
       /**This method 'skims' interesting information from the passed track, and creates a new one with cloned copies of this information
         @param track A reference to the track to be skimmed. It will not be modified in any way.
         @return A 'slimmed' version of 'track', where exactly what information is copied depends on how the tool is configured*/
-        virtual Trk::Track* slim(const Trk::Track& track)=0;
+        virtual Trk::Track* slim(const Trk::Track& track) const = 0;
 
     };
 
diff --git a/Tracking/TrkTools/TrkTrackSlimmingTool/TrkTrackSlimmingTool/TrackSlimmingTool.h b/Tracking/TrkTools/TrkTrackSlimmingTool/TrkTrackSlimmingTool/TrackSlimmingTool.h
index 45c35daccc7383810a7f184703165aa1a78e8023..24771bea2b92ccd697712cf5aef8c7cf4fb138b8 100755
--- a/Tracking/TrkTools/TrkTrackSlimmingTool/TrkTrackSlimmingTool/TrackSlimmingTool.h
+++ b/Tracking/TrkTools/TrkTrackSlimmingTool/TrkTrackSlimmingTool/TrackSlimmingTool.h
@@ -37,16 +37,16 @@ namespace Trk
       virtual ~TrackSlimmingTool ();
       
       /** standard Athena-Algorithm method */
-      virtual StatusCode initialize();
+      virtual StatusCode initialize() override;
       
       /** standard Athena-Algorithm method */
-      virtual StatusCode finalize  ();
+      virtual StatusCode finalize  () override;
       
       /**This method 'skims' interesting information from the passed track, and creates a new one with cloned copies of this information
 	 @param track A reference to the track to be skimmed. It will not be modified in any way.
 	 @return A 'slimmed' version of 'track', where exactly what information is copied depends on how the tool is configured
       */
-      Trk::Track* slim(const Trk::Track& track);
+      Trk::Track* slim(const Trk::Track& track) const override;
       
     private:
       /** any CaloDeposit with its adjacent MEOT's will be kept on the slimmed track (combined muon property) */
@@ -65,7 +65,7 @@ namespace Trk
       /**atlas id helper*/
       const AtlasDetectorID* m_detID;
       
-      void checkForValidMeas(const Trk::TrackStateOnSurface* tsos, bool& isIDmeas, bool& isMSmeas);
+      void checkForValidMeas(const Trk::TrackStateOnSurface* tsos, bool& isIDmeas, bool& isMSmeas) const;
       
       void checkIfInDet(const Trk::TrackStateOnSurface* tsos, bool& isIDmeas);
 
diff --git a/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx b/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx
index 5d2b6f743467cd02f1efb81a4eb22ffd12fb47ee..c6e5649105cb96ee4d152e316d2950d6b5cbb1c4 100755
--- a/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx
+++ b/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx
@@ -78,7 +78,7 @@ StatusCode Trk::TrackSlimmingTool::finalize()
   return sc;
 }
 
-Trk::Track* Trk::TrackSlimmingTool::slim(const Trk::Track& track)
+Trk::Track* Trk::TrackSlimmingTool::slim(const Trk::Track& track) const
 {
   // //std::cout<<"^^^^^^^^^^^ Input track is: "<<track<<std::endl;
 
@@ -319,7 +319,7 @@ Trk::Track* Trk::TrackSlimmingTool::slim(const Trk::Track& track)
   }
 }
 
-void Trk::TrackSlimmingTool::checkForValidMeas(const Trk::TrackStateOnSurface* tsos, bool& isIDmeas, bool& isMSmeas){
+void Trk::TrackSlimmingTool::checkForValidMeas(const Trk::TrackStateOnSurface* tsos, bool& isIDmeas, bool& isMSmeas) const {
   if (tsos->measurementOnTrack()!=0){
     bool isPseudo = (dynamic_cast<const Trk::PseudoMeasurementOnTrack*>(tsos->measurementOnTrack())!=0);
     // Handle horrible cROTs
diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py
index 3c3f60136a59946aef4711383cca7c53f5459f2a..7110d654903e7cbeb43531d75979210b1d8db94f 100644
--- a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py
+++ b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py
@@ -36,7 +36,6 @@ PhotonPidTools()
 
 # Following tools have TrigEgamma factories
 from egammaTools.egammaToolsFactories import EMTrackMatchBuilder, EMFourMomBuilder, EMShowerBuilder
-from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools
 
 from egammaTools.egammaToolsConf import EMPIDBuilder
 from CaloClusterCorrection import CaloClusterCorrectionConf as Cccc
@@ -116,6 +115,7 @@ TrigPhotonPIDBuilder = PublicToolFactory( EMPIDBuilder, name = "TrigPhotonPIDBui
 
 def appendtoTrigEMTrackMatchBuilder(tool):
     "add track to calo tool "
+    from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools
     if not hasattr(tool,"EMExtrapolationTools"):
         tool += EMExtrapolationTools()
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx b/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx
index 3ea04e520a9303292739d398707d6484860eb887..f2935a0b5587eadad568a37fb437601845aa960c 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx
@@ -18,6 +18,7 @@
 #include <vector>
 #include <iostream>
 #include <iterator>
+#include <unordered_map>
 
 #include "TrigSteeringEvent/Chain.h"
 #include "TrigConfHLTData/HLTSignature.h"
@@ -252,11 +253,11 @@ void Trig::CacheGlobalMemory::update(const TrigConf::HLTChainList* confChains,
 
 
 const HLT::Chain* Trig::CacheGlobalMemory::chain(const std::string& name) const {
-  std::map<std::string, const HLT::Chain*>::const_iterator i = m_efchainsByName.find(name);
+  auto i = m_efchainsByName.find(name);
   if (i != m_efchainsByName.end()) {
     return i->second;
   }
-  
+
   i = m_l2chainsByName.find(name);
   if ( i != m_l2chainsByName.end() ) {
     return i->second;
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/Root/DecisionUnpackerStandalone.cxx b/Trigger/TrigAnalysis/TrigDecisionTool/Root/DecisionUnpackerStandalone.cxx
index a2b7e483761413f90f27240fcff6c83789808b2e..1f8c8a34d60960f1396fada5ac2e168549e0fba7 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/Root/DecisionUnpackerStandalone.cxx
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/Root/DecisionUnpackerStandalone.cxx
@@ -53,12 +53,12 @@ namespace Trig {
   
   StatusCode
   DecisionUnpackerStandalone::
-  unpackDecision( std::map< std::string,
+  unpackDecision( std::unordered_map< std::string,
                              const LVL1CTP::Lvl1Item* >& itemsByName,
                    std::map< CTPID, LVL1CTP::Lvl1Item* >& itemsCache,
-                   std::map< std::string, const HLT::Chain* >& l2chainsByName,
+                   std::unordered_map< std::string, const HLT::Chain* >& l2chainsByName,
                    std::map< CHAIN_COUNTER, HLT::Chain* >& l2chainsCache,
-                   std::map< std::string, const HLT::Chain* >& efchainsByName,
+                   std::unordered_map< std::string, const HLT::Chain* >& efchainsByName,
                    std::map< CHAIN_COUNTER, HLT::Chain* >& efchainsCache,
                    char& bgCode,
                    bool unpackHLT ) {
@@ -200,9 +200,9 @@ namespace Trig {
    StatusCode
    DecisionUnpackerStandalone::
    unpackItems( std::map< unsigned, LVL1CTP::Lvl1Item* >& itemsCache,
-                std::map< std::string,
+                std::unordered_map< std::string,
                           const LVL1CTP::Lvl1Item* >& itemsByName ) {
-
+      itemsByName.reserve( itemsByName.size() + itemsCache.size() );
       auto cacheItr = itemsCache.begin();
       auto cacheEnd = itemsCache.end();
       for( ; cacheItr != cacheEnd; ++cacheItr ) {
@@ -234,8 +234,9 @@ namespace Trig {
                  const std::vector< uint32_t >& passedthrough,
                  const std::vector< uint32_t >& prescaled,
                  const std::vector< uint32_t >& resurrected,
-                 std::map< std::string, const HLT::Chain* >& output ) {
-      
+                 std::unordered_map< std::string, const HLT::Chain* >& output ) {
+      output.reserve( output.size() + cache.size() );
+
       for( auto& cntrchain : cache ) {
 
          unsigned cntr = cntrchain.first;
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/CacheGlobalMemory.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/CacheGlobalMemory.h
index 71d5062e635b78f76c81853d6a107297e3af0fb0..e2a8e097d9dd6dd0d413cedf6fe56942ee305d6f 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/CacheGlobalMemory.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/CacheGlobalMemory.h
@@ -21,9 +21,9 @@
 #include<list>
 #include<set>
 #include<map>
+#include<unordered_map>
 #include<string>
 #include "boost/foreach.hpp"
-#include <unordered_map>
 
 #include "TrigConfHLTData/HLTChain.h"
 #include "TrigConfHLTData/HLTChainList.h"
@@ -182,9 +182,9 @@ namespace Trig {
     //    std::map<CHAIN_COUNTER, const HLT::Chain*>         m_l2chains; //!< chains keyed by chain counter (chainging every event)
     //    std::map<CHAIN_COUNTER, const HLT::Chain*>         m_efchains;
     
-    std::map<std::string, const LVL1CTP::Lvl1Item*>  m_itemsByName;     //!< items keyed by configuration name (chainging every event)
-    std::map<std::string, const HLT::Chain*>         m_l2chainsByName;  //!< L2 chains keyed by chain name (chainging every event)
-    std::map<std::string, const HLT::Chain*>         m_efchainsByName;  //!< L2 chains keyed by chain name (chainging every event)
+    std::unordered_map<std::string, const LVL1CTP::Lvl1Item*> m_itemsByName;     //!< items keyed by configuration name (chainging every event)
+    std::unordered_map<std::string, const HLT::Chain*> m_l2chainsByName;  //!< L2 chains keyed by chain name (chainging every event)
+    std::unordered_map<std::string, const HLT::Chain*> m_efchainsByName;  //!< L2 chains keyed by chain name (chainging every event)
     
     typedef unsigned CTPID;
     typedef unsigned CHAIN_COUNTER;
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerAthena.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerAthena.h
index 05da310a823b23a00792ab746f6a57528a916afd..aa9b2e71cdb0ce753271ee4783c9821ef09c26a7 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerAthena.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerAthena.h
@@ -35,11 +35,11 @@ namespace Trig{
   public:
     DecisionUnpackerAthena(StoreGateSvc* sg, const std::string& key);
     virtual ~DecisionUnpackerAthena();
-    virtual StatusCode unpackDecision(std::map<std::string, const LVL1CTP::Lvl1Item*>&,
+    virtual StatusCode unpackDecision(std::unordered_map<std::string, const LVL1CTP::Lvl1Item*>&,
 				      std::map<CTPID, LVL1CTP::Lvl1Item*>&,
-				      std::map<std::string, const HLT::Chain*>&,
+				      std::unordered_map<std::string, const HLT::Chain*>&,
 				      std::map<CHAIN_COUNTER, HLT::Chain*>&,
-				      std::map<std::string, const HLT::Chain*>&,
+				      std::unordered_map<std::string, const HLT::Chain*>&,
 				      std::map<CHAIN_COUNTER, HLT::Chain*>&,
 				      char&,
 				      bool
@@ -52,10 +52,10 @@ namespace Trig{
     DecisionObjectHandleAthena* m_handle;
     StatusCode unpackItems(const LVL1CTP::Lvl1Result& result,
 			   std::map<CTPID, LVL1CTP::Lvl1Item*>&,
-			   std::map<std::string, const LVL1CTP::Lvl1Item*>&);
+			   std::unordered_map<std::string, const LVL1CTP::Lvl1Item*>&);
     StatusCode unpackChains(const std::vector<uint32_t>& serialized_chains,
 			    std::map<unsigned, HLT::Chain*>& cache,
-			    std::map<std::string, const HLT::Chain*>& output);
+			    std::unordered_map<std::string, const HLT::Chain*>& output);
 
   };
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerEventInfo.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerEventInfo.h
index 2004c72fa63db6dd91213317e717d7cbdbf7ab8a..ca006ade69eae640db3f5c2af7eea2058312d5db 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerEventInfo.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerEventInfo.h
@@ -33,11 +33,11 @@ namespace Trig{
   public:
     DecisionUnpackerEventInfo(StoreGateSvc* sg, const std::string& key);
     virtual ~DecisionUnpackerEventInfo();
-    virtual StatusCode unpackDecision(std::map<std::string, const LVL1CTP::Lvl1Item*>&,
+    virtual StatusCode unpackDecision(std::unordered_map<std::string, const LVL1CTP::Lvl1Item*>&,
 				      std::map<CTPID, LVL1CTP::Lvl1Item*>&,
-				      std::map<std::string, const HLT::Chain*>&,
+				      std::unordered_map<std::string, const HLT::Chain*>&,
 				      std::map<CHAIN_COUNTER, HLT::Chain*>&,
-				      std::map<std::string, const HLT::Chain*>&,
+				      std::unordered_map<std::string, const HLT::Chain*>&,
 				      std::map<CHAIN_COUNTER, HLT::Chain*>&,
 				      char&,
 				      bool
@@ -50,10 +50,10 @@ namespace Trig{
     DecisionObjectHandleEventInfo* m_handle;
     StatusCode unpackItems(const std::vector<uint32_t>& level1TriggerInfo,
 			   std::map<CTPID, LVL1CTP::Lvl1Item*>& itemsCache,
-			   std::map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName);
+			   std::unordered_map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName);
     StatusCode unpackChains(const std::vector<uint32_t>& chainTriggerInfo,
 			    std::map<unsigned, HLT::Chain*>& cache,
-			    std::map<std::string, const HLT::Chain*>& output);
+			    std::unordered_map<std::string, const HLT::Chain*>& output);
 
   };
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerStandalone.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerStandalone.h
index 8ff149dfe9cc4f909c4e1b20dabb441506b14727..2d66294ece32f609dc0c1eae9b74a440025cee7a 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerStandalone.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionUnpackerStandalone.h
@@ -51,13 +51,13 @@ namespace Trig {
 
     /// Function unpacking the payload of the trigger decision
     virtual StatusCode
-    unpackDecision( std::map< std::string,
+    unpackDecision( std::unordered_map< std::string,
 		    const LVL1CTP::Lvl1Item* >& itemsByName,
 		    std::map< CTPID, LVL1CTP::Lvl1Item* >& itemsCache,
-		    std::map< std::string,
+		    std::unordered_map< std::string,
 		    const HLT::Chain* >& l2chainsByName,
 		    std::map< CHAIN_COUNTER, HLT::Chain* >& l1chainsCache,
-		    std::map< std::string,
+		    std::unordered_map< std::string,
 		    const HLT::Chain* >& efchainsByName,
 		    std::map< CHAIN_COUNTER, HLT::Chain* >& efchainsCache,
 		    char& bgCode,
@@ -78,7 +78,7 @@ namespace Trig {
   private:
     /// Function unpacking the decision of the LVL1 items
     StatusCode unpackItems( std::map< CTPID, LVL1CTP::Lvl1Item* >& itemsCache,
-			    std::map< std::string,
+			    std::unordered_map< std::string,
 			    const LVL1CTP::Lvl1Item*>& itemsByName );
     /// Function unpacking the decision of the HLT chains
     StatusCode unpackChains( std::map< unsigned, HLT::Chain* >& cache,
@@ -86,7 +86,7 @@ namespace Trig {
 			     const std::vector< uint32_t >& passedThrough,
 			     const std::vector< uint32_t >& prescaled,
 			     const std::vector< uint32_t >& resurrected,
-			     std::map< std::string,
+			     std::unordered_map< std::string,
 			     const HLT::Chain* >& output );
 
     /// Helper object for retrieving the event information
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/IDecisionUnpacker.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/IDecisionUnpacker.h
index 188cc551eb5b81cb454076b278f11ba3ae7afdb2..8d1ce94bc48e3e7286590184e510c73fa85f71c3 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/IDecisionUnpacker.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/IDecisionUnpacker.h
@@ -10,6 +10,7 @@
 
 #include "AsgTools/StatusCode.h"
 #include <map>
+#include <unordered_map>
 #include <string>
 
 namespace HLT {
@@ -28,11 +29,11 @@ namespace Trig{
     typedef unsigned CHAIN_COUNTER;
     IDecisionUnpacker();
     virtual ~IDecisionUnpacker();
-    virtual StatusCode unpackDecision(std::map<std::string, const LVL1CTP::Lvl1Item*>&,
+    virtual StatusCode unpackDecision(std::unordered_map<std::string, const LVL1CTP::Lvl1Item*>&,
 				      std::map<CTPID, LVL1CTP::Lvl1Item*>& itemsCache,
-				      std::map<std::string, const HLT::Chain*>&,
+				      std::unordered_map<std::string, const HLT::Chain*>&,
 				      std::map<CHAIN_COUNTER, HLT::Chain*>&,
-				      std::map<std::string, const HLT::Chain*>&,
+				      std::unordered_map<std::string, const HLT::Chain*>&,
 				      std::map<CHAIN_COUNTER, HLT::Chain*>&,
 				      char&,
 				      bool
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/src/DecisionUnpackerAthena.cxx b/Trigger/TrigAnalysis/TrigDecisionTool/src/DecisionUnpackerAthena.cxx
index 11e05dfbb4472c6dc2b8acdf96551815229982c3..3feec896105012b6307cf09b415c9d7ae940790e 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/src/DecisionUnpackerAthena.cxx
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/src/DecisionUnpackerAthena.cxx
@@ -29,9 +29,9 @@ namespace Trig {
   }
 
 
-  StatusCode DecisionUnpackerAthena::unpackItems(const LVL1CTP::Lvl1Result& result,std::map<unsigned, LVL1CTP::Lvl1Item*>& itemsCache, std::map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName) {
-    std::map<unsigned, LVL1CTP::Lvl1Item*>::iterator cacheIt;
-    for ( cacheIt = itemsCache.begin(); cacheIt != itemsCache.end(); ++cacheIt ) {    
+  StatusCode DecisionUnpackerAthena::unpackItems(const LVL1CTP::Lvl1Result& result,std::map<unsigned, LVL1CTP::Lvl1Item*>& itemsCache, std::unordered_map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName) {
+    itemsByName.reserve( itemsByName.size() + itemsCache.size() );
+    for ( auto cacheIt = itemsCache.begin() ; cacheIt != itemsCache.end(); ++cacheIt ) {
       unsigned int ctpid = cacheIt->first;
       LVL1CTP::Lvl1Item* item = cacheIt->second;
       ATH_MSG_VERBOSE("Unpacking bits for item: " << ctpid << " " << item->name());
@@ -46,13 +46,14 @@ namespace Trig {
 
   StatusCode DecisionUnpackerAthena::unpackChains(const std::vector<uint32_t>& serialized_chains,
 						   std::map<unsigned, HLT::Chain*>& cache,
-						   std::map<std::string, const HLT::Chain*>& output) {
+						   std::unordered_map<std::string, const HLT::Chain*>& output) {
    
     if( serialized_chains.size() == 0 ) {
       ATH_MSG_WARNING("ChainResult is empty");
       return StatusCode::FAILURE;
     }
 
+    output.reserve( output.size() + cache.size() );
 
     std::vector<uint32_t>::const_iterator rawIt = serialized_chains.begin();
     rawIt++; // skip first number as it is count
@@ -61,7 +62,7 @@ namespace Trig {
       unsigned cntr = HLT::Chain::inquireChainCounter(*rawIt);
 
       // localte now the chain
-      std::map<unsigned, HLT::Chain*>::iterator cacheIt = cache.find(cntr);
+      auto cacheIt = cache.find(cntr);
       if ( cacheIt == cache.end() ) {
 	ATH_MSG_WARNING("Missing chain of counter in the configuration: " << cntr);
 	return StatusCode::FAILURE;
@@ -75,11 +76,11 @@ namespace Trig {
     return StatusCode::SUCCESS;
   }
 
-  StatusCode DecisionUnpackerAthena::unpackDecision(std::map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName,
+  StatusCode DecisionUnpackerAthena::unpackDecision(std::unordered_map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName,
 						    std::map<CTPID, LVL1CTP::Lvl1Item*>& itemsCache,
-						    std::map<std::string, const HLT::Chain*>& l2chainsByName,
+						    std::unordered_map<std::string, const HLT::Chain*>& l2chainsByName,
 						    std::map<CHAIN_COUNTER, HLT::Chain*>& l2chainsCache,
-						    std::map<std::string, const HLT::Chain*>& efchainsByName,
+						    std::unordered_map<std::string, const HLT::Chain*>& efchainsByName,
 						    std::map<CHAIN_COUNTER, HLT::Chain*>& efchainsCache,
 						    char& bgCode,
 						    bool unpackHLT
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/src/DecisionUnpackerEventInfo.cxx b/Trigger/TrigAnalysis/TrigDecisionTool/src/DecisionUnpackerEventInfo.cxx
index 115b20cba290959a51d35332f5c0546b0afe766a..7f55f0be40f3e365ce5762a9c0601da59979afc5 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/src/DecisionUnpackerEventInfo.cxx
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/src/DecisionUnpackerEventInfo.cxx
@@ -44,7 +44,7 @@ namespace Trig {
   }
 
 
-  StatusCode DecisionUnpackerEventInfo::unpackItems(const std::vector<uint32_t>& level1TriggerInfo, std::map<unsigned, LVL1CTP::Lvl1Item*>& itemsCache, std::map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName) {
+  StatusCode DecisionUnpackerEventInfo::unpackItems(const std::vector<uint32_t>& level1TriggerInfo, std::map<unsigned, LVL1CTP::Lvl1Item*>& itemsCache, std::unordered_map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName) {
     
     uint32_t L1SIZE = level1TriggerInfo.size()/3;
     std::vector<uint32_t>::const_iterator begin, end;
@@ -61,9 +61,9 @@ namespace Trig {
     begin = end;
     std::advance(end,L1SIZE);
     std::vector<uint32_t> tav(begin,end);
-    
-    std::map<unsigned, LVL1CTP::Lvl1Item*>::iterator cacheIt;
-    for ( cacheIt = itemsCache.begin(); cacheIt != itemsCache.end(); ++cacheIt ) {    
+
+    itemsByName.reserve( itemsByName.size() + itemsCache.size() );
+    for ( auto cacheIt = itemsCache.begin(); cacheIt != itemsCache.end(); ++cacheIt ) {
       unsigned int ctpid = cacheIt->first;
       LVL1CTP::Lvl1Item* item = cacheIt->second;
       ATH_MSG_VERBOSE("Unpacking bits for item: " << ctpid << " " << item->name());
@@ -78,7 +78,8 @@ namespace Trig {
 
   StatusCode DecisionUnpackerEventInfo::unpackChains(const std::vector<uint32_t>& chainTriggerInfo,
 						     std::map<unsigned, HLT::Chain*>& cache,
-						     std::map<std::string, const HLT::Chain*>& output) {
+						     std::unordered_map<std::string, const HLT::Chain*>& output) {
+    output.reserve( output.size() + cache.size() );
     for( auto& cntr_chain : cache){
       auto cntr = cntr_chain.first;      
       auto chain = cntr_chain.second;
@@ -112,11 +113,11 @@ namespace Trig {
     return StatusCode::SUCCESS;
   }
 
-  StatusCode DecisionUnpackerEventInfo::unpackDecision(std::map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName,
+  StatusCode DecisionUnpackerEventInfo::unpackDecision(std::unordered_map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName,
 						    std::map<CTPID, LVL1CTP::Lvl1Item*>& itemsCache,
-						    std::map<std::string, const HLT::Chain*>& l2chainsByName,
+						    std::unordered_map<std::string, const HLT::Chain*>& l2chainsByName,
 						    std::map<CHAIN_COUNTER, HLT::Chain*>& l2chainsCache,
-						    std::map<std::string, const HLT::Chain*>& efchainsByName,
+						    std::unordered_map<std::string, const HLT::Chain*>& efchainsByName,
 						    std::map<CHAIN_COUNTER, HLT::Chain*>& efchainsCache,
                                                     char& /*bgCode*/,
 						    bool unpackHLT
diff --git a/Trigger/TrigAnalysis/TrigInDetTruthAlgs/src/TrigL2SpacePointTruthTool.h b/Trigger/TrigAnalysis/TrigInDetTruthAlgs/src/TrigL2SpacePointTruthTool.h
index c33cccd2510d4a4f67533eed02867458d86d7be1..2f1f6f9f43c98bd7781f2a2dd3b384f65c0f2bea 100644
--- a/Trigger/TrigAnalysis/TrigInDetTruthAlgs/src/TrigL2SpacePointTruthTool.h
+++ b/Trigger/TrigAnalysis/TrigInDetTruthAlgs/src/TrigL2SpacePointTruthTool.h
@@ -11,10 +11,8 @@
 #include "TrigInDetToolInterfaces/ITrigL2SpacePointTruthTool.h"
 #include <vector>
 
-//#include "InDetIdentifier/SCT_ID.h"
 //#include "InDetIdentifier/PixelID.h" 
 //#include "InDetReadoutGeometry/PixelDetectorManager.h"
-//#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 
 // detector geometry and helper classes
 #include "InDetSimData/InDetSimDataCollection.h"
diff --git a/Trigger/TrigAnalysis/TrigJiveXML/src/TrigSiSpacePointRetriever.cxx b/Trigger/TrigAnalysis/TrigJiveXML/src/TrigSiSpacePointRetriever.cxx
index 29e07f4a96a38d7b1b50f998e88250c15a0a69c1..f37b364711e5f153b87e002e9d5bcc5bf542e53c 100755
--- a/Trigger/TrigAnalysis/TrigJiveXML/src/TrigSiSpacePointRetriever.cxx
+++ b/Trigger/TrigAnalysis/TrigJiveXML/src/TrigSiSpacePointRetriever.cxx
@@ -13,7 +13,6 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/PixelID.h"
 
-#include "InDetReadoutGeometry/SCT_DetectorManager.h" 
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
 
 namespace JiveXML {
@@ -115,12 +114,6 @@ namespace JiveXML {
 	return StatusCode::RECOVERABLE;
     }
 
-    const InDetDD::SCT_DetectorManager* sct_geomanager;
-    if ( detStore()->retrieve(sct_geomanager, "SCT").isFailure() ){
-	if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Could not get SCT GeoModel Manager!" << endmsg;
-	return StatusCode::RECOVERABLE;
-      } 
-
 //migration: https://twiki.cern.ch/twiki/bin/view/Atlas/InDetPkgFixing 
     if ( detStore()->retrieve(m_pixelHelper, "PixelID").isFailure() ){
         if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Could not get Pixel ID helper" << endmsg;
diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
index b9a320e44a958595cacfc770f16570f07d8cbd17..f4f3d8cc8f70d625235a17903b12da32d2e42398 100644
--- a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
+++ b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
@@ -7,8 +7,11 @@
 
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/ContextSpecificPtr.h"
+#include "GaudiKernel/EventContext.h"
 
 #include "AthenaBaseComps/AthService.h"
+#include "StoreGate/ReadCondHandleKey.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "GaudiKernel/IIncidentListener.h"
 //#include "IRegionSelector/IRoiDescriptor.h"
@@ -27,6 +30,7 @@
 #include "InDetPrepRawData/SCT_ClusterCollection.h"
 #include "InDetPrepRawData/PixelClusterContainer.h"
 #include "InDetPrepRawData/SCT_ClusterContainer.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "xAODTracking/Vertex.h"
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/VertexContainer.h"
@@ -35,6 +39,9 @@
 #include "FTK_RecToolInterfaces/IFTK_DuplicateTrackRemovalTool.h"
 #include "InDetCondServices/ISiLorentzAngleTool.h"
 
+#include <mutex>
+#include <vector>
+
 /// Forward Declarations ///
 class AtlasDetectorID;
 class PixelID;
@@ -58,7 +65,6 @@ namespace Trk {
 
 namespace InDetDD {
   class PixelDetectorManager;
-  class SCT_DetectorManager;
 }
 
 namespace InDet {
@@ -153,8 +159,8 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
 
  private:
 
- float dphi(const float phi1, const float phi2) const;
-
+  float dphi(const float phi1, const float phi2) const;
+  const InDetDD::SiDetectorElement* getSCTDetectorElement(const IdentifierHash hash) const;
 
   std::string m_RDO_key;
   StoreGateSvc* m_storeGate;
@@ -163,10 +169,11 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
   const SCT_ID*  m_sctId;
   
   const InDetDD::PixelDetectorManager* m_pixelManager;
-  const InDetDD::SCT_DetectorManager*  m_SCT_Manager;
 
   const AtlasDetectorID* m_id_helper;
 
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+
   ToolHandle<IFTK_UncertaintyTool> m_uncertaintyTool;
   ToolHandle<Trk::ITrackFitter> m_trackFitter;
   ToolHandle<Trk::ITrackSummaryTool> m_trackSumTool;
@@ -176,7 +183,7 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
   ToolHandle< IFTK_VertexFinderTool > m_RawVertexFinderTool;
   ToolHandle< Trk::IRIO_OnTrackCreator >      m_ROTcreator;
   ToolHandle< IFTK_DuplicateTrackRemovalTool > m_DuplicateTrackRemovalTool;
-  ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SCTLorentzAngleTool", "Tool to retrieve Lorentz angle of SCT"};
+  ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retrieve Lorentz angle of SCT"};
 
   double m_trainingBeamspotX;
   double m_trainingBeamspotY;
@@ -265,6 +272,12 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
   bool m_reverseIBLlocx;
   bool m_doVertexSorting;
 
+  // Mutex to protect the contents.
+  mutable std::mutex m_mutex;
+  // Cache to store events for slots
+  mutable std::vector<EventContext::ContextEvt_t> m_cacheSCTElements;
+  // Pointer of InDetDD::SiDetectorElementCollection
+  mutable Gaudi::Hive::ContextSpecificPtr<const InDetDD::SiDetectorElementCollection> m_SCTDetectorElements;  
 };
 
 inline bool compareFTK_Clusters (const Trk::RIO_OnTrack* cl1, const Trk::RIO_OnTrack* cl2) {
diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx b/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx
index 700b3dbc224efb8229129f4a1d4ba37fa183f2a4..ac39141a06c0dae9c094c7028ce388402b6f6e9a 100644
--- a/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx
+++ b/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx
@@ -7,7 +7,6 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/PixelID.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/PixelModuleDesign.h"
 #include "InDetReadoutGeometry/SCT_ModuleSideDesign.h"
 #include "InDetReadoutGeometry/SCT_BarrelModuleSideDesign.h"
@@ -26,6 +25,7 @@
 #include "TrkEventPrimitives/ParamDefs.h"
 #include "TrkTrackSummary/TrackSummary.h"
 #include "StoreGate/DataHandle.h"
+#include "StoreGate/ReadCondHandle.h"
 #include "InDetRIO_OnTrack/SiClusterOnTrack.h"
 #include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h"
 #include "InDetRIO_OnTrack/PixelClusterOnTrack.h"
@@ -99,7 +99,6 @@ FTK_DataProviderSvc::FTK_DataProviderSvc(const std::string& name, ISvcLocator* s
   m_pixelId(0),
   m_sctId(0),
   m_pixelManager(0),
-  m_SCT_Manager(0),
   m_id_helper(0),
   m_uncertaintyTool("FTK_UncertaintyTool"),
   m_trackFitter("Trk::ITrackFitter/InDetTrigTrackFitter"),
@@ -159,7 +158,9 @@ FTK_DataProviderSvc::FTK_DataProviderSvc(const std::string& name, ISvcLocator* s
   m_dEtaCut(0.6),
   m_nErrors(0),
   m_reverseIBLlocx(false),
-  m_doVertexSorting(true)
+  m_doVertexSorting(true),
+  m_mutex{},
+  m_cacheSCTElements{}
 {
 
   declareProperty("TrackCollectionName",m_trackCacheName);
@@ -250,7 +251,6 @@ StatusCode FTK_DataProviderSvc::initialize() {
   ATH_CHECK(detStore->retrieve(m_pixelId, "PixelID"));
   ATH_CHECK(detStore->retrieve(m_sctId, "SCT_ID"));
   ATH_CHECK(detStore->retrieve(m_pixelManager));
-  ATH_CHECK(detStore->retrieve(m_SCT_Manager));
   ATH_CHECK(detStore->retrieve(m_id_helper, "AtlasID"));
   ATH_MSG_INFO( " getting UncertaintyTool with name " << m_uncertaintyTool.name());
   ATH_CHECK(m_uncertaintyTool.retrieve());
@@ -274,6 +274,9 @@ StatusCode FTK_DataProviderSvc::initialize() {
   ATH_CHECK(m_ROTcreator.retrieve());
   ATH_CHECK(m_sctLorentzAngleTool.retrieve());
 
+  // ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
   // Register incident handler
   ServiceHandle<IIncidentSvc> iincSvc( "IncidentSvc", name());
   ATH_CHECK(iincSvc.retrieve());
@@ -1507,8 +1510,6 @@ Trk::Track* FTK_DataProviderSvc::ConvertTrack(const unsigned int iTrack){
   // Create the SCT Clusters
   //
 
-
-
   std::vector<const Trk::RIO_OnTrack*> SCT_Clusters;
 
   ATH_MSG_VERBOSE( "   ConvertTrack: SCTClusterLoop: SCT Clusters size = " << track.getSCTClusters().size());
@@ -1654,7 +1655,7 @@ const Trk::RIO_OnTrack* FTK_DataProviderSvc::createSCT_Cluster(const FTK_RawSCT_
 
   int strip = (int) stripCoord;
 
-  const InDetDD::SiDetectorElement* pDE = m_SCT_Manager->getDetectorElement(hash);
+  const InDetDD::SiDetectorElement* pDE = getSCTDetectorElement(hash);
 
 
   ATH_MSG_VERBOSE( " SCT FTKHit HitCoord rawStripCoord" << rawStripCoord << " hashID 0x" << std::hex << hash << std::dec << " " << m_id_helper->print_to_string(pDE->identify()));
@@ -2180,3 +2181,24 @@ void FTK_DataProviderSvc::handle(const Incident& incident) {
 
   }
 }
+
+const InDetDD::SiDetectorElement* FTK_DataProviderSvc::getSCTDetectorElement(const IdentifierHash hash) const {
+  const EventContext& ctx{Gaudi::Hive::currentContext()};
+
+  static const EventContext::ContextEvt_t invalidValue{EventContext::INVALID_CONTEXT_EVT};
+  EventContext::ContextID_t slot{ctx.slot()};
+  EventContext::ContextEvt_t evt{ctx.evt()};
+  std::lock_guard<std::mutex> lock{m_mutex};
+  if (slot>=m_cacheSCTElements.size()) {
+    m_cacheSCTElements.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement.
+  }
+  if (m_cacheSCTElements[slot]!=evt) {
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> condData{m_SCTDetEleCollKey};
+    if (not condData.isValid()) {
+      ATH_MSG_ERROR("Failed to get " << m_SCTDetEleCollKey.key());
+    }
+    m_SCTDetectorElements.set(*condData);
+    m_cacheSCTElements[slot] = evt;
+  }
+  return (m_SCTDetectorElements.isValid() ? m_SCTDetectorElements->getDetectorElement(hash) : nullptr);
+}
diff --git a/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py b/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py
index 13cc1769ffe4010a506871e09ad25983dd70ab01..f4124ef66554483efc52a1367dfa3095266c3914 100644
--- a/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py
+++ b/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py
@@ -15,11 +15,12 @@ if rec.doFTK():
     if not hasattr(ToolSvc, "SCTLorentzAngleTool"):
         from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup
         sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup()
-    
+
     from TrigFTK_RecExample.TrigFTK_DataProviderSvc_Config import TrigFTK_DataProviderSvc
-    theFTK_DataProviderSvc = TrigFTK_DataProviderSvc("TrigFTK_DataProviderSvc",
-                                                     SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool)
+    theFTK_DataProviderSvc = TrigFTK_DataProviderSvc("TrigFTK_DataProviderSvc")
     ServiceMgr += theFTK_DataProviderSvc
+    from AthenaCommon import CfgGetter
+    ServiceMgr.TrigFTK_DataProviderSvc.SCTLorentzAngleTool=CfgGetter.getPrivateTool("SCTLorentzAngleTool")
     
     from TrigFTK_RawDataAlgs.TrigFTK_RawDataAlgsConf import FTK_RDO_ReaderAlgo
     
diff --git a/Trigger/TrigFTK/FTK_RecTools/src/FTK_PixelClusterOnTrackTool.cxx b/Trigger/TrigFTK/FTK_RecTools/src/FTK_PixelClusterOnTrackTool.cxx
index d15014058ac16676d44c6cc3ad70e2e672212497..0b8a9a3e0957ecd2fa5d98d8093939155e78f2b4 100644
--- a/Trigger/TrigFTK/FTK_RecTools/src/FTK_PixelClusterOnTrackTool.cxx
+++ b/Trigger/TrigFTK/FTK_RecTools/src/FTK_PixelClusterOnTrackTool.cxx
@@ -12,7 +12,6 @@
 ///////////////////////////////////////////////////////////////////
 
 #include "FTK_RecTools/FTK_PixelClusterOnTrackTool.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetReadoutGeometry/PixelModuleDesign.h"
 #include "InDetIdentifier/PixelID.h"
 #include "PixelConditionsServices/IPixelOfflineCalibSvc.h"
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/DumpSp.h b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/DumpSp.h
index 4358368bb69c8c0348da192cf3c46e3bc3c927a3..13ca41eca9deb8374382bd24925e106232a45a90 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/DumpSp.h
+++ b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/DumpSp.h
@@ -43,6 +43,8 @@
 #include "TrigDecisionTool/TrigDecisionTool.h"
 #include "InDetConditionsSummaryService/IInDetConditionsSvc.h"
 #include "InDetConditionsSummaryService/IInDetConditionsTool.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
 #include "TrkTrack/TrackCollection.h"
 #include "TrkTruthData/TrackTruthCollection.h"
 #include "TrkTrackSummaryTool/TrackSummaryTool.h"
@@ -55,12 +57,11 @@ class ITruthParameters;
 class TruthSelector; 
 class PixelID; 
 class SCT_ID;
-class TRT_ID;
 class IBeamCondSvc;
 class EventID;
 
 namespace InDetDD {
-  class SiDetectorManager;
+  class PixelDetectorManager;
 }
 namespace HepPDT { 
   class ParticleDataTable; 
@@ -122,11 +123,8 @@ private:
 
   const PixelID*   m_pixelId;
   const SCT_ID*    m_sctId;
-  const TRT_ID*    m_trtId;
 
-  const InDetDD::SiDetectorManager*     m_PIX_mgr;
-  const InDetDD::SiDetectorManager*     m_SCT_mgr;    
-  const InDetDD::SiDetectorManager*     m_TRT_mgr;    
+  const InDetDD::PixelDetectorManager*     m_PIX_mgr;
 
   const InDet::SiClusterContainer*  m_pixelContainer;
   const InDet::SiClusterContainer*  m_sctContainer;
@@ -148,6 +146,8 @@ private:
 
   ServiceHandle<IBeamCondSvc>               m_beamCondSvc;
 
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+
   // job configuration 
   
   std::string    m_pixelClustersName;
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h
index d56c9b9ddb89260d5796187623f2b5e20cc08d8c..f353dd41b676213534f95cfea37eca891009d2b3 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h
+++ b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h
@@ -12,10 +12,9 @@
 
 #include "InDetPrepRawData/PixelClusterContainer.h"
 #include "InDetPrepRawData/SCT_ClusterContainer.h"
-#include "InDetIdentifier/PixelID.h"
-#include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "InDetReadoutGeometry/PixelDetectorManager.h"
+
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
 
 #include "TrigFTKToolInterfaces/ITrigFTKClusterConverterTool.h"
 #include "TrigFTKTrackConverter/TrigFTKClusterConverterTool.h"
@@ -41,6 +40,9 @@ class SCT_OnlineId;
 class IdentifierHash;
 class ITrigFTKClusterConverterTool;
 
+namespace InDetDD {
+  class PixelDetectorManager;
+}
 
 class FTKRegionalWrapper : public AthAlgorithm {
 public:
@@ -67,8 +69,9 @@ private:
   const PixelID * m_pixelId;
   const SCT_ID * m_sctId;
   const AtlasDetectorID* m_idHelper;
-  const InDetDD::SiDetectorManager*  m_PIX_mgr;
-  const InDetDD::SiDetectorManager*  m_SCT_mgr;
+  const InDetDD::PixelDetectorManager*  m_PIX_mgr;
+
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
   // variables to manage the distribution of the hits
   int m_IBLMode; //  global FTK setup variable to handle IBL
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx b/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx
index d1c4e5d5cede96d8111ef4728999be71480efd0b..a705e404edf93fb088c3231b892a4f28acce1970 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx
+++ b/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx
@@ -63,7 +63,6 @@
 #include "IdDictDetDescr/IdDictManager.h"
 #include "InDetIdentifier/PixelID.h"
 #include "InDetIdentifier/SCT_ID.h"
-#include "InDetIdentifier/TRT_ID.h"
 #include "HepPDT/ParticleDataTable.hh"
 #include "HepPDT/ParticleData.hh"
 #include "InDetSimData/InDetSimDataCollection.h"
@@ -76,6 +75,7 @@
 #include "EventInfo/EventInfo.h"
 #include "EventInfo/EventID.h"
 #include "StoreGate/DataHandle.h"
+#include "StoreGate/ReadCondHandle.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "TrkSpacePoint/SpacePoint.h"
 #include "TrkSpacePoint/SpacePointCLASS_DEF.h"
@@ -108,10 +108,7 @@
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "GeneratorObjects/McEventCollection.h"
 
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
-#include "InDetReadoutGeometry/TRT_DetectorManager.h"
 #include "InDetBeamSpotService/IBeamCondSvc.h"
 
 #include "EventPrimitives/EventPrimitivesHelpers.h"
@@ -126,10 +123,7 @@ DumpSp::DumpSp(const string& name, ISvcLocator* pSvcLocator)
   , m_evtStore( 0 )
   , m_pixelId( 0 )
   , m_sctId( 0 )
-  , m_trtId( 0 )
   , m_PIX_mgr( 0 )
-  , m_SCT_mgr( 0 )
-  , m_TRT_mgr( 0 )
   , m_pixelContainer( 0 )
   , m_sctContainer( 0 )
   , m_particleDataTable( 0 )
@@ -255,18 +249,13 @@ DumpSp::initialize()
     ATH_MSG_ERROR( "Unable to retrieve Pixel helper from DetectorStore");
     return StatusCode::FAILURE;
   }
-  if( m_detStore->retrieve(m_SCT_mgr, "SCT").isFailure() ) {
-    ATH_MSG_ERROR( "Unable to retrieve SCT manager from DetectorStore");
-    return StatusCode::FAILURE;
-  }
   if( m_detStore->retrieve(m_sctId, "SCT_ID").isFailure() ) {
     ATH_MSG_ERROR( "Unable to retrieve SCT helper from DetectorStore");
     return StatusCode::FAILURE;
   }
-  //   if( m_detStore->retrieve(m_TRT_mgr, "TRT").isFailure() ) {
-  //     ATH_MSG_ERROR( "Unable to retrieve TRT manager from DetectorStore");
-  //     return StatusCode::FAILURE;
-  //   }
+
+  // ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
   
   if( m_trkSummaryTool.retrieve().isFailure() ) {
     ATH_MSG_FATAL("Failed to retrieve tool " << m_trkSummaryTool);
@@ -1003,6 +992,13 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap
     } // end dump RDO's and SDO's for debugging purposes (m_doRDODebug)
   } // dump raw pixel data
 
+  // Get SCT_DetectorElementCollection
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* sctElements(sctDetEle.retrieve());
+  if (sctElements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+    return;
+  }
   const InDetSimDataCollection* sctSimDataMap(0);
   const bool have_sct_sdo = m_storeGate->retrieve(sctSimDataMap, "SCT_SDO_Map").isSuccess();
   const DataHandle<SCT_RDO_Container> sct_rdocontainer_iter;
@@ -1016,7 +1012,9 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap
       for( DataVector<SCT_RDORawData>::const_iterator iRDO=SCT_Collection->begin(), fRDO=SCT_Collection->end(); iRDO!=fRDO; ++iRDO ) {
         const Identifier rdoId = (*iRDO)->identify();
         // get the det element from the det element collection
-        const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(rdoId);
+        const Identifier wafer_id = m_sctId->wafer_id(rdoId);
+        const IdentifierHash wafer_hash = m_sctId->wafer_hash(wafer_id);
+        const InDetDD::SiDetectorElement* sielement = sctElements->getDetectorElement(wafer_hash);
         const InDetDD::SCT_ModuleSideDesign& design = dynamic_cast<const InDetDD::SCT_ModuleSideDesign&>(sielement->design());
         const InDetDD::SiLocalPosition localPos = design.positionFromStrip(m_sctId->strip(rdoId));
         const Amg::Vector3D gPos = sielement->globalPosition(localPos);    
@@ -1114,7 +1112,9 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap
         ATH_MSG_DEBUG( "SCT InDetRawDataCollection found with " << size << " RDOs");
         for( DataVector<SCT_RDORawData>::const_iterator iRDO=SCT_Collection->begin(), fRDO=SCT_Collection->end(); iRDO!=fRDO; ++iRDO ) {
           const Identifier rdoId = (*iRDO)->identify();
-          const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(rdoId);
+          const Identifier wafer_id = m_sctId->wafer_id(rdoId);
+          const IdentifierHash wafer_hash = m_sctId->wafer_hash(wafer_id);
+          const InDetDD::SiDetectorElement* sielement = sctElements->getDetectorElement(wafer_hash);
           const InDetDD::SCT_ModuleSideDesign& design = dynamic_cast<const InDetDD::SCT_ModuleSideDesign&>(sielement->design());
           const InDetDD::SiLocalPosition localPos = design.positionFromStrip(m_sctId->strip(rdoId));
           const Amg::Vector3D gPos = sielement->globalPosition(localPos);  
@@ -1329,7 +1329,9 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap
       if( have_sct_sdo && sctSimDataMap ) { 
         for( std::vector<Identifier>::const_iterator rdoIter = (*iCluster)->rdoList().begin();
              rdoIter != (*iCluster)->rdoList().end(); rdoIter++ ) {
-          const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(*rdoIter); 
+          const Identifier wafer_id = m_sctId->wafer_id(*rdoIter);
+          const IdentifierHash wafer_hash = m_sctId->wafer_hash(wafer_id);
+          const InDetDD::SiDetectorElement* sielement = sctElements->getDetectorElement(wafer_hash);
           assert( sielement );
           const InDetDD::SiLocalPosition rawPos = sielement->rawLocalPositionOfCell(*rdoIter);
           InDetSimDataCollection::const_iterator iter( sctSimDataMap->find(*rdoIter) );
@@ -1454,10 +1456,11 @@ DumpSp::dump_bad_modules() const
       }
     } // end for each pixel module
     // dump list of bad sct modules
-    for( InDetDD::SiDetectorElementCollection::const_iterator i=m_SCT_mgr->getDetectorElementBegin(), f=m_SCT_mgr->getDetectorElementEnd(); i!=f; ++i ) {
-      const InDetDD::SiDetectorElement* sielement( *i );
-      Identifier id = sielement->identify();
-      IdentifierHash idhash = sielement->identifyHash();
+    SCT_ID::const_id_iterator wafer_it = m_sctId->wafer_begin();
+    SCT_ID::const_id_iterator wafer_end = m_sctId->wafer_end();
+    for (; wafer_it!=wafer_end; wafer_it++) {
+      const Identifier id = *wafer_it;
+      const IdentifierHash idhash = m_sctId->wafer_hash(id);
       const bool is_bad = !(m_sctCondSummaryTool->isGood( idhash ));
       if( is_bad ) { 
         (*m_oflraw) << "B\t"
@@ -1663,6 +1666,13 @@ DumpSp::dump_tracks( const HitIndexMap& /*hitIndexMap*/, const HitIndexMap& clus
     // Alberto's code for dumping hits on tracks. this code needs to
     // be updated to use the modern track classes.
     if( m_dumpHitsOnTracks ) {
+      // // Get SCT_DetectorElementCollection
+      // SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+      // const InDetDD::SiDetectorElementCollection* sctElements(sctDetEle.retrieve());
+      // if (sctElements==nullptr) {
+      //   ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+      //   return;
+      // }
       //       // loop over list of HitOnTrack and dump them
       //       for( hit_const_iterator iHit=track->hit_list_begin(), fHit=track->hit_list_end(); iHit!=fHit; ++iHit ) {
       //         const HitOnTrack* pHit( *iHit ); 
@@ -1674,7 +1684,9 @@ DumpSp::dump_tracks( const HitIndexMap& /*hitIndexMap*/, const HitIndexMap& clus
       //         // get the PrepRawData data( cluster for Pixel and SCT hits)
       //         const Trk::PrepRawData* pPrepClu = pHit->rio(); 
       //         // is this an SCT hit?
-      //         sielement = m_SCT_mgr->getDetectorElement( rdoId );
+      //         const Identifier wafer_id = m_sctId->wafer_id(rdoId);
+      //         const IdentifierHash wafer_hash = m_sctId->wafer_hash(wafer_id);
+      //         sielement = sctElements->getDetectorElement( wafer_hash );
       //         if( sielement && sielement->isSCT() ) { // hit is SCT
       //           // if there is no PrepRawData associated then the hit is
       //           // not a real hit seen by the detector, so skip it.
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx b/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx
index a7cb9a4d19a0fa3acc00a54012cc923bca5e52c6..0d7c9dd7fa04a9e417962ec621b8bfb9323c6f12 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx
+++ b/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx
@@ -16,6 +16,8 @@
 #include "SCT_Cabling/SCT_OnlineId.h"
 #include "InDetRIO_OnTrack/SiClusterOnTrack.h"
 
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
+
 #include "InDetIdentifier/PixelID.h"
 #include "InDetIdentifier/SCT_ID.h"
 #include "Identifier/Identifier.h"
@@ -23,6 +25,8 @@
 
 #include "SCT_Cabling/SCT_SerialNumber.h"
 
+#include "StoreGate/ReadCondHandle.h"
+
 #include <algorithm>
 #include <sstream> 
 
@@ -51,7 +55,6 @@ FTKRegionalWrapper::FTKRegionalWrapper (const std::string& name, ISvcLocator* pS
   m_sctId(0),
   m_idHelper(0),
   m_PIX_mgr(0),
-  m_SCT_mgr(0),
   m_IBLMode(0),
   m_fixEndcapL0(false),
   m_ITkMode(false),
@@ -299,12 +302,10 @@ StatusCode FTKRegionalWrapper::initialize()
     return StatusCode::FAILURE;
   }
 
-  if( m_detStore->retrieve(m_SCT_mgr, "SCT").isFailure() ) {
-    log << MSG::ERROR << "Unable to retrieve SCT manager from DetectorStore" << endmsg;
-    return StatusCode::FAILURE;
+  // ReadCondHandleKey
+  if (m_getOffline) {
+    ATH_CHECK(m_SCTDetEleCollKey.initialize());
   }
-  
-
 
   // Write clusters in InDetCluster format to ESD for use in Pseudotracking
   if (m_WriteClustersToESD){
@@ -738,6 +739,14 @@ StatusCode FTKRegionalWrapper::execute()
       return StatusCode::FAILURE;
     }
     if(offlineTracks->size()!=0){
+      // Get SCT_DetectorElementCollection
+      SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+      const InDetDD::SiDetectorElementCollection* sctElements(sctDetEle.retrieve());
+      if (sctElements==nullptr) {
+        ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+        return StatusCode::FAILURE;
+      }
+
       auto track_it   = offlineTracks->begin();
       auto last_track = offlineTracks->end();
       for (int iTrk=0 ; track_it!= last_track; track_it++, iTrk++){
@@ -778,7 +787,9 @@ StatusCode FTKRegionalWrapper::execute()
 	      else if (m_idHelper->is_sct(hitId)) {
 		m_offline_isPixel->push_back(0);
 		m_offline_isBarrel->push_back(int(m_sctId->is_barrel(hitId)));
-		const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(hitId);
+                const Identifier wafer_id = m_sctId->wafer_id(hitId);
+                const IdentifierHash wafer_hash = m_sctId->wafer_hash(wafer_id);
+		const InDetDD::SiDetectorElement* sielement = sctElements->getDetectorElement(wafer_hash);
 		m_offline_clustID->push_back(sielement->identifyHash());
 		m_offline_trackNumber->push_back(iTrk);
 		m_offline_layer->push_back(m_sctId->layer_disk(hitId));
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKDetectorTool.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKDetectorTool.h
index fbe8a0314c0ba20d2b951f336e6f42dd39cdbc94..cd43c97ae0812bfa8d6b9c0899a822748bae339d 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKDetectorTool.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKDetectorTool.h
@@ -32,21 +32,15 @@
 #include "TrkTrackSummaryTool/TrackSummaryTool.h"
 #include "TrkToolInterfaces/ITrackHoleSearchTool.h"
 #include "InDetBeamSpotService/IBeamCondSvc.h"
+#include "StoreGate/ReadCondHandleKey.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/DataHandle.h"
 #include "HepPDT/ParticleDataTable.hh"
 #include "HepPDT/ParticleData.hh"
 
-#include "InDetIdentifier/PixelID.h"
-#include "InDetIdentifier/SCT_ID.h"
-#include "InDetIdentifier/TRT_ID.h"
-#include "InDetPrepRawData/SiClusterContainer.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
-#include "InDetReadoutGeometry/TRT_DetectorManager.h"
-
 #include "InDetConditionsSummaryService/IInDetConditionsTool.h"
+#include "InDetPrepRawData/SiClusterContainer.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 
 class AtlasDetectorID;
 class StoreGateSvc;
@@ -54,12 +48,11 @@ class ITruthParameters;
 class TruthSelector;
 class PixelID;
 class SCT_ID;
-class TRT_ID;
 class IBeamCondSvc;
 class EventID;
 
 namespace InDetDD {
-  class SiDetectorManager;
+  class PixelDetectorManager;
 }
 namespace HepPDT {
   class ParticleDataTable;
@@ -81,8 +74,7 @@ class FTKDetectorTool :  virtual public FTKDetectorToolI,
   StoreGateSvc*  m_detStore;
   StoreGateSvc*  m_evtStore;
      
-  const  InDetDD::SiDetectorManager*     m_PIX_mgr;
-  const  InDetDD::SiDetectorManager*     m_SCT_mgr;
+  const  InDetDD::PixelDetectorManager*     m_PIX_mgr;
   
   const InDet::SiClusterContainer*  m_pixelContainer;
   const InDet::SiClusterContainer*  m_sctContainer;
@@ -90,6 +82,8 @@ class FTKDetectorTool :  virtual public FTKDetectorToolI,
   ToolHandle<IInDetConditionsTool>        m_pixelCondSummaryTool; // tool to retrieve pixel conditions db 
   ToolHandle<IInDetConditionsTool>        m_sctCondSummaryTool{this, "SctSummaryTool",
       "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT Conditions Summary"}; // tool to retrieve SCT conditions db
+
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
   
   const PixelID*   m_pixelId;
   const SCT_ID*    m_sctId;
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKMergerAlgo.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKMergerAlgo.h
index 0d30496db79d0a8c74233759f407d4ed5b221eb9..5f44f4b6f0b40ad045c463f74eb47203f2bbbfb0 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKMergerAlgo.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKMergerAlgo.h
@@ -12,10 +12,6 @@
 
 #include "InDetPrepRawData/PixelClusterContainer.h"
 #include "InDetPrepRawData/SCT_ClusterContainer.h"
-#include "InDetIdentifier/PixelID.h"
-#include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "InDetReadoutGeometry/PixelDetectorManager.h"
 
 #include "TrkTrack/Track.h"
 #include "TrkTrack/TrackCollection.h"
@@ -36,6 +32,8 @@
 #include <string>
 #include <map>
 
+class PixelID;
+class SCT_ID;
 
 namespace Trk { class ITrackParticleCreatorTool; }
 //namespace Trk { class TrackParticleCreatorTool; }
@@ -187,8 +185,6 @@ private:
   std::string m_FTKSCTClu_CollName; // name of the collection
   InDet::SCT_ClusterContainer *m_FTKSCTCluContainer; // SCT container object
   AtlasDetectorID* m_idHelper;
-  const InDetDD::SiDetectorManager*     m_PIX_mgr;
-  const InDetDD::SiDetectorManager*     m_SCT_mgr;
   const PixelID *m_pixel_id;
   const SCT_ID *m_sct_id;
 
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTK_SGHitInput.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTK_SGHitInput.h
index fae75107a99098959252344577892bbdf9050adc..3a77e7b5f3721d729d6409835f2a64207acd8284 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTK_SGHitInput.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTK_SGHitInput.h
@@ -33,24 +33,26 @@
 #include "TrkExInterfaces/IExtrapolator.h"
 #include "TrkParameters/TrackParameters.h"
 #include "InDetBeamSpotService/IBeamCondSvc.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/DataHandle.h"
+#include "StoreGate/ReadCondHandleKey.h"
 #include "HepPDT/ParticleDataTable.hh"
 #include "HepPDT/ParticleData.hh"
 
-#include "InDetIdentifier/PixelID.h"
-#include "InDetIdentifier/SCT_ID.h"
-#include "InDetIdentifier/TRT_ID.h"
 #include "InDetPrepRawData/SiClusterContainer.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
-#include "InDetReadoutGeometry/TRT_DetectorManager.h"
 
 #include <boost/iostreams/filtering_stream.hpp>
 #include <boost/shared_ptr.hpp>
 #include <fstream>
 
+class PixelID;
+class SCT_ID;
+
+namespace InDetDD {
+  class PixelDetectorManager;
+}
+
 /** This class interface the ID hits with the FTK simulation
     implemented in Athena. Original code */   
 class FTK_SGHitInput : virtual public FTK_SGHitInputI, public AthAlgTool,
@@ -72,8 +74,7 @@ private:
   const PixelID*   m_pixelId;
   const SCT_ID*    m_sctId;
 
-  const InDetDD::SiDetectorManager*     m_PIX_mgr;
-  const InDetDD::SiDetectorManager*     m_SCT_mgr;    
+  const InDetDD::PixelDetectorManager*     m_PIX_mgr;
 
   const InDet::SiClusterContainer*  m_pixelContainer;
   const InDet::SiClusterContainer*  m_sctContainer;
@@ -86,6 +87,8 @@ private:
   ToolHandle<Trk::IExtrapolator> m_extrapolator;
   ServiceHandle<IBeamCondSvc> m_beamSpotSvc;
 
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+
   std::string  	 m_pixelClustersName;
   std::string	 m_sctClustersName;
   std::string    m_pixelSpacePointsName;
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTKDetectorTool.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTKDetectorTool.cxx
index 3871dc760dc5f5b4519d30c4da2ede16663ec126..dfdce58a583411f8e21f477c585ca906d89475d5 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTKDetectorTool.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTKDetectorTool.cxx
@@ -8,6 +8,12 @@
 #include "EventInfo/EventInfo.h"
 #include "EventInfo/EventID.h"
 
+#include "InDetIdentifier/PixelID.h"
+#include "InDetIdentifier/SCT_ID.h"
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
+
+#include "StoreGate/ReadCondHandle.h"
+
 #include <fstream>
 #include <iostream>
 
@@ -25,7 +31,6 @@ FTKDetectorTool::FTKDetectorTool(const std::string &algname,const std::string &n
   , m_detStore( 0 )
   , m_evtStore( 0 )
   , m_PIX_mgr( 0 )
-  , m_SCT_mgr( 0 )
   , m_pixelContainer( 0 )
   , m_sctContainer( 0 )
   , m_pixelCondSummaryTool("PixelConditionsSummaryTool",this)
@@ -87,10 +92,6 @@ StatusCode FTKDetectorTool::initialize()
     m_log << MSG::ERROR << "Unable to retrieve Pixel helper from DetectorStore" << endmsg;
     return StatusCode::FAILURE;
   }
-  if( m_detStore->retrieve(m_SCT_mgr, "SCT").isFailure() ) {
-    m_log << MSG::ERROR << "Unable to retrieve SCT manager from DetectorStore" << endmsg;
-    return StatusCode::FAILURE;
-  }
   if( m_detStore->retrieve(m_sctId, "SCT_ID").isFailure() ) {
     m_log << MSG::ERROR << "Unable to retrieve SCT helper from DetectorStore" << endmsg;
     return StatusCode::FAILURE;
@@ -130,6 +131,10 @@ StatusCode FTKDetectorTool::initialize()
 		return StatusCode::FAILURE;
 	  }
   }
+
+  // ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
   return StatusCode::SUCCESS;
 }
 
@@ -170,10 +175,11 @@ void FTKDetectorTool::makeBadModuleMap(){
   }
 
   // take the list of the dead SCT modules
-  for( InDetDD::SiDetectorElementCollection::const_iterator i=m_SCT_mgr->getDetectorElementBegin(), f=m_SCT_mgr->getDetectorElementEnd() ; i!=f; ++i ) {
-    const InDetDD::SiDetectorElement* sielement( *i );
-    Identifier id = sielement->identify();
-    IdentifierHash idhash = sielement->identifyHash();
+  SCT_ID::const_id_iterator wafer_it = m_sctId->wafer_begin();
+  SCT_ID::const_id_iterator wafer_end = m_sctId->wafer_end();
+  for (; wafer_it!=wafer_end; wafer_it++) {
+    const Identifier id = *wafer_it;
+    const IdentifierHash idhash = m_sctId->wafer_hash(id);
     bool is_bad = !(m_sctCondSummaryTool->isGood( idhash ));
     if(m_dumpAllModules) is_bad =true;
     if(is_bad){
@@ -242,10 +248,11 @@ void FTKDetectorTool::dumpDeadModuleSummary()
 				 << std::endl;
     }
   }
-  for( InDetDD::SiDetectorElementCollection::const_iterator i=m_SCT_mgr->getDetectorElementBegin(), f=m_SCT_mgr->getDetectorElementEnd(); i!=f; ++i ) {
-    const InDetDD::SiDetectorElement* sielement( *i );
-    Identifier id = sielement->identify();
-    IdentifierHash idhash = sielement->identifyHash();
+  SCT_ID::const_id_iterator wafer_it = m_sctId->wafer_begin();
+  SCT_ID::const_id_iterator wafer_end = m_sctId->wafer_end();
+  for (; wafer_it!=wafer_end; wafer_it++) {
+    const Identifier id = *wafer_it;
+    const IdentifierHash idhash = m_sctId->wafer_hash(id);
     bool is_bad = !(m_sctCondSummaryTool->isGood( idhash ));
     if(m_dumpAllModules) is_bad =true;
     if(is_bad){
@@ -295,10 +302,11 @@ void FTKDetectorTool::dumpModuleIDMap()
     Identifier id = sielement->identify();
     IdentifierHash idhash = sielement->identifyHash();
   }
-  for( InDetDD::SiDetectorElementCollection::const_iterator i=m_SCT_mgr->getDetectorElementBegin(), f=m_SCT_mgr->getDetectorElementEnd(); i!=f; ++i ) {
-    const InDetDD::SiDetectorElement* sielement( *i );
-    Identifier id = sielement->identify();
-    IdentifierHash idhash = sielement->identifyHash();
+  SCT_ID::const_id_iterator wafer_it = m_sctId->wafer_begin();
+  SCT_ID::const_id_iterator wafer_end = m_sctId->wafer_end();
+  for (; wafer_it!=wafer_end; wafer_it++) {
+    const Identifier id = *wafer_it;
+    const IdentifierHash idhash = m_sctId->wafer_hash(id);
   }
 #endif
 }
@@ -347,10 +355,11 @@ void FTKDetectorTool::dumpGlobalToLocalModuleMap() {
 
   countForSRAM = 0;
 
-  for( InDetDD::SiDetectorElementCollection::const_iterator i=m_SCT_mgr->getDetectorElementBegin(), f=m_SCT_mgr->getDetectorElementEnd() ; i!=f; ++i ) {
-    const InDetDD::SiDetectorElement* sielement( *i );
-    Identifier id = sielement->identify();
-    IdentifierHash idhash = sielement->identifyHash();
+  SCT_ID::const_id_iterator wafer_it = m_sctId->wafer_begin();
+  SCT_ID::const_id_iterator wafer_end = m_sctId->wafer_end();
+  for (; wafer_it!=wafer_end; wafer_it++) {
+    const Identifier id = *wafer_it;
+    const IdentifierHash idhash = m_sctId->wafer_hash(id);
 
     FTKRawHit tmpmodraw;
 
@@ -456,8 +465,13 @@ void FTKDetectorTool::dumpIDMap()
   }
 
   // take the list of the dead SCT modules
-  for( InDetDD::SiDetectorElementCollection::const_iterator i=m_SCT_mgr->getDetectorElementBegin(), f=m_SCT_mgr->getDetectorElementEnd() ; i!=f; ++i ) {
-    const InDetDD::SiDetectorElement* sielement( *i );
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* sctElements(sctDetEle.retrieve());
+  if (sctElements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+    return;
+  }
+  for (const InDetDD::SiDetectorElement* sielement: *sctElements) {
     Identifier id = sielement->identify();
     IdentifierHash idhash = sielement->identifyHash();
     const bool is_bad = !(m_sctCondSummaryTool->isGood( idhash ));
@@ -483,6 +497,14 @@ void FTKDetectorTool::dumpIDMap()
 
 void FTKDetectorTool::dumpModulePositions() {
    m_log << MSG::INFO << "dumpModulePositions"<< endmsg; 
+
+   SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+   const InDetDD::SiDetectorElementCollection* sctElements(sctDetEle.retrieve());
+   if (sctElements==nullptr) {
+     ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+     return;
+   }
+
    TFile *output=new TFile("FTKmodulePositions.root","recreate");
    TTree *t=new TTree("modulePositions","modulePositions");
    Int_t idhash;
@@ -519,8 +541,8 @@ void FTKDetectorTool::dumpModulePositions() {
    t->Branch("isbad",&isbad,"isbad/I");
    t->Branch("hitSector",&hitSector,"hitSector/I");
    InDetDD::SiDetectorElementCollection::const_iterator iStart[2],iEnd[2];
-   iStart[0]=m_SCT_mgr->getDetectorElementBegin();
-   iEnd[0]=m_SCT_mgr->getDetectorElementEnd();
+   iStart[0]=sctElements->begin();
+   iEnd[0]=sctElements->end();
    iStart[1]=m_PIX_mgr->getDetectorElementBegin();
    iEnd[1]=m_PIX_mgr->getDetectorElementEnd();
    for(isPixel=0;isPixel<2;isPixel++) {
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTKMergerAlgo.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTKMergerAlgo.cxx
index 5d963db21f9797d83df0d1d4db9c68e44ffa3cc3..c33f7808a1ce1a4d85b92f56c1fa30c56fe2bda1 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTKMergerAlgo.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTKMergerAlgo.cxx
@@ -11,6 +11,9 @@
 #include "InDetPrepRawData/SiClusterContainer.h"
 #include "IdDictDetDescr/IdDictManager.h"
 
+#include "InDetIdentifier/PixelID.h"
+#include "InDetIdentifier/SCT_ID.h"
+
 #include "TrigFTKSim/FTKMergerAlgo.h"
 #include "TrigFTKSim/FTKTruthTrack.h"
 #include "TrigFTKPool/FTKAthTrack.h"
@@ -98,8 +101,6 @@ FTKMergerAlgo::FTKMergerAlgo(const std::string& name, ISvcLocator* pSvcLocator)
   m_FTKSCTClu_CollName("FTK_SCT_Cluster"), // default name for the FTK SCT cluster collection
   m_FTKSCTCluContainer(0x0),
   m_idHelper(0),
-  m_PIX_mgr(0),
-  m_SCT_mgr(0),
   m_pixel_id(0),
   m_sct_id(0),
   m_out_trktrack_Name("FTK_Trk_Tracks"), // name of the collection used to store RAW Trk::Tracks
@@ -303,18 +304,10 @@ StatusCode FTKMergerAlgo::initialize(){
       log << MSG::ERROR << "Could not get IdDictManager !" << endmsg;
       return StatusCode::FAILURE;
     }
-    if( m_detStore->retrieve(m_PIX_mgr, "Pixel").isFailure() ) {
-      log << MSG::ERROR << "Unable to retrieve Pixel manager from DetectorStore" << endmsg;
-      return StatusCode::FAILURE;
-    }
     if (m_detStore->retrieve(m_pixel_id, "PixelID").isFailure()) {
       log << MSG::FATAL << "Could not get Pixel ID helper" << endmsg;
       return StatusCode::FAILURE;
     }
-    if( m_detStore->retrieve(m_SCT_mgr, "SCT").isFailure() ) {
-      log << MSG::ERROR << "Unable to retrieve SCT manager from DetectorStore" << endmsg;
-      return StatusCode::FAILURE;
-    }
     if (m_detStore->retrieve(m_sct_id, "SCT_ID").isFailure()) {
       log << MSG::FATAL << "Could not get SCT ID helper" << endmsg;
       return StatusCode::FAILURE;
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx
index 21623352d0ae206d5d17c65e8c30bd75e7b73fab..b612ec053a9d4d146f247865c918d0ade8a99718 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx
@@ -32,6 +32,8 @@
 #include "EventInfo/TriggerInfo.h"
 #include "EventInfo/EventID.h"
 #include "IdDictDetDescr/IdDictManager.h"
+#include "InDetIdentifier/PixelID.h"
+#include "InDetIdentifier/SCT_ID.h"
 #include "InDetPrepRawData/SiClusterContainer.h"
 #include "InDetPrepRawData/SiClusterCollection.h"
 #include "InDetRawData/InDetRawDataCollection.h"
@@ -40,9 +42,12 @@
 #include "InDetSimData/InDetSimDataCollection.h"
 #include "InDetSimData/SCT_SimHelper.h"
 #include "InDetSimData/PixelSimHelper.h"
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "InDetReadoutGeometry/SiCellId.h"
 #include "InDetReadoutGeometry/SCT_ModuleSideDesign.h"
 
+#include "StoreGate/ReadCondHandle.h"
+
 #include "HepMC/GenEvent.h"
 #include "HepMC/GenVertex.h"
 #include "HepMC/GenParticle.h"
@@ -157,15 +162,14 @@ StatusCode FTK_SGHitInput::initialize(){
     m_log << MSG::ERROR << "Unable to retrieve Pixel helper from DetectorStore" << endmsg;
     return StatusCode::FAILURE;
   }
-  if( m_detStore->retrieve(m_SCT_mgr, "SCT").isFailure() ) {
-    m_log << MSG::ERROR << "Unable to retrieve SCT manager from DetectorStore" << endmsg;
-    return StatusCode::FAILURE;
-  }
   if( m_detStore->retrieve(m_sctId, "SCT_ID").isFailure() ) {
     m_log << MSG::ERROR << "Unable to retrieve SCT helper from DetectorStore" << endmsg;
     return StatusCode::FAILURE;
   }
 
+  // ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
   // open output to .bz2 using streams for debug //
   if(m_dooutFileRawHits) {
     m_oflraw.reset( new boost::iostreams::filtering_ostream );
@@ -524,6 +528,13 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl
     m_log << MSG::INFO << "Found SCT SDO Map" << endmsg;
   }
 
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* sctElements(*sctDetEleHandle);
+  if (not sctDetEleHandle.isValid() or sctElements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available.");
+    return;
+  }
+
   const DataHandle<SCT_RDO_Container> sct_rdocontainer_iter;
   if( m_storeGate->retrieve(sct_rdocontainer_iter, "SCT_RDOs").isSuccess() ) {
     sct_rdocontainer_iter->clID(); // anything to dereference the DataHandle
@@ -535,7 +546,9 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl
       for( DataVector<SCT_RDORawData>::const_iterator iRDO=SCT_Collection->begin(), fRDO=SCT_Collection->end(); iRDO!=fRDO; ++iRDO ) {
         const Identifier rdoId = (*iRDO)->identify();
         // get the det element from the det element collection
-        const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(rdoId);
+        const Identifier wafer_id = m_sctId->wafer_id(rdoId);
+        const IdentifierHash wafer_hash = m_sctId->wafer_hash(wafer_id);
+        const InDetDD::SiDetectorElement* sielement = sctElements->getDetectorElement(wafer_hash);
         const InDetDD::SCT_ModuleSideDesign& design = dynamic_cast<const InDetDD::SCT_ModuleSideDesign&>(sielement->design());
         const InDetDD::SiLocalPosition localPos = design.positionFromStrip(m_sctId->strip(rdoId));
         const Amg::Vector3D gPos = sielement->globalPosition(localPos);
@@ -656,7 +669,9 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl
         m_log << MSG::DEBUG << "SCT InDetRawDataCollection found with " << size << " RDOs" << endmsg;
         for( DataVector<SCT_RDORawData>::const_iterator iRDO=SCT_Collection->begin(), fRDO=SCT_Collection->end(); iRDO!=fRDO; ++iRDO ) {
           const Identifier rdoId = (*iRDO)->identify();
-          const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(rdoId);
+          const Identifier wafer_id = m_sctId->wafer_id(rdoId);
+          const IdentifierHash wafer_hash = m_sctId->wafer_hash(wafer_id);
+          const InDetDD::SiDetectorElement* sielement = sctElements->getDetectorElement(wafer_hash);
           const InDetDD::SCT_ModuleSideDesign& design = dynamic_cast<const InDetDD::SCT_ModuleSideDesign&>(sielement->design());
           const InDetDD::SiLocalPosition localPos = design.positionFromStrip(m_sctId->strip(rdoId));
           const Amg::Vector3D gPos = sielement->globalPosition(localPos);
diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/TrigFTK_RawDataAlgs/FTK_RDO_CreatorAlgo.h b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/TrigFTK_RawDataAlgs/FTK_RDO_CreatorAlgo.h
index 205c019d1790fc0ea088ec1f95b5aff8e870736b..341d356d70e335d13167d89225ef3fae2cc33e09 100644
--- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/TrigFTK_RawDataAlgs/FTK_RDO_CreatorAlgo.h
+++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/TrigFTK_RawDataAlgs/FTK_RDO_CreatorAlgo.h
@@ -29,10 +29,6 @@ class AtlasDetectorID;
 class PixelID;
 class SCT_ID;
 
-namespace InDetDD {
-  class PixelDetectorManager;
-}
-
 
 
 
@@ -79,8 +75,6 @@ private:
   const PixelID* m_pixelId;
   const SCT_ID*  m_sctId;
 
-  const InDetDD::PixelDetectorManager* m_pixelManager;
-
   const AtlasDetectorID* m_id_helper;
 
 
diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/TrigFTK_RawDataAlgs/FTK_RDO_ReaderAlgo.h b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/TrigFTK_RawDataAlgs/FTK_RDO_ReaderAlgo.h
index a985586ae536a2ccc0d12ac8b7d97586b3b8b4f7..57b4a2bc2ab56d5d5f24d928a1b14d6b866b1424 100644
--- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/TrigFTK_RawDataAlgs/FTK_RDO_ReaderAlgo.h
+++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/TrigFTK_RawDataAlgs/FTK_RDO_ReaderAlgo.h
@@ -13,8 +13,9 @@
 #include "TrkTrack/TrackCollection.h" //
 #include "TrkToolInterfaces/IUpdator.h"
 #include "InDetPrepRawData/SiClusterContainer.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "InDetReadoutGeometry/PixelDetectorManager.h"
+
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
 
 #include "FTK_DataProviderInterfaces/IFTK_DataProviderSvc.h"
 
@@ -34,6 +35,10 @@ class Identifier;
 class PixelID;
 class SCT_ID;
 
+namespace InDetDD {
+  class PixelDetectorManager;
+}
+
 namespace Trk {
   class IResidualPullCalculator;
 }  
@@ -102,8 +107,9 @@ private:
   const AtlasDetectorID* m_idHelper;
   const PixelID* m_pixelId;  
   const SCT_ID* m_sctId;  
-  const InDetDD::SiDetectorManager*  m_PIX_mgr;
-  const InDetDD::SiDetectorManager*  m_SCT_mgr;
+  const InDetDD::PixelDetectorManager*  m_PIX_mgr;
+
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
   ToolHandle<Trk::IResidualPullCalculator> m_residualCalc;
   //IFTK_DataProviderSvc* m_DataProviderSvc;
diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_CreatorAlgo.cxx b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_CreatorAlgo.cxx
index fc6ca2a03b7153c102b1ecf2c4b10877921cc96e..09f4e6a511e6cd0a9e657b18ba047adbe5a246e5 100644
--- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_CreatorAlgo.cxx
+++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_CreatorAlgo.cxx
@@ -14,7 +14,6 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/PixelID.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "TBranch.h"
 #include "TMath.h"
 #include "TFile.h"
@@ -46,7 +45,6 @@ FTK_RDO_CreatorAlgo::FTK_RDO_CreatorAlgo(const std::string& name, ISvcLocator* p
   m_NcheckFail(0),
   m_pixelId(nullptr),
   m_sctId(nullptr),
-  m_pixelManager(nullptr),
   m_id_helper(nullptr),
   m_trainingBeamspotX(0.),
   m_trainingBeamspotY(0.),
@@ -101,7 +99,6 @@ StatusCode FTK_RDO_CreatorAlgo::initialize(){
   ATH_CHECK(service("DetectorStore", detStore));
   ATH_CHECK(detStore->retrieve(m_pixelId, "PixelID"));
   ATH_CHECK(detStore->retrieve(m_sctId, "SCT_ID"));
-  ATH_CHECK(detStore->retrieve(m_pixelManager));
   ATH_CHECK(detStore->retrieve(m_id_helper, "AtlasID"));
 
   // prepare the input from the FTK tracks, merged in an external simulation
diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.cxx b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.cxx
index 5ee271ef5946df9334f61bf831c56bbc161edcf1..a57bef32dc7810545bbdd491708d564c5d767f9f 100644
--- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.cxx
+++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.cxx
@@ -4,37 +4,35 @@
 
 #include "FTK_RDO_MonitorAlgo.h"
 
-#include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/IHistogramSvc.h"
-#include "GaudiKernel/ITHistSvc.h"
+#include "EventInfo/EventID.h"
+#include "EventInfo/EventInfo.h"
 
 #include "InDetIdentifier/PixelID.h"
 #include "InDetIdentifier/SCT_ID.h"
-#include "InDetIdentifier/PixelID.h"
+
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/PixelModuleDesign.h"
-#include "InDetReadoutGeometry/SCT_ModuleSideDesign.h"
 #include "InDetReadoutGeometry/SCT_BarrelModuleSideDesign.h"
 #include "InDetReadoutGeometry/SCT_ForwardModuleSideDesign.h"
+#include "InDetReadoutGeometry/SCT_ModuleSideDesign.h"
 
-#include "TrigFTKSim/ftk_dcap.h"
+#include "InDetRIO_OnTrack/SiClusterOnTrack.h"
 
+#include "StoreGate/ReadCondHandle.h"
+
+#include "TrigFTKSim/ftk_dcap.h"
 
 #include "TrkSurfaces/Surface.h"
 
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "TrkToolInterfaces/IResidualPullCalculator.h"
 
-#include "EventInfo/EventInfo.h"
-#include "EventInfo/EventID.h"
-
 #include "TrkTrack/Track.h"
 #include "TrkTrack/TrackCollection.h"
 #include "TrkTrackSummary/TrackSummary.h"
 
-#include "InDetRIO_OnTrack/SiClusterOnTrack.h"
+#include "GaudiKernel/IHistogramSvc.h"
+#include "GaudiKernel/ITHistSvc.h"
+#include "GaudiKernel/MsgStream.h"
 
 #include "TMath.h"
 
@@ -48,7 +46,6 @@ FTK_RDO_MonitorAlgo::FTK_RDO_MonitorAlgo(const std::string& name, ISvcLocator* p
   m_pixelId(0),
   m_sctId(0),
   m_pixelManager(0),
-  m_SCT_Manager(0),
   m_id_helper(0),
   m_minPt(1000.),
   m_maxa0(1.),
@@ -145,11 +142,13 @@ StatusCode FTK_RDO_MonitorAlgo::initialize(){
   ATH_CHECK(detStore()->retrieve(m_pixelId, "PixelID"));
   ATH_CHECK(detStore()->retrieve(m_sctId, "SCT_ID"));
   ATH_CHECK(detStore()->retrieve(m_pixelManager));
-  ATH_CHECK(detStore()->retrieve(m_SCT_Manager));
   ATH_CHECK(detStore()->retrieve(m_id_helper, "AtlasID"));
 
   ATH_CHECK(m_sctLorentzAngleTool.retrieve());
 
+  // ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
   ATH_MSG_INFO("RDO_CollectionName " << m_ftk_raw_trackcollection_Name);
   ATH_MSG_INFO("offlineTracksName "<<m_offlineTracksName);
   ATH_MSG_INFO("FTK_DataProvider "<< m_DataProviderSvc);
@@ -218,6 +217,13 @@ StatusCode FTK_RDO_MonitorAlgo::execute() {
     ATH_MSG_DEBUG( "entered execution for run" << eventID->run_number()
 		   << "event" << eventID->event_number());
   }
+
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* sctElements(*sctDetEleHandle);
+  if (not sctDetEleHandle.isValid() or sctElements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available.");
+    return StatusCode::FAILURE;
+  }
   
   // get FTK tracks
   const FTK_RawTrackContainer *rawTracks ( nullptr );
@@ -358,7 +364,7 @@ StatusCode FTK_RDO_MonitorAlgo::execute() {
 	  
 	  if (eta> m_mineta && eta < m_maxeta && phi0> m_minphi && phi0 < m_maxphi) {
 	    if (uniqueMatch) { 
-	      if (m_getRawTracks)(this)->compareTracks(ftkRawTrack, offlinetrackPixLocxLocy, offlinetrackSctLocx);
+	      if (m_getRawTracks)(this)->compareTracks(ftkRawTrack, sctElements, offlinetrackPixLocxLocy, offlinetrackSctLocx);
 	      if (m_getTracks) {
 		const Trk::Track* ftktrack = m_DataProviderSvc->getCachedTrack(ftkTrackMatch.first,false);
 		if (ftktrack) (this)->compareTracks(ftktrack, offlinetrackPixLocxLocy, offlinetrackSctLocx, false);
@@ -1122,6 +1128,7 @@ const std::pair<unsigned int, unsigned int> FTK_RDO_MonitorAlgo::matchTrack(cons
 }
 
 void FTK_RDO_MonitorAlgo::compareTracks(const FTK_RawTrack* ftkTrack, 
+                                        const InDetDD::SiDetectorElementCollection* sctElements,
 					std::map<unsigned int,std::pair<double,double> >& offlinetrackPixLocxLocy,
 					std::map<unsigned int,double>& offlinetrackSctLocx
 					) {
@@ -1261,8 +1268,8 @@ void FTK_RDO_MonitorAlgo::compareTracks(const FTK_RawTrack* ftkTrack,
       layername="SCTE";
     }
     
-
-    double ftkLocX  = (this)->getSctLocX(scthash,rawStripCoord,clusterWidth);
+    const InDetDD::SiDetectorElement* element = sctElements->getDetectorElement(scthash);
+    double ftkLocX  = (this)->getSctLocX(element,rawStripCoord,clusterWidth);
     
     auto p = offlinetrackSctLocx.find(scthash);
     if (p!=offlinetrackSctLocx.end()) {
@@ -1503,13 +1510,13 @@ const std::pair<double,double> FTK_RDO_MonitorAlgo::getPixLocXlocY(const Identif
 }
   
 
-double FTK_RDO_MonitorAlgo::getSctLocX(const IdentifierHash hash, const float rawstripCoord, const int clusterWidth) {
+double FTK_RDO_MonitorAlgo::getSctLocX(const InDetDD::SiDetectorElement* pDE, const float rawstripCoord, const int clusterWidth) {
+
+  const IdentifierHash hash = pDE->identifyHash();
 
   double xloc=0.;
 
   float stripCoord = rawstripCoord/2.; // rawStribCoord is in units of half a strip
-
-  const InDetDD::SiDetectorElement* pDE = m_SCT_Manager->getDetectorElement(hash);
 	
   const InDetDD::SCT_ModuleSideDesign* design;
 
diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.h b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.h
index 527e95588f315ab159403595f32df7183fa33a02..e0aea819cc9df7bb1b4d8f16c4e00d829f7ae423 100644
--- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.h
+++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.h
@@ -12,8 +12,6 @@
 
 #include "TrkTrack/TrackCollection.h" //
 #include "InDetPrepRawData/SiClusterContainer.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "InDetCondServices/ISiLorentzAngleTool.h"
 
 #include "FTK_DataProviderInterfaces/IFTK_DataProviderSvc.h"
@@ -21,6 +19,9 @@
 #include "TrigFTK_RawData/FTK_RawTrack.h"
 #include "TrigFTK_RawData/FTK_RawTrackContainer.h"
 #include "TrkEventPrimitives/VertexType.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
+
 #include <vector>
 #include <string>
 #include <map>
@@ -37,7 +38,7 @@ class SCT_ID;
 
 namespace InDetDD {
   class PixelDetectorManager;
-  class SCT_DetectorManager;
+  class SiDetectorElement;
 }
 
 enum FTK_MonHistType{Raw,Raw_wid1,Raw_wid2, Raw_wid3, Raw_wid4, Cnv, Rft};
@@ -63,9 +64,10 @@ public:
 							 std::map<unsigned int,double>& offlinetrackSctLocx,
 							 bool& uniqueMatch);
   
-  double getSctLocX(const IdentifierHash hash, const float stripCoord, const int clusterWidth);
+  double getSctLocX(const InDetDD::SiDetectorElement* pDE, const float stripCoord, const int clusterWidth);
   const std::pair<double,double> getPixLocXlocY(const IdentifierHash hash, const float rawLocalPhiCoord, const float rawLocalEtaCoord);
   void compareTracks(const FTK_RawTrack* ftkTrack, 
+                     const InDetDD::SiDetectorElementCollection* sctElements,
 		     std::map<unsigned int,std::pair<double,double>>& offlinetrackPixLocxLocy,
 		     std::map<unsigned int,double>& offlinetrackSctLocx);
 
@@ -99,12 +101,13 @@ public:
   const SCT_ID*  m_sctId;
   
   const InDetDD::PixelDetectorManager* m_pixelManager;
-  const InDetDD::SCT_DetectorManager*  m_SCT_Manager;
 
   const AtlasDetectorID* m_id_helper;
 
   ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"};
 
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+
   /// Histograms ///
   TH1D* m_h_FTK_RawTrack_n;
   TH1D* m_h_FTK_pt;
diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_ReaderAlgo.cxx b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_ReaderAlgo.cxx
index c94e2d034994c8383220b4f15f0e7fe6f8454a0a..be0713a4455644603ca479fe05689c4216da19af 100644
--- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_ReaderAlgo.cxx
+++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_ReaderAlgo.cxx
@@ -12,7 +12,6 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "TrkSurfaces/Surface.h"
 #include "TrkToolInterfaces/IUpdator.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "TrkToolInterfaces/IResidualPullCalculator.h"
 
@@ -33,6 +32,8 @@
 
 #include "InDetRIO_OnTrack/SiClusterOnTrack.h"
 
+#include "StoreGate/ReadCondHandle.h"
+
 #include "TMath.h"
 #define NINT(a) ((a) >= 0.0 ? (int)((a)+0.5) : (int)((a)-0.5))
 
@@ -107,6 +108,9 @@ StatusCode FTK_RDO_ReaderAlgo::initialize(){
   MsgStream athlog(msgSvc(), name());
   ATH_MSG_INFO("FTK_RDO_ReaderAlgo::initialize()" );
 
+  // ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
   //FIX THESE
   ATH_CHECK( service("StoreGateSvc", m_StoreGate ));
   ATH_MSG_INFO("Input RDO collection" << m_ftk_raw_trackcollection_Name);
@@ -1792,12 +1796,14 @@ void FTK_RDO_ReaderAlgo::Fill_Clusters(TrackCollection *trackCollection,std::vec
     ATH_MSG_WARNING( "Unable to retrieve Pixel manager from DetectorStore" << endl);
     return;
   }
-  if( detStore()->retrieve(m_SCT_mgr, "SCT").isFailure() ) {
-    ATH_MSG_WARNING( "Unable to retrieve SCT manager from DetectorStore" << endl);
+
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* sctElements(*sctDetEleHandle);
+  if (not sctDetEleHandle.isValid() or sctElements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available.");
     return;
   }
 
-
   auto track_it   = trackCollection->begin();
   auto last_track = trackCollection->end();
 
@@ -1885,7 +1891,9 @@ void FTK_RDO_ReaderAlgo::Fill_Clusters(TrackCollection *trackCollection,std::vec
 	      Layer->push_back(layerPixel);
 	    }
 	    if (m_idHelper->is_sct(hitId)) {	      
-	      const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(hitId);
+              const Identifier wafer_id = m_sctId->wafer_id(hitId);
+              const IdentifierHash wafer_hash = m_sctId->wafer_hash(wafer_id);
+	      const InDetDD::SiDetectorElement* sielement = sctElements->getDetectorElement(wafer_hash);
 	      clustID->push_back(sielement->identifyHash());
 	      
 	      y_residual->push_back(999999);
@@ -1936,16 +1944,14 @@ void FTK_RDO_ReaderAlgo::Fill_Clusters(const xAOD::TrackParticleContainer *track
     ATH_MSG_WARNING( "Unable to retrieve Pixel manager from DetectorStore" << endl);
     return;
   }
-  if( detStore()->retrieve(m_SCT_mgr, "SCT").isFailure() ) {
-    ATH_MSG_WARNING( "Unable to retrieve SCT manager from DetectorStore" << endl);
+
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* sctElements(*sctDetEleHandle);
+  if (not sctDetEleHandle.isValid() or sctElements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available.");
     return;
   }
 
-
-
-
-
-
   auto track_it   = trackCollection->begin();
   auto last_track = trackCollection->end();
 
@@ -2037,7 +2043,9 @@ void FTK_RDO_ReaderAlgo::Fill_Clusters(const xAOD::TrackParticleContainer *track
 	      Layer->push_back(layerPixel);
 	    }
 	    if (m_idHelper->is_sct(hitId)) {
-	      const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(hitId);
+              const Identifier wafer_id = m_sctId->wafer_id(hitId);
+              const IdentifierHash wafer_hash = m_sctId->wafer_hash(wafer_id);
+	      const InDetDD::SiDetectorElement* sielement = sctElements->getDetectorElement(wafer_hash);
 	      clustID->push_back(sielement->identifyHash());
 
 	      x_residual->push_back(res_x);
diff --git a/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTK_DataProviderSvc_Config.py b/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTK_DataProviderSvc_Config.py
index c1a463afbbe5c251e5223a8b9e89195c4badd1ef..fae4c1c817ec36bd0593873c72f171403eb9a380 100644
--- a/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTK_DataProviderSvc_Config.py
+++ b/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTK_DataProviderSvc_Config.py
@@ -5,17 +5,10 @@ from FTK_DataProviderSvc.FTK_DataProviderSvcConf import FTK_DataProviderSvc, FTK
 
 class TrigFTK_DataProviderSvc(FTK_DataProviderSvc) :
 
-    def __init__(self, name = "TrigFTK_DataProviderSvc"):
+    def __init__(self, name = "TrigFTK_DataProviderSvc", SCTLorentzAngleTool=None):
         print "In FTK_DataProviderSvc_Config.py"  
         FTK_DataProviderSvc.__init__(self, name) 
 
-        # SiLorentzAngleTool for SCT
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, "SCTLorentzAngleTool"):
-            from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup
-            sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup()
-        FTK_DataProviderSvc.SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool
-
         from TrigInDetConf.TrigInDetRecToolsFTK import InDetTrigTrackFitterFTK, InDetTrigRotCreatorFTK, TrigFTK_VertexCollectionSortingTool, \
         TrigFTK_UncertaintyTool,TrigFTK_RawVertexFinderTool,InDetTrigTrackParticleCreatorToolFTK,InDetTrigTrackSummaryToolFTK
         from InDetTrigRecExample.InDetTrigConfigRecLoadToolsPost import InDetTrigPriVxFinderTool
@@ -41,10 +34,8 @@ class TrigFTK_DataProviderSvc(FTK_DataProviderSvc) :
         self.VertexCollectionSortingTool=TrigFTK_VertexCollectionSortingTool
         self.ROTcreatorTool= InDetTrigRotCreatorFTK 
 
-
         from RecExConfig.RecFlags import rec
         self.doTruth= rec.doTruth()
 
-        
-
-
+        if SCTLorentzAngleTool is not None:
+            FTK_DataProviderSvc.SCTLorentzAngleTool = SCTLorentzAngleTool
diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt
index e7c8c917abba09c730a584d3987c1427f4f94e41..0c77ccbb97b1004d55e8347665dcae432b5af0f5 100644
--- a/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt
+++ b/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt
@@ -22,6 +22,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Event/xAOD/xAODCaloEvent
                           Event/xAOD/xAODEventInfo
                           LArCalorimeter/LArRecEvent
+                          LArCalorimeter/LArRecConditions
                           Reconstruction/Jet/JetUtils )
 
 # External dependencies:
@@ -41,7 +42,7 @@ atlas_add_library( TrigCaloHypoLib
 atlas_add_component( TrigCaloHypo
                      src/components/*.cxx
                      INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ${CLHEP_LIBRARIES} xAODJet GaudiKernel JetEvent TrigCaloEvent TrigParticle TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib CaloGeoHelpers EventKernel FourMomUtils xAODCaloEvent xAODEventInfo LArRecEvent JetUtils TrigCaloHypoLib )
+                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ${CLHEP_LIBRARIES} xAODJet GaudiKernel JetEvent TrigCaloEvent TrigParticle TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib CaloGeoHelpers EventKernel FourMomUtils xAODCaloEvent xAODEventInfo LArRecEvent LArRecConditions JetUtils TrigCaloHypoLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/TrigCaloHypo/TrigEFCaloHypoNoise.h b/Trigger/TrigHypothesis/TrigCaloHypo/TrigCaloHypo/TrigEFCaloHypoNoise.h
index b7101d78afb2160c4eeb61f9ffc66b92f29ccb86..9953194ea4dfaf58796553c320037964810c69ee 100755
--- a/Trigger/TrigHypothesis/TrigCaloHypo/TrigCaloHypo/TrigEFCaloHypoNoise.h
+++ b/Trigger/TrigHypothesis/TrigCaloHypo/TrigCaloHypo/TrigEFCaloHypoNoise.h
@@ -18,7 +18,8 @@
 #include "TrigInterfaces/HypoAlgo.h"
 #include "TrigTimeAlgs/TrigTimerSvc.h"
 #include "CaloInterface/ILArNoisyROTool.h"
-
+#include "StoreGate/ReadHandleKey.h"
+#include "LArRecConditions/LArBadChannelCont.h"
 
 namespace hltinterface{
   class GenericHLTContainer;
@@ -78,6 +79,11 @@ class TrigEFCaloHypoNoise : public HLT::HypoAlgo {
   long int m_publishTime;
 
   ToolHandle<ILArNoisyROTool> m_noisyROTool;
+  SG::ReadCondHandleKey<LArBadFebCont> m_knownBadFEBsVecKey {this, "BadFEBsKey", "LArKnownBadFEBs", "key to read the known Bad FEBs"};
+  SG::ReadCondHandleKey<LArBadFebCont> m_knownMNBFEBsVecKey {this, "MNBFEBsKey", "LArKnownMNBFEBs", "key to read the known MNB FEBs"};
+  std::set<unsigned int> m_knownBadFEBs;
+  std::vector<HWIdentifier> m_knownMNBFEBs;
+  bool m_hasFebs;
 
 };
 #endif
diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx b/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx
index dc565443ced40bba2adfaa39cbba1cee67f256b3..057cc0e0b59dd5db56b8d7c188d204d9c5a02b45 100755
--- a/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx
+++ b/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx
@@ -39,7 +39,7 @@ class ISvcLocator;
 /////////////////////////////////////////////////////////////////////
 //
 TrigEFCaloHypoNoise::TrigEFCaloHypoNoise(const std::string& name, ISvcLocator* pSvcLocator):
-  HLT::HypoAlgo(name, pSvcLocator), m_isInterface(false), m_noisyROTool("",this) {
+  HLT::HypoAlgo(name, pSvcLocator), m_isInterface(false), m_noisyROTool("",this),m_hasFebs(false) {
 
   declareProperty("Etcut",   m_EtCut = 40*CLHEP::GeV); // Default: 40 GeV
   declareProperty("doMonitoring", m_doMonitoring = false );
@@ -85,6 +85,16 @@ HLT::ErrorCode TrigEFCaloHypoNoise::hltInitialize()
 	return HLT::OK;
   }
 
+  StatusCode sc = m_knownBadFEBsVecKey.initialize();
+  if(sc != StatusCode::SUCCESS) {
+     ATH_MSG_WARNING( "Could not find Known Bad FEBs list, assuming empty !!!" );
+  }
+  sc = m_knownMNBFEBsVecKey.initialize() ;
+  if(sc != StatusCode::SUCCESS) {
+     ATH_MSG_WARNING( "Could not find Known MNB FEBs list, assuming empty !!!" );
+  }
+  m_hasFebs=false;
+
   auto cfact = hltinterface::ContainerFactory::getInstance();
   if ( cfact ) {
       msg() << MSG::DEBUG << "Got the factory for TDAQ interface, will try to register vectors" << endmsg;
@@ -135,15 +145,59 @@ HLT::ErrorCode TrigEFCaloHypoNoise::hltExecute(const HLT::TriggerElement* output
   const CaloCellContainer* outCells(0);
   HLT::ErrorCode ec = getFeature(outputTE, outCells);
   if(ec!=HLT::OK) {
-    msg() << MSG::WARNING << " Failed to get CellCollections " << endmsg;
+    ATH_MSG_WARNING(" Failed to get CellCollections ");
     return ec;
   }
 
-  
+  if(!m_hasFebs){
+     bool hasBad=false; bool hasMNB=false;
+     if (!evtStore()->contains<LArBadFebCont>(m_knownBadFEBsVecKey.key())) { 
+         ATH_MSG_WARNING("No Bad FEBs object existing, assume empty list");
+         hasBad=true;
+     } else {   
+         SG::ReadCondHandle<LArBadFebCont> badHdl(m_knownBadFEBsVecKey);
+         const LArBadFebCont* badCont=*badHdl;
+         if(badCont) {
+           for(LArBadFebCont::BadChanVec::const_iterator i = badCont->begin(); i!=badCont->end(); i++) {
+              m_knownBadFEBs.insert(i->first);
+           }
+           if(m_knownBadFEBs.size() == 0) {
+                 ATH_MSG_WARNING("List of known Bad FEBs empty !? ");
+           }
+           hasBad=true;
+         }
+     }
+     ATH_MSG_DEBUG("Number of known Bad FEBs: "<<m_knownBadFEBs.size());
+
+     if (!evtStore()->contains<LArBadFebCont>(m_knownMNBFEBsVecKey.key())) { 
+         ATH_MSG_WARNING("No MNB FEBs object existing, assume empty list");
+         hasMNB=true;
+     } else {   
+         SG::ReadCondHandle<LArBadFebCont> MNBHdl(m_knownMNBFEBsVecKey);
+         const LArBadFebCont* MNBCont=*MNBHdl;
+         if(MNBCont) {
+           for(LArBadFebCont::BadChanVec::const_iterator i = MNBCont->begin(); i!=MNBCont->end(); i++) {
+              m_knownMNBFEBs.push_back(HWIdentifier(i->first));
+           }
+           if(m_knownMNBFEBs.size() == 0) {
+                 ATH_MSG_WARNING("List of known MNB FEBs empty !? ");
+           }
+           hasMNB=true;
+         }
+     }
+     ATH_MSG_DEBUG("Number of known MNB FEBs: "<<m_knownMNBFEBs.size());
+     if(hasBad && hasMNB) {
+        m_hasFebs=true;
+     } else {
+        ATH_MSG_WARNING("No known Bad or MNB Febs list available, will be empty !!");
+     }      
+  }   
+  const std::set<unsigned int> knownBadFEBs(m_knownBadFEBs);
+  const std::vector<HWIdentifier> knownMNBFEBs(m_knownMNBFEBs);
   unsigned int flag = 0;
   if ( outCells ) {
 	if ( msgDebug ) msg() << MSG::DEBUG << "Got cell container, will process it" << endmsg;
-	std::unique_ptr<LArNoisyROSummary> noisyRO = m_noisyROTool->process(outCells);
+	std::unique_ptr<LArNoisyROSummary> noisyRO = m_noisyROTool->process(outCells, &knownBadFEBs, &knownMNBFEBs);
 	if ( msgDebug ) msg() << MSG::DEBUG << "processed it" << endmsg;
         if ( noisyRO->BadFEBFlaggedPartitions() ) {
 	      if ( msgDebug ) msg() << MSG::DEBUG << "Passed : BadFEBFlaggedPartitions" << endmsg;
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h
index 75bbc6789db38201393eff81ca0667a900273d76..dc3cea8a3847586475fc7b1cefec134b69129530 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h
@@ -56,8 +56,6 @@ class TrigL2PhotonFexMT : public AthAlgorithm {
   
  private:
   
-  xAOD::TrigPhotonContainer* m_trigPhotonContainer; 
-
     SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey { this, 
       "RoIs",                             // property name
       "rois",                            // default value of StoreGate key
diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoToolMT.h b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoToolMT.h
index 5a6c783fe698a31ba10dd267c1099f13932c2002..fb50c43d5da1ce3ce29094b7f8828c9b8bbaacc1 100644
--- a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoToolMT.h
+++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoToolMT.h
@@ -78,8 +78,6 @@ class TrigL2CaloRingerHypoToolMT : virtual public ::AthAlgTool
   Gaudi::Property<double>                                             m_emEtCut;
 
   
-  size_t m_multiplicity = 1;
-
   //ToolHandle<GenericMonitoringTool> m_monTool{ this, "MonTool", "", "Monitoring tool" };
 }; 
 
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoAlg.h b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoAlg.h
index 8be8fc8652e2e719fcbb0e475bd3774d0c86bac4..e9d3d0adaf216450dbc36ec9501885a0e195acbf 100644
--- a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoAlg.h
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoAlg.h
@@ -16,6 +16,8 @@
 
 #include "TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h"
 
+#include "DecisionHandling/HypoBase.h"
+
 class StoreGateSvc;
 class TriggerElement;
 
@@ -23,7 +25,7 @@ class TriggerElement;
 // --------------------------------------------------------------------------------
 
 class TrigMuonEFMSonlyHypoAlg
-   : public ::AthReentrantAlgorithm
+   : public ::HypoBase
 {
   public:
 
@@ -40,20 +42,9 @@ class TrigMuonEFMSonlyHypoAlg
     TrigMuonEFMSonlyHypoAlg(); 
     ToolHandleArray<TrigMuonEFMSonlyHypoTool> m_hypoTools {this, "HypoTools", {}, "Tools to perform selection"}; 
 
-    SG::WriteHandleKey<TrigCompositeUtils::DecisionContainer> m_decisionsKey{
-	this, "Decisions", "MuonEFMSonlyHypo_Decisions", "Name of the decisions object attached by TrigMuonEFMSonlyHypo"};
-
-    SG::ReadHandleKey< ViewContainer > m_viewsKey{
-	this, "ViewRoIs", "MUViewRoIs", "Name of the input data on Views produced by EventCreatorAlgorithms"};
-
     SG::ReadHandleKey<xAOD::MuonContainer> m_muonKey{
 	this, "MuonDecisions", "MuonEFMSonly_MuonData", "Name of the input data on xAOD::MuonContainer produced by MuonCreatorAlg"};
 
-    SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiKey{
-	this, "RoIs", "MURoIs", "Name of the input data from L1Decoder"};
-
-    SG::ReadHandleKey<TrigCompositeUtils::DecisionContainer> m_previousDecisionsKey{
-	this, "L1Decisions", "MuonEFMSonly_Decisions", "Name of the input decisions object"};
 };
 
 #endif
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h
index 6401c6023344d20744937f22517dad96ccfb94c4..edcd3552f3b32bfb521900fdaa1da127f4ea9526 100644
--- a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h
@@ -23,18 +23,20 @@ class TrigMuonEFMSonlyHypoTool: public ::AthAlgTool {
   ~TrigMuonEFMSonlyHypoTool();
  
   struct MuonEFInfo {
-  MuonEFInfo( TrigCompositeUtils::Decision* d, const TrigRoiDescriptor* r, const xAOD::MuonContainer* m,
+  MuonEFInfo( TrigCompositeUtils::Decision* d, 
+              const TrigRoiDescriptor* r, 
+              const xAOD::Muon* m,
 	      const TrigCompositeUtils::Decision* previousDecision )
-  : decision( d ), 
+    : decision( d ), 
       roi( r ),
-      muons( m ),
+      muon( m ),
       previousDecisionIDs(TrigCompositeUtils::decisionIDs( previousDecision ).begin(), 
 			  TrigCompositeUtils::decisionIDs( previousDecision ).end() )
     {}
       
     TrigCompositeUtils::Decision* decision;
     const TrigRoiDescriptor* roi;
-    const xAOD::MuonContainer* muons;
+    const xAOD::Muon* muon;
     const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs;
   };
 
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py b/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py
index 411ff2795394180ad1cb018527c522f6f1ae200a..85bbf1a0a1d8bce6461df63104d89e97511b0d78 100755
--- a/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py
@@ -1832,52 +1832,79 @@ class TrigMuonIDTrackMultiHypoConfig(TrigMuonIDTrackMultiHypo) :
         self.AthenaMonTools = [ online ]
 
 
-########MT EF hypo 
-class TrigMuonEFMSonlyHypoConfig(TrigMuonEFMSonlyHypoAlg) :
+########MT EF menu hypo 
+def TrigMuonEFMSonlyHypoToolFromName( toolName, thresholdHLT ) :
 
-    __slots__ = []
+    name = "TrigMuonEFMSonlyHypoTool"
+    config = TrigMuonEFMSonlyHypoConfig()
 
-    # nath: name threshold, for example HLT_mu6 etc
-    def TrigMuonEFMSonlyHypoToolFromName( self, name, nath ):	
+    # Separete HLT_NmuX to bname[0]=HLT and bname[1]=NmuX
+    bname = thresholdHLT.split('_') 
+    threshold = bname[1]
+    thresholds = config.decodeThreshold( threshold )
+    print "TrigMuonEFMSonlyHypoConfig: Decoded ", thresholdHLT, " to ", thresholds
 
-        from AthenaCommon.Constants import DEBUG
-        tool = TrigMuonEFMSonlyHypoTool( nath )  
-        tool.OutputLevel = DEBUG
-        bname = nath.split('_') 
+    tool = config.ConfigurationHypoTool( toolName, thresholds )
+ 
+    # Setup MonTool for monitored variables in AthenaMonitoring package
+    TriggerFlags.enableMonitoring = ["Validation"]
 
-        # this needs to be correctly defined, as this is defined for test run
-        if len(bname) == 2: 
-            th = re.findall(r'[0-9]+', bname[1])           
-            threshold = str(th[0]) + 'GeV'
-            TrigMuonEFMSonlyHypoConfig().ConfigrationHypoTool( name, nath, threshold )
-        else:
-            print """ Configration ERROR: Can't configure threshold at TrigMuonEFMSonlyHypoTool """
-            return tool
-    
-        # Setup MonTool for monitored variables in AthenaMonitoring package
-        try:
-            TriggerFlags.enableMonitoring = ["Validation"]
+    try:
             if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in TriggerFlags.enableMonitoring() or 'Cosmic' in TriggerFlags.enableMonitoring():
-                tool.MonTool = TrigMuonEFMSonlyHypoMonitoring() 
-        except AttributeError:
+                tool.MonTool = TrigMuonEFMSonlyHypoMonitoring( name + "Monitoring_" + thresholdHLT ) 
+    except AttributeError:
             tool.MonTool = ""
             print name, ' Monitoring Tool failed'
     
-        return tool
+    return tool
     
-    def ConfigrationHypoTool( self, name, nath, threshold ): 
+class TrigMuonEFMSonlyHypoConfig(): 
         
-        tool = TrigMuonEFMSonlyHypoTool( nath )  
+
+    def decodeThreshold( self, threshold ):
+        """ decodes the thresholds of the form mu6, 2mu6, ... """
+        print "decoding ", threshold
+
+        if threshold[0].isdigit():  # If the form is NmuX, return as list [X,X,X...N times...]
+            assert threshold[1:3] == "mu", "Two digit multiplicity not supported"
+            return [ threshold[3:] ] * int( threshold[0] )
+        if threshold.count('mu') > 1:  # If theform is muXmuY, return as [X,Y]
+            return threshold.strip('mu').split('mu')
     
-        try:
-            tool.AcceptAll = False
-            values = trigMuonEFSAThresholds[threshold]
-            tool.PtBins = values[0]
-            tool.PtThresholds = [ x * GeV for x in values[1] ]
-        except LookupError:
-            if (threshold=='passthrough'):
-                tool.PtBins = [-10000.,10000.]
-                tool.PtThresholds = [ -1. * GeV ]
-            else:
-                raise Exception('MuonEFMSonly Hypo Misconfigured: threshold %r not supported' % threshold)
-        return threshold
+        # If the form is muX(inclusive), return as 1 element list
+        return [ threshold[2:] ]        
+
+    def ConfigurationHypoTool( self, toolName, thresholds ):
+
+        tool = TrigMuonEFMSonlyHypoTool( toolName )  
+
+        nt = len(thresholds)
+        print "TrigMuonEFMSonlyHypoConfig: Set ", nt, " thresholds" 
+        print "But cann't use multi muon trigger due to not yet implemented it"
+        #tool.PtBins = [ [ 0, 2.5 ] ] * nt
+        #tool.PtThresholds = [ [ 5.49 * GeV ] ] * nt
+        # these lines are commented out because the hypo tool has not yet implemented multi muon trigger
+        # if you implement it, please remove these coment out. 
+ 
+        for th, thvalue in enumerate(thresholds):
+            thvaluename = thvalue + 'GeV'
+            print "Number of threshold = ", th, ", Value of threshold = ", thvaluename
+
+            try:
+                tool.AcceptAll = False
+                values = trigMuonEFSAThresholds[thvaluename]
+                tool.PtBins = values[0]
+                tool.PtThresholds = [ x * GeV for x in values[1] ]
+
+            except LookupError:
+                if (threshold=='passthrough'):
+                    tool.PtBins = [-10000.,10000.]
+                    tool.PtThresholds = [ -1. * GeV ]
+                else:
+                    raise Exception('MuonEFMSonly Hypo Misconfigured: threshold %r not supported' % threshold)
+
+            break # because the hypo tool has not yet implemented multi muon trigger
+                  # if you implement it, please remove this line. 
+
+        return tool
+
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx
index b4f56f61103701722259b91e42443481e5fead11..756761aa554f6cffe9ff386cfee292b907890375 100755
--- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx
@@ -9,6 +9,7 @@
 #include "AthLinks/ElementLink.h"
 #include "xAODTrigMuon/L2StandAloneMuonContainer.h"
 #include "TrigMuonHypo/TrigMufastHypoAlg.h"
+#include "AthViews/ViewHelper.h"
 
 using namespace TrigCompositeUtils; 
 
@@ -76,30 +77,22 @@ StatusCode TrigMufastHypoAlg::execute_r( const EventContext& context ) const
   for ( auto previousDecision: *previousDecisionsHandle ) {
     //get RoI
     auto roiEL = previousDecision->objectLink<TrigRoiDescriptorCollection>( "initialRoI" );
-    CHECK( roiEL.isValid() );
+    ATH_CHECK( roiEL.isValid() );
     const TrigRoiDescriptor* roi = *roiEL;
 
     // get View
     auto viewEL = previousDecision->objectLink< ViewContainer >( "view" );
-    CHECK( viewEL.isValid() );
-    const SG::View* view_const = *viewEL;
-    SG::View* view = const_cast<SG::View*>(view_const); // CHECK THIS!
+    ATH_CHECK( viewEL.isValid() );
 
-    // get info of that view
-    auto muFastHandle = SG::makeHandle( m_muFastKey, context );    
-    CHECK( muFastHandle.setProxyDict( view ) );
+    //// get info of that view
+    auto muFastHandle = ViewHelper::makeHandle( *viewEL, m_muFastKey, context );
+    ATH_CHECK( muFastHandle.isValid() );
     ATH_MSG_DEBUG ( "Muinfo handle size: " << muFastHandle->size() << "..." );
 
-  
-    auto muonEL = ElementLink<xAOD::L2StandAloneMuonContainer>( view->name()+"_"+m_muFastKey.key(), 0 );
-    CHECK( muonEL.isValid() );
+    auto muonEL = ViewHelper::makeLink( *viewEL, muFastHandle, 0 );
+    ATH_CHECK( muonEL.isValid() );
     const xAOD::L2StandAloneMuon* muon = *muonEL;
 
-    // or instead:
-    //const xAOD::L2StandAloneMuon* muon = muFastHandle.cptr()->at(0);
-    //auto muonEL = ElementLink<xAOD::L2StandAloneMuonContainer>( muFastHandle.cptr(), 0 );
-    //    CHECK( muonEL.isValid() );
-
     // create new decision
     auto newd = newDecisionIn( decisions.get() );
 
@@ -115,7 +108,7 @@ StatusCode TrigMufastHypoAlg::execute_r( const EventContext& context ) const
     ATH_MSG_DEBUG("REGTEST: " << m_muFastKey.key() << " eta/phi = " << (*muonEL)->eta() << "/" << (*muonEL)->phi());
     ATH_MSG_DEBUG("REGTEST:  View = " << (*viewEL));
     ATH_MSG_DEBUG("REGTEST:  RoI  = eta/phi = " << (*roiEL)->eta() << "/" << (*roiEL)->phi());
-    ATH_MSG_DEBUG("Added view, roi, feature, previous decision to new decision "<<counter <<" for view "<<view->name()  );
+    ATH_MSG_DEBUG("Added view, roi, feature, previous decision to new decision "<<counter <<" for view "<<(*viewEL)->name()  );
     counter++;
   }
 
@@ -137,7 +130,7 @@ StatusCode TrigMufastHypoAlg::execute_r( const EventContext& context ) const
 
   {// make output handle and debug, in the base class
     auto outputHandle = SG::makeHandle(decisionOutput(), context);
-    CHECK( outputHandle.record( std::move( decisions ), std::move( aux ) ) );
+    ATH_CHECK( outputHandle.record( std::move( decisions ), std::move( aux ) ) );
     ATH_MSG_DEBUG ( "Exit with "<<outputHandle->size() <<" decisions");
     TrigCompositeUtils::DecisionIDContainer allPassingIDs;
     if ( outputHandle.isValid() ) {
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFMSonlyHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFMSonlyHypoAlg.cxx
index a0e4598d032c94ffdc08fd0bb7a93e1eb4dae015..7f1fa9153e09668abe42f35be868d4379ccff96a 100755
--- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFMSonlyHypoAlg.cxx
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFMSonlyHypoAlg.cxx
@@ -8,6 +8,7 @@
 #include "GaudiKernel/StatusCode.h"
 
 #include "TrigMuonHypo/TrigMuonEFMSonlyHypoAlg.h"
+#include "AthViews/ViewHelper.h"
 
 using namespace TrigCompositeUtils; 
 
@@ -16,7 +17,8 @@ using namespace TrigCompositeUtils;
 
 TrigMuonEFMSonlyHypoAlg::TrigMuonEFMSonlyHypoAlg( const std::string& name,
 						  ISvcLocator* pSvcLocator ) :
-  ::AthReentrantAlgorithm( name, pSvcLocator )
+//  ::AthReentrantAlgorithm( name, pSvcLocator )
+  ::HypoBase( name, pSvcLocator )
 {
 
 } 
@@ -32,18 +34,9 @@ StatusCode TrigMuonEFMSonlyHypoAlg::initialize()
   ATH_MSG_INFO ( "Initializing " << name() << "..." );
   ATH_CHECK(m_hypoTools.retrieve());
 
-  ATH_CHECK(m_viewsKey.initialize());
-
   renounce(m_muonKey);
   ATH_CHECK(m_muonKey.initialize());
 
-  renounce(m_roiKey);
-  ATH_CHECK(m_roiKey.initialize());
-
-  ATH_CHECK(m_decisionsKey.initialize());
-
-  ATH_CHECK(m_previousDecisionsKey.initialize());
- 
   ATH_MSG_INFO( "Initialization completed successfully" );
   return StatusCode::SUCCESS;
 }
@@ -63,82 +56,70 @@ StatusCode TrigMuonEFMSonlyHypoAlg::finalize()
 
 StatusCode TrigMuonEFMSonlyHypoAlg::execute_r( const EventContext& context ) const
 {
-
   ATH_MSG_DEBUG("StatusCode TrigMuonEFMSonlyHypoAlg::execute_r start");
 
-  auto viewsHandle = SG::makeHandle( m_viewsKey, context );
-  std::map<const TrigRoiDescriptor*, const TrigCompositeUtils::Decision* > roiToDecision;
-  auto previousDecisionsHandle = SG::makeHandle( m_previousDecisionsKey, context );
-  for ( auto previousDecision: *previousDecisionsHandle ) { 
-    auto roiEL = previousDecision->objectLink<TrigRoiDescriptorCollection>( "initialRoI" );
-    if (!roiEL.isValid()) {
-      ATH_MSG_ERROR("ReadHandle for ViewContainer key:" << m_viewsKey.key() << " is failed");
-      return StatusCode::FAILURE;
-    }
-    const TrigRoiDescriptor* roi = *roiEL;
-    roiToDecision.insert( std::make_pair( roi, previousDecision ) );
+  // common for all hypos, to move in the base class
+  auto previousDecisionsHandle = SG::makeHandle( decisionInput(), context );
+  if ( not previousDecisionsHandle.isValid() ) { // implict
+     ATH_MSG_DEBUG( "No implicit RH for previous decisions "<<  decisionInput().key()<<": is this expected?" );
+     return StatusCode::SUCCESS;
   }
-  ATH_MSG_DEBUG("REGTEST: RoI to decisions map size: " << roiToDecision.size() );
+  ATH_MSG_DEBUG( "Running with "<< previousDecisionsHandle->size() <<" implicit ReadHandles for previous decisions");
 
   auto decisions = std::make_unique<DecisionContainer>();
   auto aux = std::make_unique<DecisionAuxContainer>();
   decisions->setStore(aux.get());
-  size_t counter = 0;	// view counter
+  // end of common
+  
   std::vector<TrigMuonEFMSonlyHypoTool::MuonEFInfo> toolInput;
-  for (auto view: *viewsHandle) {
-    auto d = newDecisionIn( decisions.get() );
-    // retrieve Muons
-    auto muonHandle = SG::makeHandle( m_muonKey, context );
-    if (muonHandle.setProxyDict(view).isFailure()) {
-      ATH_MSG_ERROR("ReadHandle for xAOD::MuonContainer key:" << m_muonKey.key() << " is failed");
-      return StatusCode::FAILURE;
-    } 
-    const xAOD::MuonContainer* muons = muonHandle.cptr();
-    // retrieve RoIs
-    auto roiHandle = SG::makeHandle( m_roiKey, context );
-    if (roiHandle.setProxyDict(view).isFailure()) {
-      ATH_MSG_ERROR("ReadHandle for TrigRoiDescriptor key:" << m_roiKey.key() << " is failed");
-      return StatusCode::FAILURE;
-    } 
-    const TrigRoiDescriptor* roi = roiHandle.cptr()->at(0);
-    // push_back to toolInput
-    toolInput.emplace_back( d, roi, muons, roiToDecision[roi] );
-
-    // retrieve ViewRoIs
-    auto viewlink = ElementLink< ViewContainer >( m_viewsKey.key(), counter );
-    if(!viewlink.isValid()) {
-      ATH_MSG_ERROR("ReadHandle for ViewContainer key:" << m_viewsKey.key() << " isn't Valid");
-      return StatusCode::FAILURE;
-    } else {
-      d->setObjectLink( "view", viewlink );
-      ATH_MSG_DEBUG("REGTEST: " << m_viewsKey.key() << " = " << (*viewlink));
-    }
-    
-    // retrieve RoI descriptor
-    auto roilink = ElementLink<TrigRoiDescriptorCollection>( view->name()+"_"+m_roiKey.key(), 0 ); 
-    if(!roilink.isValid()) {
-      ATH_MSG_ERROR("ReadHandle for TrigRoiDescriptorCollection key:" << m_roiKey.key() << " isn't Valid");
-      return StatusCode::FAILURE;
-    } else {
-      d->setObjectLink( "roi", roilink );
-      ATH_MSG_DEBUG("REGTEST: " << m_roiKey.key() << " eta/phi = " << (*roilink)->eta() << "/" << (*roilink)->phi());
-    }
-    
-    // retrieve xAOD::Muon Decision 
-    if(muons->size()>0){
-      auto muonlink = ElementLink<xAOD::MuonContainer>( view->name()+"_"+m_muonKey.key(), 0 ); 
-      if(!muonlink.isValid()) {
-	ATH_MSG_ERROR("ReadHandle for xAOD::MuonContainer key:" << m_muonKey.key() << " isn't Valid");
-	return StatusCode::FAILURE;
-      } else {
-	d->setObjectLink( "feature", muonlink );
-	ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " pT = " << (*muonlink)->pt() << " GeV");
-	ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " eta/phi = " << (*muonlink)->eta() << "/" << (*muonlink)->phi());
-      }
-    }
-    
+  size_t counter = 0;  // view counter
+
+  // loop over previous decisions
+  for ( auto previousDecision: *previousDecisionsHandle ) {
+     // get RoIs
+    auto roiEL = previousDecision->objectLink<TrigRoiDescriptorCollection>( "initialRoI" );
+    ATH_CHECK( roiEL.isValid() );
+    const TrigRoiDescriptor* roi = *roiEL;
+
+    // get View
+    auto viewEL = previousDecision->objectLink<ViewContainer>( "view" );
+    ATH_CHECK( viewEL.isValid() );
+
+    // get muons
+    auto muonHandle = ViewHelper::makeHandle( *viewEL, m_muonKey, context );
+    ATH_CHECK( muonHandle.isValid() );
+    ATH_MSG_DEBUG( "Muinfo handle size: " << muonHandle->size() << " ..." );
+
+    // It is posisble that no muons are found, in this case we go to the next decision
+    if(muonHandle->size()==0) continue;
+
+    // this code only gets muon 0. The EF algorithms can potentially make more than 1 muon, so may need to revisit this
+    auto muonEL = ViewHelper::makeLink( *viewEL, muonHandle, 0 );
+    ATH_CHECK( muonEL.isValid() );
+
+    const xAOD::Muon* muon = *muonEL;
+
+    // create new dicions
+    auto newd = newDecisionIn( decisions.get() );
+
+    // pussh_back to toolInput
+    toolInput.emplace_back( newd, roi, muon, previousDecision );
+
+    newd -> setObjectLink( "feature", muonEL );
+    newd -> setObjectLink( "roi",     roiEL  );
+    newd -> setObjectLink( "view",    viewEL );
+    TrigCompositeUtils::linkToPrevious( newd, decisionInput().key(), counter );
+
+    ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " pT = " << (*muonEL)->pt() << " GeV");
+    ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " eta/phi = " << (*muonEL)->eta() << "/" << (*muonEL)->phi());
+    ATH_MSG_DEBUG("REGTEST:  View = " << (*viewEL));
+    ATH_MSG_DEBUG("REGTEST:  RoI  = eta/phi = " << (*roiEL)->eta() << "/" << (*roiEL)->phi());
+    ATH_MSG_DEBUG("Added view, roi, feature, previous decision to new decision "<<counter <<" for view "<<(*viewEL)->name()  );
+
     counter++;
-  } // End of view loops */
+  }
+
+  ATH_MSG_DEBUG("Found "<<toolInput.size()<<" inputs to tools");
 
   // to TrigMuonEFMSonlyHypoTool
   StatusCode sc = StatusCode::SUCCESS;
@@ -151,8 +132,21 @@ StatusCode TrigMuonEFMSonlyHypoAlg::execute_r( const EventContext& context ) con
     }
   } // End of tool algorithms */	
 
-  auto handle =  SG::makeHandle(m_decisionsKey, context);     
-  ATH_CHECK( handle.record( std::move(decisions), std::move(aux) ) );
+  { // make output handle and debug, in the base class
+    auto outputHandle = SG::makeHandle( decisionOutput(), context );
+    ATH_CHECK( outputHandle.record( std::move(decisions), std::move(aux) ));
+    ATH_MSG_DEBUG ( "Exit with " << outputHandle->size() << " decisions");
+    TrigCompositeUtils::DecisionIDContainer allPassingIDs;
+    if ( outputHandle.isValid() ) {
+      for ( auto decisionObject: *outputHandle )  {
+	TrigCompositeUtils::decisionIDs( decisionObject, allPassingIDs );
+      }
+      for ( TrigCompositeUtils::DecisionID id : allPassingIDs ) {
+	ATH_MSG_DEBUG( " +++ " << HLT::Identifier( id ) );
+      }
+      
+    } else ATH_MSG_WARNING( "Output decisions are NOT valid with key : " << decisionOutput().key() );
+  }
 
   ATH_MSG_DEBUG("StatusCode TrigMuonEFMSonlyHypoAlg::execute_r success");
   return StatusCode::SUCCESS;
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFMSonlyHypoTool.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFMSonlyHypoTool.cxx
index 2eeba24ef907ba1c9b7b6f0ca9394068099e9e73..0cf4325495116fcd1b25d5ef0bad7ac738f7bf3a 100644
--- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFMSonlyHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFMSonlyHypoTool.cxx
@@ -84,46 +84,44 @@ StatusCode TrigMuonEFMSonlyHypoTool::decide(TrigMuonEFMSonlyHypoTool::MuonEFInfo
 
   //  decision making
   //Get xAOD::MuonContainer from hypotool
-  const xAOD::MuonContainer *muonContainer = input.muons;
-  if(!muonContainer){
+  const xAOD::Muon* muon = input.muon;
+  if( !muon ){
     ATH_MSG_DEBUG("Retrieval of xAOD::MuonContainer failed");
     return StatusCode::FAILURE;
   }
 
-  for(auto muon : *muonContainer){
-    if (muon->primaryTrackParticle()) { // was there a muon in this RoI ?
 
-      const xAOD::TrackParticle* tr = muon->trackParticle(xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle);
+  if (muon->primaryTrackParticle()) { // was there a muon in this RoI ?
 
-      if (!tr) {
-	ATH_MSG_DEBUG("No ExtrapolatedMuonSpectrometerTrackParticle found.");
-	continue;
-      } else {
-	ATH_MSG_DEBUG("Retrieved ExtrapolatedMuonSpectrometerTrack track with abs pt "<< (*tr).pt()/CLHEP::GeV << " GeV ");
-
-	//fill monitored variables
-	fexPt.push_back(tr->pt()/CLHEP::GeV);
-	fexEta.push_back(tr->eta());
-	fexPhi.push_back(tr->phi());
-
-	//Apply hypo cuts
-	float absEta = fabs(tr->eta());
-	float threshold = 0;
-	for (std::vector<float>::size_type k=0; k<m_bins; ++k) {
-	  if (absEta > m_ptBins[k] && absEta <= m_ptBins[k+1]) threshold = m_ptThresholds[k];
-	}
-	if (fabs(tr->pt())/CLHEP::GeV > (threshold/CLHEP::GeV)){
-	  selPt.push_back(tr->pt()/CLHEP::GeV);
-	  selEta.push_back(tr->eta());
-	  selPhi.push_back(tr->phi());
-
-	  result = true;
-	}
-	ATH_MSG_DEBUG(" REGTEST muon pt is " << tr->pt()/CLHEP::GeV << " GeV "
-		      << " with Charge " << tr->charge()
-		      << " and threshold cut is " << threshold/CLHEP::GeV << " GeV"
-		      << " so hypothesis is " << (result?"true":"false"));
+    const xAOD::TrackParticle* tr = muon->trackParticle(xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle);
+
+    if (!tr) {
+      ATH_MSG_DEBUG("No ExtrapolatedMuonSpectrometerTrackParticle found.");
+    } else {
+      ATH_MSG_DEBUG("Retrieved ExtrapolatedMuonSpectrometerTrack track with abs pt "<< (*tr).pt()/CLHEP::GeV << " GeV ");
+
+      //fill monitored variables
+      fexPt.push_back(tr->pt()/CLHEP::GeV);
+      fexEta.push_back(tr->eta());
+      fexPhi.push_back(tr->phi());
+
+      //Apply hypo cuts
+      float absEta = fabs(tr->eta());
+      float threshold = 0;
+      for (std::vector<float>::size_type k=0; k<m_bins; ++k) {
+        if (absEta > m_ptBins[k] && absEta <= m_ptBins[k+1]) threshold = m_ptThresholds[k];
+      }
+      if (fabs(tr->pt())/CLHEP::GeV > (threshold/CLHEP::GeV)){
+        selPt.push_back(tr->pt()/CLHEP::GeV);
+        selEta.push_back(tr->eta());
+        selPhi.push_back(tr->phi());
+
+        result = true;
       }
+      ATH_MSG_DEBUG(" REGTEST muon pt is " << tr->pt()/CLHEP::GeV << " GeV "
+      	      << " with Charge " << tr->charge()
+      	      << " and threshold cut is " << threshold/CLHEP::GeV << " GeV"
+      	      << " so hypothesis is " << (result?"true":"false"));
     }
   }
   return StatusCode(result);				
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoAlg.cxx
index 4f53a7f536fa2eaf8023c14c8eea5a5651895190..54d9f58d7a321fb7fe6ade1bcea67f9ec7613523 100644
--- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoAlg.cxx
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoAlg.cxx
@@ -12,6 +12,7 @@
 #include "xAODTrigMuon/L2StandAloneMuonContainer.h" 
 
 #include "TrigMuonHypo/TrigmuCombHypoAlg.h"
+#include "AthViews/ViewHelper.h"
 
 using namespace TrigCompositeUtils; 
 
@@ -86,17 +87,13 @@ StatusCode TrigmuCombHypoAlg::execute_r(const EventContext& context) const
     ATH_CHECK( previousDecision->hasObjectLink("view") );
     auto viewEL = previousDecision->objectLink<ViewContainer>("view");
     ATH_CHECK( viewEL.isValid() );
-    const SG::View* view_const = *viewEL;
-    SG::View* view = const_cast<SG::View*>(view_const); // CHECK THIS!
-    ATH_MSG_INFO("DEBUG: view name = " << view->name() );
 
     // get info
-    auto muCombHandle = SG::makeHandle( m_muCombKey, context ); 
-    ATH_CHECK( muCombHandle.setProxyDict(view) );
+    auto muCombHandle = ViewHelper::makeHandle( *viewEL, m_muCombKey, context );
     ATH_CHECK( muCombHandle.isValid() );
     ATH_MSG_DEBUG( "Muinfo handle size: " << muCombHandle->size() << "...");
 
-    auto muCombEL = ElementLink<xAOD::L2CombinedMuonContainer> ( view->name()+"_"+m_muCombKey.key(), 0 );
+    auto muCombEL = ViewHelper::makeLink( *viewEL, muCombHandle, 0 );
     ATH_CHECK( muCombEL.isValid() );
     const xAOD::L2CombinedMuon* muComb = *muCombEL;
     
@@ -113,10 +110,9 @@ StatusCode TrigmuCombHypoAlg::execute_r(const EventContext& context) const
     auto muFastInfo = (*muCombEL)->muSATrack(); 
     ATH_MSG_DEBUG("REGTEST: muSATrack pt in " << m_muCombKey.key() << " = " << muFastInfo->pt() << " GeV");
     ATH_MSG_DEBUG("REGTEST: muSATrack eta/phi in " << m_muCombKey.key() << " = " << muFastInfo->eta() << "/" << muFastInfo->phi());
-    
     ATH_MSG_DEBUG("REGTEST: muCBTrack pt in " << m_muCombKey.key() << " = " << (*muCombEL)->pt() << " GeV");
     ATH_MSG_DEBUG("REGTEST: muCBTrack eta/phi in " << m_muCombKey.key() << " = " << (*muCombEL)->eta() << "/" << (*muCombEL)->phi());
-    ATH_MSG_DEBUG("Added view, features, previous decision to new decision "<<counter <<" for view "<<view->name()  );
+    ATH_MSG_DEBUG("Added view, features, previous decision to new decision "<<counter <<" for view "<<(*viewEL)->name()  );
 
     counter++;
   }
diff --git a/Trigger/TrigMonitoring/TrigCostMonitor/src/TrigCostRun.cxx b/Trigger/TrigMonitoring/TrigCostMonitor/src/TrigCostRun.cxx
index 25f63d351a180c2d659cf1eba1c907f9b59eefb9..4bafda3d0e095237bfc5c1fd3f712445cd70ffb2 100644
--- a/Trigger/TrigMonitoring/TrigCostMonitor/src/TrigCostRun.cxx
+++ b/Trigger/TrigMonitoring/TrigCostMonitor/src/TrigCostRun.cxx
@@ -459,7 +459,12 @@ bool TrigCostRun::ReadHLTResult::ReadResult(ServiceHandle<StoreGateSvc> &storeGa
   // Append application ID with level string
   //
   appName = "APP_"+hltLevel+":"+appName;
-  if(outputLevel <= MSG::DEBUG) log() << MSG::DEBUG << "Extracted App Name: " << appName << endmsg;
+  size_t locationOfRack = appName.find("rack-");
+  std::string category = "APP_ID";
+  if (locationOfRack != std::string::npos) {
+    category = appName.substr(locationOfRack, 7); // Select e.g. "rack-10"
+  }
+  if(outputLevel <= MSG::DEBUG) log() << MSG::DEBUG << "Extracted App Name: " << appName << " category(rack):" << category << endmsg;
 
   //
   // Save a map between application name and application id (hashed name) in global config
@@ -472,7 +477,9 @@ bool TrigCostRun::ReadHLTResult::ReadResult(ServiceHandle<StoreGateSvc> &storeGa
   //
   // Get hash id for HLT result
   //
-  appId = TrigConf::HLTUtils::string2hash(appName, "APP_ID");
+  appId = TrigConf::HLTUtils::string2hash(appName, category);
+  // Giving a different category per rack helps spread out the hashes over more categories which reduced the
+  // probability of a hash collision terminating the job (the collision still occurs, however).
   
   return true;
 }
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoring/TrigMuonMonitoring/HLTMuonMonTool.h b/Trigger/TrigMonitoring/TrigMuonMonitoring/TrigMuonMonitoring/HLTMuonMonTool.h
index f198da2ded47a878bfe6e21fe2e769d7d42b9531..f9796a8f4544c278afdf2c26375fbf3689a1030f 100755
--- a/Trigger/TrigMonitoring/TrigMuonMonitoring/TrigMuonMonitoring/HLTMuonMonTool.h
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoring/TrigMuonMonitoring/HLTMuonMonTool.h
@@ -219,6 +219,7 @@ class HLTMuonMonTool : public IHLTMonTool
   bool m_passedES[ESHIINDEP + 1]; // std, tag, id
   bool m_CB_mon_ESbr[ESHIINDEP + 1];
   bool m_MS_mon_ESbr[ESHIINDEP + 1];
+  bool m_passedESNONISO;
 
   //AI 20100824
   std::vector<std::string> m_allESchain;
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/CommonMon.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/CommonMon.cxx
index fba0b4e3afbd9012bef994144f3821c660049376..94dd6f133a2ba2c6e6bbf807f7224a8725969cd4 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/CommonMon.cxx
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/CommonMon.cxx
@@ -1420,6 +1420,11 @@ StatusCode HLTMuonMonTool::bookChainDQA_generic(const std::string& cName, bool i
       // vs_ESstd.push_back("HLT_mu18i4_tight"); // for test
       // vs_ESstd.push_back("HLT_mu22_medium"); // for test
 
+      std::vector<std::string> vs_ESnoniso;
+      vs_ESnoniso.push_back("HLT_mu14");  // for EnhancedBias
+      vs_ESnoniso.push_back("HLT_mu26");
+      vs_ESnoniso.push_back("HLT_mu24");      
+      
       std::vector<std::string> vs_EStag;
       //vs_EStag.push_back("HLT_mu24_muCombTag_NoEF_tight"); // pp v4
       vs_EStag.push_back("HLT_mu20_idperf"); // pp v5
@@ -1477,6 +1482,12 @@ StatusCode HLTMuonMonTool::bookChainDQA_generic(const std::string& cName, bool i
 	    ATH_MSG_DEBUG("----- CommonDQA: ESstd " << *itrES << " and EF " << *itrES << " passed");
 	  }
 	}
+	for (itrES = vs_ESnoniso.begin(); itrES != vs_ESnoniso.end(); itrES++) {
+	  if (getTDT()->isPassed(*itrES)) {
+	    m_passedESNONISO = true;
+	    ATH_MSG_DEBUG("----- CommonDQA: ESnoniso " << *itrES << " and EF " << *itrES << " passed");
+	  }
+	}
 	for (itrES = vs_EStag.begin(); itrES != vs_EStag.end(); itrES++) {
 	  //if (isPassedES(m_esvect, *itrES)) { // YY modified: no request on lower chain //attention
 	  if (getTDT()->isPassed(*itrES)) { // YY modified: no request on lower chain
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuIsoMon.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuIsoMon.cxx
index bd89398647873ffc66a0215839183b587691ba37..08552c1bed18054e61744a412f0688fb341ce7cf 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuIsoMon.cxx
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuIsoMon.cxx
@@ -95,11 +95,10 @@ StatusCode HLTMuonMonTool::bookMuIsoDQA()
 StatusCode HLTMuonMonTool::fillMuIsoDQA()
 {
 
-  //first of all select only mu15 events
-  //YY if (!isPassedES(m_esvect, "mu15")) return StatusCode::SUCCESS;
-  if (!m_passedES[ESSTD]) { 
+  // Measure muIso in the events with non iso muon triggers
+  if (!m_passedESNONISO) { 
     return StatusCode::SUCCESS;
-  } // YY modified
+  }
 	
   hist("Common_Counter", m_histdir)->Fill((float)MUISO);
 
diff --git a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/HypoBase.h b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/HypoBase.h
index 13d3a544fb6bab788239e2a7d5ed359f73951376..3a83457515bd4c33ccc6c8fd0b8613c7582219d6 100644
--- a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/HypoBase.h
+++ b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/HypoBase.h
@@ -35,9 +35,9 @@ This is a base class for HLT Hypos to reduce boilerplate and enforce the common
  private:
   
   /// input decisions, will be implicit (renounced).
-  SG::ReadHandleKey<TrigCompositeUtils::DecisionContainer> m_input { this, "HypoInputDecisions", "HypoInputDecision", "Input Decision (implicit)" };
+  SG::ReadHandleKey<TrigCompositeUtils::DecisionContainer> m_input { this, "HypoInputDecisions", "UNSPECIFIED_INPUT", "Input Decision (implicit)" };
   /// output decisions
-  SG::WriteHandleKey<TrigCompositeUtils::DecisionContainer> m_output { this, "HypoOutputDecisions", "HypoOutputDecision", "Ouput Decision" };
+  SG::WriteHandleKey<TrigCompositeUtils::DecisionContainer> m_output { this, "HypoOutputDecisions", "UNSPECIFIED_OUTPUT", "Ouput Decision" };
     
   // for future implementation: ToolHandleArray<ITestHypoTool> m_tools { this, "HypoTools", {}, "Hypo tools" };
 };
diff --git a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx
index a90382447a19a59457d97c1ac3af24ab9827b041..85740d83b601b04fc49948473d49d04cc59701d6 100644
--- a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx
+++ b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx
@@ -41,7 +41,7 @@ StatusCode ComboHypo::initialize() {
 
   ATH_MSG_INFO( "with this multiplicity map: ");
   for ( auto m: m_multiplicitiesReqMap ) {
-    ATH_MSG_INFO("-- "<< m.first<<" multiplicities: ");
+    ATH_MSG_INFO("-- "<< m.first<<" multiplicities of size "<<m.second.size());
     for (auto mult: m.second){
       ATH_MSG_INFO("-- "<< mult<<", ");
     }
@@ -140,10 +140,10 @@ void ComboHypo::fillDecisionsMap( std::vector< MultiplicityMap >&  dmap, const E
   for ( size_t i = 0; i < m_inputs.size(); ++i ) {   
     auto inputHandle = SG::makeHandle( m_inputs.at(i), context );
     if ( inputHandle.isValid() ) {
-      ATH_MSG_DEBUG( "Found implicit RH from " << inputHandle.key() <<" with these decisions:"  );
+      ATH_MSG_DEBUG( "Found implicit RH from " << inputHandle.key() <<" with "<< inputHandle->size() << " elements:"  );
       MultiplicityMap thisInputDmap;
       for ( const Decision* decision : *inputHandle.cptr() ) {
-	ATH_MSG_DEBUG( decisionIDs( decision ).size() << " chains passed:" );
+	ATH_MSG_DEBUG( "Decision with "<< decisionIDs( decision ).size() << " chains passed:" );
 	for ( DecisionID id: decisionIDs( decision ) ) {
 	  ATH_MSG_DEBUG( " +++ " << HLT::Identifier( id ) );
 	  thisInputDmap[id] ++;
@@ -159,10 +159,10 @@ void ComboHypo::fillDecisionsMap( std::vector< MultiplicityMap >&  dmap, const E
 
 
   //debug
-  ATH_MSG_DEBUG( "Decision map found :" );
+  ATH_MSG_DEBUG( "Decision map filled :" );
   int i=0;
   for (auto onemap: dmap){
-    ATH_MSG_DEBUG("map "<<i<<": ");
+    ATH_MSG_DEBUG("map ["<<i<<"]: ");
     for (auto m: onemap){
       ATH_MSG_DEBUG(" +++ " << HLT::Identifier( m.first ) <<" mult: "<<m.second);
     }
diff --git a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingEmulationTool.cxx b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingEmulationTool.cxx
index b16a47d718e57743b6dbbe517f2dce9ee4bf3c34..e6bad52cc6b35f57965348449e8959d9805adc1d 100644
--- a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingEmulationTool.cxx
+++ b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingEmulationTool.cxx
@@ -54,13 +54,6 @@ StatusCode CTPUnpackingEmulationTool::parseInputFile() {
 StatusCode CTPUnpackingEmulationTool::initialize() {
 
   CHECK( CTPUnpackingToolBase::initialize() );
-  CHECK( decodeCTPToChainMapping() ); 
-
-  for( auto ctpid : m_ctpToChain ){
-    for ( auto chain : ctpid.second ){
-      ATH_MSG_DEBUG( ctpid.first << " " << chain );
-    }
-  }
   return parseInputFile();
 }
 
diff --git a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.cxx
index 5075ff3c7400237ea49e4f810773736bd279f6cc..47401d5afd94e2659e0b5fea96a7f1f8fb01927d 100644
--- a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.cxx
+++ b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.cxx
@@ -4,6 +4,8 @@
 #include "DecisionHandling/HLTIdentifier.h"
 #include "TrigT1Result/RoIBResult.h"
 #include "AthenaMonitoring/MonitoredScope.h"
+#include "TrigConfL1Data/CTPConfig.h"
+#include "TrigConfL1Data/TriggerItem.h"
 #include "CTPUnpackingTool.h"
 
 using namespace HLT;
@@ -12,24 +14,56 @@ using namespace HLT;
 CTPUnpackingTool::CTPUnpackingTool( const std::string& type,
                                     const std::string& name, 
                                     const IInterface* parent ) 
-  : CTPUnpackingToolBase(type, name, parent) 
-{
+  : CTPUnpackingToolBase(type, name, parent),
+    m_configSvc( "TrigConf::LVL1ConfigSvc/LVL1ConfigSvc", name ) {
 }
 
 
 StatusCode CTPUnpackingTool::initialize() 
 {   
+  CHECK( m_configSvc.retrieve() );
+
   CHECK( CTPUnpackingToolBase::initialize() );
-  CHECK( decodeCTPToChainMapping() ); 
-  if ( m_ctpToChain.empty() ) {
-    ATH_MSG_WARNING( "Empty CTP to chains mapping: " << m_ctpToChainProperty );
-  } 
-  for ( auto m: m_ctpToChain ) {
-    ATH_MSG_INFO( "Mapping of CTP bit: " << m.first << " to chains " << m.second );
-  }
+  
+  ServiceHandle<IIncidentSvc> incidentSvc("IncidentSvc", "CTPSimulation");
+  CHECK(incidentSvc.retrieve());
+  incidentSvc->addListener(this,"BeginRun", 200);
+  incidentSvc.release().ignore();
   return StatusCode::SUCCESS;
 }
 
+void CTPUnpackingTool::handle(const Incident& incident) {
+  
+  if (incident.type()!="BeginRun") return;
+  ATH_MSG_DEBUG( "In CTPUnpackingTool BeginRun incident");
+  
+  if( decodeCTPToChainMapping().isFailure() ) {
+    ATH_MSG_ERROR( "ERROR in CTPUnpackingTool configuration");
+  }
+}
+
+
+StatusCode CTPUnpackingTool::decodeCTPToChainMapping() {
+  // iterate over all items and obtain the CPT ID for each item. Then, package that in the map: name -> CTP ID
+  std::map<std::string, size_t> toCTPID;
+  for ( const TrigConf::TriggerItem* item:   m_configSvc->ctpConfig()->menu().itemVector() ) {
+    toCTPID[item->name()] = item->ctpId();
+
+  }
+  
+  for ( auto seedingHLTtoL1: m_ctpToChainProperty ) {
+    CHECK( toCTPID.find( seedingHLTtoL1.second ) != toCTPID.end() ); 
+    size_t l1ItemID = toCTPID [ seedingHLTtoL1.second ];
+    m_ctpToChain[ l1ItemID ].push_back( HLT::Identifier( seedingHLTtoL1.first ) ); 
+  }
+  for ( auto ctpIDtoChain: m_ctpToChain ) {
+    for ( auto chain: ctpIDtoChain.second ) {
+      ATH_MSG_DEBUG( "CTP seed of " << ctpIDtoChain.first << " enables chains " << chain );
+    }
+  }
+    
+  return StatusCode::SUCCESS;
+}
 
 StatusCode CTPUnpackingTool::decode( const ROIB::RoIBResult& roib,  HLT::IDVec& enabledChains ) const {
   using namespace Monitored;
@@ -47,7 +81,8 @@ StatusCode CTPUnpackingTool::decode( const ROIB::RoIBResult& roib,  HLT::IDVec&
       if ( decision == true or m_forceEnable ) {
 	if ( decision ) {
 	  nTAVItems = nTAVItems + 1;	  
-	  ATH_MSG_DEBUG( "L1 item " << ctpIndex << " active, enabling chains");
+	  ATH_MSG_DEBUG( "L1 item " << ctpIndex << " active, enabling chains " 
+			 << (m_forceEnable ? " due to the forceEnable flag" : " due to the seed"));
 	}
 
 	auto itr = m_ctpToChain.find( ctpIndex );
diff --git a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.h b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.h
index d65cc2f1794f5d392f29b5aabf2d7acb1a871118..46373033e1becdd39caaa67ccfc809af1772b6d7 100644
--- a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.h
+++ b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.h
@@ -8,9 +8,10 @@
 #include "CTPUnpackingToolBase.h"
 
 #include "DecisionHandling/HLTIdentifier.h"
+#include "TrigConfInterfaces/ILVL1ConfigSvc.h"
+#include "GaudiKernel/IIncidentListener.h"
 
-
-class CTPUnpackingTool : public CTPUnpackingToolBase {
+class CTPUnpackingTool : public CTPUnpackingToolBase, public IIncidentListener {
 public:
   
   CTPUnpackingTool( const std::string& type,
@@ -20,9 +21,11 @@ public:
   virtual StatusCode decode(const ROIB::RoIBResult& roib, HLT::IDVec& enabledChains) const override;
 
   virtual StatusCode initialize() override;
+  virtual void handle(const Incident& incident) override;
 
 private:
-
+  StatusCode decodeCTPToChainMapping();
+  ServiceHandle<TrigConf::ILVL1ConfigSvc> m_configSvc;
 }; 
 
 
diff --git a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingToolBase.cxx b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingToolBase.cxx
index 925cb7dd5f6c1bdfb9339b54097a658328ac7001..66e050e9d2f28f2f8387591da299471899952d1f 100644
--- a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingToolBase.cxx
+++ b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingToolBase.cxx
@@ -23,28 +23,28 @@ StatusCode CTPUnpackingToolBase::initialize()
   return StatusCode::SUCCESS;
 }
 
-StatusCode CTPUnpackingToolBase::decodeCTPToChainMapping() {
-  std::istringstream input;
-  for ( auto entry: m_ctpToChainProperty ) {
-    input.clear();
-    input.str(entry);
-    size_t ctpId;
-    input >> ctpId;
-    char delim;
-    input >> delim;    
-    if ( delim != ':' ) {
-      //      log << MSG::ERROR
-      //	error() << "Error in conf. entry: " << entry << " missing ':'"<<endreq;
-      //      ATH_MSG_ERROR( "Error in conf. entry: " << entry << " missing ':'" );
-      return StatusCode::FAILURE;
-    }
-    std::string chainName;
-    input >> chainName;
-    //log << MSG::DEBUG <<"Chain " << chainName << " seeded from CTP item of ID " << ctpId
-    //    ATH_MSG_DEBUG( "Chain " << chainName << " seeded from CTP item of ID " << ctpId );
-    m_ctpToChain[ctpId].push_back( HLT::Identifier(chainName) );
-  }
-  return StatusCode::SUCCESS;
-}
+// StatusCode CTPUnpackingToolBase::decodeCTPToChainMapping() {
+//   // std::istringstream input;
+//   // for ( auto entry: m_ctpToChainProperty ) {
+//   //   input.clear();
+//   //   input.str(entry);
+//   //   size_t ctpId;
+//   //   input >> ctpId;
+//   //   char delim;
+//   //   input >> delim;    
+//   //   if ( delim != ':' ) {
+//   //     //      log << MSG::ERROR
+//   //     //	error() << "Error in conf. entry: " << entry << " missing ':'"<<endreq;
+//   //     //      ATH_MSG_ERROR( "Error in conf. entry: " << entry << " missing ':'" );
+//   //     return StatusCode::FAILURE;
+//   //   }
+//   //   std::string chainName;
+//   //   input >> chainName;
+//   //   //log << MSG::DEBUG <<"Chain " << chainName << " seeded from CTP item of ID " << ctpId
+//   //   //    ATH_MSG_DEBUG( "Chain " << chainName << " seeded from CTP item of ID " << ctpId );
+//   //   m_ctpToChain[ctpId].push_back( HLT::Identifier(chainName) );
+//   // }
+//   return StatusCode::SUCCESS;
+// }
 
 
diff --git a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingToolBase.h b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingToolBase.h
index 49828ce09af9c1780cb90168f957893a53c4b92c..af3bf3a98c52390e2de8afdfb20b252a689932d7 100644
--- a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingToolBase.h
+++ b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingToolBase.h
@@ -36,14 +36,14 @@ public:
    
 protected:
 
-  StatusCode decodeCTPToChainMapping();
+
   typedef std::map<size_t, HLT::IDVec> IndexToIdentifiers;
   IndexToIdentifiers       m_ctpToChain;
 
   ///@{ @name Properties
-  Gaudi::Property<std::vector<std::string>> m_ctpToChainProperty{
-    this, "CTPToChainMapping", {}, "Mapping of the form: '34:HLT_x', '35:HLT_y', ..., both "
-                                   "CTP ID and chain may appear many times"};
+  Gaudi::Property<std::map<std::string, std::string>> m_ctpToChainProperty{
+    this, "CTPToChainMapping", {}, "Mapping of the form: 'L1_X:HLT_x', 'L1_Y:HLT_y', ..., both "
+                                   "CTP item name and chain may appear many times"};
 
   Gaudi::Property<bool> m_forceEnable{
     this, "ForceEnableAllChains", false, "Enables all chains in each event, testing mode"};
diff --git a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx
index 3e13851ec2922087e10176d524a539025061639a..846925b564ddd3ca275067b13c24524aeba1852f 100644
--- a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx
+++ b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx
@@ -110,6 +110,7 @@ StatusCode EventViewCreatorAlgorithm::execute_r( const EventContext& context ) c
       if (itViewMap != viewMap.end()){
 	int iview=itViewMap->second;
 	newd->setObjectLink( "view", ElementLink< ViewContainer >(m_viewsKey.key(), iview ));//adding view to TC
+	ATH_MSG_DEBUG( "Adding already mapped view " << iview << " in ViewVector , to new decision");
 	//	need to check if this View has parent views? can we have more than one parent views?
       }
       else{
@@ -137,6 +138,7 @@ StatusCode EventViewCreatorAlgorithm::execute_r( const EventContext& context ) c
 	// link decision to this view
 	newd->setObjectLink( "view", ElementLink< ViewContainer >(m_viewsKey.key(), viewVector->size()-1 ));//adding view to TC
       	viewMap[roiDescriptor]=viewVector->size()-1;
+	ATH_MSG_DEBUG( "Adding new view to new decision; storing view in viewVector component "<<viewVector->size()-1);
       
 	// see if there is a view linked to the decision object, if so link it to the view that is just made
 	if ( Idecision->hasObjectLink( "view" ) ) {
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/MuonInputProvider.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/MuonInputProvider.cxx
index 38a60f1cb0089770d5fac6a62de06bf991023577..73c924817a5986ef45a4df48031e6cd8839f6c5f 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/MuonInputProvider.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/MuonInputProvider.cxx
@@ -34,7 +34,7 @@ using namespace LVL1;
 MuonInputProvider::MuonInputProvider( const std::string& type, const std::string& name, 
                                       const IInterface* parent) :
    base_class(type, name, parent),
-   m_roibLocation(""),
+   m_roibLocation(ROIB::DEFAULT_RoIBRDOLocation),
    m_histSvc("THistSvc", name),
    m_configSvc( "TrigConf::TrigConfigSvc/TrigConfigSvc", name ),
    m_recRPCRoiSvc( LVL1::ID_RecRpcRoiSvc, name ),
diff --git a/Trigger/TrigT1/TrigT1CaloSim/TrigT1CaloSim/OverlayTTL1.h b/Trigger/TrigT1/TrigT1CaloSim/TrigT1CaloSim/OverlayTTL1.h
new file mode 100644
index 0000000000000000000000000000000000000000..73918d8eb673c6b4e8607269c19d03f859e210b8
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloSim/TrigT1CaloSim/OverlayTTL1.h
@@ -0,0 +1,95 @@
+// -*- C++ -*-
+
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ================================================
+// OverlayTTL1 class description
+// ================================================
+//
+// THIS TEXT TO BE REPLACED BY ATLAS STANDARD FORMAT
+//
+//
+// class: OverlayTTL1
+//
+// Description:
+//
+//The OverlayTTL1 class takes calorimeter cells from the TES and
+// forms Trigger Towers, which it then places back into the TES  The calorimeter
+// cells can be produced either by GEANT or other fast simulation packages
+// - this is defined by setting a parameter
+// CellType to 1 for CaloCells, 2 to reprocess TriggerTowers and 3 for LAr/Tile TTL1 input (a simulation of analogue towers);
+//
+// ................................................................
+//
+
+#ifndef TRIGT1CALOSIM_OVERLAYTTL1_H
+#define TRIGT1CALOSIM_OVERLAYTTL1_H
+
+// STL
+#include <map>
+#include <string>
+#include <vector>
+
+// Athena/Gaudi
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "Identifier/Identifier.h"
+
+//Calorimeter tower includes
+#include "LArRawEvent/LArTTL1Container.h"
+#include "TileEvent/TileTTL1Container.h"
+
+namespace LVL1
+{
+
+class OverlayTTL1 : public AthAlgorithm
+{
+public:
+  //-------------------------
+  // Constructors/Destructors
+  //-------------------------
+  OverlayTTL1(const std::string& name, ISvcLocator* pSvcLocator);
+  virtual ~OverlayTTL1();
+
+  // These are disallowed
+  OverlayTTL1(const OverlayTTL1&) = delete;
+  OverlayTTL1& operator=(const OverlayTTL1&) = delete;
+
+  //------------------------------------------------------
+  // Methods used by Athena to run the algorithm
+  //------------------------------------------------------
+  StatusCode initialize();
+  StatusCode execute();
+  StatusCode finalize();
+
+private:
+  // Enable/disable Tile TTL1 overlay
+  bool m_enableTileTTL1Overlay;
+
+  // locations of background TTL1 data
+  SG::ReadHandleKey<LArTTL1Container> m_bkgEmTTL1Key{this,"BkgEmTTL1Key","OriginalEvent_SG+LArTTL1EM","ReadHandleKey for Background Input EM LArTTL1Container"};
+  SG::ReadHandleKey<LArTTL1Container> m_bkgHadTTL1Key{this,"BkgHadTTL1Key","OriginalEvent_SG+LArTTL1HAD","ReadHandleKey for Background Input Had LArTTL1Container"};
+  SG::ReadHandleKey<TileTTL1Container> m_bkgTileTTL1Key{this,"BkgTileTTL1Key","OriginalEvent_SG+TileTTL1Cnt","ReadHandleKey for Background Input TileTTL1Container"};
+
+  // locations of signal TTL1 data
+  SG::ReadHandleKey<LArTTL1Container> m_signalEmTTL1Key{this,"SignalEmTTL1Key","BkgEvent_0_SG+LArTTL1EM","ReadHandleKey for Signal Input EM LArTTL1Container"};
+  SG::ReadHandleKey<LArTTL1Container> m_signalHadTTL1Key{this,"SignalHadTTL1Key","BkgEvent_0_SG+LArTTL1HAD","ReadHandleKey for Signal Input Had LArTTL1Container"};
+  SG::ReadHandleKey<TileTTL1Container> m_signalTileTTL1Key{this,"SignalTileTTL1Key","BkgEvent_0_SG+TileTTL1Cnt","ReadHandleKey for Signal Input TileTTL1Container"};
+
+  // locations of output TTL1 data
+  SG::WriteHandleKey<LArTTL1Container> m_outputEmTTL1Key{this,"OutputEmTTL1Key","StoreGateSvc+LArTTL1EM","WriteHandleKey for Output EM LArTTL1Container"};
+  SG::WriteHandleKey<LArTTL1Container> m_outputHadTTL1Key{this,"OutputHadTTL1Key","StoreGateSvc+LArTTL1HAD","WriteHandleKey for Output Had LArTTL1Container"};
+  SG::WriteHandleKey<TileTTL1Container> m_outputTileTTL1Key{this,"OutputTileTTL1Key","StoreGateSvc+TileTTL1Cnt","WriteHandleKey for Output TileTTL1Container"};
+
+  /** overlay amplitudes from other TTL1 */
+  void groupLArTowers(SG::ReadHandle<LArTTL1Container>& towers, std::map<Identifier, std::vector<const LArTTL1*>> &towerMap) const;
+  void groupTileTowers(SG::ReadHandle<TileTTL1Container>& towers, std::map<Identifier, std::vector<const TileTTL1*>> &towerMap) const;
+
+  /** specialised overlay functions */
+  StatusCode overlayLArTTL1(const SG::ReadHandleKey<LArTTL1Container> &bkgKey, const SG::ReadHandleKey<LArTTL1Container> &signalKey, const SG::WriteHandleKey<LArTTL1Container> &outputKey, const std::string &label);
+  StatusCode overlayTileTTL1(const SG::ReadHandleKey<TileTTL1Container> &bkgKey, const SG::ReadHandleKey<TileTTL1Container> &signalKey, const SG::WriteHandleKey<TileTTL1Container> &outputKey);
+};
+
+} // namespace LVL1
+#endif
diff --git a/Trigger/TrigT1/TrigT1CaloSim/python/OverlayTTL1Config.py b/Trigger/TrigT1/TrigT1CaloSim/python/OverlayTTL1Config.py
new file mode 100644
index 0000000000000000000000000000000000000000..87b05874609b0312fddba06a10ec584f51867661
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloSim/python/OverlayTTL1Config.py
@@ -0,0 +1,23 @@
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+
+from AthenaCommon import CfgMgr
+
+def getTTL1Overlay(name="OverlayTTL1", **kwargs):
+    from OverlayCommonAlgs.OverlayFlags import overlayFlags
+
+    # Tile TTL1 overlay is currently not needed as Tile trigger towers are created from the overlaid container
+    kwargs.setdefault("EnableTileTTL1Overlay", False)
+
+    kwargs.setdefault("BkgEmTTL1Key", overlayFlags.dataStore() + "+LArTTL1EM");
+    kwargs.setdefault("SignalEmTTL1Key", overlayFlags.evtStore() + "+LArTTL1EM");
+    kwargs.setdefault("OutputEmTTL1Key", overlayFlags.outputStore() + "+LArTTL1EM");
+
+    kwargs.setdefault("BkgHadTTL1Key", overlayFlags.dataStore() + "+LArTTL1HAD");
+    kwargs.setdefault("SignalHadTTL1Key", overlayFlags.evtStore() + "+LArTTL1HAD");
+    kwargs.setdefault("OutputHadTTL1Key", overlayFlags.outputStore() + "+LArTTL1HAD");
+
+    kwargs.setdefault("BkgTileTTL1Key", overlayFlags.dataStore() + "+TileTTL1Cnt");
+    kwargs.setdefault("SignalTileTTL1Key", overlayFlags.evtStore() + "+TileTTL1Cnt");
+    kwargs.setdefault("OutputTileTTL1Key", overlayFlags.outputStore() + "+TileTTL1Cnt");
+
+    return CfgMgr.LVL1__OverlayTTL1(name, **kwargs)
diff --git a/Trigger/TrigT1/TrigT1CaloSim/python/TrigT1CaloSimConfigDb.py b/Trigger/TrigT1/TrigT1CaloSim/python/TrigT1CaloSimConfigDb.py
new file mode 100644
index 0000000000000000000000000000000000000000..0d012591a702b0b44d1aaa8e42a301e3e7084c58
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloSim/python/TrigT1CaloSimConfigDb.py
@@ -0,0 +1,4 @@
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+
+from AthenaCommon.CfgGetter import addAlgorithm
+addAlgorithm("TrigT1CaloSim.OverlayTTL1Config.getTTL1Overlay", "OverlayTTL1")
diff --git a/Trigger/TrigT1/TrigT1CaloSim/src/OverlayTTL1.cxx b/Trigger/TrigT1/TrigT1CaloSim/src/OverlayTTL1.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b27039427cdae91144faa9223d7f73ab4a4986ec
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloSim/src/OverlayTTL1.cxx
@@ -0,0 +1,229 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ================================================
+// OverlayTTL1 class Implementation
+// ================================================
+
+#include "TrigT1CaloSim/OverlayTTL1.h"
+
+// Atlas includes
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/WriteHandle.h"
+
+namespace LVL1 {
+
+OverlayTTL1::OverlayTTL1(const std::string& name, ISvcLocator* pSvcLocator)
+  : AthAlgorithm(name, pSvcLocator)
+
+{
+  declareProperty("EnableTileTTL1Overlay", m_enableTileTTL1Overlay=false);
+}
+
+OverlayTTL1::~OverlayTTL1() {}
+
+StatusCode OverlayTTL1::initialize()
+{
+  ATH_MSG_DEBUG("Initialising");
+
+  // StoreGate keys
+  ATH_CHECK( m_bkgEmTTL1Key.initialize() );
+  ATH_CHECK( m_bkgHadTTL1Key.initialize() );
+  ATH_CHECK( m_signalEmTTL1Key.initialize() );
+  ATH_CHECK( m_signalHadTTL1Key.initialize() );
+  ATH_CHECK( m_outputEmTTL1Key.initialize() );
+  ATH_CHECK( m_outputHadTTL1Key.initialize() );
+
+  if (m_enableTileTTL1Overlay) {
+    ATH_CHECK( m_bkgTileTTL1Key.initialize() );
+    ATH_CHECK( m_signalTileTTL1Key.initialize() );
+    ATH_CHECK( m_outputTileTTL1Key.initialize() );
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+/// Main algorithm execute
+StatusCode OverlayTTL1::execute()
+{
+  ATH_CHECK( overlayLArTTL1(m_bkgEmTTL1Key, m_signalEmTTL1Key, m_outputEmTTL1Key, "EM") );
+  ATH_CHECK( overlayLArTTL1(m_bkgHadTTL1Key, m_signalHadTTL1Key, m_outputHadTTL1Key, "Hadronic") );
+
+  if (m_enableTileTTL1Overlay) {
+    ATH_CHECK( overlayTileTTL1(m_bkgTileTTL1Key, m_signalTileTTL1Key, m_outputTileTTL1Key) );
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode OverlayTTL1::finalize()
+{
+  ATH_MSG_DEBUG("Finalizing");
+  return StatusCode::SUCCESS;
+}
+
+/** steps over LAr tower collection and overlays on existing collection  */
+void OverlayTTL1::groupLArTowers(SG::ReadHandle<LArTTL1Container>& towers, std::map<Identifier, std::vector<const LArTTL1*>> &towerMap) const
+{
+  for(const auto& tower : *towers){
+
+    // Obtain identifier
+    Identifier id = tower->ttOfflineID();
+
+    // Does this tower already exist?
+    // Get channel ID = key to map
+    //uint32_t channel = coolId.id();
+    std::map<Identifier, std::vector<const LArTTL1*>>::iterator test = towerMap.find( id );
+    // If already exists, add tower to location 
+    if (test != towerMap.end()) {
+      // Add this pointer to the vector
+      test->second.push_back(tower);
+    }
+    // Otherwise create new entry in the map
+    else {
+      std::vector<const LArTTL1*> towers;
+      towers.push_back(tower);
+      towerMap.insert(std::pair<Identifier, std::vector<const LArTTL1*>>(id, towers));
+    }
+
+  } // end for loop
+}
+
+
+/// Real Tile overlay towers and overlay on existing event
+void OverlayTTL1::groupTileTowers(SG::ReadHandle<TileTTL1Container>& towers, std::map<Identifier, std::vector<const TileTTL1*>> &towerMap) const
+{
+  // Step over all towers
+  for(const auto& tower : *towers) {
+
+    // Obtain identifier
+    Identifier id = tower->TTL1_ID();
+
+    // Is this one already in the map
+    std::map<Identifier, std::vector<const TileTTL1*>>::iterator test = towerMap.find( id );
+    // If already exists, add tower to location 
+    if (test != towerMap.end()) {
+      // Add this pointer to the vector
+      test->second.push_back(tower);
+    }
+    // Otherwise create new entry in the map
+    else {
+      std::vector<const TileTTL1*> towers;
+      towers.push_back(tower);
+      towerMap.insert(std::pair<Identifier, std::vector<const TileTTL1*>>(id, towers));
+    }
+
+  } // end for loop
+
+  return;
+}
+
+/// Main algorithm execute
+StatusCode OverlayTTL1::overlayLArTTL1(const SG::ReadHandleKey<LArTTL1Container> &bkgKey, const SG::ReadHandleKey<LArTTL1Container> &signalKey, const SG::WriteHandleKey<LArTTL1Container> &outputKey, const std::string &label)
+{
+  // setup maps
+  std::map<Identifier, std::vector<const LArTTL1*>> towerMap;
+
+  // Find LAr towers in TES
+  SG::ReadHandle<LArTTL1Container> bkgTowers(bkgKey);
+  if (!bkgTowers.isValid()) {
+    ATH_MSG_ERROR("Could not get background " << label << " LArTTL1Container container " << bkgTowers.name() << " from store " << bkgTowers.store());
+    return StatusCode::FAILURE;
+  }
+
+  /// If we are doing MC-MC overlay there should be a second set of TTL1
+  /// So here we retrieve those, match them up and sum their amplitudes
+  SG::ReadHandle<LArTTL1Container> signalTowers(signalKey);
+  if (!signalTowers.isValid()) {
+    ATH_MSG_ERROR("Could not get signal " << label << " LArTTL1Container container " << signalTowers.name() << " from store " << signalTowers.store());
+    return StatusCode::FAILURE;
+  }
+
+  // Group towers by ID
+  groupLArTowers(bkgTowers, towerMap);
+  groupLArTowers(signalTowers, towerMap);
+
+  // Set up output containers  
+  SG::WriteHandle<LArTTL1Container> outputContainer(outputKey);
+  // Register the TTL1 container in the TES
+  ATH_CHECK( outputContainer.record(std::make_unique<LArTTL1Container>()) );
+  ATH_MSG_DEBUG( "Output " << label << " LArTTL1Container registered successfully (" << outputKey.key() << ")" );
+
+  // Make the output collection
+  for (std::map<Identifier, std::vector<const LArTTL1*>>::iterator itMap = towerMap.begin(); itMap != towerMap.end(); ++itMap) {
+     std::vector<const LArTTL1*>::iterator it = (itMap->second).begin();
+     HWIdentifier hwId = (*it)->ttOnlineID();
+     Identifier Id = (*it)->ttOfflineID();
+
+     std::vector<float> mergedAmps;
+     for (; it != (itMap->second).end(); ++it) {
+        if (mergedAmps.size() == 0) mergedAmps = (*it)->samples();
+        else {
+          std::vector<float> amps = (*it)->samples();
+          if (amps.size() != mergedAmps.size()) ATH_MSG_WARNING("LAr " << label << " vectors have different lengths: " << amps.size() << ", " << mergedAmps.size()); 
+          else for (unsigned int i = 0; i < amps.size(); ++i) mergedAmps[i] += amps[i];     
+        }
+     }
+
+     // Create new tower and add to output vector
+     std::unique_ptr<LArTTL1> ttL1 = std::make_unique<LArTTL1>(hwId, Id, mergedAmps);
+     outputContainer->push_back(ttL1.release());
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode OverlayTTL1::overlayTileTTL1(const SG::ReadHandleKey<TileTTL1Container> &bkgKey, const SG::ReadHandleKey<TileTTL1Container> &signalKey, const SG::WriteHandleKey<TileTTL1Container> &outputKey)
+{
+  // setup map
+  std::map<Identifier, std::vector<const TileTTL1*>> towerMap;
+
+  // Find Tile towers in TES
+  SG::ReadHandle<TileTTL1Container> bkgTowers(bkgKey);
+  if (!bkgTowers.isValid()) {
+    ATH_MSG_ERROR("Could not get background TileTTL1Container container " << bkgTowers.name() << " from store " << bkgTowers.store());
+    return StatusCode::FAILURE;
+  }
+
+  /// If we are doing MC-MC overlay there should be a second set of TTL1
+  /// So here we retrieve those, match them up and sum their amplitudes
+  SG::ReadHandle<TileTTL1Container> signalTowers(signalKey);
+  if (!signalTowers.isValid()) {
+    ATH_MSG_ERROR("Could not get signal TileTTL1Container container " << signalTowers.name() << " from store " << signalTowers.store());
+    return StatusCode::FAILURE;
+  }
+
+  // Group towers by ID
+  groupTileTowers(bkgTowers, towerMap);
+  groupTileTowers(signalTowers, towerMap);
+
+  SG::WriteHandle<TileTTL1Container> outputContainer(outputKey);
+  // Register the TTL1 container in the TES
+  ATH_CHECK( outputContainer.record(std::make_unique<TileTTL1Container>()) );
+  ATH_MSG_DEBUG( "Output TileTTL1Container registered successfully (" << outputKey.key() << ")" );
+
+  // Then the process Tile TTL1 collection
+  for (std::map<Identifier, std::vector<const TileTTL1*>>::iterator itMap = towerMap.begin(); itMap != towerMap.end(); ++itMap) {
+    std::vector<const TileTTL1*>::iterator it = (itMap->second).begin();
+    Identifier Id = (*it)->TTL1_ID();
+
+    std::vector<float> mergedAmps;
+    for (; it != (itMap->second).end(); ++it) {
+      if (mergedAmps.size() == 0) mergedAmps = (*it)->fsamples();
+      else {
+        std::vector<float> amps = (*it)->fsamples();
+        if (amps.size() != mergedAmps.size()) ATH_MSG_WARNING("Tile vectors have different lengths: " << amps.size() << ", " << mergedAmps.size()); 
+        else for (unsigned int i = 0; i < amps.size(); ++i) mergedAmps[i] += amps[i];     
+      }
+    }
+
+    // Create new tower and add to output vector
+    std::unique_ptr<TileTTL1> ttL1 = std::make_unique<TileTTL1>(Id, mergedAmps);
+    outputContainer->push_back(ttL1.release());
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+} // close namespace bracket
diff --git a/Trigger/TrigT1/TrigT1CaloSim/src/components/TrigT1CaloSim_entries.cxx b/Trigger/TrigT1/TrigT1CaloSim/src/components/TrigT1CaloSim_entries.cxx
index c67110e751c8bac4949df4e6214d584d481d2af2..7d530edcf74cc7a2c8be74a5aa7203b2c3770bfc 100644
--- a/Trigger/TrigT1/TrigT1CaloSim/src/components/TrigT1CaloSim_entries.cxx
+++ b/Trigger/TrigT1/TrigT1CaloSim/src/components/TrigT1CaloSim_entries.cxx
@@ -16,6 +16,7 @@
 #include "TrigT1CaloSim/EnergyCMX.h"
 #include "TrigT1CaloSim/OverlayRun2TriggerTowerMaker.h"
 #include "TrigT1CaloSim/TransientDatabaseOverride.h"
+#include "TrigT1CaloSim/OverlayTTL1.h"
 
 
 using namespace LVL1;
@@ -38,4 +39,4 @@ DECLARE_COMPONENT( JetCMX )
 DECLARE_COMPONENT( EnergyCMX )
 DECLARE_COMPONENT( TransientDatabaseOverride )
 DECLARE_COMPONENT( OverlayRun2TriggerTowerMaker )
-
+DECLARE_COMPONENT( OverlayTTL1 )
diff --git a/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1Muctpi.cxx b/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1Muctpi.cxx
index 0c7dd419c1f2171d692eec47ac10af7d2101958d..bb6060f5bab5883a2b15edba5983a158f571d407 100644
--- a/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1Muctpi.cxx
+++ b/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1Muctpi.cxx
@@ -42,8 +42,8 @@
 namespace LVL1MUCTPI {
 
   // Set the default StoreGate locations of input and output objects:
-  const std::string L1Muctpi::m_DEFAULT_L1MuctpiStoreLocationRPC = "/Event/L1MuctpiStoreRPC";
-  const std::string L1Muctpi::m_DEFAULT_L1MuctpiStoreLocationTGC = "/Event/L1MuctpiStoreTGC";
+  const std::string L1Muctpi::m_DEFAULT_L1MuctpiStoreLocationRPC = "L1MuctpiStoreRPC";
+  const std::string L1Muctpi::m_DEFAULT_L1MuctpiStoreLocationTGC = "L1MuctpiStoreTGC";
   const std::string L1Muctpi::m_DEFAULT_AODLocID                 = "LVL1_ROI";
   const std::string L1Muctpi::m_DEFAULT_RDOLocID                 = "MUCTPI_RDO";
 
diff --git a/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1MuctpiPatGen.cxx b/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1MuctpiPatGen.cxx
index 077683beab93f61808c74c1c44d4c6a727c7e4ef..42fcf88dce2cf06a33ba133885adc2068c40ea09 100644
--- a/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1MuctpiPatGen.cxx
+++ b/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1MuctpiPatGen.cxx
@@ -16,8 +16,8 @@
 
 namespace LVL1MUCTPI {
 
-   static const std::string DEFAULT_L1MuctpiStoreLocationRPC = "/Event/L1MuctpiStoreRPC";
-   static const std::string DEFAULT_L1MuctpiStoreLocationTGC = "/Event/L1MuctpiStoreTGC";
+   static const std::string DEFAULT_L1MuctpiStoreLocationRPC = "L1MuctpiStoreRPC";
+   static const std::string DEFAULT_L1MuctpiStoreLocationTGC = "L1MuctpiStoreTGC";
 
    //--------------
    // Constructor
diff --git a/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1MuctpiTool.cxx b/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1MuctpiTool.cxx
index c95a5fdc116eb4bec4d6be427c00b19190c6d571..01718c515d5a401b07aced86282546d489b74187 100644
--- a/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1MuctpiTool.cxx
+++ b/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1MuctpiTool.cxx
@@ -49,8 +49,8 @@
 namespace LVL1MUCTPI {
 
   // Set the default StoreGate locations of input and output objects:
-  const std::string L1MuctpiTool::m_DEFAULT_L1MuctpiStoreLocationRPC = "/Event/L1MuctpiStoreRPC";
-  const std::string L1MuctpiTool::m_DEFAULT_L1MuctpiStoreLocationTGC = "/Event/L1MuctpiStoreTGC";
+  const std::string L1MuctpiTool::m_DEFAULT_L1MuctpiStoreLocationRPC = "L1MuctpiStoreRPC";
+  const std::string L1MuctpiTool::m_DEFAULT_L1MuctpiStoreLocationTGC = "L1MuctpiStoreTGC";
   const std::string L1MuctpiTool::m_DEFAULT_AODLocID                 = "LVL1_ROI";
   const std::string L1MuctpiTool::m_DEFAULT_RDOLocID                 = "MUCTPI_RDO";
 
diff --git a/Trigger/TrigT1/TrigT1RPCsteering/TrigT1RPCsteering/TrigT1RPC.h b/Trigger/TrigT1/TrigT1RPCsteering/TrigT1RPCsteering/TrigT1RPC.h
index c071a9486e9382d06ab42524725de38c20ce7fe9..58a20fea33bdead5c0bcca76e4d1509a532d114b 100755
--- a/Trigger/TrigT1/TrigT1RPCsteering/TrigT1RPCsteering/TrigT1RPC.h
+++ b/Trigger/TrigT1/TrigT1RPCsteering/TrigT1RPCsteering/TrigT1RPC.h
@@ -31,7 +31,7 @@
 
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 
-#define DEFAULT_L1MuctpiStoreLocationRPC "/Event/L1MuctpiStoreRPC"
+#define DEFAULT_L1MuctpiStoreLocationRPC "L1MuctpiStoreRPC"
 
 class RpcIdHelper;
 
diff --git a/Trigger/TrigT1/TrigT1TGC/doc/readme b/Trigger/TrigT1/TrigT1TGC/doc/readme
index 9653e7a446e524f53806a7145ed769c43ccd16ea..f2cae50c9ace64bc0513c69c76b2c45a54e0a961 100644
--- a/Trigger/TrigT1/TrigT1TGC/doc/readme
+++ b/Trigger/TrigT1/TrigT1TGC/doc/readme
@@ -98,7 +98,7 @@ Desrciption of Properties
 
 - MuCTPIInput_TGC
     - location of MuCTPI inputs in the store gate  	
-    - default : "/Event/L1MuctpiStoreTGC" (defined in jobOption)
+    - default : "L1MuctpiStoreTGC" (defined in jobOption)
   
 - InputData_perEvent
    - location of input data in the store gate	
diff --git a/Trigger/TrigT1/TrigT1TGC/python/TrigT1TGCConfig.py b/Trigger/TrigT1/TrigT1TGC/python/TrigT1TGCConfig.py
index 2a00e91613a929e58aa466712f66f9ae7a9b41ef..a4d6f6e2926f7a2ff1cfe522103ec0ffd1ee2370 100755
--- a/Trigger/TrigT1/TrigT1TGC/python/TrigT1TGCConfig.py
+++ b/Trigger/TrigT1/TrigT1TGC/python/TrigT1TGCConfig.py
@@ -11,9 +11,9 @@ class TrigT1TGCConfig (LVL1TGCTrigger__LVL1TGCTrigger):
         super(TrigT1TGCConfig ,self).__init__(name)
 
         self.InputData_perEvent = "TGC_DIGITS" 
-        self.ASDOutDataLocation = "/Event/ASDOutDataLocation"
+        self.ASDOutDataLocation = "ASDOutDataLocation"
         self.MuonTrigConfig     = "/Run/MuonTrigConfig"
-        self.MuCTPIInput_TGC    = "/Event/L1MuctpiStoreTGC"
+        self.MuCTPIInput_TGC    = "L1MuctpiStoreTGC"
         self.MaskFileName       = "TrigT1TGCMaskedChannel.db"
         self.MaskFileName12     = "TrigT1TGCMaskedChannel._12.db"
         
diff --git a/Trigger/TrigT1/TrigT1TGC/share/TrigT1TGCJobOptions.py b/Trigger/TrigT1/TrigT1TGC/share/TrigT1TGCJobOptions.py
index 1ff70a3552b0e47bce637ec671dc59690e34123b..e1ca0bd5568593736c5ba2970d7fee227e090c66 100755
--- a/Trigger/TrigT1/TrigT1TGC/share/TrigT1TGCJobOptions.py
+++ b/Trigger/TrigT1/TrigT1TGC/share/TrigT1TGCJobOptions.py
@@ -8,8 +8,8 @@ LVL1TGCTrigger.InputData_perEvent = "TGC_DIGITS"
 #  MainAlgorithm for Simulation //
 theApp.TopAlg += ["LVL1TGCTrigger::LVL1TGCTrigger/LVL1TGCTrigger"]
 # properties
-LVL1TGCTrigger.ASDOutDataLocation = "/Event/ASDOutDataLocation"
-LVL1TGCTrigger.MuCTPIInput_TGC    = "/Event/L1MuctpiStoreTGC"
+LVL1TGCTrigger.ASDOutDataLocation = "ASDOutDataLocation"
+LVL1TGCTrigger.MuCTPIInput_TGC    = "L1MuctpiStoreTGC"
 # mask file
 LVL1TGCTrigger.MaskFileName = "TrigT1TGCMaskedChannel.db"
 LVL1TGCTrigger.MaskFileName12 = "TrigT1TGCMaskedChannel._12.db"
diff --git a/Trigger/TrigT1/TrigT1TGC/share/TrigT1TGCJobOptions.txt b/Trigger/TrigT1/TrigT1TGC/share/TrigT1TGCJobOptions.txt
deleted file mode 100755
index 20b1e54d69a24f1dda05980e69604523c1c6a54b..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1TGC/share/TrigT1TGCJobOptions.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-
-ApplicationMgr.DLLs   += { "TrigT1TGC" };
-ApplicationMgr.DLLs   += { "TGCcabling" };
-ApplicationMgr.ExtSvc += { "TGCcablingSvc" };
-
-//// top algorithms to be run ////
-//  select Input source
-LVL1TGCTrigger.InputData_perEvent = "TGC_DIGITS" ;
-
-//  MainAlgorithm for Simulation //
-ApplicationMgr.TopAlg += {"LVL1TGCTrigger::LVL1TGCTrigger/LVL1TGCTrigger"};
-
-// properties
-LVL1TGCTrigger.ASDOutDataLocation = "/Event/ASDOutDataLocation";
-LVL1TGCTrigger.MuCTPIInput_TGC    = "/Event/L1MuctpiStoreTGC";
-
diff --git a/Trigger/TrigT1/TrigT1TGC/src/LVL1TGCTrigger.cxx b/Trigger/TrigT1/TrigT1TGC/src/LVL1TGCTrigger.cxx
index 802f2a4a8c208a938e26607e6e10970045ddbf90..6df6d365e422fbf116d1c7b4d3e525a6b217ace6 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/LVL1TGCTrigger.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/LVL1TGCTrigger.cxx
@@ -89,7 +89,7 @@ namespace LVL1TGCTrigger {
     m_debuglevel(false)
 {
     declareProperty("EventStore", m_sgSvc, "Event Store"); 
-    declareProperty("MuCTPIInput_TGC",     m_keyMuCTPIInput_TGC="/Event/L1MuctpiStoreTGC");
+    declareProperty("MuCTPIInput_TGC",     m_keyMuCTPIInput_TGC="L1MuctpiStoreTGC");
     declareProperty("InputData_perEvent",  m_keyTgcDigit="TGC_DIGITS");
     declareProperty("TileMuRcv_Input",     m_keyTileMu="TileMuRcvCnt");
     declareProperty("ProcessAllBunhes",    m_ProcessAllBunches=true);
diff --git a/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKClusterConverterTool.h b/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKClusterConverterTool.h
index 194917f5163b002a7ab30d917da9be2c4410c10d..d4a46ad0f422d8a6b16a8e77ddebeea42882d013 100644
--- a/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKClusterConverterTool.h
+++ b/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKClusterConverterTool.h
@@ -7,17 +7,24 @@
 #ifndef TRIGFTKTRACKCONVERTER_TRIGFTKCLUSTERCONVERTERTOOL_H
 #define TRIGFTKTRACKCONVERTER_TRIGFTKCLUSTERCONVERTERTOOL_H
 
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
-
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "TrigFTKSim/FTKTrack.h"
 #include "TrigFTKToolInterfaces/ITrigFTKClusterConverterTool.h"
 
+#include "InDetCondServices/ISiLorentzAngleTool.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "PixelConditionsServices/IPixelOfflineCalibSvc.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "TrigFTKSim/FTKTrack.h"
 #include "TrkFitterInterfaces/ITrackFitter.h" 
 #include "TrkFitterUtils/FitterTypes.h" 
-#include "PixelConditionsServices/IPixelOfflineCalibSvc.h"
-#include "InDetCondServices/ISiLorentzAngleTool.h"
+
+#include "GaudiKernel/ContextSpecificPtr.h"
+#include "GaudiKernel/EventContext.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
+#include <mutex>
+#include <vector>
 
 class StoreGateSvc;
 
@@ -29,7 +36,6 @@ class IdentifierHash;
 
 namespace InDetDD {
   class PixelDetectorManager;
-  class SCT_DetectorManager;
 }
 
 namespace InDet {
@@ -73,10 +79,12 @@ private:
   const SCT_ID* m_sctId;
   
   const InDetDD::PixelDetectorManager* m_pixelManager;
-  const InDetDD::SCT_DetectorManager* m_SCT_Manager;
 
   ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"};
   ToolHandle<Trk::ITrackFitter> m_trackFitter;
+
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+
   bool m_doFit;
   bool m_doTruth;
   std::string m_ftkPixelTruthName;
@@ -87,6 +95,15 @@ private:
   PRD_MultiTruthCollection* m_ftkSctTruth;
   const AtlasDetectorID* m_idHelper;
   bool m_collectionsReady;
+
+  // Mutex to protect the contents.
+  mutable std::mutex m_mutex;
+  // Cache to store events for slots
+  mutable std::vector<EventContext::ContextEvt_t> m_cacheSCTElements;
+  // Pointer of InDetDD::SiDetectorElementCollection
+  mutable Gaudi::Hive::ContextSpecificPtr<const InDetDD::SiDetectorElementCollection> m_SCTDetectorElements;
+
+  const InDetDD::SiDetectorElement* getSCTDetectorElement(const IdentifierHash hash) const;
 };
 
 #endif
diff --git a/Trigger/TrigTools/TrigFTKTrackConverter/src/TrigFTKClusterConverterTool.cxx b/Trigger/TrigTools/TrigFTKTrackConverter/src/TrigFTKClusterConverterTool.cxx
index 28a9b3375b0f05f153374f200de0f0d5ab0b9e1a..f7d55e8b211afa65e6c83390bddcdf244df1ac7e 100644
--- a/Trigger/TrigTools/TrigFTKTrackConverter/src/TrigFTKClusterConverterTool.cxx
+++ b/Trigger/TrigTools/TrigFTKTrackConverter/src/TrigFTKClusterConverterTool.cxx
@@ -20,12 +20,12 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/PixelID.h" 
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "AtlasDetDescr/AtlasDetectorID.h"
 
 #include "GeneratorObjects/McEventCollection.h"
 #include "HepMC/GenParticle.h"
 
+#include "StoreGate/ReadCondHandle.h"
 #include "StoreGate/StoreGateSvc.h" 
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
 
@@ -62,7 +62,9 @@ TrigFTKClusterConverterTool::TrigFTKClusterConverterTool(const std::string& t,
   m_doTruth(false),
   m_ftkPixelTruthName("PRD_MultiTruthPixel_FTK"),
   m_ftkSctTruthName("PRD_MultiTruthSCT_FTK"),
-  m_mcTruthName("TruthEvent") {
+  m_mcTruthName("TruthEvent"),
+  m_mutex{},
+  m_cacheSCTElements{} {
 
   declareInterface< ITrigFTKClusterConverterTool >( this );
   declareProperty( "PixelOfflineCalibSvc",m_offlineCalibSvc);
@@ -123,12 +125,9 @@ StatusCode TrigFTKClusterConverterTool::initialize() {
     return sc;
   } 
 
-  sc = detStore->retrieve(m_SCT_Manager);
-  if( sc.isFailure() ) {
-    ATH_MSG_ERROR("Could not retrieve SCT DetectorManager from detStore.");
-    return sc;
-  } 
-	
+  // ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
 	//Get ID helper
 	if (detStore->retrieve(m_idHelper, "AtlasID").isFailure()) {
 		ATH_MSG_FATAL("Could not get AtlasDetectorID helper AtlasID");
@@ -156,7 +155,7 @@ StatusCode TrigFTKClusterConverterTool::finalize() {
 
 InDet::SCT_Cluster* TrigFTKClusterConverterTool::createSCT_Cluster(IdentifierHash hash, float hCoord, int w){
   
-  const InDetDD::SiDetectorElement* pDE = m_SCT_Manager->getDetectorElement(hash);
+  const InDetDD::SiDetectorElement* pDE = getSCTDetectorElement(hash);
   float locPos = hCoord+0.1; // adding 0.1 to prevent rounding errors
 
   int strip = (int)(locPos);
@@ -464,3 +463,23 @@ StatusCode TrigFTKClusterConverterTool::getMcTruthCollections(StoreGateSvc* evtS
   return sc;
 }
 
+const InDetDD::SiDetectorElement* TrigFTKClusterConverterTool::getSCTDetectorElement(const IdentifierHash hash) const {
+  const EventContext& ctx{Gaudi::Hive::currentContext()};
+
+  static const EventContext::ContextEvt_t invalidValue{EventContext::INVALID_CONTEXT_EVT};
+  EventContext::ContextID_t slot{ctx.slot()};
+  EventContext::ContextEvt_t evt{ctx.evt()};
+  std::lock_guard<std::mutex> lock{m_mutex};
+  if (slot>=m_cacheSCTElements.size()) {
+    m_cacheSCTElements.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement.
+  }
+  if (m_cacheSCTElements[slot]!=evt) {
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> condData{m_SCTDetEleCollKey};
+    if (not condData.isValid()) {
+      ATH_MSG_ERROR("Failed to get " << m_SCTDetEleCollKey.key());
+    }
+    m_SCTDetectorElements.set(*condData);
+    m_cacheSCTElements[slot] = evt;
+  }
+  return (m_SCTDetectorElements.isValid() ? m_SCTDetectorElements->getDetectorElement(hash) : nullptr);
+}
diff --git a/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py b/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py
index 0f067dd97029d22e1f977677741955ae1cb36be2..127455caf661d00bb56de93fc6651f29bba9271e 100644
--- a/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py
+++ b/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py
@@ -62,7 +62,7 @@ if not hasattr(ToolSvc, "SCTLorentzAngleTool"):
 InDetTrigBroadSCT_ClusterOnTrackToolFTK = FTK_SCTClusterOnTrackTool("InDetTrigBroadSCT_ClusterOnTrackToolFTK",
                                                                     CorrectionStrategy = 0,  # do correct position bias
                                                                     ErrorStrategy      = 0,  # do use broad errors
-                                                                    SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool)
+                                                                    LorentzAngleTool = ToolSvc.SCTLorentzAngleTool)
 ToolSvc += InDetTrigBroadSCT_ClusterOnTrackToolFTK
 if (InDetTrigFlags.doPrintConfigurables()):
   print InDetTrigBroadSCT_ClusterOnTrackToolFTK
diff --git a/Trigger/TrigTools/TrigInDetTrackFitter/TrigInDetTrackFitter/TrigDkfTrackMakerTool.h b/Trigger/TrigTools/TrigInDetTrackFitter/TrigInDetTrackFitter/TrigDkfTrackMakerTool.h
index f28e389f24e7a8cf5a91a0196118510dd1ef8719..48cbdce262f0e0e77c44e93c60fc0950f7a99592 100644
--- a/Trigger/TrigTools/TrigInDetTrackFitter/TrigInDetTrackFitter/TrigDkfTrackMakerTool.h
+++ b/Trigger/TrigTools/TrigInDetTrackFitter/TrigInDetTrackFitter/TrigDkfTrackMakerTool.h
@@ -6,24 +6,28 @@
 #define __TRIGDKFTRACKMAKERTOOL_H__
 
 #include "AthenaBaseComps/AthAlgTool.h"
+#include "TrigInDetToolInterfaces/ITrigDkfTrackMakerTool.h"
 
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
 #include "TrkDistributedKalmanFilter/TrkBaseNode.h"
 #include "TrkDistributedKalmanFilter/TrkPlanarSurface.h"
-
-#include "TrigInDetToolInterfaces/ITrigDkfTrackMakerTool.h"
-#include <vector>
-
-#include "InDetIdentifier/SCT_ID.h"
-#include "InDetIdentifier/PixelID.h" 
-#include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "TrkTrack/Track.h"
 
+#include "GaudiKernel/EventContext.h"
+#include "GaudiKernel/ContextSpecificPtr.h"
+
+#include <mutex>
+#include <vector>
 
 class AtlasDetectorID;
 class PixelID;
 class SCT_ID;
 
+namespace InDetDD {
+  class PixelDetectorManager;
+}
+
 class TrigDkfTrackMakerTool : virtual public ITrigDkfTrackMakerTool, public AthAlgTool {
  public:
       
@@ -45,8 +49,15 @@ class TrigDkfTrackMakerTool : virtual public ITrigDkfTrackMakerTool, public AthA
   const AtlasDetectorID* m_idHelper;
   
   const InDetDD::PixelDetectorManager* m_pixelManager;
-  const InDetDD::SCT_DetectorManager* m_SCT_Manager;
 
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+  // Mutex to protect the contents.
+  mutable std::mutex m_mutex;
+  // Cache to store events for slots
+  mutable std::vector<EventContext::ContextEvt_t> m_cacheSCTElements;
+  // Pointer of InDetDD::SiDetectorElementCollection
+  mutable Gaudi::Hive::ContextSpecificPtr<const InDetDD::SiDetectorElementCollection> m_SCTDetectorElements;
+  const InDetDD::SiDetectorElement* getSCTDetectorElement(const IdentifierHash& waferHash) const;
 };
 
 #endif 
diff --git a/Trigger/TrigTools/TrigInDetTrackFitter/src/TrigDkfTrackMakerTool.cxx b/Trigger/TrigTools/TrigInDetTrackFitter/src/TrigDkfTrackMakerTool.cxx
index 4bb1b437b58b7b2d30a548fdc294d67ce22b1bf9..deafb0db9bafb2d4dbbdeccd8b05635077a387f5 100644
--- a/Trigger/TrigTools/TrigInDetTrackFitter/src/TrigDkfTrackMakerTool.cxx
+++ b/Trigger/TrigTools/TrigInDetTrackFitter/src/TrigDkfTrackMakerTool.cxx
@@ -20,8 +20,11 @@
 #include "TrigInDetEvent/TrigSiSpacePoint.h"
 
 #include "AtlasDetDescr/AtlasDetectorID.h"
+#include "InDetIdentifier/PixelID.h"
+#include "InDetIdentifier/SCT_ID.h"
 #include "InDetPrepRawData/SCT_Cluster.h"
 #include "InDetPrepRawData/PixelCluster.h"
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h"
 #include "InDetRIO_OnTrack/PixelClusterOnTrack.h"
 
@@ -31,13 +34,17 @@
 #include "TrkSurfaces/TrapezoidBounds.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
+#include "StoreGate/ReadCondHandle.h"
+
 #include "TrkDistributedKalmanFilter/TrkFilteringNodes.h"
 #include "TrkDistributedKalmanFilter/TrkTrackState.h"
 
 
 TrigDkfTrackMakerTool::TrigDkfTrackMakerTool(const std::string& t, 
 					     const std::string& n,
-					     const IInterface*  p ): AthAlgTool(t,n,p)
+					     const IInterface*  p ): AthAlgTool(t,n,p),
+  m_mutex{},
+  m_cacheSCTElements{}
 {
   declareInterface< ITrigDkfTrackMakerTool >( this );
   m_idHelper=NULL;
@@ -69,12 +76,8 @@ StatusCode TrigDkfTrackMakerTool::initialize()
       ATH_MSG_ERROR("Could not retrieve Pixel DetectorManager from detStore."); 
       return sc;
    } 
-  sc = detStore()->retrieve(m_SCT_Manager);
-  if( sc.isFailure() ) 
-    {
-      ATH_MSG_ERROR("Could not retrieve SCT DetectorManager from detStore.");
-      return sc;
-    } 
+
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
 
   ATH_MSG_INFO("TrigDkfTrackMakerTool constructed ");
   return sc;
@@ -125,13 +128,13 @@ bool TrigDkfTrackMakerTool::createDkfTrack(std::vector<const TrigSiSpacePoint*>&
 	  if((pCL[0]==NULL)||(pCL[1]==NULL)) continue;
 
 	  IdentifierHash idHash[2];
-	  InDetDD::SiDetectorElement* pEL[2];
+	  const InDetDD::SiDetectorElement* pEL[2];
 	  double RadVec[2];
 	  int index[2];
 	  for(i=0;i<2;i++)
 	    {
 	      idHash[i]=m_sctId->wafer_hash(m_sctId->wafer_id(pCL[i]->identify()));
-	      pEL[i]=m_SCT_Manager->getDetectorElement(idHash[i]);	      
+	      pEL[i]=getSCTDetectorElement(idHash[i]);
 	      const Trk::Surface& rSurf=pEL[i]->surface();
 
 	      // const Trk::Surface& rSurf=pCL[i]->detectorElement()->surface();
@@ -345,3 +348,23 @@ bool TrigDkfTrackMakerTool::createDkfTrack(const Trk::Track& track,
 	return true;
 }
 
+const InDetDD::SiDetectorElement* TrigDkfTrackMakerTool::getSCTDetectorElement(const IdentifierHash& waferHash) const {
+  const EventContext& ctx{Gaudi::Hive::currentContext()};
+
+  static const EventContext::ContextEvt_t invalidValue{EventContext::INVALID_CONTEXT_EVT};
+  EventContext::ContextID_t slot{ctx.slot()};
+  EventContext::ContextEvt_t evt{ctx.evt()};
+  std::lock_guard<std::mutex> lock{m_mutex};
+  if (slot>=m_cacheSCTElements.size()) {
+    m_cacheSCTElements.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement.
+  }
+  if (m_cacheSCTElements[slot]!=evt) {
+    SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> condData{m_SCTDetEleCollKey};
+    if (not condData.isValid()) {
+      ATH_MSG_ERROR("Failed to get " << m_SCTDetEleCollKey.key());
+    }
+    m_SCTDetectorElements.set(*condData);
+    m_cacheSCTElements[slot] = evt;
+  }
+  return (m_SCTDetectorElements.isValid() ? m_SCTDetectorElements->getDetectorElement(waferHash) : nullptr);
+}
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_Clusterization.h b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_Clusterization.h
index 8a0ff4af9513a03b6c3786caa1df7ec38dd6888e..6aebc8a6824558d2676664f7aa547510545b767f 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_Clusterization.h
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_Clusterization.h
@@ -6,13 +6,18 @@
 #define SCT_CLUSTERIZATION_H
 
 #include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "TrkPrepRawData/PrepRawDataCLASS_DEF.h"
-#include "InDetPrepRawData/SCT_ClusterCollection.h"
 #include "Identifier/Identifier.h"
 #include "InDetCondServices/ISiLorentzAngleTool.h"
+#include "InDetPrepRawData/SCT_ClusterCollection.h"
+
 #include <vector>
 
+namespace InDetDD {
+  class SCT_DetectorManager;
+  class SiDetectorElement;
+}
+
 class FastSCT_Clusterization{
 public:
 
@@ -39,7 +44,8 @@ public:
   void setLorentzAngleTool(const ISiLorentzAngleTool* lorentzAngleTool) { m_lorentzAngleTool = lorentzAngleTool; }
 
   void addHit( const Identifier elementId, const IdentifierHash
-	       hashId, const unsigned int strip );
+	       hashId, const unsigned int strip,
+               const InDetDD::SiDetectorElement* detElement);
   void finishHits();
 
   void initializeGeometry(const InDetDD::SCT_DetectorManager* manager);
@@ -56,7 +62,8 @@ public:
 
 private:
   void setupNewElement(const Identifier elementId, const IdentifierHash
-                       hashId, const unsigned int strip );
+                       hashId, const unsigned int strip,
+                       const InDetDD::SiDetectorElement* detElement);
 
   void addCluster();
   
@@ -65,8 +72,8 @@ private:
   bool m_firstWord;
 
   unsigned int m_clusterId;
-  InDetDD::SCT_DetectorManager* m_man;
-  InDetDD::SiDetectorElement* m_detEl;
+  const InDetDD::SCT_DetectorManager* m_man;
+  const InDetDD::SiDetectorElement* m_detEl;
 
   Identifier m_element;
   
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_RodDecoder.h b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_RodDecoder.h
index 30e258887e0d64599db0aaebf116fc86a2225a23..6c9dfc3f0484fb634023c2529ed6f101419fa97d 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_RodDecoder.h
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_RodDecoder.h
@@ -29,9 +29,10 @@
 #include "Identifier/IdContext.h" 
 #include "ByteStreamData/RawEvent.h" 
 
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"  
 #include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "InDetCondServices/ISiLorentzAngleTool.h"
+#include "StoreGate/ReadCondHandleKey.h"
 
 #include <deque>
 
@@ -57,15 +58,15 @@ public:
 		       std::vector<bool>&, FastSCT_Clusterization* );
 
   int addNewStrip(int strip, int, uint32_t onlineId, int ERRORS, float errorHit[20],
-		  std::vector<bool>&);
+		  std::vector<bool>&, const InDetDD::SiDetectorElementCollection* elements);
 
  private:
-  const InDetDD::SCT_DetectorManager *m_indet_mgr; 
   const SCT_ID* m_sct_id; 
   IdContext m_cntx_sct; 
   FastSCT_Clusterization* m_pClusterization;
   ISCT_CablingSvc* m_cablingSvc;
   ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 };
 
 #endif
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/PixelGCBuilder.h b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/PixelGCBuilder.h
index af095588adc2e1960d78034f3a55154176762e05..c434f34a701e70acd66fd0d490a71a971171cb28 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/PixelGCBuilder.h
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/PixelGCBuilder.h
@@ -6,14 +6,17 @@
 #define PIXELGCBUILDER_H
 #include "InDetIdentifier/PixelID.h"
 #include "InDetPrepRawData/PixelClusterCollection.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 
 class TrigSiSpacePoint;
 class TrigSiSpacePoint;
 
+namespace InDetDD {
+  class PixelDetectorManager;
+}
+
 class PixelGCBuilder { 
 public:
-  PixelGCBuilder(const InDetDD::SiDetectorManager* &manager, const PixelID*, int); 
+  PixelGCBuilder(const InDetDD::PixelDetectorManager* &manager, const PixelID*, int); 
   ~PixelGCBuilder();
 
   void formSpacePoints (const InDet::PixelClusterCollection& clusterColl,
@@ -21,7 +24,7 @@ public:
 
 private:
   const PixelID* m_pixelID;
-  const InDetDD::SiDetectorManager* m_manager;
+  const InDetDD::PixelDetectorManager* m_manager;
   int m_OffsetEndcapPixels;
 };
 
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_ClusterCacheTool.h b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_ClusterCacheTool.h
index 462d6f76c18cf7b502eb2585876c7d94b5b00eda..2d6c1a11acca546e91d8de5ed541672e1cdc6e4c 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_ClusterCacheTool.h
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_ClusterCacheTool.h
@@ -17,7 +17,8 @@
 
 #include "TrigOnlineSpacePointTool/FastSCT_RodDecoder.h"
 #include "Identifier/IdContext.h" 
-#include "InDetReadoutGeometry/SiDetectorManager.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
 #include "TrigOnlineSpacePointTool/FastSCT_Clusterization.h"
 #include "TrigOnlineSpacePointTool/ISCT_ClusterCacheTool.h"
 #include <vector>
@@ -26,6 +27,10 @@ class FastSCT_Clusterization;
 class ISCT_CablingSvc;
 class TrigTimer;
 
+namespace InDetDD {
+  class SCT_DetectorManager;
+}
+
 typedef OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment         ROBF ;
 
 class SCT_ClusterCacheTool : public AthAlgTool, virtual public ISCT_ClusterCacheTool  {
@@ -66,6 +71,7 @@ private:
   std::string m_bsErrContainerName;
   std::string m_bsFracContainerName;
   bool m_doBS;
+  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
 #define SCT_CL_CACHE_NTIMERS 5
   TrigTimer* m_timer[SCT_CL_CACHE_NTIMERS];
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_GCBuilder.h b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_GCBuilder.h
index a3a311ca432433a7c8b456086f790000cb21fe25..d6e9ae0f8fe1b538eac10762e28c131b2245887f 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_GCBuilder.h
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_GCBuilder.h
@@ -4,27 +4,33 @@
 
 #ifndef SCT_GCBUILDER_H
 #define SCT_GCBUILDER_H
-#include "InDetIdentifier/SCT_ID.h"
+
 #include "InDetPrepRawData/SCT_ClusterCollection.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 
+#include <vector>
+
+class SCT_ID;
 class TrigSiSpacePoint;
+namespace InDetDD {
+  class SiDetectorElementCollection;
+}
 
 class SCT_GCBuilder {
 public:
-  SCT_GCBuilder(const InDetDD::SiDetectorManager* &manager, const SCT_ID* , bool, int, int);
+  SCT_GCBuilder(const SCT_ID* , bool, int, int);
   ~SCT_GCBuilder();
 
   void formSpacePoints (const InDet::SCT_ClusterCollection& phi_clusterColl,
-			std::vector<TrigSiSpacePoint*>& spacePoints);
+                        const InDetDD::SiDetectorElementCollection* elements,
+                        std::vector<TrigSiSpacePoint*>& spacePoints);
   
-  void formSpacePoints (const InDet::SCT_ClusterCollection& phi_clusterColl, 
-			const InDet::SCT_ClusterCollection& uv_clusterColl, 
-			bool allowPhiOnly,
-			std::vector<TrigSiSpacePoint*>& spacePoints);
+  void formSpacePoints (const InDet::SCT_ClusterCollection& phi_clusterColl,
+                        const InDet::SCT_ClusterCollection& uv_clusterColl,
+                        const bool allowPhiOnly,
+                        const InDetDD::SiDetectorElementCollection* elements,
+                        std::vector<TrigSiSpacePoint*>& spacePoints);
 private:
   const SCT_ID* m_sctID;
-  const InDetDD::SiDetectorManager* m_manager; 
   bool m_useOfflineAlgorithm;
   int m_OffsetBarrelSCT;
   int m_OffsetEndcapSCT;
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_SpacePointTool.h b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_SpacePointTool.h
index 22d4a11d767ba6bba27670cc6d54c45f328ee60b..7ba0668c867da5b212fd2e61b9226d011c10db34 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_SpacePointTool.h
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_SpacePointTool.h
@@ -4,20 +4,23 @@
 
 #ifndef SCT_SpacePointTool_H
 #define SCT_SpacePointTool_H
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "TrigInDetToolInterfaces/ITrigL2LayerNumberTool.h"
-#include "TrigOnlineSpacePointTool/SCT_GCBuilder.h"
-#include "InDetPrepRawData/SCT_ClusterCollection.h"
-#include "InDetIdentifier/SCT_ID.h"
+
 #include "AthenaBaseComps/AthAlgTool.h"
+
+#include "InDetPrepRawData/SCT_ClusterCollection.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "TrigInDetEvent/TrigSiSpacePointCollection.h"
+
 #include "GaudiKernel/ToolHandle.h"
+
 #include <vector>
 
-class TrigSiSpacePoint;
-class TrigTimer;
 class IBeamCondSvc;
 class ITrigL2LayerNumberTool;
-
+class SCT_GCBuilder;
+class SCT_ID;
+class TrigTimer;
 
 class SCT_SpacePointTool : public AthAlgTool {
   public:
@@ -82,7 +85,6 @@ class SCT_SpacePointTool : public AthAlgTool {
     SCT_GCBuilder* m_builder;
 
     const SCT_ID* m_id_sct;
-    const InDetDD::SiDetectorManager * m_mgr;
     IdContext m_cntx_sct; 
 
     bool m_unassociatedPhi;
@@ -102,6 +104,7 @@ class SCT_SpacePointTool : public AthAlgTool {
 
     ToolHandle<ITrigL2LayerNumberTool> m_numberingTool;
 
+    SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
 #define SCTSP_NTIMERS 7
     TrigTimer* m_timer[SCTSP_NTIMERS];
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_Clusterization.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_Clusterization.cxx
index c23706acd4148ee5810c44fa6286d822033568f6..c14a8fe60e3f1cd1a84dee2de0e9de05076f425f 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_Clusterization.cxx
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_Clusterization.cxx
@@ -3,9 +3,10 @@
 */
 
 #include "TrigOnlineSpacePointTool/FastSCT_Clusterization.h"
-#include "TrkPrepRawData/PrepRawDataCLASS_DEF.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
 
+#include "InDetReadoutGeometry/SCT_DetectorManager.h"
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "TrkPrepRawData/PrepRawDataCLASS_DEF.h"
 
 //#define CLUSTERING_DBG 
 
@@ -89,12 +90,13 @@ void FastSCT_Clusterization::addCluster(){
 }
 
 void FastSCT_Clusterization::setupNewElement(const Identifier elementId, 
-					 const IdentifierHash hashId, 
-					 const unsigned int sctStrip){
+                                             const IdentifierHash hashId, 
+                                             const unsigned int sctStrip,
+                                             const InDetDD::SiDetectorElement* detElement){
   
   m_currentClusterColl = new InDet::SCT_ClusterCollection(hashId);
   m_currentClusterColl->setIdentifier(elementId);
-  m_detEl=m_man->getDetectorElement(hashId);
+  m_detEl=detElement;
   m_current_width=1;
   m_first_strip = sctStrip;
   m_last_strip = sctStrip;
@@ -121,7 +123,8 @@ void FastSCT_Clusterization::setupNewElement(const Identifier elementId,
 }
 
 void FastSCT_Clusterization:: addHit( const Identifier elementId, const IdentifierHash
-                                  hashId, const unsigned int sctStrip) {
+                                      hashId, const unsigned int sctStrip,
+                                      const InDetDD::SiDetectorElement* detElement) {
   if (m_firstWord) {
     m_firstWord = false;
 #ifdef CLUSTERING_DBG 
@@ -129,7 +132,7 @@ void FastSCT_Clusterization:: addHit( const Identifier elementId, const Identifi
 #endif
 
     m_element = elementId;
-    setupNewElement(elementId, hashId, sctStrip);
+    setupNewElement(elementId, hashId, sctStrip, detElement);
     
 #ifdef CLUSTERING_DBG 
       std::cout << "done first hit" << std::endl;
@@ -152,7 +155,7 @@ void FastSCT_Clusterization:: addHit( const Identifier elementId, const Identifi
 
     // set up new wafer
     m_element = elementId;
-    setupNewElement(elementId, hashId, sctStrip);
+    setupNewElement(elementId, hashId, sctStrip, detElement);
 
   } else {
 #ifdef CLUSTERING_DBG 
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_RodDecoder.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_RodDecoder.cxx
index 0861fc182c650a9bc7dcf6099bcc3affacc003d4..851ab9be51eaffcd0317e7be31ad506304bf5281 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_RodDecoder.cxx
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_RodDecoder.cxx
@@ -2,14 +2,18 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigTimeAlgs/TrigTimerSvc.h"
-#include "TrigOnlineSpacePointTool/FastSCT_Clusterization.h"
 #include "TrigOnlineSpacePointTool/FastSCT_RodDecoder.h"
-#include "GaudiKernel/ListItem.h"
+
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
+#include "ByteStreamData/ROBData.h"
+#include "StoreGate/ReadCondHandle.h"
+#include "TrigOnlineSpacePointTool/FastSCT_Clusterization.h"
+#include "TrigTimeAlgs/TrigTimerSvc.h"
+
+#include "GaudiKernel/ListItem.h"
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/IToolSvc.h"
-#include "ByteStreamData/ROBData.h" 
+
 #include <algorithm> 
 
 using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
@@ -36,23 +40,17 @@ const InterfaceID& FastSCT_RodDecoder::interfaceID( )
 StatusCode FastSCT_RodDecoder::initialize() {
 
   ATH_MSG_INFO(" initialize "); 
-  StatusCode sc = AthAlgTool::initialize(); 
+  ATH_CHECK(AthAlgTool::initialize());
 
-  sc = detStore()->retrieve(m_indet_mgr,"SCT"); 
-  if (sc.isFailure()) {
-    ATH_MSG_FATAL("Cannot retrieve SCT_DetectorManager!");
-    return StatusCode::FAILURE;
-  } 
-  
-  if (detStore()->retrieve(m_sct_id, "SCT_ID").isFailure()) {                       
-     ATH_MSG_FATAL("Could not get SCT ID helper");
-     return StatusCode::FAILURE;
-  }  
+  ATH_CHECK(detStore()->retrieve(m_sct_id, "SCT_ID"));
 
   m_cntx_sct = m_sct_id->wafer_context();
 
   ATH_CHECK(m_lorentzAngleTool.retrieve());
 
+  // Initialize ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
   return StatusCode::SUCCESS;
 }
 
@@ -113,6 +111,14 @@ bool FastSCT_RodDecoder::fillCollections(const ROBFragment* rob, uint32_t robid,
   //For the BS Time Out Error
   std::vector<uint32_t>  TimeOutErrOnlineIds ;
 
+  // Get SCT_DetectorElementCollection
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+  if (elements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+    return false;
+  }
+
  // loop over the ROB  iterator over 32 bits words
 
   ROBData::iterator it1 = ((ROBData) rob).begin() ;
@@ -180,7 +186,7 @@ bool FastSCT_RodDecoder::fillCollections(const ROBFragment* rob, uint32_t robid,
 		      */
 		      if (strip != oldstrip)
 			{ //if it is a new cluster,  make RDO with the previous cluster
-			  nNewStrips+=addNewStrip(oldstrip,groupSize,onlineId,ERRORS,errorHit, listOfIds);
+			  nNewStrips+=addNewStrip(oldstrip,groupSize,onlineId,ERRORS,errorHit, listOfIds, elements);
 			  saved[oldstrip]=1;
 			  oldstrip = strip;
 			  groupSize = 0;	
@@ -207,7 +213,7 @@ bool FastSCT_RodDecoder::fillCollections(const ROBFragment* rob, uint32_t robid,
 		      */
 		      if (strip != oldstrip) 
 			{ //if it is a new cluster, make RDO with the previous cluster
-			  nNewStrips+=addNewStrip(oldstrip,groupSize,onlineId,ERRORS,errorHit,listOfIds);
+			  nNewStrips+=addNewStrip(oldstrip,groupSize,onlineId,ERRORS,errorHit,listOfIds, elements);
 			  saved[oldstrip]=1;	 
 			  oldstrip = strip;
 			  groupSize = 0;
@@ -278,7 +284,7 @@ bool FastSCT_RodDecoder::fillCollections(const ROBFragment* rob, uint32_t robid,
 			robid<<" online Id "<<onlineId<<std::dec<<endmsg ;
 		      */
 		      groupSize =  1 ;
-		      nNewStrips+=addNewStrip(strip,groupSize,onlineId,ERRORS,errorHit,listOfIds) ;
+		      nNewStrips+=addNewStrip(strip,groupSize,onlineId,ERRORS,errorHit,listOfIds, elements);
 		      saved[strip] = 1;
 		      groupSize = 0 ;
 		    }
@@ -299,12 +305,12 @@ bool FastSCT_RodDecoder::fillCollections(const ROBFragment* rob, uint32_t robid,
 			  strip++;
 			  // tbin = dataWord&0x7;
 			  groupSize = 1;
-			  nNewStrips+=addNewStrip(strip,groupSize,onlineId,ERRORS,errorHit,listOfIds);
+			  nNewStrips+=addNewStrip(strip,groupSize,onlineId,ERRORS,errorHit,listOfIds, elements);
 			  saved[strip] = 1;
 			  // second hit from the pair
 			  strip++;
 			  // tbin = (dataWord >> 4) & 0x7 ;
-			  nNewStrips+=addNewStrip(strip,groupSize,onlineId,ERRORS,errorHit,listOfIds);
+			  nNewStrips+=addNewStrip(strip,groupSize,onlineId,ERRORS,errorHit,listOfIds, elements);
 			  saved[strip] = 1;
 			  groupSize = 0;
 			}
@@ -322,7 +328,7 @@ bool FastSCT_RodDecoder::fillCollections(const ROBFragment* rob, uint32_t robid,
 			  strip++;
 			  // tbin = dataWord&0x7;
 			  groupSize = 1;
-			  nNewStrips+=addNewStrip(strip,groupSize,onlineId,ERRORS,errorHit,listOfIds);
+			  nNewStrips+=addNewStrip(strip,groupSize,onlineId,ERRORS,errorHit,listOfIds, elements);
 			  saved[strip] = 1;  
 			  groupSize = 0; 
 			}
@@ -346,7 +352,7 @@ bool FastSCT_RodDecoder::fillCollections(const ROBFragment* rob, uint32_t robid,
 			groupSize<<", Link "<<linkNb<<", chip "<<chip<<std::dec<<" strip "<<strip<< endmsg ;
 		    }
 		  */
-		  nNewStrips+=addNewStrip(strip, groupSize++, onlineId, ERRORS, errorHit,listOfIds);	 
+		  nNewStrips+=addNewStrip(strip, groupSize++, onlineId, ERRORS, errorHit,listOfIds, elements);
 		  saved[strip] = 1;
 		}
 	      //Every thing is set to default for a new hunt of RDO
@@ -477,7 +483,7 @@ bool FastSCT_RodDecoder::fillCollections(const ROBFragment* rob, uint32_t robid,
   // create RDO of the last link or stream of the event
   if (saved[strip]==0 && oldstrip>=0)
     {
-      nNewStrips+=addNewStrip(strip, groupSize++, onlineId, ERRORS, errorHit,listOfIds);
+      nNewStrips+=addNewStrip(strip, groupSize++, onlineId, ERRORS, errorHit,listOfIds, elements);
       saved[strip] = 1;
     }
   /*
@@ -489,7 +495,8 @@ bool FastSCT_RodDecoder::fillCollections(const ROBFragment* rob, uint32_t robid,
 }
 
 int FastSCT_RodDecoder::addNewStrip(int Strip0, int groupSize, uint32_t onlineId, 
-                                    int /*ERRORS*/, float /*errorHit*/[20], std::vector<bool>& listOfIds)
+                                    int /*ERRORS*/, float /*errorHit*/[20], std::vector<bool>& listOfIds,
+                                    const InDetDD::SiDetectorElementCollection* elements)
 
 {
   const IdentifierHash hashId = m_cablingSvc->getHashFromOnlineId(onlineId) ;
@@ -509,7 +516,7 @@ int FastSCT_RodDecoder::addNewStrip(int Strip0, int groupSize, uint32_t onlineId
       return 0;
     }
 
-  const InDetDD::SiDetectorElement * p_element = (m_indet_mgr->getDetectorElement(hashId));
+  const InDetDD::SiDetectorElement * p_element = (elements->getDetectorElement(hashId));
   int iStrip,strip;
   if (p_element->swapPhiReadoutDirection()) 
     {
@@ -523,7 +530,7 @@ int FastSCT_RodDecoder::addNewStrip(int Strip0, int groupSize, uint32_t onlineId
 	    ATH_MSG_DEBUG<< "add strip " <<strip<<" groupSize="<<groupSize<<" HashId "<<(int)hashId<<"  "<<
 	      m_sct_id->print_to_string(idColl)<<endmsg;
 	  */
-	  m_pClusterization->addHit(idColl, hashId,strip);
+	  m_pClusterization->addHit(idColl, hashId, strip, p_element);
 	}
     }
   else
@@ -538,7 +545,7 @@ int FastSCT_RodDecoder::addNewStrip(int Strip0, int groupSize, uint32_t onlineId
 	    ATH_MSG_DEBUG<< "add strip " <<strip<<" groupSize="<<groupSize<<" HashId "<<(int)hashId<<"  "<<
 	      m_sct_id->print_to_string(idColl)<<endmsg;
 	  */
-	  m_pClusterization->addHit(idColl, hashId,strip);
+	  m_pClusterization->addHit(idColl, hashId, strip, p_element);
 	}
     }
   return groupSize;
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/OnlineSpacePointProviderTool.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/OnlineSpacePointProviderTool.cxx
index 670abdc05408d6b96fb3ea7c7922b71f5674c580..a78cc4cccd38abfe2ed41095842c5d2fceb3d547 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/OnlineSpacePointProviderTool.cxx
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/OnlineSpacePointProviderTool.cxx
@@ -22,7 +22,6 @@
 #include "InDetPrepRawData/PixelClusterContainer.h"
 #include "InDetPrepRawData/SCT_ClusterCollection.h"
 #include "InDetPrepRawData/SCT_ClusterContainer.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 // SpacePoint creation
 #include "IRegionSelector/IRegSelSvc.h"
 #include "TrigInDetEvent/TrigSiSpacePoint.h"
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/PixelGCBuilder.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/PixelGCBuilder.cxx
index 3cd6e0bbec7055e4584f2877b778a4d89f490d63..dddc5204b77b1590689da90d798010400d761f54 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/PixelGCBuilder.cxx
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/PixelGCBuilder.cxx
@@ -5,13 +5,12 @@
 #include "TrigOnlineSpacePointTool/PixelGCBuilder.h"
 #include "InDetPrepRawData/PixelClusterCollection.h"
 #include "TrigInDetEvent/TrigSiSpacePoint.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
 
 #include <cmath>
 //#define GCDEBUG 
 
-PixelGCBuilder::PixelGCBuilder(const InDetDD::SiDetectorManager* &manager, const PixelID* pixelId, 
+PixelGCBuilder::PixelGCBuilder(const InDetDD::PixelDetectorManager* &manager, const PixelID* pixelId, 
 			       int offsetEndcapPixels) {
   m_manager=manager;
   m_pixelID = pixelId;
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/PixelSpacePointTool.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/PixelSpacePointTool.cxx
index 99424f71427123d5036d92f8e80d5bbfc841497c..0dbd7eb6766a59f7422b1f02675d5576acfcbf63 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/PixelSpacePointTool.cxx
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/PixelSpacePointTool.cxx
@@ -8,7 +8,7 @@
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 #include "InDetIdentifier/PixelID.h"
 #include "Identifier/IdentifierHash.h" 
-#include "InDetReadoutGeometry/SiDetectorManager.h"
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include <string>
 #include "TrigTimeAlgs/TrigTimerSvc.h"
 
@@ -44,7 +44,7 @@ PixelSpacePointTool::PixelSpacePointTool( const std::string& type,
 StatusCode PixelSpacePointTool::initialize()  {
   ATH_MSG_DEBUG(name() << " in initialize");
 
-  const InDetDD::SiDetectorManager * mgr;
+  const InDetDD::PixelDetectorManager * mgr;
   StatusCode sc=detStore()->retrieve(mgr, "Pixel");
   if (sc.isFailure()) {
     ATH_MSG_ERROR(name() << "failed to get Pixel Manager");
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_ClusterCacheTool.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_ClusterCacheTool.cxx
index 491f79a13af8d5175ef3bf565397f27ddd38c8f2..5cab2807e3036924cafd0caef09cf8d642e6f74c 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_ClusterCacheTool.cxx
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_ClusterCacheTool.cxx
@@ -2,32 +2,30 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigTimeAlgs/TrigTimerSvc.h"
-#include "InDetPrepRawData/SCT_ClusterCollection.h"
-#include "SCT_RawDataByteStreamCnv/ISCT_RodDecoder.h"
-#include "InDetPrepRawData/SiClusterContainer.h"
 #include "TrigOnlineSpacePointTool/SCT_ClusterCacheTool.h"
-#include "AthenaBaseComps/AthMsgStreamMacros.h"
-#include "InDetIdentifier/SCT_ID.h"
-#include "Identifier/IdentifierHash.h" 
-
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include <string>
-#include <sstream>
 
+#include "AthenaBaseComps/AthMsgStreamMacros.h"
 #include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
-#include "TrigOnlineSpacePointTool/FastSCT_Clusterization.h"
-#include "eformat/SourceIdentifier.h" 
-using eformat::helper::SourceIdentifier;
 #include "ByteStreamData/ROBData.h" 
+#include "eformat/SourceIdentifier.h"
+#include "Identifier/IdentifierHash.h"
+#include "InDetByteStreamErrors/InDetBSErrContainer.h"
+#include "InDetByteStreamErrors/SCT_ByteStreamFractionContainer.h"
+#include "InDetIdentifier/SCT_ID.h"
+#include "InDetPrepRawData/SCT_ClusterCollection.h"
+#include "InDetPrepRawData/SiClusterContainer.h"
+#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "SCT_Cabling/ISCT_CablingSvc.h"
-
+#include "SCT_RawDataByteStreamCnv/ISCT_RodDecoder.h"
+#include "StoreGate/ReadCondHandle.h"
+#include "TrigOnlineSpacePointTool/FastSCT_Clusterization.h"
 #include "TrigTimeAlgs/TrigTimerSvc.h"
 
-#include "InDetByteStreamErrors/InDetBSErrContainer.h"
-#include "InDetByteStreamErrors/SCT_ByteStreamFractionContainer.h"
+#include <sstream>
+#include <string>
 
 using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
+using eformat::helper::SourceIdentifier;
 
 SCT_ClusterCacheTool::SCT_ClusterCacheTool( const std::string& type, 
 					    const std::string& name, 
@@ -160,6 +158,8 @@ StatusCode SCT_ClusterCacheTool::initialize()  {
     m_timer[4] = timerSvc->addItem("SCT_CLTot");
   }
 
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+
   return sc;
 }
 
@@ -184,6 +184,14 @@ StatusCode SCT_ClusterCacheTool::convertBStoClusters(std::vector<const ROBF*>& r
       m_timer[4]->start();
     }
 
+  // Get SCT_DetectorElementCollection
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+  if (elements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+    return StatusCode::FAILURE;
+  }
+
   if(!evtStore()->contains<InDet::SCT_ClusterContainer>(m_containerName))
     {
       m_clusterContainer->cleanup();
@@ -382,6 +390,7 @@ StatusCode SCT_ClusterCacheTool::convertBStoClusters(std::vector<const ROBF*>& r
       int nstrips=0;
       for (std::vector<IdentifierHash>::iterator it=reducedList.begin(); it != reducedList.end(); ++it)        
 	{
+          const InDetDD::SiDetectorElement* element = elements->getDetectorElement((*it));
 	  SCT_RDO_Container::const_iterator collIt=m_rdoContainer->indexFind((*it));
 	  if(collIt==m_rdoContainer->end())
 	    continue;
@@ -396,13 +405,13 @@ StatusCode SCT_ClusterCacheTool::convertBStoClusters(std::vector<const ROBF*>& r
 		      int strip=m_sct_id->strip(stripId);
 		      nstrips++;
 		      m_clusterization.addHit((*collIt)->identify(),(*collIt)->identifyHash(),
-					      strip);
+					      strip, element);
 		      int groupSize=(*rdoIt)->getGroupSize();
 		      for(int ig=1;ig<groupSize;ig++)
 			{
 			  strip++;
 			  m_clusterization.addHit((*collIt)->identify(),(*collIt)->identifyHash(),
-						  strip);
+						  strip, element);
 			  nstrips++;
 			}
 		    }
@@ -411,7 +420,6 @@ StatusCode SCT_ClusterCacheTool::convertBStoClusters(std::vector<const ROBF*>& r
 		{
 		  const InDetRawDataCollection<SCT_RDORawData>* pRdoColl = (*collIt);
 		  const InDet::SCT_ClusterCollection* pColl = m_clusteringTool->clusterize(*pRdoColl,
-											   *m_indet_mgr,
 											   *m_sct_id);
 		  if(pColl!=NULL) 
 		    {
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_GCBuilder.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_GCBuilder.cxx
index 491b8234960d1bd7de19e30a98e58d2d76d24a53..3a7b9be863b8c3199fbc9c34e4795019aefb94e4 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_GCBuilder.cxx
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_GCBuilder.cxx
@@ -4,23 +4,20 @@
 
 #include "TrigOnlineSpacePointTool/SCT_GCBuilder.h"
 
-#include "InDetReadoutGeometry/SiLocalPosition.h"  
-#include "InDetReadoutGeometry/SiDetectorElement.h"  
-
-#include "InDetPrepRawData/SCT_ClusterCollection.h"
+#include "InDetIdentifier/SCT_ID.h"
+#include "InDetReadoutGeometry/SiLocalPosition.h"
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "TrigInDetEvent/TrigSiSpacePoint.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
-#include <cmath>
 
+#include <cmath>
 
 //#define GCDEBUG 
 
 #define WAFER_WIDTH 0.1
 
-SCT_GCBuilder::SCT_GCBuilder(const InDetDD::SiDetectorManager* &manager, const SCT_ID* sctId, bool useOffline,
+SCT_GCBuilder::SCT_GCBuilder(const SCT_ID* sctId, bool useOffline,
 			     int offsetBarrelSCT, int offsetEndcapSCT) {
-  m_manager=manager;
   m_sctID = sctId;
   m_useOfflineAlgorithm=useOffline;
   m_OffsetBarrelSCT = offsetBarrelSCT;
@@ -31,6 +28,7 @@ SCT_GCBuilder::~SCT_GCBuilder() {
 }
 
 void SCT_GCBuilder::formSpacePoints (const InDet::SCT_ClusterCollection& phi_clusterColl, 
+                                     const InDetDD::SiDetectorElementCollection* elements,
 				     std::vector<TrigSiSpacePoint*>& space_points) {
   double locT, locL, errLocT, errLocL, x, y;
   double r, dr, phi, dphi, z, dz;
@@ -40,7 +38,7 @@ void SCT_GCBuilder::formSpacePoints (const InDet::SCT_ClusterCollection& phi_clu
   const Identifier& waferId = phi_clusterColl.identify();
   const IdentifierHash& waferIdHash = phi_clusterColl.identifyHash();
 
-  const InDetDD::SiDetectorElement* element=m_manager->getDetectorElement(waferIdHash);
+  const InDetDD::SiDetectorElement* element=elements->getDetectorElement(waferIdHash);
 
   double pitchPhi = element->phiPitch();
   double pitchPhiRadians = pitchPhi/element->center().mag();
@@ -147,7 +145,8 @@ void SCT_GCBuilder::formSpacePoints (const InDet::SCT_ClusterCollection& phi_clu
 
 void SCT_GCBuilder::formSpacePoints (const InDet::SCT_ClusterCollection& phi_clusterColl, 
 				     const InDet::SCT_ClusterCollection& uv_clusterColl, 
-				     bool allowPhiOnly,
+				     const bool allowPhiOnly,
+                                     const InDetDD::SiDetectorElementCollection* elements,
 				     std::vector<TrigSiSpacePoint*>& space_points) 
 {
   double errLocT,errLocL,x,y;
@@ -170,8 +169,8 @@ void SCT_GCBuilder::formSpacePoints (const InDet::SCT_ClusterCollection& phi_clu
   IdentifierHash phi_waferIdHash = phi_clusterColl.identifyHash();  
   IdentifierHash uv_waferIdHash  = uv_clusterColl.identifyHash();
 
-  const InDetDD::SiDetectorElement* phi_element=m_manager->getDetectorElement(phi_waferIdHash);
-  const InDetDD::SiDetectorElement* uv_element=m_manager->getDetectorElement(uv_waferIdHash);
+  const InDetDD::SiDetectorElement* phi_element=elements->getDetectorElement(phi_waferIdHash);
+  const InDetDD::SiDetectorElement* uv_element=elements->getDetectorElement(uv_waferIdHash);
 
   if(phi_element->isStereo())
     {
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_SpacePointTool.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_SpacePointTool.cxx
index 677511bf7b22f173d82962463fbe12c5db63b0d0..c66ac4751fbeeeeae95922a1aeded69c92050f42 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_SpacePointTool.cxx
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_SpacePointTool.cxx
@@ -1,15 +1,21 @@
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigInDetEvent/TrigSiSpacePointCollection.h"
-#include "InDetBeamSpotService/IBeamCondSvc.h"
 #include "TrigOnlineSpacePointTool/SCT_SpacePointTool.h"
+
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 #include "Identifier/IdentifierHash.h" 
-#include <string>
+#include "InDetBeamSpotService/IBeamCondSvc.h"
+#include "InDetIdentifier/SCT_ID.h"
+#include "StoreGate/ReadCondHandle.h"
+#include "TrigInDetToolInterfaces/ITrigL2LayerNumberTool.h"
+#include "TrigOnlineSpacePointTool/SCT_GCBuilder.h"
 #include "TrigTimeAlgs/TrigTimerSvc.h"
 
+#include <string>
+
 static const InterfaceID IID_ISCT_SpacePointTool
             ("SCT_SpacePointTool", 136, 0);
 
@@ -47,25 +53,21 @@ StatusCode SCT_SpacePointTool::initialize()  {
 
   ATH_MSG_DEBUG( name() << " in initialize" );
   
-  StatusCode sc=detStore()->retrieve(m_mgr, "SCT");
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR( name() << "failed to get SCT Manager" );
-    return StatusCode::FAILURE;
-  }
-
   // Get SCT  helpers                                                                                                                         
   if (detStore()->retrieve(m_id_sct, "SCT_ID").isFailure()) { 
      ATH_MSG_FATAL( "Could not get SCT ID helper" ); 
      return StatusCode::FAILURE; 
   }  
 
-  sc=m_numberingTool.retrieve();
+  StatusCode sc=m_numberingTool.retrieve();
   if(sc.isFailure()) {
     ATH_MSG_ERROR("Could not retrieve "<<m_numberingTool);
     return sc;
   }
+
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
   
-  m_builder = new SCT_GCBuilder(m_mgr,m_id_sct,m_useOfflineAlgorithm,
+  m_builder = new SCT_GCBuilder(m_id_sct,m_useOfflineAlgorithm,
 				m_numberingTool->offsetBarrelSCT(),
 				m_numberingTool->offsetEndcapSCT());
 
@@ -134,13 +136,20 @@ StatusCode SCT_SpacePointTool::finalize() {
 StatusCode SCT_SpacePointTool::fillCollections(ClusterCollectionVector& clusterCollData,std::vector<int>& listOfIds) 
 { 
 
-  StatusCode sc;
+  // Get SCT_DetectorElementCollection
+  SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
+  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+  if (elements==nullptr) {
+    ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
+    return StatusCode::FAILURE;
+  }
 
   std::map <Identifier,  PhiUVPair> phi_uv_table;
   std::map <Identifier,  PhiUVPair>::iterator iter_phiUV;
 
   int nSP=0;listOfIds.clear();
 
+  StatusCode sc;
   if(!evtStore()->contains<TrigSiSpacePointContainer>(m_spacepointContainerName))
     {
       m_spacepointContainer->cleanup();
@@ -183,6 +192,7 @@ StatusCode SCT_SpacePointTool::fillCollections(ClusterCollectionVector& clusterC
   for (; iter_coll != clusterCollData.end(); iter_coll++) {
 
     Identifier wafer_id = (*iter_coll)->identify();
+    IdentifierHash wafer_hash = (*iter_coll)->identifyHash();
     Identifier module_id =  m_id_sct->wafer_id(m_id_sct->barrel_ec(wafer_id),
 					       m_id_sct->layer_disk(wafer_id),
 					       m_id_sct->phi_module(wafer_id),
@@ -191,7 +201,7 @@ StatusCode SCT_SpacePointTool::fillCollections(ClusterCollectionVector& clusterC
     bool phi_wafer_found = false;
 
     // Find out if it is a phi wafer   
-    const InDetDD::SiDetectorElement* element=m_mgr->getDetectorElement(wafer_id);
+    const InDetDD::SiDetectorElement* element=elements->getDetectorElement(wafer_hash);
     if(!element->isStereo()) phi_wafer_found = true;
 
     /*
@@ -294,7 +304,7 @@ StatusCode SCT_SpacePointTool::fillCollections(ClusterCollectionVector& clusterC
     if ( ((*iter_phiUV).second).uvWafer() == 0 ) 
       {
 	if (m_unassociatedPhi) 
-	  m_builder->formSpacePoints( *(((*iter_phiUV).second).phiWafer()), newSpacePointData ); 
+	  m_builder->formSpacePoints( *(((*iter_phiUV).second).phiWafer()), elements, newSpacePointData );
       } 
     else 
       {
@@ -306,7 +316,7 @@ StatusCode SCT_SpacePointTool::fillCollections(ClusterCollectionVector& clusterC
 	*/
 	m_builder->formSpacePoints( *(((*iter_phiUV).second).phiWafer()), 
 				    *(((*iter_phiUV).second).uvWafer()),
-				    m_unassociatedPhi, newSpacePointData);  
+				    m_unassociatedPhi, elements, newSpacePointData);
 	if ( m_timers ) m_timer[0]->pause();
       } 
 
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/test/test_mc_pp_v7_trigdecisiontool_grid.sh b/Trigger/TrigValidation/TrigAnalysisTest/test/test_mc_pp_v7_trigdecisiontool_grid.sh
index 09335042d49c857bd142d5ebcf01c88007a10deb..26b67fc32b6500dab1ea06e812a67bc32252b3a2 100755
--- a/Trigger/TrigValidation/TrigAnalysisTest/test/test_mc_pp_v7_trigdecisiontool_grid.sh
+++ b/Trigger/TrigValidation/TrigAnalysisTest/test/test_mc_pp_v7_trigdecisiontool_grid.sh
@@ -28,7 +28,7 @@ export JOB_LOG="athena.log"
 export TEST="TrigAnalysisTest"
 export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigAnalysisTest/AthenaTrigAOD_TrigEDMandTDTCheck_MC_pp_v7_chain/AOD.pool.root"]'
 
-athena.py -c "RunningRTT=TRUE;jp.AthenaCommonFlags.PoolAODInput=${DS}" -b TrigAnalysisTest/testAthenaTrigAOD_TrigDecTool.py | tee ${JOB_LOG}
+athena.py -c "RunningRTT=TRUE;jp.AthenaCommonFlags.PoolAODInput=${DS};DetDescrVersion='ATLAS-R2-2015-03-01-00'" -b TrigAnalysisTest/testAthenaTrigAOD_TrigDecTool.py | tee ${JOB_LOG}
 echo "art-result: ${PIPESTATUS[0]} ${JOB_LOG%%.*}"
 
 source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/test/test_mc_pp_v7_trigedm_grid.sh b/Trigger/TrigValidation/TrigAnalysisTest/test/test_mc_pp_v7_trigedm_grid.sh
index 5e8687fa7ab017e9f62336e2e8813479396e8a13..995bd2c464a826bcd771e3c581f21b68612425ea 100755
--- a/Trigger/TrigValidation/TrigAnalysisTest/test/test_mc_pp_v7_trigedm_grid.sh
+++ b/Trigger/TrigValidation/TrigAnalysisTest/test/test_mc_pp_v7_trigedm_grid.sh
@@ -28,7 +28,7 @@ export JOB_LOG="athena.log"
 export TEST="TrigAnalysisTest"
 export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigAnalysisTest/AthenaTrigAOD_TrigEDMandTDTCheck_MC_pp_v7_chain/AOD.pool.root"]'
 
-athena.py -c "RunningRTT=TRUE;jp.AthenaCommonFlags.PoolAODInput=${DS}" -b TrigAnalysisTest/testAthenaTrigAOD_TrigEDMCheck.py | tee ${JOB_LOG}
+athena.py -c "RunningRTT=TRUE;jp.AthenaCommonFlags.PoolAODInput=${DS};DetDescrVersion='ATLAS-R2-2015-03-01-00'" -b TrigAnalysisTest/testAthenaTrigAOD_TrigEDMCheck.py | tee ${JOB_LOG}
 echo "art-result: ${PIPESTATUS[0]} ${JOB_LOG%%.*}"
 
 source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TrigEgammaValidation/share/generalJobOption.py b/Trigger/TrigValidation/TrigEgammaValidation/share/generalJobOption.py
index e23a1353b631770ca97b094d56e58c34f7155616..79945d20a8648a5a92577e79f392ce331b04b994 100644
--- a/Trigger/TrigValidation/TrigEgammaValidation/share/generalJobOption.py
+++ b/Trigger/TrigValidation/TrigEgammaValidation/share/generalJobOption.py
@@ -213,9 +213,6 @@ elif (WhichInput == "BS"):
     #if hasattr(ToolSvc,"TRT_FillCablingData_DC3"):
     #  ToolSvc.TRT_FillCablingData_DC3.RealData=False
 
-    #if hasattr(ToolSvc,"SCT_CablingSelector"):
-    #  ToolSvc.SCT_CablingSelector.Filename = "SCT_Jan08Cabling.dat" 
-
 jobproperties.PerfMonFlags.doMonitoring = True
 
 print ">>>>>>>>== generalJobOption.py DEBUG ==<<<<<<<<<"
diff --git a/Trigger/TrigValidation/TrigP1Test/share/TopOptions_WriteBS_LVL1sim_fromAthena.py b/Trigger/TrigValidation/TrigP1Test/share/TopOptions_WriteBS_LVL1sim_fromAthena.py
index fe192170459492275e51d807214c032902229633..bab3d27d0e8181f103500247e157817e18047e2b 100644
--- a/Trigger/TrigValidation/TrigP1Test/share/TopOptions_WriteBS_LVL1sim_fromAthena.py
+++ b/Trigger/TrigValidation/TrigP1Test/share/TopOptions_WriteBS_LVL1sim_fromAthena.py
@@ -130,12 +130,6 @@ from LArByteStream.LArByteStreamConf import LArRawDataContByteStreamTool
 ToolSvc+=LArRawDataContByteStreamTool()               
 ToolSvc.LArRawDataContByteStreamTool.InitializeForWriting=True
 
-# -------------------------------------------------------------
-# SCT Cablings
-# -------------------------------------------------------------
-if hasattr(ToolSvc,"SCT_CablingSelector"):
-    ToolSvc.SCT_CablingSelector.Filename = "SCT_Jan08Cabling.dat"
-
 theApp.CreateSvc  += ["StoreGateSvc/StoreGateSvc" ]
 ByteStreamAddressProviderSvc = Service( "ByteStreamAddressProviderSvc" )
 ByteStreamAddressProviderSvc.TypeNames += [ 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
index 6e9b2b58e25c241627e3c00359f14e7624730881..4649d657fe7aa2aa20c9ed8ff8c50153abc9c993 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
+++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
@@ -13,7 +13,7 @@ atlas_depends_on_subdirs( PUBLIC
                           PRIVATE
                           Control/AthenaBaseComps
                           Trigger/TrigEvent/TrigSteeringEvent
-			  Control/AthViews			  
+			  Control/AthViews
                           )
 
 find_package( Boost COMPONENTS filesystem thread system )
@@ -46,8 +46,8 @@ atlas_add_test( ViewSchedule64 SCRIPT test/test_view_schedule.sh
 
 
 atlas_add_test( merge
-                SCRIPT test/test_merge.sh 
-		PROPERTIES TIMEOUT 500 
+                SCRIPT test/test_merge.sh
+		PROPERTIES TIMEOUT 500
 	      )
 
 file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_IDRunMC )
@@ -63,14 +63,10 @@ atlas_add_test( IDRunData SCRIPT test/test_id_run_data.sh
 		PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_IDRunData
               )
 
-#atlas_add_test( caloRunData SCRIPT test/test_calo_run_data.sh
-#                PROPERTIES TIMEOUT 500
-#              )
-# replaced by complete egamma test
 file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_egammaRunData )
 atlas_add_test( egammaRunData
 		SCRIPT test/test_egamma_run_data.sh
-                PROPERTIES TIMEOUT 500 
+                PROPERTIES TIMEOUT 500
 		PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_egammaRunData
               )
 
@@ -83,30 +79,30 @@ atlas_add_test( photonMenu
 #		EXTRA_PATTERNS "TriggerSummary"
 file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_egammaMenu )
 atlas_add_test( egammaMenu
-		SCRIPT test/test_egamma_menu.sh	
-                PROPERTIES TIMEOUT 500 
+		SCRIPT test/test_egamma_menu.sh
+                PROPERTIES TIMEOUT 500
 		PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_egammaMenu
               )
 
 file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_muRunData )
 atlas_add_test( muRunData
-		SCRIPT test/test_mu_run_data.sh		
-                PROPERTIES TIMEOUT 500 
+		SCRIPT test/test_mu_run_data.sh
+                PROPERTIES TIMEOUT 500
 		PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_muRunData
               )
 
 file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_muMenu )
 atlas_add_test( muMenu
-		SCRIPT test/test_mu_menu.sh     
-		PROPERTIES TIMEOUT 500 
+		SCRIPT test/test_mu_menu.sh
+		PROPERTIES TIMEOUT 500
 		PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_muMenu
               )
 
-file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_egammaMuMenu )
-atlas_add_test( egammaMuMenu
-		SCRIPT test/test_egamma_mu_menu.sh	
-                PROPERTIES TIMEOUT 500 
-		PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_egammaMuMenu
+file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_fullMenu )
+atlas_add_test( fullMenu
+		SCRIPT test/test_full_menu.sh
+                PROPERTIES TIMEOUT 500
+		PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_fullMenu
               )
 
 file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_idCaloRunData )
@@ -116,27 +112,31 @@ atlas_add_test( idCaloRunData
 		PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_idCaloRunData
               )
 
+file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_emu_l1_decoding )
 atlas_add_test( EmuL1Decoding
 		SCRIPT test/test_emu_l1_decoding.sh
+		PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_emu_l1_decoding
 		)
 
 
+file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_emu_step_processing )
 atlas_add_test( EmuStepProcessing
 		SCRIPT	test/test_emu_step_processing.sh
-		EXTRA_PATTERNS "-s TriggerMonitorFinal"		
+		EXTRA_PATTERNS "-s TriggerMonitorFinal"
+		PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_emu_step_processing
 )
 
 file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_NewJO )
-atlas_add_test( NewJO 
+atlas_add_test( NewJO
 		SCRIPT test/test_newJO.sh
-                PROPERTIES TIMEOUT 500 
+                PROPERTIES TIMEOUT 500
 		PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_NewJO
 		)
 
 file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_l1sim )
 atlas_add_test( l1sim
 		SCRIPT test/test_l1sim.sh
-                PROPERTIES TIMEOUT 500 
+                PROPERTIES TIMEOUT 500
 		PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_l1sim
 		)
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py
index ebf88a6a2d3e05fb06cfa07546ece11100e12de6..98906442d89af5f9751ac883b88844dec23e926d 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py
@@ -39,7 +39,6 @@ def makeMonitor(name, decisions, EnabledChainNames):
         print collect
         tools.append(collect)
     mon.CollectorTools=tools
-  #[ x.split(":")[1] for x in  MenuTest.CTPToChainMapping ]
     print mon
     return mon
 
@@ -54,19 +53,20 @@ def makeStreamESD(name, flatDecisions):
     def addTC(name):   
         StreamESD.ItemList += [ "xAOD::TrigCompositeContainer#"+name, "xAOD::TrigCompositeAuxContainer#"+name+"Aux." ]
 
-    
     for tc in flatDecisions:
-        #edmCreator.TrigCompositeContainer:
         addTC( tc )
 
     addTC("HLTSummary")
-    log.debug("ESD file content: ")
-    log.debug( StreamESD.ItemList  )
+    if log.isEnabledFor(logging.DEBUG):
+        log.debug("ESD file content: ")
+        log.debug( StreamESD.ItemList  )
     return StreamESD
 
+
 def create_step_reco_node(name, seq_list, dump=False):
     """ elementary HLT reco step, contianing all sequences of the step """
-    log.debug("Create reco step %s with %d sequences", name, len(seq_list))
+    if log.isEnabledFor(logging.DEBUG):
+        log.debug("Create reco step %s with %d sequences", name, len(seq_list))
     stepCF = parOR(name+"_reco")
     for seq in seq_list:        
         step_seq = create_CFSequence(seq)             
@@ -78,7 +78,8 @@ def create_step_reco_node(name, seq_list, dump=False):
 
 def create_step_filter_node(name, seq_list, dump=False):
     """ elementary HLT filter step: OR node containing all Filters of the sequences. The node gates execution of next reco step """
-    log.debug("Create filter step %s with %d filters", name, len(seq_list))
+    if log.isEnabledFor(logging.DEBUG):
+        log.debug("Create filter step %s with %d filters", name, len(seq_list))
     stepCF = parOR(name+"_filter")
     for seq in seq_list:
         filterAlg=seq.filter.Alg                    
@@ -104,35 +105,24 @@ def create_step_sequence(name, filterAlg, rest,sublist):
 
 def create_CFSequence(CFseq):
     """ Creates AthSequencer nodes with sequences attached """
-    log.debug(" *** Create CFSequence %s with FilterAlg %s *", CFseq.name, CFseq.filter.Alg.name())
+    if log.isEnabledFor(logging.DEBUG):
+        log.debug(" *** Create CFSequence %s with FilterAlg %s *", CFseq.name, CFseq.filter.Alg.name())
     filterAlg=CFseq.filter.Alg
 
 
     stepReco = parOR(CFseq.name+"_reco") # all reco algoritms from al lthe sequences in a parallel sequence
     seqAndView = seqAND(CFseq.name+"_view", [stepReco]) #include in seq:And to run in views: add here the Hypo
     seqAndWithFilter = seqAND(CFseq.name, [filterAlg, seqAndView]) # add to the main step+filter
-#    stepAnd += seqAndView
     
     for menuseq in CFseq.step.sequences:
         ath_sequence=menuseq.sequence.Alg
         subs = ath_sequence
         stepReco += subs
         seqAndView += menuseq.hypo.Alg 
-#        stepReco = parOR(CFseq.name+"_reco", subs)
-#        seqAndView = seqAND(CFseq.name+"_view", [stepReco,menuseq.hypo.Alg ])      
-
-
-
-    
-    ## for menuseq in CFseq.menuSeq:
-    ##     ath_sequence=menuseq.sequence.Alg
-    ##     subs = ath_sequence
-    ##     stepReco = parOR(CFseq.name+"_reco", subs)
-    ##     seqAndView = seqAND(CFseq.name+"_view", [stepReco,menuseq.hypo.Alg ])      
-    ##     stepAnd += seqAndView
 
     if CFseq.step.isCombo:
         seqAndView += CFseq.step.combo.Alg
+        print CFseq.step.combo.Alg
         
     return seqAndWithFilter
 
@@ -195,7 +185,8 @@ def makeHLTTree(HLTChains):
 
 def decisionTree_From_Chains(HLTNode, chains):
     """ creates the decision tree, given the starting node and the chains containing the sequences  """
-    log.debug("Run decisionTree_From_Chains on %s", HLTNode.name())
+    if log.isEnabledFor(logging.DEBUG):
+        log.debug("Run decisionTree_From_Chains on %s", HLTNode.name())
 
     from TrigUpgradeTest.MenuComponents import CFSequence, RoRSequenceFilterNode, ComboMaker
     HLTNodeName= HLTNode.name()
@@ -204,10 +195,13 @@ def decisionTree_From_Chains(HLTNode, chains):
     NSTEPS=0
     for chain in chains:
         steps =len(chain.steps)
-        log.debug("Adding chain %s with %d steps"%(chain.name,steps))
+        if log.isEnabledFor(logging.DEBUG):
+            log.debug("Adding chain %s with %d steps"%(chain.name,steps))
         if NSTEPS < steps:
             NSTEPS = steps
-    log.debug("Run on %d steps", NSTEPS)
+            
+    if log.isEnabledFor(logging.DEBUG):
+        log.debug("Run on %d steps", NSTEPS)
     
 
     #loop over chains to configure hypotools
@@ -215,10 +209,7 @@ def decisionTree_From_Chains(HLTNode, chains):
     for chain in chains:
         chain.decodeHypoToolConfs()
 
-
-  #  finaleDecisions = [[] for y in range(NSTEPS)] 
     finalDecisions = [] # needed for monitor
-#    step_decisions = []
     allSeq_list = []
     for nstep in range(0, NSTEPS):
         finalDecisions.append([]) # list of final deciisons per step
@@ -231,10 +222,9 @@ def decisionTree_From_Chains(HLTNode, chains):
                 continue
 
             chain_step=chain.steps[nstep]
-            log.debug("\n************* Start step %d %s for chain %s", nstep+1, stepCF_name, chain.name)
-            
+            if log.isEnabledFor(logging.DEBUG):
+                log.debug("\n************* Start step %d %s for chain %s", nstep+1, stepCF_name, chain.name)
             
-           
             # one filter per step_chain
             # one filter input per previous menusequence output (the L1Seed for first step)
             # one filter output per menuSeq
@@ -243,9 +233,10 @@ def decisionTree_From_Chains(HLTNode, chains):
             if nstep == 0: # L1 seeding
                 previous_sequence="".join(chain.group_seed)              
                 seeds=chain.group_seed
-                log.debug("Found these seeds from the sequence: %s", seeds)
                 filter_input.extend( seeds )
-                log.debug("Seeds from this chain: %s", filter_input)
+                if log.isEnabledFor(logging.DEBUG):
+                    log.debug("Found these seeds from the sequence: %s", seeds)
+                    log.debug("Seeds from this chain: %s", filter_input)
                 previous_seeds=seeds  
                                       
             else:
@@ -256,35 +247,35 @@ def decisionTree_From_Chains(HLTNode, chains):
                 for seq in prev:
                     filter_input.extend(seq.outputs)
                     previous_seeds.append( seq.seed)
-                
-                log.debug("Connect to previous sequence through these filter inputs: %s" %str( filter_input) )
+
+                if log.isEnabledFor(logging.DEBUG):    
+                    log.debug("Connect to previous sequence through these filter inputs: %s" %str( filter_input) )
                 if len(filter_input) != len(previous_seeds):
                     log.error("found %d filter inputs and %d seeds", len(filter_input), len(previous_seeds))
                     sys.exit("ERROR, in size")
                     
           
-                    
             (sfilter, alreadyFoundFilter) = buildFilter(stepCF_name,previous_sequence, CFseq_list, chain, filter_input, previous_seeds)
-
-
+             
             if not alreadyFoundFilter:
                 CF_seq = CFSequence( ChainStep=chain_step, FilterAlg=sfilter)
-    #            log.debug(CF_seq)
                 CFseq_list.append(CF_seq)
                 for sequence in chain_step.sequences:                
                     step_decisions.extend(sequence.outputs)                
-                # if this is the last step, store final decisions
             
             if len(chain.steps) == nstep+1:  
-                log.debug("Adding finalDecisions for chain %s at step %d:"%(chain.name, nstep+1))
+                if log.isEnabledFor(logging.DEBUG):
+                    log.debug("Adding finalDecisions for chain %s at step %d:"%(chain.name, nstep+1))
                 for seq in chain_step.sequences:
                     finalDecisions[nstep].extend(seq.outputs)
-                    log.debug(seq.outputs)
-
+                    if log.isEnabledFor(logging.DEBUG):
+                        log.debug(seq.outputs)
+            
             #end of loop over menu sequences
                 
         #end of loop over chains for this step, now implement CF:
-        log.debug("\n******** Create CF Tree %s with AthSequencers", stepCF_name)        
+        if log.isEnabledFor(logging.DEBUG):
+            log.debug("\n******** Create CF Tree %s with AthSequencers", stepCF_name)        
         #first make the filter step
         stepFilter = create_step_filter_node(stepCF_name, CFseq_list, dump=False)
         HLTNode += stepFilter
@@ -299,16 +290,18 @@ def decisionTree_From_Chains(HLTNode, chains):
         summary=makeSummary("TriggerSummary"+ stepCF_name, step_decisions)
         HLTNode += summary
 
-        log.debug("Now Draw...")
+        if log.isEnabledFor(logging.DEBUG):
+            log.debug("Now Draw...")
         stepCF_DataFlow_to_dot("%s_%s"%(HLTNodeName,stepCF_name), CFseq_list)
         stepCF_ControlFlow_to_dot(stepCF)
-       
-        log.info("************* End of step %d, %s", nstep+1, stepCF_name)
 
+        if log.isEnabledFor(logging.DEBUG):
+            log.info("************* End of step %d, %s", nstep+1, stepCF_name)
         # end of steps
 
 
-    log.debug("finalDecisions: %s" %str( finalDecisions) )
+    if log.isEnabledFor(logging.DEBUG):
+        log.debug("finalDecisions: %s" %str( finalDecisions) )
     all_DataFlow_to_dot(HLTNodeName, allSeq_list)
     return finalDecisions
 
@@ -325,20 +318,24 @@ def buildFilter(stepCF_name,previous_sequence, CFseq_list, chain, filter_input,
         findFilter= [cfseq.filter for cfseq in CFseq_list if filter_name in cfseq.filter.algname]
         n_filters = len(findFilter)
         if n_filters == 1:
-            log.debug("Filter %s already exists", filter_name)
             sfilter=findFilter[0]
-            log.debug("Adding chain %s to %s", chain.name,sfilter.algname)
             sfilter.setChains(chain.name)
-            log.debug(sfilter.getChains())
+            if log.isEnabledFor(logging.DEBUG):
+                log.debug("Filter %s already exists", filter_name)
+                log.debug("Adding chain %s to %s", chain.name,sfilter.algname)
+                log.debug(sfilter.getChains())
+
+
         elif n_filters == 0:
             sfilter = RoRSequenceFilterNode(name=filter_name)
-            log.debug("Adding these seeds to filter: %s", previous_seeds)
             for i in previous_seeds: sfilter.addSeed(i)
             for i in filter_input: sfilter.addInput(i)                        
             filter_out=["%s_from_%s"%(filter_name,i) for i in filter_input]
             for o in filter_out: sfilter.addOutput(o)            
             sfilter.setChains(chain.name)
-            log.debug("Filter Done: %s", sfilter.name)
+            if log.isEnabledFor(logging.DEBUG):
+                log.debug("Adding these seeds to filter: %s", previous_seeds)
+                log.debug("Filter Done: %s", sfilter.name)
         else:
             log.error("found %d filters  with name %s", n_filters, filter_name)
             sys.exit("ERROR, in filter configuration")
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py
index 446fe7d6abc2b270f68a5648e4eb85010905a1ee..90b18294278c45d38679bf776fc09fe8f50df819 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py
@@ -201,7 +201,6 @@ def makeInDetAlgs():
   InDetSCT_Clusterization = InDet__SCT_Clusterization(name                    = "InDetSCT_Clusterization",
                                                       clusteringTool          = InDetSCT_ClusteringTool,
                                                       # ChannelStatus         = InDetSCT_ChannelStatusAlg,
-                                                      DetectorManagerName     = InDetKeys.SCT_Manager(),
                                                       DataObjectName          = InDetKeys.SCT_RDOs(),
                                                       ClustersName            = "SCT_TrigClusters",
                                                       conditionsTool          = InDetSCT_ConditionsSummaryToolWithoutFlagged)
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuChains.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuChains.py
index 57261b6cecb7ec7b94b4d421952175f30dc5a0de..c4996280ec80bdcf77095433dff26bc6f4d7426b 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuChains.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuChains.py
@@ -23,9 +23,9 @@ ChainDictionary ={  'HLT_e8'     : ['HLT_e8'],
 
 def getConfFromChainName(name):  
     if name in ChainDictionary:
-        print "called chain "+name+" and hypoTool conf "+ str(ChainDictionary[name])
+        print "MenuChains.getConfFromChainName: Called chain "+name+" and hypoTool conf "+ str(ChainDictionary[name])
         return ChainDictionary[name]
-    log.error("Wrong chain name given: found %s",name)
+    log.error("MenuChains.getConfFromChainName: Wrong chain name given: found %s",name)
     sys.exit("ERROR, in chain configuration") 
 
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py
index b690b6f745f797e565c4815f085d5578804592a2..815e62cf721b5d0a347dcf3b23690078a0b9f712 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py
@@ -193,9 +193,10 @@ class ComboMaker(AlgNode):
     def addChain(self, chain):
         if log.isEnabledFor(logging.DEBUG):
             log.debug("ComboMaker %s adding chain %s"%(self.algname,chain))
-        seeds=chain.strip().split("_")
-        seeds.pop(0)
-        for seed in seeds:
+        from MenuChains import getConfFromChainName
+        confs=getConfFromChainName(chain)
+        for conf in confs:
+            seed=conf.replace("HLT_", "")
             integers = map(int, re.findall(r'^\d+', seed))
             multi=0
             if len(integers)== 0:
@@ -263,7 +264,6 @@ class MenuSequence():
         filter_output = sfilter.getOutputList()
         inputs=[filter_output[i] for i,fseed in enumerate (sfilter.seeds) if self.seed in fseed  ]
         if log.isEnabledFor(logging.DEBUG):
-#            log.debug("MenuSequence %s: filter out=%s, seeds=%s, seq.seeds=%s",self.name, filter_output, sfilter.seeds, self.seed)        
             log.debug("connectToFilter: found %d inputs to sequence::%s from Filter::%s (from seed %s)",
                           len(inputs), self.name, sfilter.algname, self.seed)
             for i in inputs: log.debug("- "+i)
@@ -411,9 +411,9 @@ class ChainStep:
         self.combo = ComboMaker("ComboHypo_%s"%self.name)
         for sequence in Sequences:
             new_sequence=copy.deepcopy(sequence)
-            new_sequence.name=("Combo_%s"%sequence.name)
+            new_sequence.name=("%s_Combo"%sequence.name)
             oldhypo=sequence.hypo.Alg
-            new_hypoAlg=oldhypo.clone("Combo_%s"%oldhypo.name())
+            new_hypoAlg=oldhypo.clone("%s_Combo"%oldhypo.name())
             new_sequence.replaceHypoForCombo(new_hypoAlg)
             self.sequences.append(new_sequence)
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py
index 1685482e80d362acb7a369ab68dc70af59deccf4..5f603fbab6071ef08dcb6b8fccddeeb20c1e0ff0 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py
@@ -48,4 +48,9 @@ def TrigmuCombHypoToolConf(name, conf):
     hypotool.OutputLevel = DEBUG
     return hypotool
 
-   
+def TrigMuonEFMSonlyHypoToolConf(name, conf):
+    from AthenaCommon.Constants import DEBUG
+    from TrigMuonHypo.testTrigMuonHypoConfig import TrigMuonEFMSonlyHypoToolFromName
+    hypotool= TrigMuonEFMSonlyHypoToolFromName(name, conf)
+    hypotool.OutputLevel = DEBUG
+    return hypotool   
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py b/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py
index 7a33f5a062a0eacbccec52734ada94ec563e31b9..c17c60d62217b32755028296b20e60be907e5f5e 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py
@@ -13,22 +13,21 @@ def writeEmulationFiles(data):
 # Testing menu used in the L1 decoders
 class MenuTest:
     
-    CTPToChainMapping = ["0:HLT_e3_etcut",
-                         "0:HLT_e5_etcut",
-                         "0:HLT_g5_etcut",
-                         "1:HLT_e7_etcut",
-                         "23:HLT_2e3_etcut",
-                         "23:HLT_e3e5_etcut",
-                         "15:HLT_mu6",
-                         "33:HLT_2mu6",
-                         "15:HLT_mu6idperf",
-                         "42:HLT_e15mu4",
-                         "68:HLT_xe10", # the item is L1_XE10
-                         "152:HLT_xs20",
-                         "50:HLT_te15", # the seed is L1_TE15.0ETA24
-                         "93:HLT_j85",
-                         "93:HLT_j60",
-                         ]
+    CTPToChainMapping = {"LT_e3_etcut":   "L1_EM3",        
+                         "LT_e5_etcut":   "L1_EM3",        
+                         "LT_g5_etcut":   "L1_EM3",        
+                         "LT_e7_etcut":   "L1_EM7",        
+                         "HLT_mu6idperf": "L1_EM7",        
+                         "HLT_mu6":       "L1_EM7",        
+                         "HLT_xs20":      "L1_EM7",        
+                         "HLT_2e3_etcut": "L1_2EM3",        
+                         "HLT_e3e5_etcut":"L1_2EM3",        
+                         "HLT_2mu6":      "L1_2MU4",        
+                         "HLT_e15mu24":    "L1_EM7_MU15",    
+                         "HLT_xe10":      "L1_XE10",   
+                         "HLT_te15":      "L1_TE15.0ETA24", 
+                         "HLT_j85":       "L1_J30",         
+                         "HLT_j60":       "L1_J30"      }
 
     EMThresholdToChainMapping = ["EM3 : HLT_e3_etcut",
                                  "EM3 : HLT_e5_etcut",
@@ -49,7 +48,6 @@ class MenuTest:
                                  "MU4 : HLT_e15mu4",
                                  "MU6 : HLT_2mu6"]
 
-
     METThresholdToChainMapping = ["UNUSED : HLT_xe10",
                                   "UNUSED : HLT_xs20",
                                   "UNUSED : HLT_te15"]
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py
index b5085fe2cc79fcaa515e0b163d50876a2301fd15..f54220189ca5f05d3c4baeb05745dcb5905382f5 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py
@@ -10,6 +10,10 @@ from AthenaCommon.AppMgr import ServiceMgr
 from AthenaCommon.AppMgr import ToolSvc
 from AthenaCommon.DetFlags import DetFlags
 import AthenaCommon.CfgMgr as CfgMgr
+import AthenaCommon.CfgGetter as CfgGetter
+
+from AthenaCommon.CfgGetter import getPublicTool, getPublicToolClone
+from AthenaCommon import CfgMgr
 
 ### workaround to prevent online trigger folders to be enabled ###
 from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
@@ -42,11 +46,10 @@ from TrigUpgradeTest.MenuComponents import MenuSequence
 
 ### for Control Flow ###
 from AthenaCommon.CFElements import parOR, seqAND, seqOR, stepSeq
- 
 
 doL2SA=True
 doL2CB=True
-doEFSA=False
+doEFSA=True
 TriggerFlags.doID=True
 
 # ===========================================
@@ -98,14 +101,10 @@ if TriggerFlags.doMuon:
     l2MuViewsMaker.Views = "MUViewRoIs"
     l2MuViewsMaker.ViewNodeName = l2MuViewNode.name()
 
-  ### It cannot be used because it has not yet been migrated for muon menu ###
   if doEFSA:
-    efMuViewNode = AthSequencer("efMuViewNode", Sequential=False, ModeOR=False, StopOverride=False)
+    efMuViewNode = parOR("efMuViewNode")
     efMuViewsMaker = EventViewCreatorAlgorithm("efMuViewsMaker", OutputLevel=DEBUG)
     efMuViewsMaker.ViewFallThrough = True
- 
-    efMuViewsMaker.InputMakerInputDecisions = ["MURoIDecisions"]
-    efMuViewsMaker.InputMakerOutputDecisions = ["MURoIDecisionsOutputEF"]
     efMuViewsMaker.RoIsLink = "initialRoI" # -||-
     efMuViewsMaker.InViewRoIs = "MURoIs" # contract with the consumer
     efMuViewsMaker.Views = "EFMUViewRoIs"
@@ -316,10 +315,10 @@ if TriggerFlags.doMuon:
     ### RPCRDO ###
     if muonRecFlags.doRPCs():
       from TrigL2MuonSA.TrigL2MuonSAConf import TrigL2MuonSA__RpcDataPreparator
-      L2RpcDataPreparator = TrigL2MuonSA__RpcDataPreparator(OutputLevel = DEBUG,
+      L2RpcDataPreparator = TrigL2MuonSA__RpcDataPreparator(OutputLevel         = INFO,
                                                             RpcPrepDataProvider = RpcRdoToRpcPrepDataTool,
-                                                            RpcRawDataProvider = MuonRpcRawDataProviderTool,
-                                                            DecodeBS = DetFlags.readRDOBS.RPC_on())
+                                                            RpcRawDataProvider  = MuonRpcRawDataProviderTool,
+                                                            DecodeBS            = DetFlags.readRDOBS.RPC_on())
       ToolSvc += L2RpcDataPreparator
        
       muFastAlg.DataPreparator.RPCDataPreparator = L2RpcDataPreparator
@@ -327,7 +326,7 @@ if TriggerFlags.doMuon:
     ### TGCRDO ###
     if muonRecFlags.doTGCs():
       from TrigL2MuonSA.TrigL2MuonSAConf import TrigL2MuonSA__TgcDataPreparator
-      L2TgcDataPreparator = TrigL2MuonSA__TgcDataPreparator(OutputLevel         = DEBUG,
+      L2TgcDataPreparator = TrigL2MuonSA__TgcDataPreparator(OutputLevel         = INFO,
                                                             TgcPrepDataProvider = TgcRdoToTgcPrepDataTool,
                                                             TGC_RawDataProvider = MuonTgcRawDataProviderTool)
       ToolSvc += L2TgcDataPreparator
@@ -337,7 +336,7 @@ if TriggerFlags.doMuon:
     ### MDTRDO ###
     if muonRecFlags.doMDTs():
       from TrigL2MuonSA.TrigL2MuonSAConf import TrigL2MuonSA__MdtDataPreparator
-      L2MdtDataPreparator = TrigL2MuonSA__MdtDataPreparator(OutputLevel = DEBUG,
+      L2MdtDataPreparator = TrigL2MuonSA__MdtDataPreparator(OutputLevel         = INFO,
                                                             MDT_RawDataProvider = MuonMdtRawDataProviderTool,
                                                             MdtPrepDataProvider = MdtRdoToMdtPrepDataTool)
       ToolSvc += L2MdtDataPreparator
@@ -347,7 +346,7 @@ if TriggerFlags.doMuon:
     ### CSCRDO ###
     if muonRecFlags.doCSCs():
       from TrigL2MuonSA.TrigL2MuonSAConf import TrigL2MuonSA__CscDataPreparator
-      L2CscDataPreparator = TrigL2MuonSA__CscDataPreparator(OutputLevel = DEBUG,
+      L2CscDataPreparator = TrigL2MuonSA__CscDataPreparator(OutputLevel         = INFO,
                                                             CscPrepDataProvider = CscRdoToCscPrepDataTool)
       ToolSvc += L2CscDataPreparator
        
@@ -436,123 +435,116 @@ if TriggerFlags.doMuon:
 # ===========================================
 #          SET EFMUON
 # ===========================================
-  ### It cannot be used because it has not yet been migrated for muon menu ###
-
-#  if doEFSA:
-# ### RoRSeqFilter step2 ###
-#    filterEFSAAlg = RoRSeqFilter("filterEFSAAlg")
-#    filterEFSAAlg.Input = [trigmuCombHypo.Decisions]
-#    filterEFSAAlg.Output = ["Filtered"+trigmuCombHypo.Decisions]
-#    filterEFSAAlg.Chains = testChains
-#    filterEFSAAlg.OutputLevel = DEBUG
-#    
-#    from TrkDetDescrSvc.TrkDetDescrSvcConf import Trk__TrackingVolumesSvc
-#    ServiceMgr += Trk__TrackingVolumesSvc("TrackingVolumesSvc",BuildVolumesFromTagInfo = False)
-#
-#    theSegmentFinder = CfgGetter.getPublicToolClone("MuonSegmentFinder","MooSegmentFinder")
-#    theSegmentFinder.DoSummary=True
-#    CfgGetter.getPublicTool("MuonLayerHoughTool").DoTruth=False
-#    theSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker",
-#                                                    SegmentFinder=theSegmentFinder,
-#                                                    MuonSegmentOutputLocation = "MooreSegments",
-#                                                    UseCSC = muonRecFlags.doCSCs(),
-#                                                    UseMDT = muonRecFlags.doMDTs(),
-#                                                    UseRPC = muonRecFlags.doRPCs(),
-#                                                    UseTGC = muonRecFlags.doTGCs(),
-#                                                    doClusterTruth=False,
-#                                                    UseTGCPriorBC = False,
-#                                                    UseTGCNextBC  = False,
-#                                                    doTGCClust = muonRecFlags.doTGCClusterSegmentFinding(),
-#                                                    doRPCClust = muonRecFlags.doRPCClusterSegmentFinding(), OutputLevel=DEBUG )
-#    
-#
-# 
-#    theNCBSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker_NCB",
-#                                                       SegmentFinder = getPublicToolClone("MooSegmentFinder_NCB","MuonSegmentFinder",
-#                                                                                          DoSummary=False,
-#                                                                                          Csc2dSegmentMaker = getPublicToolClone("Csc2dSegmentMaker_NCB","Csc2dSegmentMaker",
-#                                                                                                                                 segmentTool = getPublicToolClone("CscSegmentUtilTool_NCB",
-#                                                                                                                                                                  "CscSegmentUtilTool",
-#                                                                                                                                                                  TightenChi2 = False, 
-#                                                                                                                                                                  IPconstraint=False)),
-#                                                                                          Csc4dSegmentMaker = getPublicToolClone("Csc4dSegmentMaker_NCB","Csc4dSegmentMaker",
-#                                                                                                                                 segmentTool = getPublicTool("CscSegmentUtilTool_NCB")),
-#                                                                                          DoMdtSegments=False,DoSegmentCombinations=False,DoSegmentCombinationCleaning=False),
-#                                                       MuonPatternCombinationLocation = "NCB_MuonHoughPatternCombinations", 
-#                                                       MuonSegmentOutputLocation = "NCB_MuonSegments", 
-#                                                       MuonSegmentCombinationOutputLocation = "NCB_MooreSegmentCombinations",
-#                                                       UseCSC = muonRecFlags.doCSCs(),
-#                                                       UseMDT = False,
-#                                                       UseRPC = False,
-#                                                       UseTGC = False,
-#                                                       UseTGCPriorBC = False,
-#                                                       UseTGCNextBC  = False,
-#                                                       doTGCClust = False,
-#                                                       doRPCClust = False)
-#
-#    from MuonRecExample.MuonStandalone import MuonTrackSteering
-#    MuonTrackSteering.DoSummary=True
-#    MuonTrackSteering.DoSummary=DEBUG
-#    TrackBuilder = CfgMgr.MuPatTrackBuilder("MuPatTrackBuilder" )
-#    TrackBuilder.TrackSteering=CfgGetter.getPublicToolClone("MuonTrackSteering", "MuonTrackSteering")
-#
-#    from AthenaCommon.Include import include
-#    include("InDetBeamSpotService/BeamCondSvc.py" )        
-#    from xAODTrackingCnv.xAODTrackingCnvConf import xAODMaker__TrackParticleCnvAlg, xAODMaker__TrackCollectionCnvTool, xAODMaker__RecTrackParticleContainerCnvTool
-#  
-#    muonParticleCreatorTool = getPublicTool("MuonParticleCreatorTool")
-#  
-#    muonTrackCollectionCnvTool = xAODMaker__TrackCollectionCnvTool( name = "MuonTrackCollectionCnvTool", TrackParticleCreator = muonParticleCreatorTool )
-#  
-#    muonRecTrackParticleContainerCnvTool = xAODMaker__RecTrackParticleContainerCnvTool(name = "MuonRecTrackParticleContainerCnvTool", TrackParticleCreator = muonParticleCreatorTool )
-# 
-#    xAODTrackParticleCnvAlg = xAODMaker__TrackParticleCnvAlg( name = "MuonStandaloneTrackParticleCnvAlg", 
-#                                                              TrackParticleCreator = muonParticleCreatorTool,
-#                                                              TrackCollectionCnvTool=muonTrackCollectionCnvTool,
-#                                                              RecTrackParticleContainerCnvTool = muonRecTrackParticleContainerCnvTool,
-#                                                              TrackContainerName = "MuonSpectrometerTracks",
-#                                                              xAODTrackParticlesFromTracksContainerName = "MuonSpectrometerTrackParticles",
-#                                                              ConvertTrackParticles = False,
-#                                                              ConvertTracks = True)
-#
-#
-#    thetrkbuilder = getPublicToolClone("CombinedMuonTrackBuilder_SA", "CombinedMuonTrackBuilder", MuonHoleRecovery="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool')
-#
-#    theCandidateTool = getPublicToolClone("MuonCandidateTool_SA", "MuonCandidateTool", TrackBuilder=thetrkbuilder)
-#    theMuonCandidateAlg=CfgMgr.MuonCombinedMuonCandidateAlg("MuonCandidateAlg",MuonCandidateTool=theCandidateTool)
-#
-#
-#    thecreatortool= getPublicToolClone("MuonCreatorTool_SA", "MuonCreatorTool", ScatteringAngleTool="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool', MuonSelectionTool="", FillTimingInformation=False, OutputLevel=DEBUG)
-#
-#    themuoncreatoralg = CfgMgr.MuonCreatorAlg("MuonCreatorAlg")
-#    themuoncreatoralg.MuonCreatorTool=thecreatortool
-#    themuoncreatoralg.CreateSAmuons=True
-#    themuoncreatoralg.ClusterContainerName=""
-#
-#    #Algorithms to views
-#    efMuViewNode += theSegmentFinderAlg
-##    efMuViewNode += theNCBSegmentFinderAlg #The configuration still needs some sorting out for this so disabled for now.
-#    efMuViewNode += TrackBuilder
-#    efMuViewNode += xAODTrackParticleCnvAlg
-#    efMuViewNode += theMuonCandidateAlg
-#    efMuViewNode += themuoncreatoralg
-#
-#    #Setup MS-only hypo
-#    from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFMSonlyHypoConfig
-#    trigMuonEFSAHypo = TrigMuonEFMSonlyHypoConfig("MuonEFSAHypoAlg")
-#    trigMuonEFSAHypo.OutputLevel = DEBUG
-#
-#    trigMuonEFSAHypo.ViewRoIs = efMuViewsMaker.Views
-#    trigMuonEFSAHypo.MuonDecisions = "Muons"
-#    trigMuonEFSAHypo.RoIs = efMuViewsMaker.InViewRoIs
-#    trigMuonEFSAHypo.Decisions = "EFMuonSADecisions"
-#    trigMuonEFSAHypo.L1Decisions = efMuViewsMaker.InputMakerInputDecisions[0]
-#
-#    trigMuonEFSAHypo.HypoTools = [ trigMuonEFSAHypo.TrigMuonEFMSonlyHypoToolFromName( "TrigMuonEFMSonlyHypoTool", c ) for c in testChains ] 
-#
-#    muonEFSADecisionsDumper = DumpDecisions("muonEFSADecisionsDumper", OutputLevel=DEBUG, Decisions = trigMuonEFSAHypo.Decisions )
-#    muonEFSAStep = seqAND("muonEFSAStep", [filterEFSAAlg, efMuViewsMaker, efMuViewNode, trigMuonEFSAHypo, muonEFSADecisionsDumper])
 
+  if doEFSA:
+    from TrkDetDescrSvc.TrkDetDescrSvcConf import Trk__TrackingVolumesSvc
+    ServiceMgr += Trk__TrackingVolumesSvc("TrackingVolumesSvc",BuildVolumesFromTagInfo = False)
+
+    theSegmentFinder = CfgGetter.getPublicToolClone("MuonSegmentFinder","MooSegmentFinder")
+    theSegmentFinder.DoSummary=True
+    CfgGetter.getPublicTool("MuonLayerHoughTool").DoTruth=False
+    theSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker",
+                                                    SegmentFinder=theSegmentFinder,
+                                                    MuonSegmentOutputLocation = "MooreSegments",
+                                                    UseCSC = muonRecFlags.doCSCs(),
+                                                    UseMDT = muonRecFlags.doMDTs(),
+                                                    UseRPC = muonRecFlags.doRPCs(),
+                                                    UseTGC = muonRecFlags.doTGCs(),
+                                                    doClusterTruth=False,
+                                                    UseTGCPriorBC = False,
+                                                    UseTGCNextBC  = False,
+                                                    doTGCClust = muonRecFlags.doTGCClusterSegmentFinding(),
+                                                    doRPCClust = muonRecFlags.doRPCClusterSegmentFinding(), OutputLevel=DEBUG )
+    
+
+ 
+    theNCBSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker_NCB",
+                                                       SegmentFinder = getPublicToolClone("MooSegmentFinder_NCB","MuonSegmentFinder",
+                                                                                          DoSummary=False,
+                                                                                          Csc2dSegmentMaker = getPublicToolClone("Csc2dSegmentMaker_NCB","Csc2dSegmentMaker",
+                                                                                                                                 segmentTool = getPublicToolClone("CscSegmentUtilTool_NCB",
+                                                                                                                                                                  "CscSegmentUtilTool",
+                                                                                                                                                                  TightenChi2 = False, 
+                                                                                                                                                                  IPconstraint=False)),
+                                                                                          Csc4dSegmentMaker = getPublicToolClone("Csc4dSegmentMaker_NCB","Csc4dSegmentMaker",
+                                                                                                                                 segmentTool = getPublicTool("CscSegmentUtilTool_NCB")),
+                                                                                          DoMdtSegments=False,DoSegmentCombinations=False,DoSegmentCombinationCleaning=False),
+                                                       MuonPatternCombinationLocation = "NCB_MuonHoughPatternCombinations", 
+                                                       MuonSegmentOutputLocation = "NCB_MuonSegments", 
+                                                       MuonSegmentCombinationOutputLocation = "NCB_MooreSegmentCombinations",
+                                                       UseCSC = muonRecFlags.doCSCs(),
+                                                       UseMDT = False,
+                                                       UseRPC = False,
+                                                       UseTGC = False,
+                                                       UseTGCPriorBC = False,
+                                                       UseTGCNextBC  = False,
+                                                       doTGCClust = False,
+                                                       doRPCClust = False)
+
+    from MuonRecExample.MuonStandalone import MuonTrackSteering
+    MuonTrackSteering.DoSummary=True
+    MuonTrackSteering.DoSummary=DEBUG
+    TrackBuilder = CfgMgr.MuPatTrackBuilder("MuPatTrackBuilder" )
+    TrackBuilder.TrackSteering=CfgGetter.getPublicToolClone("MuonTrackSteering", "MuonTrackSteering")
+
+    from AthenaCommon.Include import include
+    include("InDetBeamSpotService/BeamCondSvc.py" )        
+    from xAODTrackingCnv.xAODTrackingCnvConf import xAODMaker__TrackParticleCnvAlg, xAODMaker__TrackCollectionCnvTool, xAODMaker__RecTrackParticleContainerCnvTool
+  
+    muonParticleCreatorTool = getPublicTool("MuonParticleCreatorTool")
+  
+    muonTrackCollectionCnvTool = xAODMaker__TrackCollectionCnvTool( name = "MuonTrackCollectionCnvTool", TrackParticleCreator = muonParticleCreatorTool )
+  
+    muonRecTrackParticleContainerCnvTool = xAODMaker__RecTrackParticleContainerCnvTool(name = "MuonRecTrackParticleContainerCnvTool", TrackParticleCreator = muonParticleCreatorTool )
+ 
+    xAODTrackParticleCnvAlg = xAODMaker__TrackParticleCnvAlg( name = "MuonStandaloneTrackParticleCnvAlg", 
+                                                              TrackParticleCreator = muonParticleCreatorTool,
+                                                              TrackCollectionCnvTool=muonTrackCollectionCnvTool,
+                                                              RecTrackParticleContainerCnvTool = muonRecTrackParticleContainerCnvTool,
+                                                              TrackContainerName = "MuonSpectrometerTracks",
+                                                              xAODTrackParticlesFromTracksContainerName = "MuonSpectrometerTrackParticles",
+                                                              ConvertTrackParticles = False,
+                                                              ConvertTracks = True)
+
+
+    thetrkbuilder = getPublicToolClone("CombinedMuonTrackBuilder_SA", "CombinedMuonTrackBuilder", MuonHoleRecovery="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool')
+
+    theCandidateTool = getPublicToolClone("MuonCandidateTool_SA", "MuonCandidateTool", TrackBuilder=thetrkbuilder)
+    theMuonCandidateAlg=CfgMgr.MuonCombinedMuonCandidateAlg("MuonCandidateAlg",MuonCandidateTool=theCandidateTool)
+
+
+    thecreatortool= getPublicToolClone("MuonCreatorTool_SA", "MuonCreatorTool", ScatteringAngleTool="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool', MuonSelectionTool="", FillTimingInformation=False, OutputLevel=DEBUG)
+
+    themuoncreatoralg = CfgMgr.MuonCreatorAlg("MuonCreatorAlg")
+    themuoncreatoralg.MuonCreatorTool=thecreatortool
+    themuoncreatoralg.CreateSAmuons=True
+    themuoncreatoralg.ClusterContainerName=""
+
+    #Algorithms to views
+    efMuViewNode += theSegmentFinderAlg
+#    efMuViewNode += theNCBSegmentFinderAlg #The configuration still needs some sorting out for this so disabled for now.
+    efMuViewNode += TrackBuilder
+    efMuViewNode += xAODTrackParticleCnvAlg
+    efMuViewNode += theMuonCandidateAlg
+    efMuViewNode += themuoncreatoralg
+
+    #Setup MS-only hypo
+    from TrigMuonHypo.TrigMuonHypoConf import TrigMuonEFMSonlyHypoAlg
+    trigMuonEFSAHypo = TrigMuonEFMSonlyHypoAlg( "MuonEFSAHypoAlg" )
+    trigMuonEFSAHypo.OutputLevel = DEBUG
+    trigMuonEFSAHypo.MuonDecisions = "Muons"
+
+    muonEFMSonlySequence = seqAND( "muonEFMSonlySequence", [efMuViewsMaker, efMuViewNode] )
+
+    #muonEFMSonly_HLTSequence = HLTRecoSequence( "muonEFMSonly_HLTSequence",
+    #                                            Sequence = muonEFMSonlySequence,
+    #                                            Maker = efMuViewsMaker,
+    #                                            Seed = "L1MU" ) 
+
+    muonEFSAStep = MenuSequence( Sequence=muonEFMSonlySequence,
+                                 Maker=efMuViewsMaker,
+                                 Hypo=trigMuonEFSAHypo,
+                                 HypoToolClassName="TrigMuonEFMSonlyHypoToolConf")
 
 
    
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuL1DecodingTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuL1DecodingTest.py
index 90dbd480c6fd774520af6daff2143e8acce9504d..8c5ec84e8d21619bf73f153f3cfb24d571eaa56b 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuL1DecodingTest.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuL1DecodingTest.py
@@ -52,7 +52,7 @@ writeEmulationFiles(data)
 ctpUnpacker = CTPUnpackingEmulationTool( OutputLevel =  DEBUG, ForceEnableAllChains=True )
 
 l1Decoder.ctpUnpacker = ctpUnpacker
-l1Decoder.ctpUnpacker.CTPToChainMapping = ["0:HLT_e3",  "0:HLT_g5", "1:HLT_e7", "2:HLT_2e3", "15:HLT_mu6", "33:HLT_2mu6", "15:HLT_mu6idperf", "42:HLT_e15mu4"] # this are real IDs of L1_* items in pp_v5 menu
+
 
 emUnpacker = RoIsUnpackingEmulationTool("EMRoIsUnpackingTool",
                                         Decisions = "EMRoIDecisions",
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessing.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessing.ref
index 96e75f6036486b2d02d22afbe2a6ceb76debadc7..2bbe3bc58adfaa17c6177b6d87bf60e8daeb20fd 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessing.ref
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessing.ref
@@ -1,7 +1,7 @@
-Wed Aug  1 12:49:37 CEST 2018
+Tue Aug  7 16:54:39 CEST 2018
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc62-opt] [combohypo/7abd61f8a3] -- built on [2018-08-01T1032]
+Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc62-opt] [combohypo2/6e5ada6c79] -- built on [2018-08-07T1340]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Error in <TSystem::ExpandFileName>: input: $ROOTDIR/lib/libRIO, output: $ROOTDIR/lib/libRIO
@@ -25,21 +25,23 @@ Py:MenuComponents   DEBUG Chain HLT_e8 adding seed L1EM to sequence 0 in step St
 Py:MenuComponents   DEBUG Chain HLT_e8 adding seed L1EM to sequence 0 in step Step2_em
 Py:MenuComponents   DEBUG Chain HLT_e8 with seeds: ['EM7'] 
 Py:MenuComponents   DEBUG Making combo Alg ComboHypo_Step1_mu_em
-Py:MenuComponents   DEBUG set new Hypo Combo_Step1MuHypo for combo sequence Combo_S_Step1MuHypo 
-Py:MenuComponents   DEBUG set new Hypo Combo_Step1ElHypo for combo sequence Combo_S_Step1ElHypo 
+Py:MenuComponents   DEBUG set new Hypo Step1MuHypo_Combo for combo sequence S_Step1MuHypo_Combo 
+Py:MenuComponents   DEBUG set new Hypo Step1ElHypo_Combo for combo sequence S_Step1ElHypo_Combo 
 Py:MenuComponents   DEBUG Making combo Alg ComboHypo_Step2_mu_em
-Py:MenuComponents   DEBUG set new Hypo Combo_Step2MuHypo for combo sequence Combo_S_Step2MuHypo 
-Py:MenuComponents   DEBUG set new Hypo Combo_Step2ElHypo for combo sequence Combo_S_Step2ElHypo 
+Py:MenuComponents   DEBUG set new Hypo Step2MuHypo_Combo for combo sequence S_Step2MuHypo_Combo 
+Py:MenuComponents   DEBUG set new Hypo Step2ElHypo_Combo for combo sequence S_Step2ElHypo_Combo 
 Py:MenuComponents   DEBUG Chain HLT_mu8_e8 adding seed L1MU to sequence 0 in step Step1_mu_em
 Py:MenuComponents   DEBUG Chain HLT_mu8_e8 adding seed L1MU to sequence 0 in step Step2_mu_em
 Py:MenuComponents   DEBUG Chain HLT_mu8_e8 adding seed L1EM to sequence 1 in step Step1_mu_em
 Py:MenuComponents   DEBUG Chain HLT_mu8_e8 adding seed L1EM to sequence 1 in step Step2_mu_em
 Py:MenuComponents   DEBUG Chain HLT_mu8_e8 with seeds: ['MU6', 'EM7'] 
 Py:MenuComponents   DEBUG ComboMaker ComboHypo_Step1_mu_em adding chain HLT_mu8_e8
+MenuChains.getConfFromChainName: Called chain HLT_mu8_e8 and hypoTool conf ['HLT_mu8', 'HLT_e8']
 Py:MenuComponents   DEBUG ComboMaker ComboHypo_Step2_mu_em adding chain HLT_mu8_e8
+MenuChains.getConfFromChainName: Called chain HLT_mu8_e8 and hypoTool conf ['HLT_mu8', 'HLT_e8']
 enabled Combo chains:  ['MU6 : HLT_mu8_e8'] ['EM7 : HLT_mu8_e8']
 EnabledChainNamesToCTP:  ['0:HLT_mu20', '1:HLT_mu81step', '2:HLT_mu8', '3:HLT_e20', '4:HLT_e8', '5:HLT_mu8_e8']
-Py:ConfigurableDb    INFO Read module info for 5487 configurables from 8 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5495 configurables from 8 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 EMRoIsUnpackingTool enables chians:
 ['EM7 : HLT_e20', 'EM7 : HLT_e8', 'EM7 : HLT_mu8_e8']
@@ -202,18 +204,18 @@ Py:HLTCFConfig      DEBUG Adding chain HLT_e20 with 2 steps
 Py:HLTCFConfig      DEBUG Adding chain HLT_e8 with 2 steps
 Py:HLTCFConfig      DEBUG Adding chain HLT_mu8_e8 with 2 steps
 Py:HLTCFConfig      DEBUG Run on 2 steps
-called chain HLT_mu20 and hypoTool conf ['HLT_mu20']
-called chain HLT_mu81step and hypoTool conf ['HLT_mu8']
-called chain HLT_mu8 and hypoTool conf ['HLT_mu8']
-called chain HLT_e20 and hypoTool conf ['HLT_e20']
-called chain HLT_e8 and hypoTool conf ['HLT_e8']
-called chain HLT_mu8_e8 and hypoTool conf ['HLT_mu8', 'HLT_e8']
+MenuChains.getConfFromChainName: Called chain HLT_mu20 and hypoTool conf ['HLT_mu20']
+MenuChains.getConfFromChainName: Called chain HLT_mu81step and hypoTool conf ['HLT_mu8']
+MenuChains.getConfFromChainName: Called chain HLT_mu8 and hypoTool conf ['HLT_mu8']
+MenuChains.getConfFromChainName: Called chain HLT_e20 and hypoTool conf ['HLT_e20']
+MenuChains.getConfFromChainName: Called chain HLT_e8 and hypoTool conf ['HLT_e8']
+MenuChains.getConfFromChainName: Called chain HLT_mu8_e8 and hypoTool conf ['HLT_mu8', 'HLT_e8']
 Py:HLTCFConfig      DEBUG 
 ************* Start step 1 Step1 for chain HLT_mu20
 Py:HLTCFConfig      DEBUG Found these seeds from the sequence: ['L1MU']
 Py:HLTCFConfig      DEBUG Seeds from this chain: ['L1MU']
-Py:HLTCFConfig      DEBUG Adding these seeds to filter: ['L1MU']
 Py:MenuComponents   DEBUG Adding Chain HLT_mu20 to filter FilterStep1_on_L1MUNode
+Py:HLTCFConfig      DEBUG Adding these seeds to filter: ['L1MU']
 Py:HLTCFConfig      DEBUG Filter Done: FilterStep1_on_L1MUNode
 Py:MenuComponents   DEBUG connectToFilter: found 1 inputs to sequence::S_Step1MuHypo from Filter::FilterStep1_on_L1MU (from seed L1MU)
 Py:MenuComponents   DEBUG - FilterStep1_on_L1MU_from_L1MU
@@ -223,9 +225,9 @@ Py:HLTCFConfig      DEBUG
 ************* Start step 1 Step1 for chain HLT_mu81step
 Py:HLTCFConfig      DEBUG Found these seeds from the sequence: ['L1MU']
 Py:HLTCFConfig      DEBUG Seeds from this chain: ['L1MU']
+Py:MenuComponents   DEBUG Adding Chain HLT_mu81step to filter FilterStep1_on_L1MUNode
 Py:HLTCFConfig      DEBUG Filter FilterStep1_on_L1MU already exists
 Py:HLTCFConfig      DEBUG Adding chain HLT_mu81step to FilterStep1_on_L1MU
-Py:MenuComponents   DEBUG Adding Chain HLT_mu81step to filter FilterStep1_on_L1MUNode
 Py:HLTCFConfig      DEBUG ['HLT_mu20', 'HLT_mu81step']
 Py:HLTCFConfig      DEBUG Adding finalDecisions for chain HLT_mu81step at step 1:
 Py:HLTCFConfig      DEBUG ['Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU']
@@ -233,16 +235,16 @@ Py:HLTCFConfig      DEBUG
 ************* Start step 1 Step1 for chain HLT_mu8
 Py:HLTCFConfig      DEBUG Found these seeds from the sequence: ['L1MU']
 Py:HLTCFConfig      DEBUG Seeds from this chain: ['L1MU']
+Py:MenuComponents   DEBUG Adding Chain HLT_mu8 to filter FilterStep1_on_L1MUNode
 Py:HLTCFConfig      DEBUG Filter FilterStep1_on_L1MU already exists
 Py:HLTCFConfig      DEBUG Adding chain HLT_mu8 to FilterStep1_on_L1MU
-Py:MenuComponents   DEBUG Adding Chain HLT_mu8 to filter FilterStep1_on_L1MUNode
 Py:HLTCFConfig      DEBUG ['HLT_mu20', 'HLT_mu81step', 'HLT_mu8']
 Py:HLTCFConfig      DEBUG 
 ************* Start step 1 Step1 for chain HLT_e20
 Py:HLTCFConfig      DEBUG Found these seeds from the sequence: ['L1EM']
 Py:HLTCFConfig      DEBUG Seeds from this chain: ['L1EM']
-Py:HLTCFConfig      DEBUG Adding these seeds to filter: ['L1EM']
 Py:MenuComponents   DEBUG Adding Chain HLT_e20 to filter FilterStep1_on_L1EMNode
+Py:HLTCFConfig      DEBUG Adding these seeds to filter: ['L1EM']
 Py:HLTCFConfig      DEBUG Filter Done: FilterStep1_on_L1EMNode
 Py:MenuComponents   DEBUG connectToFilter: found 1 inputs to sequence::S_Step1ElHypo from Filter::FilterStep1_on_L1EM (from seed L1EM)
 Py:MenuComponents   DEBUG - FilterStep1_on_L1EM_from_L1EM
@@ -252,29 +254,29 @@ Py:HLTCFConfig      DEBUG
 ************* Start step 1 Step1 for chain HLT_e8
 Py:HLTCFConfig      DEBUG Found these seeds from the sequence: ['L1EM']
 Py:HLTCFConfig      DEBUG Seeds from this chain: ['L1EM']
+Py:MenuComponents   DEBUG Adding Chain HLT_e8 to filter FilterStep1_on_L1EMNode
 Py:HLTCFConfig      DEBUG Filter FilterStep1_on_L1EM already exists
 Py:HLTCFConfig      DEBUG Adding chain HLT_e8 to FilterStep1_on_L1EM
-Py:MenuComponents   DEBUG Adding Chain HLT_e8 to filter FilterStep1_on_L1EMNode
 Py:HLTCFConfig      DEBUG ['HLT_e20', 'HLT_e8']
 Py:HLTCFConfig      DEBUG 
 ************* Start step 1 Step1 for chain HLT_mu8_e8
 Py:HLTCFConfig      DEBUG Found these seeds from the sequence: ['L1MU', 'L1EM']
 Py:HLTCFConfig      DEBUG Seeds from this chain: ['L1MU', 'L1EM']
-Py:HLTCFConfig      DEBUG Adding these seeds to filter: ['L1MU', 'L1EM']
 Py:MenuComponents   DEBUG Adding Chain HLT_mu8_e8 to filter FilterStep1_on_L1MUL1EMNode
+Py:HLTCFConfig      DEBUG Adding these seeds to filter: ['L1MU', 'L1EM']
 Py:HLTCFConfig      DEBUG Filter Done: FilterStep1_on_L1MUL1EMNode
-Py:MenuComponents   DEBUG connectToFilter: found 1 inputs to sequence::Combo_S_Step1MuHypo from Filter::FilterStep1_on_L1MUL1EM (from seed L1MU)
+Py:MenuComponents   DEBUG connectToFilter: found 1 inputs to sequence::S_Step1MuHypo_Combo from Filter::FilterStep1_on_L1MUL1EM (from seed L1MU)
 Py:MenuComponents   DEBUG - FilterStep1_on_L1MUL1EM_from_L1MU
-Py:MenuComponents   DEBUG connectToFilter: connecting InputMaker to HypoAlg: adding 1 output to InputMaker::Step1MuInputMaker and sending to HypoAlg::Combo_Step1MuHypo
+Py:MenuComponents   DEBUG connectToFilter: connecting InputMaker to HypoAlg: adding 1 output to InputMaker::Step1MuInputMaker and sending to HypoAlg::Step1MuHypo_Combo
 Py:MenuComponents   DEBUG FilterStep1_on_L1MUL1EM_from_L1MU
-Py:MenuComponents   DEBUG connectToFilter: found 1 inputs to sequence::Combo_S_Step1ElHypo from Filter::FilterStep1_on_L1MUL1EM (from seed L1EM)
+Py:MenuComponents   DEBUG connectToFilter: found 1 inputs to sequence::S_Step1ElHypo_Combo from Filter::FilterStep1_on_L1MUL1EM (from seed L1EM)
 Py:MenuComponents   DEBUG - FilterStep1_on_L1MUL1EM_from_L1EM
-Py:MenuComponents   DEBUG connectToFilter: connecting InputMaker to HypoAlg: adding 1 output to InputMaker::Step1ElInputMaker and sending to HypoAlg::Combo_Step1ElHypo
+Py:MenuComponents   DEBUG connectToFilter: connecting InputMaker to HypoAlg: adding 1 output to InputMaker::Step1ElInputMaker and sending to HypoAlg::Step1ElHypo_Combo
 Py:MenuComponents   DEBUG FilterStep1_on_L1MUL1EM_from_L1EM
-Py:MenuComponents   DEBUG Adding inputs Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU to combo ComboHypo_Step1_mu_em
-Py:MenuComponents   DEBUG Adding outputs combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU to combo ComboHypo_Step1_mu_em
-Py:MenuComponents   DEBUG Adding inputs Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM to combo ComboHypo_Step1_mu_em
-Py:MenuComponents   DEBUG Adding outputs combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM to combo ComboHypo_Step1_mu_em
+Py:MenuComponents   DEBUG Adding inputs Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU to combo ComboHypo_Step1_mu_em
+Py:MenuComponents   DEBUG Adding outputs combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU to combo ComboHypo_Step1_mu_em
+Py:MenuComponents   DEBUG Adding inputs Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM to combo ComboHypo_Step1_mu_em
+Py:MenuComponents   DEBUG Adding outputs combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM to combo ComboHypo_Step1_mu_em
 Py:HLTCFConfig      DEBUG 
 ******** Create CF Tree Step1 with AthSequencers
 Py:HLTCFConfig      DEBUG Create filter step Step1 with 3 filters
@@ -285,13 +287,45 @@ Py:HLTCFConfig      DEBUG Create reco step HLTAllSteps_Step1 with 3 sequences
 Py:HLTCFConfig      DEBUG  *** Create CFSequence Step1_mu with FilterAlg FilterStep1_on_L1MU *
 Py:HLTCFConfig      DEBUG  *** Create CFSequence Step1_em with FilterAlg FilterStep1_on_L1EM *
 Py:HLTCFConfig      DEBUG  *** Create CFSequence Step1_mu_em with FilterAlg FilterStep1_on_L1MUL1EM *
+/***** Algorithm ComboHypo/ComboHypo_Step1_mu_em ***************************************************
+|-AuditAlgorithms            = False
+|-AuditBeginRun              = False
+|-AuditEndRun                = False
+|-AuditExecute               = False
+|-AuditFinalize              = False
+|-AuditInitialize            = False
+|-AuditReinitialize          = False
+|-AuditRestart               = False
+|-AuditStart                 = False
+|-AuditStop                  = False
+|-Cardinality                = 1
+|-DetStore                   = ServiceHandle('StoreGateSvc/DetectorStore')
+|-Enable                     = True
+|-ErrorCounter               = 0
+|-ErrorMax                   = 1
+|-EvtStore                   = ServiceHandle('StoreGateSvc')
+|-ExtraInputs                = []  (default: [])
+|-ExtraOutputs               = []  (default: [])
+|-FilterCircularDependencies = True
+|-HypoInputDecisions         = ['Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
+|                            (default: [])
+|-HypoOutputDecisions        = ['combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
+|                            (default: [])
+|-IsIOBound                  = False
+|-MonitorService             = 'MonitorSvc'
+|-MultiplicitiesMap          = {'HLT_mu8_e8': [1, 1]}  (default: {})
+|-NeededResources            = []  (default: [])
+|-OutputLevel                = 2  (default: 0)
+|-RegisterForContextService  = False
+|-Timeline                   = True
+\----- (End of Algorithm ComboHypo/ComboHypo_Step1_mu_em) ------------------------------------------
 Py:HLTCFConfig      DEBUG Now Draw...
 Py:HLTCFConfig       INFO ************* End of step 1, Step1
 Py:HLTCFConfig      DEBUG 
 ************* Start step 2 Step2 for chain HLT_mu20
 Py:HLTCFConfig      DEBUG Connect to previous sequence through these filter inputs: ['Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU']
-Py:HLTCFConfig      DEBUG Adding these seeds to filter: ['L1MU']
 Py:MenuComponents   DEBUG Adding Chain HLT_mu20 to filter FilterStep2_on_Step2_muNode
+Py:HLTCFConfig      DEBUG Adding these seeds to filter: ['L1MU']
 Py:HLTCFConfig      DEBUG Filter Done: FilterStep2_on_Step2_muNode
 Py:MenuComponents   DEBUG connectToFilter: found 1 inputs to sequence::S_Step2MuHypo from Filter::FilterStep2_on_Step2_mu (from seed L1MU)
 Py:MenuComponents   DEBUG - FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
@@ -302,17 +336,17 @@ Py:HLTCFConfig      DEBUG ['Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1M
 Py:HLTCFConfig      DEBUG 
 ************* Start step 2 Step2 for chain HLT_mu8
 Py:HLTCFConfig      DEBUG Connect to previous sequence through these filter inputs: ['Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU']
+Py:MenuComponents   DEBUG Adding Chain HLT_mu8 to filter FilterStep2_on_Step2_muNode
 Py:HLTCFConfig      DEBUG Filter FilterStep2_on_Step2_mu already exists
 Py:HLTCFConfig      DEBUG Adding chain HLT_mu8 to FilterStep2_on_Step2_mu
-Py:MenuComponents   DEBUG Adding Chain HLT_mu8 to filter FilterStep2_on_Step2_muNode
 Py:HLTCFConfig      DEBUG ['HLT_mu20', 'HLT_mu8']
 Py:HLTCFConfig      DEBUG Adding finalDecisions for chain HLT_mu8 at step 2:
 Py:HLTCFConfig      DEBUG ['Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU']
 Py:HLTCFConfig      DEBUG 
 ************* Start step 2 Step2 for chain HLT_e20
 Py:HLTCFConfig      DEBUG Connect to previous sequence through these filter inputs: ['Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM']
-Py:HLTCFConfig      DEBUG Adding these seeds to filter: ['L1EM']
 Py:MenuComponents   DEBUG Adding Chain HLT_e20 to filter FilterStep2_on_Step2_emNode
+Py:HLTCFConfig      DEBUG Adding these seeds to filter: ['L1EM']
 Py:HLTCFConfig      DEBUG Filter Done: FilterStep2_on_Step2_emNode
 Py:MenuComponents   DEBUG connectToFilter: found 1 inputs to sequence::S_Step2ElHypo from Filter::FilterStep2_on_Step2_em (from seed L1EM)
 Py:MenuComponents   DEBUG - FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
@@ -323,33 +357,33 @@ Py:HLTCFConfig      DEBUG ['Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1E
 Py:HLTCFConfig      DEBUG 
 ************* Start step 2 Step2 for chain HLT_e8
 Py:HLTCFConfig      DEBUG Connect to previous sequence through these filter inputs: ['Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM']
+Py:MenuComponents   DEBUG Adding Chain HLT_e8 to filter FilterStep2_on_Step2_emNode
 Py:HLTCFConfig      DEBUG Filter FilterStep2_on_Step2_em already exists
 Py:HLTCFConfig      DEBUG Adding chain HLT_e8 to FilterStep2_on_Step2_em
-Py:MenuComponents   DEBUG Adding Chain HLT_e8 to filter FilterStep2_on_Step2_emNode
 Py:HLTCFConfig      DEBUG ['HLT_e20', 'HLT_e8']
 Py:HLTCFConfig      DEBUG Adding finalDecisions for chain HLT_e8 at step 2:
 Py:HLTCFConfig      DEBUG ['Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM']
 Py:HLTCFConfig      DEBUG 
 ************* Start step 2 Step2 for chain HLT_mu8_e8
-Py:HLTCFConfig      DEBUG Connect to previous sequence through these filter inputs: ['combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
-Py:HLTCFConfig      DEBUG Adding these seeds to filter: ['L1MU', 'L1EM']
+Py:HLTCFConfig      DEBUG Connect to previous sequence through these filter inputs: ['combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
 Py:MenuComponents   DEBUG Adding Chain HLT_mu8_e8 to filter FilterStep2_on_Step2_mu_emNode
+Py:HLTCFConfig      DEBUG Adding these seeds to filter: ['L1MU', 'L1EM']
 Py:HLTCFConfig      DEBUG Filter Done: FilterStep2_on_Step2_mu_emNode
-Py:MenuComponents   DEBUG connectToFilter: found 1 inputs to sequence::Combo_S_Step2MuHypo from Filter::FilterStep2_on_Step2_mu_em (from seed L1MU)
-Py:MenuComponents   DEBUG - FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-Py:MenuComponents   DEBUG connectToFilter: connecting InputMaker to HypoAlg: adding 1 output to InputMaker::Step2MuInputMaker and sending to HypoAlg::Combo_Step2MuHypo
-Py:MenuComponents   DEBUG FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-Py:MenuComponents   DEBUG connectToFilter: found 1 inputs to sequence::Combo_S_Step2ElHypo from Filter::FilterStep2_on_Step2_mu_em (from seed L1EM)
-Py:MenuComponents   DEBUG - FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
-Py:MenuComponents   DEBUG connectToFilter: connecting InputMaker to HypoAlg: adding 1 output to InputMaker::Step2ElInputMaker and sending to HypoAlg::Combo_Step2ElHypo
-Py:MenuComponents   DEBUG FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
-Py:MenuComponents   DEBUG Adding inputs Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU to combo ComboHypo_Step2_mu_em
-Py:MenuComponents   DEBUG Adding outputs combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU to combo ComboHypo_Step2_mu_em
-Py:MenuComponents   DEBUG Adding inputs Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM to combo ComboHypo_Step2_mu_em
-Py:MenuComponents   DEBUG Adding outputs combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM to combo ComboHypo_Step2_mu_em
+Py:MenuComponents   DEBUG connectToFilter: found 1 inputs to sequence::S_Step2MuHypo_Combo from Filter::FilterStep2_on_Step2_mu_em (from seed L1MU)
+Py:MenuComponents   DEBUG - FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Py:MenuComponents   DEBUG connectToFilter: connecting InputMaker to HypoAlg: adding 1 output to InputMaker::Step2MuInputMaker and sending to HypoAlg::Step2MuHypo_Combo
+Py:MenuComponents   DEBUG FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Py:MenuComponents   DEBUG connectToFilter: found 1 inputs to sequence::S_Step2ElHypo_Combo from Filter::FilterStep2_on_Step2_mu_em (from seed L1EM)
+Py:MenuComponents   DEBUG - FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+Py:MenuComponents   DEBUG connectToFilter: connecting InputMaker to HypoAlg: adding 1 output to InputMaker::Step2ElInputMaker and sending to HypoAlg::Step2ElHypo_Combo
+Py:MenuComponents   DEBUG FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+Py:MenuComponents   DEBUG Adding inputs Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU to combo ComboHypo_Step2_mu_em
+Py:MenuComponents   DEBUG Adding outputs combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU to combo ComboHypo_Step2_mu_em
+Py:MenuComponents   DEBUG Adding inputs Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM to combo ComboHypo_Step2_mu_em
+Py:MenuComponents   DEBUG Adding outputs combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM to combo ComboHypo_Step2_mu_em
 Py:HLTCFConfig      DEBUG Adding finalDecisions for chain HLT_mu8_e8 at step 2:
-Py:HLTCFConfig      DEBUG ['combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU']
-Py:HLTCFConfig      DEBUG ['combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
+Py:HLTCFConfig      DEBUG ['combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU']
+Py:HLTCFConfig      DEBUG ['combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
 Py:HLTCFConfig      DEBUG 
 ******** Create CF Tree Step2 with AthSequencers
 Py:HLTCFConfig      DEBUG Create filter step Step2 with 3 filters
@@ -360,9 +394,41 @@ Py:HLTCFConfig      DEBUG Create reco step HLTAllSteps_Step2 with 3 sequences
 Py:HLTCFConfig      DEBUG  *** Create CFSequence Step2_mu with FilterAlg FilterStep2_on_Step2_mu *
 Py:HLTCFConfig      DEBUG  *** Create CFSequence Step2_em with FilterAlg FilterStep2_on_Step2_em *
 Py:HLTCFConfig      DEBUG  *** Create CFSequence Step2_mu_em with FilterAlg FilterStep2_on_Step2_mu_em *
+/***** Algorithm ComboHypo/ComboHypo_Step2_mu_em ***************************************************
+|-AuditAlgorithms            = False
+|-AuditBeginRun              = False
+|-AuditEndRun                = False
+|-AuditExecute               = False
+|-AuditFinalize              = False
+|-AuditInitialize            = False
+|-AuditReinitialize          = False
+|-AuditRestart               = False
+|-AuditStart                 = False
+|-AuditStop                  = False
+|-Cardinality                = 1
+|-DetStore                   = ServiceHandle('StoreGateSvc/DetectorStore')
+|-Enable                     = True
+|-ErrorCounter               = 0
+|-ErrorMax                   = 1
+|-EvtStore                   = ServiceHandle('StoreGateSvc')
+|-ExtraInputs                = []  (default: [])
+|-ExtraOutputs               = []  (default: [])
+|-FilterCircularDependencies = True
+|-HypoInputDecisions         = ['Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
+|                            (default: [])
+|-HypoOutputDecisions        = ['combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
+|                            (default: [])
+|-IsIOBound                  = False
+|-MonitorService             = 'MonitorSvc'
+|-MultiplicitiesMap          = {'HLT_mu8_e8': [1, 1]}  (default: {})
+|-NeededResources            = []  (default: [])
+|-OutputLevel                = 2  (default: 0)
+|-RegisterForContextService  = False
+|-Timeline                   = True
+\----- (End of Algorithm ComboHypo/ComboHypo_Step2_mu_em) ------------------------------------------
 Py:HLTCFConfig      DEBUG Now Draw...
 Py:HLTCFConfig       INFO ************* End of step 2, Step2
-Py:HLTCFConfig      DEBUG finalDecisions: [['Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU'], ['Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM']]
+Py:HLTCFConfig      DEBUG finalDecisions: [['Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU'], ['Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM']]
 adding collector  0
 ['Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU']
 /***** Private AlgTool DecisionCollectorTool/StepCollector0 ****************************************
@@ -382,7 +448,7 @@ adding collector  0
 |-OutputLevel       = 0
 \----- (End of Private AlgTool DecisionCollectorTool/StepCollector0) -------------------------------
 adding collector  1
-['Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
+['Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
 /***** Private AlgTool DecisionCollectorTool/StepCollector1 ****************************************
 |-AuditFinalize     = False
 |-AuditInitialize   = False
@@ -391,7 +457,7 @@ adding collector  1
 |-AuditStart        = False
 |-AuditStop         = False
 |-AuditTools        = False
-|-Decisions         = ['Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
+|-Decisions         = ['Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
 |                   (default: [])
 |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 |-EvtStore          = ServiceHandle('StoreGateSvc')
@@ -424,7 +490,7 @@ adding collector  1
 |-ExtraInputs                = []  (default: [])
 |-ExtraOutputs               = []  (default: [])
 |-FilterCircularDependencies = True
-|-FinalDecisions             = ['Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
+|-FinalDecisions             = ['Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
 |                            (default: [])
 |-HistParh                   = '/EXPERT/TrigSteer_HLT'
 |-IsIOBound                  = False
@@ -459,7 +525,7 @@ adding collector  1
 | |-AuditStart        = False
 | |-AuditStop         = False
 | |-AuditTools        = False
-| |-Decisions         = ['Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
+| |-Decisions         = ['Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM']
 | |                   (default: [])
 | |-DetStore          = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-EvtStore          = ServiceHandle('StoreGateSvc')
@@ -470,7 +536,7 @@ adding collector  1
 | \----- (End of Private AlgTool DecisionCollectorTool/StepCollector1) -------------------------------
 \----- (End of Algorithm TrigSignatureMoniMT/TriggerMonitorFinal) ----------------------------------
 Py:HLTCFConfig      DEBUG ESD file content: 
-Py:HLTCFConfig      DEBUG ['EventInfo#*', 'xAOD::TrigCompositeContainer#Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'xAOD::TrigCompositeAuxContainer#Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MUAux.', 'xAOD::TrigCompositeContainer#Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'xAOD::TrigCompositeAuxContainer#Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MUAux.', 'xAOD::TrigCompositeContainer#Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'xAOD::TrigCompositeAuxContainer#Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MUAux.', 'xAOD::TrigCompositeContainer#Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'xAOD::TrigCompositeAuxContainer#Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EMAux.', 'xAOD::TrigCompositeContainer#Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'xAOD::TrigCompositeAuxContainer#Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EMAux.', 'xAOD::TrigCompositeContainer#combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'xAOD::TrigCompositeAuxContainer#combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MUAux.', 'xAOD::TrigCompositeContainer#combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM', 'xAOD::TrigCompositeAuxContainer#combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EMAux.', 'xAOD::TrigCompositeContainer#HLTSummary', 'xAOD::TrigCompositeAuxContainer#HLTSummaryAux.']
+Py:HLTCFConfig      DEBUG ['EventInfo#*', 'xAOD::TrigCompositeContainer#Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'xAOD::TrigCompositeAuxContainer#Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MUAux.', 'xAOD::TrigCompositeContainer#Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'xAOD::TrigCompositeAuxContainer#Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MUAux.', 'xAOD::TrigCompositeContainer#Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU', 'xAOD::TrigCompositeAuxContainer#Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MUAux.', 'xAOD::TrigCompositeContainer#Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'xAOD::TrigCompositeAuxContainer#Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EMAux.', 'xAOD::TrigCompositeContainer#Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM', 'xAOD::TrigCompositeAuxContainer#Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EMAux.', 'xAOD::TrigCompositeContainer#combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU', 'xAOD::TrigCompositeAuxContainer#combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MUAux.', 'xAOD::TrigCompositeContainer#combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM', 'xAOD::TrigCompositeAuxContainer#combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EMAux.', 'xAOD::TrigCompositeContainer#HLTSummary', 'xAOD::TrigCompositeAuxContainer#HLTSummaryAux.']
  +-- AthSequencer/AthMasterSeq
    +-- AthSequencer/AthFilterSeq
      +-- AthSequencer/AthBeginSeq
@@ -512,8 +578,8 @@ Py:HLTCFConfig      DEBUG ['EventInfo#*', 'xAOD::TrigCompositeContainer#Step1MuH
                      +-- AthSequencer/elSeqStep1
                        +-- HLTTest::TestInputMaker/Step1ElInputMaker
                        +-- HLTTest::TestRecoAlg/CaloClustering
-                   +-- HLTTest::TestHypoAlg/Combo_Step1MuHypo
-                   +-- HLTTest::TestHypoAlg/Combo_Step1ElHypo
+                   +-- HLTTest::TestHypoAlg/Step1MuHypo_Combo
+                   +-- HLTTest::TestHypoAlg/Step1ElHypo_Combo
                    +-- ComboHypo/ComboHypo_Step1_mu_em
              +-- TriggerSummaryAlg/TriggerSummaryStep1
              +-- AthSequencer/Step2_filter
@@ -547,8 +613,8 @@ Py:HLTCFConfig      DEBUG ['EventInfo#*', 'xAOD::TrigCompositeContainer#Step1MuH
                      +-- AthSequencer/elSeqStep2
                        +-- HLTTest::TestInputMaker/Step2ElInputMaker
                        +-- HLTTest::TestRecoAlg/CaloClustering2
-                   +-- HLTTest::TestHypoAlg/Combo_Step2MuHypo
-                   +-- HLTTest::TestHypoAlg/Combo_Step2ElHypo
+                   +-- HLTTest::TestHypoAlg/Step2MuHypo_Combo
+                   +-- HLTTest::TestHypoAlg/Step2ElHypo_Combo
                    +-- ComboHypo/ComboHypo_Step2_mu_em
              +-- TriggerSummaryAlg/TriggerSummaryStep2
            +-- TriggerSummaryAlg/TriggerSummaryFinal
@@ -563,8 +629,8 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r2)
-                                          running on lxplus009.cern.ch on Wed Aug  1 12:50:03 2018
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r3)
+                                          running on pc-tbed-pub-23.cern.ch on Tue Aug  7 16:54:55 2018
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -581,8 +647,8 @@ PoolSvc                                            INFO io_register[PoolSvc](xml
 PoolSvc                                            INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc                                            INFO Frontier compression level set to 5
 DBReplicaSvc                                       INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data
-DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-31T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus009.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-08-06T2056/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
+DBReplicaSvc                                       INFO Total of 10 servers found for host pc-tbed-pub-23.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                            INFO Successfully setup replica sorting algorithm
 PoolSvc                                            INFO Setting up APR FileCatalog and Streams
 PoolSvc                                            INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
@@ -809,67 +875,67 @@ Step1ElHypo                                       DEBUG HypoBase::sysInitialize(
 Step1ElHypo                                       DEBUG HypoBase::sysInitialize()           and produce decision: Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
 Step1ElHypo                                       DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step1ElInputMaker_from_FilterStep1_on_L1EM_from_L1EM
 Step1ElHypo                                       DEBUG HypoBase::sysInitialize()           and produce decision: Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-Combo_Step1MuHypo                                 DEBUG Property update for OutputLevel : new value = 2
-Combo_Step1MuHypo                                  INFO Initializing Combo_Step1MuHypo...
-Combo_Step1MuHypo                                 DEBUG Link name is initialRoI
-Combo_Step1MuHypo.HLT_mu8_e8                      DEBUG Property update for OutputLevel : new value = 2
-Combo_Step1MuHypo.HLT_mu8_e8                       INFO Initializing Combo_Step1MuHypo.HLT_mu8_e8...
-Combo_Step1MuHypo.HLT_mu8_e8                      DEBUG Configured to require chain HLT_mu8_e8 ID#3385806166
-Combo_Step1MuHypo.HLT_mu8_e8                      DEBUG Link name is initialRoI
-Combo_Step1MuHypo.HLT_mu8_e8                      DEBUG threshold= 'Threshold':8000.00
-Combo_Step1MuHypo.HLT_mu8_e8                      DEBUG property= 'Property':pt
-Combo_Step1MuHypo                                 DEBUG input handles: 2
-Combo_Step1MuHypo                                 DEBUG output handles: 1
-Combo_Step1MuHypo                                 DEBUG Registering all Tools in ToolHandleArray HypoTools
-Combo_Step1MuHypo                                 DEBUG Adding private ToolHandle tool Combo_Step1MuHypo.HLT_mu8_e8 (HLTTest::TestHypoTool) from ToolHandleArray HypoTools
-Combo_Step1MuHypo                                 DEBUG Data Deps for Combo_Step1MuHypo
+Step1MuHypo_Combo                                 DEBUG Property update for OutputLevel : new value = 2
+Step1MuHypo_Combo                                  INFO Initializing Step1MuHypo_Combo...
+Step1MuHypo_Combo                                 DEBUG Link name is initialRoI
+Step1MuHypo_Combo.HLT_mu8_e8                      DEBUG Property update for OutputLevel : new value = 2
+Step1MuHypo_Combo.HLT_mu8_e8                       INFO Initializing Step1MuHypo_Combo.HLT_mu8_e8...
+Step1MuHypo_Combo.HLT_mu8_e8                      DEBUG Configured to require chain HLT_mu8_e8 ID#3385806166
+Step1MuHypo_Combo.HLT_mu8_e8                      DEBUG Link name is initialRoI
+Step1MuHypo_Combo.HLT_mu8_e8                      DEBUG threshold= 'Threshold':8000.00
+Step1MuHypo_Combo.HLT_mu8_e8                      DEBUG property= 'Property':pt
+Step1MuHypo_Combo                                 DEBUG input handles: 2
+Step1MuHypo_Combo                                 DEBUG output handles: 1
+Step1MuHypo_Combo                                 DEBUG Registering all Tools in ToolHandleArray HypoTools
+Step1MuHypo_Combo                                 DEBUG Adding private ToolHandle tool Step1MuHypo_Combo.HLT_mu8_e8 (HLTTest::TestHypoTool) from ToolHandleArray HypoTools
+Step1MuHypo_Combo                                 DEBUG Data Deps for Step1MuHypo_Combo
   + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1MuInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
   + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+muAlg_out' ) 
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
-Combo_Step1MuHypo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step1MuInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1MU
-Combo_Step1MuHypo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-Combo_Step1ElHypo                                 DEBUG Property update for OutputLevel : new value = 2
-Combo_Step1ElHypo                                  INFO Initializing Combo_Step1ElHypo...
-Combo_Step1ElHypo                                 DEBUG Link name is initialRoI
-Combo_Step1ElHypo.HLT_mu8_e8                      DEBUG Property update for OutputLevel : new value = 2
-Combo_Step1ElHypo.HLT_mu8_e8                       INFO Initializing Combo_Step1ElHypo.HLT_mu8_e8...
-Combo_Step1ElHypo.HLT_mu8_e8                      DEBUG Configured to require chain HLT_mu8_e8 ID#3385806166
-Combo_Step1ElHypo.HLT_mu8_e8                      DEBUG Link name is initialRoI
-Combo_Step1ElHypo.HLT_mu8_e8                      DEBUG threshold= 'Threshold':8000.00
-Combo_Step1ElHypo.HLT_mu8_e8                      DEBUG property= 'Property':et
-Combo_Step1ElHypo                                 DEBUG input handles: 2
-Combo_Step1ElHypo                                 DEBUG output handles: 1
-Combo_Step1ElHypo                                 DEBUG Registering all Tools in ToolHandleArray HypoTools
-Combo_Step1ElHypo                                 DEBUG Adding private ToolHandle tool Combo_Step1ElHypo.HLT_mu8_e8 (HLTTest::TestHypoTool) from ToolHandleArray HypoTools
-Combo_Step1ElHypo                                 DEBUG Data Deps for Combo_Step1ElHypo
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+Step1MuHypo_Combo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step1MuInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Step1MuHypo_Combo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Step1ElHypo_Combo                                 DEBUG Property update for OutputLevel : new value = 2
+Step1ElHypo_Combo                                  INFO Initializing Step1ElHypo_Combo...
+Step1ElHypo_Combo                                 DEBUG Link name is initialRoI
+Step1ElHypo_Combo.HLT_mu8_e8                      DEBUG Property update for OutputLevel : new value = 2
+Step1ElHypo_Combo.HLT_mu8_e8                       INFO Initializing Step1ElHypo_Combo.HLT_mu8_e8...
+Step1ElHypo_Combo.HLT_mu8_e8                      DEBUG Configured to require chain HLT_mu8_e8 ID#3385806166
+Step1ElHypo_Combo.HLT_mu8_e8                      DEBUG Link name is initialRoI
+Step1ElHypo_Combo.HLT_mu8_e8                      DEBUG threshold= 'Threshold':8000.00
+Step1ElHypo_Combo.HLT_mu8_e8                      DEBUG property= 'Property':et
+Step1ElHypo_Combo                                 DEBUG input handles: 2
+Step1ElHypo_Combo                                 DEBUG output handles: 1
+Step1ElHypo_Combo                                 DEBUG Registering all Tools in ToolHandleArray HypoTools
+Step1ElHypo_Combo                                 DEBUG Adding private ToolHandle tool Step1ElHypo_Combo.HLT_mu8_e8 (HLTTest::TestHypoTool) from ToolHandleArray HypoTools
+Step1ElHypo_Combo                                 DEBUG Data Deps for Step1ElHypo_Combo
   + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1ElInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
   + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+elAlg_out' ) 
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
-Combo_Step1ElHypo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step1ElInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1EM
-Combo_Step1ElHypo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+Step1ElHypo_Combo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step1ElInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1EM
+Step1ElHypo_Combo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 ComboHypo_Step1_mu_em                             DEBUG Property update for OutputLevel : new value = 2
 ComboHypo_Step1_mu_em                              INFO with these inputs: 
-ComboHypo_Step1_mu_em                              INFO -- Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-ComboHypo_Step1_mu_em                              INFO -- Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+ComboHypo_Step1_mu_em                              INFO -- Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+ComboHypo_Step1_mu_em                              INFO -- Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 ComboHypo_Step1_mu_em                              INFO with this multiplicity map: 
-ComboHypo_Step1_mu_em                              INFO -- HLT_mu8_e8 multiplicities: 
+ComboHypo_Step1_mu_em                              INFO -- HLT_mu8_e8 multiplicities of size 2
 ComboHypo_Step1_mu_em                              INFO -- 1, 
 ComboHypo_Step1_mu_em                              INFO -- 1, 
 ComboHypo_Step1_mu_em                             DEBUG input handles: 0
 ComboHypo_Step1_mu_em                             DEBUG output handles: 2
 ComboHypo_Step1_mu_em                             DEBUG Data Deps for ComboHypo_Step1_mu_em
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
-Combo_Step1MuHypo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step1MuInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1MU
-Combo_Step1MuHypo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-Combo_Step1ElHypo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step1ElInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1EM
-Combo_Step1ElHypo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+Step1MuHypo_Combo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step1MuInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Step1MuHypo_Combo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Step1ElHypo_Combo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step1ElInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1EM
+Step1ElHypo_Combo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryStep1                               DEBUG Property update for OutputLevel : new value = 2
 TriggerSummaryStep1                               DEBUG Will consume implicit decisions:
 TriggerSummaryStep1                               DEBUG  Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
 TriggerSummaryStep1                               DEBUG  Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerSummaryStep1                               DEBUG  combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerSummaryStep1                               DEBUG  combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerSummaryStep1                               DEBUG  combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerSummaryStep1                               DEBUG  combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryStep1                               DEBUG input handles: 1
 TriggerSummaryStep1                               DEBUG output handles: 1
 TriggerSummaryStep1                               DEBUG Registering all Tools in ToolHandleArray OutputTools
@@ -905,35 +971,35 @@ FilterStep2_on_Step2_em                           DEBUG Data Deps for FilterStep
 FilterStep2_on_Step2_mu_em                        DEBUG Property update for OutputLevel : new value = 2
 FilterStep2_on_Step2_mu_em                         INFO Initializing FilterStep2_on_Step2_mu_em...
 FilterStep2_on_Step2_mu_em                        DEBUG Will consume implicit ReadDH:
-FilterStep2_on_Step2_mu_em                        DEBUG  - combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-FilterStep2_on_Step2_mu_em                        DEBUG  - combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+FilterStep2_on_Step2_mu_em                        DEBUG  - combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+FilterStep2_on_Step2_mu_em                        DEBUG  - combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 FilterStep2_on_Step2_mu_em                        DEBUG Will produce implicit WriteDH: 
-FilterStep2_on_Step2_mu_em                        DEBUG  - FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-FilterStep2_on_Step2_mu_em                        DEBUG  - FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+FilterStep2_on_Step2_mu_em                        DEBUG  - FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+FilterStep2_on_Step2_mu_em                        DEBUG  - FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 FilterStep2_on_Step2_mu_em                        DEBUG Configured to require chain HLT_mu8_e8 ID#3385806166
 FilterStep2_on_Step2_mu_em                        DEBUG mergeInputs is  'MergeInputs':False
 FilterStep2_on_Step2_mu_em                        DEBUG input handles: 0
 FilterStep2_on_Step2_mu_em                        DEBUG output handles: 2
 FilterStep2_on_Step2_mu_em                        DEBUG Data Deps for FilterStep2_on_Step2_mu_em
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
 Step2MuInputMaker                                 DEBUG Property update for OutputLevel : new value = 2
 Step2MuInputMaker                                  INFO Initializing Step2MuInputMaker...
 Step2MuInputMaker                                 DEBUG Will produce output reco collections: 'StoreGateSvc+muIM2_out'
 Step2MuInputMaker                                 DEBUG input handles: 2
 Step2MuInputMaker                                 DEBUG output handles: 3
 Step2MuInputMaker                                 DEBUG Data Deps for Step2MuInputMaker
-  + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+  + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
   + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU' ) 
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
   + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuInputMaker_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU' ) 
   + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+muIM2_out' ) 
 Step2MuInputMaker                                 DEBUG Will consume implicit decisions:
 Step2MuInputMaker                                 DEBUG  FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
-Step2MuInputMaker                                 DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Step2MuInputMaker                                 DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
 Step2MuInputMaker                                 DEBUG  and produce decisions: 
 Step2MuInputMaker                                 DEBUG  Step2MuInputMaker_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
-Step2MuInputMaker                                 DEBUG  Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Step2MuInputMaker                                 DEBUG  Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
 muMSRecAlg2                                       DEBUG Property update for OutputLevel : new value = 2
 muMSRecAlg2                                        INFO Initializing muMSRecAlg2 reading input file  'FileName':msmu.dat
 muMSRecAlg2                                       DEBUG Loaded 3 pseudo events
@@ -944,10 +1010,10 @@ muMSRecAlg2                                       DEBUG Data Deps for muMSRecAlg
   + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+muAlg2_out' ) 
 Step2MuInputMaker                                 DEBUG Will consume implicit decisions:
 Step2MuInputMaker                                 DEBUG  FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
-Step2MuInputMaker                                 DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Step2MuInputMaker                                 DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
 Step2MuInputMaker                                 DEBUG  and produce decisions: 
 Step2MuInputMaker                                 DEBUG  Step2MuInputMaker_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
-Step2MuInputMaker                                 DEBUG  Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Step2MuInputMaker                                 DEBUG  Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
 Step2MuHypo                                       DEBUG Property update for OutputLevel : new value = 2
 Step2MuHypo                                        INFO Initializing Step2MuHypo...
 Step2MuHypo                                       DEBUG Link name is initialRoI
@@ -983,16 +1049,16 @@ Step2ElInputMaker                                 DEBUG input handles: 2
 Step2ElInputMaker                                 DEBUG output handles: 3
 Step2ElInputMaker                                 DEBUG Data Deps for Step2ElInputMaker
   + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM' ) 
-  + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+  + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
   + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2ElInputMaker_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM' ) 
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
   + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+elIM2_out' ) 
 Step2ElInputMaker                                 DEBUG Will consume implicit decisions:
 Step2ElInputMaker                                 DEBUG  FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-Step2ElInputMaker                                 DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+Step2ElInputMaker                                 DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 Step2ElInputMaker                                 DEBUG  and produce decisions: 
 Step2ElInputMaker                                 DEBUG  Step2ElInputMaker_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-Step2ElInputMaker                                 DEBUG  Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+Step2ElInputMaker                                 DEBUG  Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 CaloClustering2                                   DEBUG Property update for OutputLevel : new value = 2
 CaloClustering2                                    INFO Initializing CaloClustering2 reading input file  'FileName':emclusters.dat
 CaloClustering2                                   DEBUG Loaded 3 pseudo events
@@ -1003,10 +1069,10 @@ CaloClustering2                                   DEBUG Data Deps for CaloCluste
   + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+elAlg2_out' ) 
 Step2ElInputMaker                                 DEBUG Will consume implicit decisions:
 Step2ElInputMaker                                 DEBUG  FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-Step2ElInputMaker                                 DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+Step2ElInputMaker                                 DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 Step2ElInputMaker                                 DEBUG  and produce decisions: 
 Step2ElInputMaker                                 DEBUG  Step2ElInputMaker_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-Step2ElInputMaker                                 DEBUG  Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+Step2ElInputMaker                                 DEBUG  Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 Step2ElHypo                                       DEBUG Property update for OutputLevel : new value = 2
 Step2ElHypo                                        INFO Initializing Step2ElHypo...
 Step2ElHypo                                       DEBUG Link name is initialRoI
@@ -1035,67 +1101,67 @@ Step2ElHypo                                       DEBUG HypoBase::sysInitialize(
 Step2ElHypo                                       DEBUG HypoBase::sysInitialize()           and produce decision: Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
 Step2ElHypo                                       DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step2ElInputMaker_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
 Step2ElHypo                                       DEBUG HypoBase::sysInitialize()           and produce decision: Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-Combo_Step2MuHypo                                 DEBUG Property update for OutputLevel : new value = 2
-Combo_Step2MuHypo                                  INFO Initializing Combo_Step2MuHypo...
-Combo_Step2MuHypo                                 DEBUG Link name is initialRoI
-Combo_Step2MuHypo.HLT_mu8_e8                      DEBUG Property update for OutputLevel : new value = 2
-Combo_Step2MuHypo.HLT_mu8_e8                       INFO Initializing Combo_Step2MuHypo.HLT_mu8_e8...
-Combo_Step2MuHypo.HLT_mu8_e8                      DEBUG Configured to require chain HLT_mu8_e8 ID#3385806166
-Combo_Step2MuHypo.HLT_mu8_e8                      DEBUG Link name is initialRoI
-Combo_Step2MuHypo.HLT_mu8_e8                      DEBUG threshold= 'Threshold':8000.00
-Combo_Step2MuHypo.HLT_mu8_e8                      DEBUG property= 'Property':pt2
-Combo_Step2MuHypo                                 DEBUG input handles: 2
-Combo_Step2MuHypo                                 DEBUG output handles: 1
-Combo_Step2MuHypo                                 DEBUG Registering all Tools in ToolHandleArray HypoTools
-Combo_Step2MuHypo                                 DEBUG Adding private ToolHandle tool Combo_Step2MuHypo.HLT_mu8_e8 (HLTTest::TestHypoTool) from ToolHandleArray HypoTools
-Combo_Step2MuHypo                                 DEBUG Data Deps for Combo_Step2MuHypo
-  + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+Step2MuHypo_Combo                                 DEBUG Property update for OutputLevel : new value = 2
+Step2MuHypo_Combo                                  INFO Initializing Step2MuHypo_Combo...
+Step2MuHypo_Combo                                 DEBUG Link name is initialRoI
+Step2MuHypo_Combo.HLT_mu8_e8                      DEBUG Property update for OutputLevel : new value = 2
+Step2MuHypo_Combo.HLT_mu8_e8                       INFO Initializing Step2MuHypo_Combo.HLT_mu8_e8...
+Step2MuHypo_Combo.HLT_mu8_e8                      DEBUG Configured to require chain HLT_mu8_e8 ID#3385806166
+Step2MuHypo_Combo.HLT_mu8_e8                      DEBUG Link name is initialRoI
+Step2MuHypo_Combo.HLT_mu8_e8                      DEBUG threshold= 'Threshold':8000.00
+Step2MuHypo_Combo.HLT_mu8_e8                      DEBUG property= 'Property':pt2
+Step2MuHypo_Combo                                 DEBUG input handles: 2
+Step2MuHypo_Combo                                 DEBUG output handles: 1
+Step2MuHypo_Combo                                 DEBUG Registering all Tools in ToolHandleArray HypoTools
+Step2MuHypo_Combo                                 DEBUG Adding private ToolHandle tool Step2MuHypo_Combo.HLT_mu8_e8 (HLTTest::TestHypoTool) from ToolHandleArray HypoTools
+Step2MuHypo_Combo                                 DEBUG Data Deps for Step2MuHypo_Combo
+  + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
   + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+muAlg2_out' ) 
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
-Combo_Step2MuHypo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-Combo_Step2MuHypo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-Combo_Step2ElHypo                                 DEBUG Property update for OutputLevel : new value = 2
-Combo_Step2ElHypo                                  INFO Initializing Combo_Step2ElHypo...
-Combo_Step2ElHypo                                 DEBUG Link name is initialRoI
-Combo_Step2ElHypo.HLT_mu8_e8                      DEBUG Property update for OutputLevel : new value = 2
-Combo_Step2ElHypo.HLT_mu8_e8                       INFO Initializing Combo_Step2ElHypo.HLT_mu8_e8...
-Combo_Step2ElHypo.HLT_mu8_e8                      DEBUG Configured to require chain HLT_mu8_e8 ID#3385806166
-Combo_Step2ElHypo.HLT_mu8_e8                      DEBUG Link name is initialRoI
-Combo_Step2ElHypo.HLT_mu8_e8                      DEBUG threshold= 'Threshold':8000.00
-Combo_Step2ElHypo.HLT_mu8_e8                      DEBUG property= 'Property':et
-Combo_Step2ElHypo                                 DEBUG input handles: 2
-Combo_Step2ElHypo                                 DEBUG output handles: 1
-Combo_Step2ElHypo                                 DEBUG Registering all Tools in ToolHandleArray HypoTools
-Combo_Step2ElHypo                                 DEBUG Adding private ToolHandle tool Combo_Step2ElHypo.HLT_mu8_e8 (HLTTest::TestHypoTool) from ToolHandleArray HypoTools
-Combo_Step2ElHypo                                 DEBUG Data Deps for Combo_Step2ElHypo
-  + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+Step2MuHypo_Combo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Step2MuHypo_Combo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Step2ElHypo_Combo                                 DEBUG Property update for OutputLevel : new value = 2
+Step2ElHypo_Combo                                  INFO Initializing Step2ElHypo_Combo...
+Step2ElHypo_Combo                                 DEBUG Link name is initialRoI
+Step2ElHypo_Combo.HLT_mu8_e8                      DEBUG Property update for OutputLevel : new value = 2
+Step2ElHypo_Combo.HLT_mu8_e8                       INFO Initializing Step2ElHypo_Combo.HLT_mu8_e8...
+Step2ElHypo_Combo.HLT_mu8_e8                      DEBUG Configured to require chain HLT_mu8_e8 ID#3385806166
+Step2ElHypo_Combo.HLT_mu8_e8                      DEBUG Link name is initialRoI
+Step2ElHypo_Combo.HLT_mu8_e8                      DEBUG threshold= 'Threshold':8000.00
+Step2ElHypo_Combo.HLT_mu8_e8                      DEBUG property= 'Property':et
+Step2ElHypo_Combo                                 DEBUG input handles: 2
+Step2ElHypo_Combo                                 DEBUG output handles: 1
+Step2ElHypo_Combo                                 DEBUG Registering all Tools in ToolHandleArray HypoTools
+Step2ElHypo_Combo                                 DEBUG Adding private ToolHandle tool Step2ElHypo_Combo.HLT_mu8_e8 (HLTTest::TestHypoTool) from ToolHandleArray HypoTools
+Step2ElHypo_Combo                                 DEBUG Data Deps for Step2ElHypo_Combo
+  + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
   + INPUT   ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+elAlg2_out' ) 
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
-Combo_Step2ElHypo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
-Combo_Step2ElHypo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+Step2ElHypo_Combo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+Step2ElHypo_Combo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 ComboHypo_Step2_mu_em                             DEBUG Property update for OutputLevel : new value = 2
 ComboHypo_Step2_mu_em                              INFO with these inputs: 
-ComboHypo_Step2_mu_em                              INFO -- Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-ComboHypo_Step2_mu_em                              INFO -- Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+ComboHypo_Step2_mu_em                              INFO -- Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+ComboHypo_Step2_mu_em                              INFO -- Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 ComboHypo_Step2_mu_em                              INFO with this multiplicity map: 
-ComboHypo_Step2_mu_em                              INFO -- HLT_mu8_e8 multiplicities: 
+ComboHypo_Step2_mu_em                              INFO -- HLT_mu8_e8 multiplicities of size 2
 ComboHypo_Step2_mu_em                              INFO -- 1, 
 ComboHypo_Step2_mu_em                              INFO -- 1, 
 ComboHypo_Step2_mu_em                             DEBUG input handles: 0
 ComboHypo_Step2_mu_em                             DEBUG output handles: 2
 ComboHypo_Step2_mu_em                             DEBUG Data Deps for ComboHypo_Step2_mu_em
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
-Combo_Step2MuHypo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-Combo_Step2MuHypo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-Combo_Step2ElHypo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
-Combo_Step2ElHypo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+Step2MuHypo_Combo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Step2MuHypo_Combo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+Step2ElHypo_Combo                                 DEBUG HypoBase::sysInitialize() Will consume implicit decision: Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+Step2ElHypo_Combo                                 DEBUG HypoBase::sysInitialize()           and produce decision: Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryStep2                               DEBUG Property update for OutputLevel : new value = 2
 TriggerSummaryStep2                               DEBUG Will consume implicit decisions:
 TriggerSummaryStep2                               DEBUG  Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
 TriggerSummaryStep2                               DEBUG  Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerSummaryStep2                               DEBUG  combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerSummaryStep2                               DEBUG  combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerSummaryStep2                               DEBUG  combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerSummaryStep2                               DEBUG  combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryStep2                               DEBUG input handles: 1
 TriggerSummaryStep2                               DEBUG output handles: 1
 TriggerSummaryStep2                               DEBUG Registering all Tools in ToolHandleArray OutputTools
@@ -1109,8 +1175,8 @@ TriggerSummaryFinal                               DEBUG  Step2MuHypo_from_Filter
 TriggerSummaryFinal                               DEBUG  Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
 TriggerSummaryFinal                               DEBUG  Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
 TriggerSummaryFinal                               DEBUG  Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerSummaryFinal                               DEBUG  combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerSummaryFinal                               DEBUG  combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerSummaryFinal                               DEBUG  combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerSummaryFinal                               DEBUG  combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryFinal.HLTEDMCreator                 DEBUG Property update for OutputLevel : new value = 2
 ClassIDSvc                                         INFO  getRegistryEntries: read 218 CLIDRegistry entries for module ALL
 TriggerSummaryFinal                               DEBUG input handles: 1
@@ -1123,8 +1189,8 @@ TriggerSummaryFinal                               DEBUG Data Deps for TriggerSum
   + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU' ) 
   + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM' ) 
   + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU' ) 
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
-  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+  + OUTPUT  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
 TriggerMonitorFinal                               DEBUG Property update for OutputLevel : new value = 2
 TriggerMonitorFinal.StepCollector0                DEBUG Property update for OutputLevel : new value = 2
 TriggerMonitorFinal.StepCollector1                DEBUG Property update for OutputLevel : new value = 2
@@ -1148,10 +1214,10 @@ StreamESD                                          INFO I/O reinitialization...
 ThreadPoolSvc                                      INFO no thread init tools attached
 AvalancheSchedulerSvc                              INFO Activating scheduler in a separate thread
 AvalancheSchedulerSvc                              INFO Found 35 algorithms
-AvalancheSchedulerSvc                           WARNING multiple algorithms declare  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU' )  as output! could be a single instance in multiple paths though, or control flow may guarantee only one runs...!
-AvalancheSchedulerSvc                           WARNING multiple algorithms declare  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' )  as output! could be a single instance in multiple paths though, or control flow may guarantee only one runs...!
 AvalancheSchedulerSvc                           WARNING multiple algorithms declare  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU' )  as output! could be a single instance in multiple paths though, or control flow may guarantee only one runs...!
-AvalancheSchedulerSvc                           WARNING multiple algorithms declare  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' )  as output! could be a single instance in multiple paths though, or control flow may guarantee only one runs...!
+AvalancheSchedulerSvc                           WARNING multiple algorithms declare  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU' )  as output! could be a single instance in multiple paths though, or control flow may guarantee only one runs...!
+AvalancheSchedulerSvc                           WARNING multiple algorithms declare  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' )  as output! could be a single instance in multiple paths though, or control flow may guarantee only one runs...!
+AvalancheSchedulerSvc                           WARNING multiple algorithms declare  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' )  as output! could be a single instance in multiple paths though, or control flow may guarantee only one runs...!
 AvalancheSchedulerSvc                           WARNING multiple algorithms declare  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM' )  as output! could be a single instance in multiple paths though, or control flow may guarantee only one runs...!
 AvalancheSchedulerSvc                              INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
    o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+HLTChains' )     required by Algorithm: 
@@ -1210,8 +1276,8 @@ PrecedenceSvc                                      INFO
                         elSeqStep1 [Seq]  [Sequential]  [Prompt] 
                           Step1ElInputMaker [Alg]  [n= 0]
                           CaloClustering [Alg]  [n= 1] [unclonable] 
-                      Combo_Step1MuHypo [Alg]  [n= 0]
-                      Combo_Step1ElHypo [Alg]  [n= 0]
+                      Step1MuHypo_Combo [Alg]  [n= 0]
+                      Step1ElHypo_Combo [Alg]  [n= 0]
                       ComboHypo_Step1_mu_em [Alg]  [n= 0]
                 TriggerSummaryStep1 [Alg]  [n= 0]
                 Step2_filter [Seq]  [Concurrent]  [OR] 
@@ -1245,8 +1311,8 @@ PrecedenceSvc                                      INFO
                         elSeqStep2 [Seq]  [Sequential]  [Prompt] 
                           Step2ElInputMaker [Alg]  [n= 0]
                           CaloClustering2 [Alg]  [n= 1] [unclonable] 
-                      Combo_Step2MuHypo [Alg]  [n= 0]
-                      Combo_Step2ElHypo [Alg]  [n= 0]
+                      Step2MuHypo_Combo [Alg]  [n= 0]
+                      Step2ElHypo_Combo [Alg]  [n= 0]
                       ComboHypo_Step2_mu_em [Alg]  [n= 0]
                 TriggerSummaryStep2 [Alg]  [n= 0]
               TriggerSummaryFinal [Alg]  [n= 0]
@@ -1283,27 +1349,32 @@ PrecedenceSvc                                      INFO
         V
         Step1MuInputMaker
       ====================================
-        muMSRecAlg
+        ComboHypo_Step1_mu_em
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+muAlg_out' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
         V
-        Step1MuHypo
-        Combo_Step1MuHypo
       ====================================
         ComboHypo_Step1_mu_em
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
         V
       ====================================
         FilterStep2_on_Step2_mu_em
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
         V
         Step2MuInputMaker
+      ====================================
+        muMSRecAlg
+        V
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+muAlg_out' ) 
+        V
+        Step1MuHypo
+        Step1MuHypo_Combo
       ====================================
         FilterStep2_on_Step2_mu_em
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
         V
         Step2ElInputMaker
       ====================================
@@ -1332,22 +1403,11 @@ PrecedenceSvc                                      INFO
         V
         o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+L1EM' ) 
         V
-      ====================================
-        Step2MuInputMaker
-        V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
-        V
-        Combo_Step2MuHypo
       ====================================
         L1Decoder
         V
         o  ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+L1EMRoIs' ) 
         V
-      ====================================
-        ComboHypo_Step1_mu_em
-        V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
-        V
       ====================================
         L1Decoder
         V
@@ -1359,6 +1419,16 @@ PrecedenceSvc                                      INFO
         V
         o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+L1MU' ) 
         V
+      ====================================
+        Step1MuHypo_Combo
+        V
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+        V
+      ====================================
+        Step1ElHypo_Combo
+        V
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+        V
       ====================================
         FilterStep1_on_L1EM
         V
@@ -1366,35 +1436,49 @@ PrecedenceSvc                                      INFO
         V
         Step1ElInputMaker
       ====================================
-        FilterStep2_on_Step2_mu
+        CaloClustering
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+elAlg_out' ) 
         V
-        Step2MuInputMaker
+        Step1ElHypo
+        Step1ElHypo_Combo
       ====================================
-        FilterStep1_on_L1MUL1EM
+        Step1ElInputMaker
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1ElInputMaker_from_FilterStep1_on_L1EM_from_L1EM' ) 
         V
-        Step1MuInputMaker
+        Step1ElHypo
       ====================================
+        Step2ElHypo
         TriggerSummaryFinal
-        ComboHypo_Step2_mu_em
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM' ) 
         V
       ====================================
-        Step1MuHypo
-        TriggerSummaryFinal
+        FilterStep1_on_L1MUL1EM
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep1_on_L1MUL1EM_from_L1EM' ) 
         V
+        Step1ElInputMaker
+      ====================================
+        CaloClustering2
+        V
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+elAlg2_out' ) 
+        V
+        Step2ElHypo_Combo
+        Step2ElHypo
       ====================================
         Step1MuInputMaker
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+muIM_out' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1MuInputMaker_from_FilterStep1_on_L1MU_from_L1MU' ) 
         V
-        muMSRecAlg
+        Step1MuHypo
+      ====================================
+        Step1ElInputMaker
+        V
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1ElInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+        V
+        Step1ElHypo_Combo
       ====================================
         Step1ElInputMaker
         V
@@ -1402,28 +1486,27 @@ PrecedenceSvc                                      INFO
         V
         CaloClustering
       ====================================
-        Step1ElInputMaker
+        ComboHypo_Step2_mu_em
+        TriggerSummaryFinal
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1ElInputMaker_from_FilterStep1_on_L1EM_from_L1EM' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
         V
-        Step1ElHypo
       ====================================
-        Step1MuInputMaker
+        Step2MuHypo_Combo
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1MuInputMaker_from_FilterStep1_on_L1MU_from_L1MU' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
         V
-        Step1MuHypo
       ====================================
-        Combo_Step1ElHypo
+        Step2ElHypo_Combo
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
         V
       ====================================
         Step2ElInputMaker
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+elIM2_out' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
         V
-        CaloClustering2
+        Step2ElHypo_Combo
       ====================================
         Step2ElInputMaker
         V
@@ -1431,101 +1514,84 @@ PrecedenceSvc                                      INFO
         V
         Step2ElHypo
       ====================================
-        Combo_Step2MuHypo
+        Step2ElInputMaker
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+elIM2_out' ) 
         V
+        CaloClustering2
       ====================================
-        Step2ElHypo
         TriggerSummaryFinal
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+MonitoringSummaryTriggerSummaryFinal' ) 
         V
       ====================================
-        FilterStep1_on_L1MUL1EM
+        Step2MuHypo
+        TriggerSummaryFinal
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU' ) 
         V
-        Step1ElInputMaker
       ====================================
-        Step2ElInputMaker
+        Step1MuInputMaker
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1MuInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
         V
-        Combo_Step2ElHypo
+        Step1MuHypo_Combo
       ====================================
-        CaloClustering2
+        FilterStep2_on_Step2_mu
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+elAlg2_out' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU' ) 
         V
-        Step2ElHypo
-        Combo_Step2ElHypo
+        Step2MuInputMaker
       ====================================
-        Combo_Step2ElHypo
+        FilterStep1_on_L1MUL1EM
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+FilterStep1_on_L1MUL1EM_from_L1MU' ) 
         V
+        Step1MuInputMaker
       ====================================
-        Step1ElInputMaker
+        Step1MuHypo
+        TriggerSummaryFinal
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1ElInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU' ) 
         V
-        Combo_Step1ElHypo
       ====================================
-        TriggerSummaryStep2
+        Step2MuInputMaker
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+MonitoringSummaryTriggerSummaryStep2' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
         V
+        Step2MuHypo_Combo
       ====================================
-        SGInputLoader
-        V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+HLTChains' ) 
-        V
-        TriggerSummaryStep2
+        ComboHypo_Step2_mu_em
         TriggerSummaryFinal
-        TriggerSummaryStep1
-      ====================================
-        CaloClustering
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+elAlg_out' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
         V
-        Step1ElHypo
-        Combo_Step1ElHypo
       ====================================
         Step1MuInputMaker
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step1MuInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
-        V
-        Combo_Step1MuHypo
-      ====================================
-        Step2MuHypo
-        TriggerSummaryFinal
-        V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+muIM_out' ) 
         V
+        muMSRecAlg
       ====================================
-        TriggerSummaryFinal
+        TriggerSummaryStep2
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+MonitoringSummaryTriggerSummaryFinal' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+MonitoringSummaryTriggerSummaryStep2' ) 
         V
       ====================================
-        Combo_Step1MuHypo
+        SGInputLoader
         V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU' ) 
+        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+HLTChains' ) 
         V
+        TriggerSummaryStep2
+        TriggerSummaryFinal
+        TriggerSummaryStep1
       ====================================
         muMSRecAlg2
         V
         o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+muAlg2_out' ) 
         V
+        Step2MuHypo_Combo
         Step2MuHypo
-        Combo_Step2MuHypo
-      ====================================
-        TriggerSummaryFinal
-        ComboHypo_Step2_mu_em
-        V
-        o  ( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM' ) 
-        V
       ====================================
 
 HistogramPersistencySvc                         WARNING Histograms saving not required.
@@ -1679,25 +1745,25 @@ Step1ElHypo                             0   0     DEBUG Number of positive decis
 Step1ElHypo                             0   0     DEBUG  --- found new decision HLT_e20 ID#4230506138
 Step1ElHypo                             0   0     DEBUG Number of positive decisions for this input: 1
 Step1ElHypo                             0   0     DEBUG  --- found new decision HLT_e20 ID#4230506138
-Combo_Step1MuHypo                       0   0     DEBUG Executing Combo_Step1MuHypo...
-Combo_Step1MuHypo                       0   0     DEBUG No implicit RH for previous decisions Step1MuInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1MU: is this expected?
-Combo_Step1ElHypo                       0   0     DEBUG Executing Combo_Step1ElHypo...
-Combo_Step1ElHypo                       0   0     DEBUG No implicit RH for previous decisions Step1ElInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1EM: is this expected?
+Step1MuHypo_Combo                       0   0     DEBUG Executing Step1MuHypo_Combo...
+Step1MuHypo_Combo                       0   0     DEBUG No implicit RH for previous decisions Step1MuInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1MU: is this expected?
+Step1ElHypo_Combo                       0   0     DEBUG Executing Step1ElHypo_Combo...
+Step1ElHypo_Combo                       0   0     DEBUG No implicit RH for previous decisions Step1ElInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1EM: is this expected?
 ComboHypo_Step1_mu_em                   0   0     DEBUG Executing ComboHypo_Step1_mu_em...
-ComboHypo_Step1_mu_em                   0   0     DEBUG No implicit RH from Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-ComboHypo_Step1_mu_em                   0   0     DEBUG No implicit RH from Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
-ComboHypo_Step1_mu_em                   0   0     DEBUG Decision map found :
-ComboHypo_Step1_mu_em                   0   0     DEBUG map 0: 
-ComboHypo_Step1_mu_em                   0   0     DEBUG map 1: 
+ComboHypo_Step1_mu_em                   0   0     DEBUG No implicit RH from Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+ComboHypo_Step1_mu_em                   0   0     DEBUG No implicit RH from Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+ComboHypo_Step1_mu_em                   0   0     DEBUG Decision map filled :
+ComboHypo_Step1_mu_em                   0   0     DEBUG map [0]: 
+ComboHypo_Step1_mu_em                   0   0     DEBUG map [1]: 
 ComboHypo_Step1_mu_em                   0   0     DEBUG Required multiplicity 1 for chain HLT_mu8_e8: observed multiplicity 0 in container 0
 ComboHypo_Step1_mu_em                   0   0     DEBUG Chain HLT_mu8_e8 is rejected
 ComboHypo_Step1_mu_em                   0   0     DEBUG Copying 0 positive decisions to outputs
-ComboHypo_Step1_mu_em                   0   0     DEBUG combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 0 decisions:
-ComboHypo_Step1_mu_em                   0   0     DEBUG combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 0 decisions:
+ComboHypo_Step1_mu_em                   0   0     DEBUG combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 0 decisions:
+ComboHypo_Step1_mu_em                   0   0     DEBUG combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 0 decisions:
 TriggerSummaryStep1                     0   0     DEBUG Missing decisions for Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU which may be perfectly correct
 TriggerSummaryStep1                     0   0     DEBUG Found 2 Decisions for Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerSummaryStep1                     0   0     DEBUG Found 0 Decisions for combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerSummaryStep1                     0   0     DEBUG Found 0 Decisions for combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerSummaryStep1                     0   0     DEBUG Found 0 Decisions for combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerSummaryStep1                     0   0     DEBUG Found 0 Decisions for combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryStep1                     0   0     DEBUG In summary 1 chains passed:
 TriggerSummaryStep1                     0   0     DEBUG  +++ HLT_e20 ID#4230506138
 FilterStep2_on_Step2_mu                 0   0     DEBUG Executing FilterStep2_on_Step2_mu...
@@ -1718,20 +1784,20 @@ FilterStep2_on_Step2_em                 0   0     DEBUG Filter passed creating 1
 FilterStep2_on_Step2_em                 0   0     DEBUG  FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
 FilterStep2_on_Step2_mu_em              0   0     DEBUG Executing FilterStep2_on_Step2_mu_em...
 FilterStep2_on_Step2_mu_em              0   0     DEBUG Running on 2 input keys
-FilterStep2_on_Step2_mu_em              0   0     DEBUG Checking inputHandle combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 0 elements
+FilterStep2_on_Step2_mu_em              0   0     DEBUG Checking inputHandle combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 0 elements
 FilterStep2_on_Step2_mu_em              0   0     DEBUG Input size 0
 FilterStep2_on_Step2_mu_em              0   0     DEBUG Output size 0
-FilterStep2_on_Step2_mu_em              0   0     DEBUG Checking inputHandle combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 0 elements
+FilterStep2_on_Step2_mu_em              0   0     DEBUG Checking inputHandle combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 0 elements
 FilterStep2_on_Step2_mu_em              0   0     DEBUG Input size 0
 FilterStep2_on_Step2_mu_em              0   0     DEBUG Output size 0
 FilterStep2_on_Step2_mu_em              0   0     DEBUG Filter rejected creating 2 valid outDecisions DH
 Step2ElInputMaker                       0   0     DEBUG Executing Step2ElInputMaker...
 Step2ElInputMaker                       0   0     DEBUG  FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM is valid
-Step2ElInputMaker                       0   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM is not valid
+Step2ElInputMaker                       0   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM is not valid
 Step2ElInputMaker                       0   0     DEBUG number of implicit ReadHandles is 2, 1 are valid
 Step2ElInputMaker                       0   0     DEBUG Got input FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM with 2 elements
 Step2ElInputMaker                       0   0     DEBUG Recording output key Step2ElInputMaker_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM of size 2 at index 0
-Step2ElInputMaker                       0   0     DEBUG Got no decisions from input FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM because handle not valid
+Step2ElInputMaker                       0   0     DEBUG Got no decisions from input FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM because handle not valid
 Step2ElInputMaker                       0   0     DEBUG Got output Step2ElInputMaker_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM with 2 elements
 Step2ElInputMaker                       0   0     DEBUG followed seed link to input 568483925
 Step2ElInputMaker                       0   0     DEBUG  Found feature initialRoI
@@ -1739,10 +1805,10 @@ Step2ElInputMaker                       0   0     DEBUG  Added initialRoI and in
 Step2ElInputMaker                       0   0     DEBUG followed seed link to input 568483925
 Step2ElInputMaker                       0   0     DEBUG  Found feature initialRoI
 Step2ElInputMaker                       0   0     DEBUG  Added initialRoI and initialRoI  to reco object
-Step2ElInputMaker                       0   0     DEBUG Got no decisions from output Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM because handle not valid
+Step2ElInputMaker                       0   0     DEBUG Got no decisions from output Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM because handle not valid
 Step2ElInputMaker                       0   0     DEBUG Produced 2 reco objects
 Step2ElInputMaker                       0   0     DEBUG  FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM valid
-Step2ElInputMaker                       0   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM not valid
+Step2ElInputMaker                       0   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM not valid
 Step2ElInputMaker                       0   0     DEBUG number of implicit ReadHandles for input decisions is 2, 1 are valid
 Step2ElInputMaker                       0   0     DEBUG Produced 1 output decisions containers
 Step2ElInputMaker                       0   0     DEBUG Step2ElInputMaker_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM with 2 decisions:
@@ -1765,15 +1831,15 @@ CaloClustering2                         0   0     DEBUG   et : 35000
 CaloClustering2                         0   0     DEBUG Reconstructed 2 objects
 Step2MuInputMaker                       0   0     DEBUG Executing Step2MuInputMaker...
 Step2MuInputMaker                       0   0     DEBUG  FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU is not valid
-Step2MuInputMaker                       0   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU is not valid
+Step2MuInputMaker                       0   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU is not valid
 Step2MuInputMaker                       0   0     DEBUG number of implicit ReadHandles is 2, 0 are valid
 Step2MuInputMaker                       0   0     DEBUG Got no decisions from input FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU because handle not valid
-Step2MuInputMaker                       0   0     DEBUG Got no decisions from input FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU because handle not valid
+Step2MuInputMaker                       0   0     DEBUG Got no decisions from input FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU because handle not valid
 Step2MuInputMaker                       0   0     DEBUG Got no decisions from output Step2MuInputMaker_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU because handle not valid
-Step2MuInputMaker                       0   0     DEBUG Got no decisions from output Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU because handle not valid
+Step2MuInputMaker                       0   0     DEBUG Got no decisions from output Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU because handle not valid
 Step2MuInputMaker                       0   0     DEBUG Produced 0 reco objects
 Step2MuInputMaker                       0   0     DEBUG  FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU not valid
-Step2MuInputMaker                       0   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU not valid
+Step2MuInputMaker                       0   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU not valid
 Step2MuInputMaker                       0   0     DEBUG number of implicit ReadHandles for input decisions is 2, 0 are valid
 Step2MuInputMaker                       0   0     DEBUG Produced 0 output decisions containers
 muMSRecAlg2                             0   0     DEBUG Executing muMSRecAlg2...
@@ -1808,25 +1874,25 @@ Step2ElHypo                             0   0     DEBUG Number of positive decis
 Step2ElHypo                             0   0     DEBUG  --- found new decision HLT_e20 ID#4230506138
 Step2ElHypo                             0   0     DEBUG Number of positive decisions for this input: 1
 Step2ElHypo                             0   0     DEBUG  --- found new decision HLT_e20 ID#4230506138
-Combo_Step2MuHypo                       0   0     DEBUG Executing Combo_Step2MuHypo...
-Combo_Step2MuHypo                       0   0     DEBUG No implicit RH for previous decisions Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU: is this expected?
-Combo_Step2ElHypo                       0   0     DEBUG Executing Combo_Step2ElHypo...
-Combo_Step2ElHypo                       0   0     DEBUG No implicit RH for previous decisions Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM: is this expected?
+Step2MuHypo_Combo                       0   0     DEBUG Executing Step2MuHypo_Combo...
+Step2MuHypo_Combo                       0   0     DEBUG No implicit RH for previous decisions Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU: is this expected?
+Step2ElHypo_Combo                       0   0     DEBUG Executing Step2ElHypo_Combo...
+Step2ElHypo_Combo                       0   0     DEBUG No implicit RH for previous decisions Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM: is this expected?
 ComboHypo_Step2_mu_em                   0   0     DEBUG Executing ComboHypo_Step2_mu_em...
-ComboHypo_Step2_mu_em                   0   0     DEBUG No implicit RH from Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-ComboHypo_Step2_mu_em                   0   0     DEBUG No implicit RH from Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
-ComboHypo_Step2_mu_em                   0   0     DEBUG Decision map found :
-ComboHypo_Step2_mu_em                   0   0     DEBUG map 0: 
-ComboHypo_Step2_mu_em                   0   0     DEBUG map 1: 
+ComboHypo_Step2_mu_em                   0   0     DEBUG No implicit RH from Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+ComboHypo_Step2_mu_em                   0   0     DEBUG No implicit RH from Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+ComboHypo_Step2_mu_em                   0   0     DEBUG Decision map filled :
+ComboHypo_Step2_mu_em                   0   0     DEBUG map [0]: 
+ComboHypo_Step2_mu_em                   0   0     DEBUG map [1]: 
 ComboHypo_Step2_mu_em                   0   0     DEBUG Required multiplicity 1 for chain HLT_mu8_e8: observed multiplicity 0 in container 0
 ComboHypo_Step2_mu_em                   0   0     DEBUG Chain HLT_mu8_e8 is rejected
 ComboHypo_Step2_mu_em                   0   0     DEBUG Copying 0 positive decisions to outputs
-ComboHypo_Step2_mu_em                   0   0     DEBUG combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 0 decisions:
-ComboHypo_Step2_mu_em                   0   0     DEBUG combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 0 decisions:
+ComboHypo_Step2_mu_em                   0   0     DEBUG combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 0 decisions:
+ComboHypo_Step2_mu_em                   0   0     DEBUG combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 0 decisions:
 TriggerSummaryStep2                     0   0     DEBUG Missing decisions for Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU which may be perfectly correct
 TriggerSummaryStep2                     0   0     DEBUG Found 2 Decisions for Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerSummaryStep2                     0   0     DEBUG Found 0 Decisions for combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerSummaryStep2                     0   0     DEBUG Found 0 Decisions for combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerSummaryStep2                     0   0     DEBUG Found 0 Decisions for combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerSummaryStep2                     0   0     DEBUG Found 0 Decisions for combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryStep2                     0   0     DEBUG In summary 1 chains passed:
 TriggerSummaryStep2                     0   0     DEBUG  +++ HLT_e20 ID#4230506138
 TriggerSummaryFinal                     0   0     DEBUG Missing decisions for Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU which may be perfectly correct
@@ -1834,8 +1900,8 @@ TriggerSummaryFinal                     0   0     DEBUG Missing decisions for St
 TriggerSummaryFinal                     0   0     DEBUG Missing decisions for Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU which may be perfectly correct
 TriggerSummaryFinal                     0   0     DEBUG Found 2 Decisions for Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
 TriggerSummaryFinal                     0   0     DEBUG Found 2 Decisions for Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerSummaryFinal                     0   0     DEBUG Found 0 Decisions for combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerSummaryFinal                     0   0     DEBUG Found 0 Decisions for combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerSummaryFinal                     0   0     DEBUG Found 0 Decisions for combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerSummaryFinal                     0   0     DEBUG Found 0 Decisions for combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryFinal                     0   0     DEBUG In summary 1 chains passed:
 TriggerSummaryFinal                     0   0     DEBUG  +++ HLT_e20 ID#4230506138
 TriggerSummaryFinal.HLTEDMCreator       0   0     DEBUG The Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU was absent, creating it, possibly filling with content from views
@@ -1843,18 +1909,18 @@ TriggerSummaryFinal.HLTEDMCreator       0   0     DEBUG The Step2MuHypo_from_Fil
 TriggerSummaryFinal.HLTEDMCreator       0   0     DEBUG The Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU already present
 TriggerSummaryFinal.HLTEDMCreator       0   0     DEBUG The Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM already present
 TriggerSummaryFinal.HLTEDMCreator       0   0     DEBUG The Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM already present
-TriggerSummaryFinal.HLTEDMCreator       0   0     DEBUG The combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU already present
-TriggerSummaryFinal.HLTEDMCreator       0   0     DEBUG The combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM already present
+TriggerSummaryFinal.HLTEDMCreator       0   0     DEBUG The combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU already present
+TriggerSummaryFinal.HLTEDMCreator       0   0     DEBUG The combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM already present
 0_StoreGateSvc_Impl                     0   0   WARNING  setupProxy:: error setting up proxy for key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap and clid 1333228823
- Pre-existing valid DataProxy @0x1eec8000 found in Store for key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap with clid 1333228823
-0_StoreGateSvc_Impl                     0   0   WARNING record_impl: Problem setting up the proxy for object @0x1eebe6c0
- recorded with key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0x1ee402a0
+ Pre-existing valid DataProxy @0x19c21cc0 found in Store for key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap with clid 1333228823
+0_StoreGateSvc_Impl                     0   0   WARNING record_impl: Problem setting up the proxy for object @0x1f71a6c0
+ recorded with key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0x1f6a4ed0
 VarHandle(StoreGateSvc+Step2MuHypo_fr...0   0     ERROR /build2/atnight/localbuilds/nightlies/master/athena/Control/StoreGate/src/VarHandleBase.cxx:709 (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
                                         0   0     FATAL /build2/atnight/localbuilds/nightlies/master/athena/Control/StoreGate/StoreGate/WriteHandle.icc:887 (StatusCode SG::WriteHandle<T>::record(std::unique_ptr<_Tp>, std::unique_ptr<U>, bool) [with AUXSTORE = xAOD::TrigCompositeAuxContainer_v1; T = DataVector<xAOD::TrigComposite_v1>]): code 0: this->record(std::move(data))
 0_StoreGateSvc_Impl                     0   0   WARNING  setupProxy:: error setting up proxy for key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap and clid 1333228823
- Pre-existing valid DataProxy @0x1eec8280 found in Store for key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap with clid 1333228823
-0_StoreGateSvc_Impl                     0   0   WARNING record_impl: Problem setting up the proxy for object @0x1eebea20
- recorded with key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0x1ee40e00
+ Pre-existing valid DataProxy @0x1f724140 found in Store for key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap with clid 1333228823
+0_StoreGateSvc_Impl                     0   0   WARNING record_impl: Problem setting up the proxy for object @0x1f71aa20
+ recorded with key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0x1f6a5410
 VarHandle(StoreGateSvc+Step2ElHypo_fr...0   0     ERROR /build2/atnight/localbuilds/nightlies/master/athena/Control/StoreGate/src/VarHandleBase.cxx:709 (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
                                         0   0     FATAL /build2/atnight/localbuilds/nightlies/master/athena/Control/StoreGate/StoreGate/WriteHandle.icc:887 (StatusCode SG::WriteHandle<T>::record(std::unique_ptr<_Tp>, std::unique_ptr<U>, bool) [with AUXSTORE = xAOD::TrigCompositeAuxContainer_v1; T = DataVector<xAOD::TrigComposite_v1>]): code 0: this->record(std::move(data))
 TriggerMonitorFinal                     0   0     DEBUG L1 0 N positive decisions 1
@@ -1866,12 +1932,12 @@ TriggerMonitorFinal                     0   0     DEBUG Decision for 0 objects a
 TriggerMonitorFinal                     0   0     DEBUG Decision for 0 objects available in Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
 TriggerMonitorFinal                     0   0     DEBUG Decision for 2 objects available in Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
 TriggerMonitorFinal                     0   0     DEBUG Decision for 2 objects available in Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerMonitorFinal                     0   0     DEBUG Decision for 0 objects available in combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerMonitorFinal                     0   0     DEBUG Decision for 0 objects available in combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerMonitorFinal                     0   0     DEBUG Decision for 0 objects available in combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerMonitorFinal                     0   0     DEBUG Decision for 0 objects available in combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerMonitorFinal                     0   0     DEBUG Event passsed, filling 5
 DbSession                               0   0      INFO     Open     DbSession    
 Domain[ROOT_All]                        0   0      INFO >   Access   DbDomain     UPDATE    [ROOT_All] 
-Domain[ROOT_All]                        0   0      INFO ->  Access   DbDatabase   CREATE    [ROOT_All] 9F289329-54D1-924F-B939-015CA2FAA049
+Domain[ROOT_All]                        0   0      INFO ->  Access   DbDatabase   CREATE    [ROOT_All] 5FF10EFB-63B1-8245-8821-94DCD30F5261
 Domain[ROOT_All]                        0   0      INFO                           myESD.pool.root
 RootDatabase.open                       0   0      INFO myESD.pool.root File version:61206
 StorageSvc                              0   0      INFO Building shape according to reflection information using shape ID for:
@@ -2188,85 +2254,85 @@ Step1ElHypo                             1   0     DEBUG  --- found new decision
 Step1ElHypo                             1   0     DEBUG Number of positive decisions for this input: 2
 Step1ElHypo                             1   0     DEBUG  --- found new decision HLT_e8 ID#1906825600
 Step1ElHypo                             1   0     DEBUG  --- found new decision HLT_e20 ID#4230506138
-Combo_Step1MuHypo                       1   0     DEBUG Executing Combo_Step1MuHypo...
-Combo_Step1MuHypo                       1   0     DEBUG Running with 2 implicit ReadHandles for previous decisions
-Combo_Step1MuHypo                       1   0     DEBUG and with 2 reco inputs
-Combo_Step1MuHypo                       1   0     DEBUG Found 2 features initialRoI mapped from previous decisions
-Combo_Step1MuHypo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
-Combo_Step1MuHypo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 0
-Combo_Step1MuHypo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
-Combo_Step1MuHypo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 1
-Combo_Step1MuHypo.HLT_mu8_e8            1   0     DEBUG Making new decisions Combo_Step1MuHypo.HLT_mu8_e8
-Combo_Step1MuHypo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 0= 3
-Combo_Step1MuHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu81step ID#2702561248
-Combo_Step1MuHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8 ID#3370546555
-Combo_Step1MuHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
-Combo_Step1MuHypo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 not passed by value 6500
-Combo_Step1MuHypo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 1= 3
-Combo_Step1MuHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu81step ID#2702561248
-Combo_Step1MuHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8 ID#3370546555
-Combo_Step1MuHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
-Combo_Step1MuHypo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 passed by value: 8500
-Combo_Step1MuHypo                       1   0     DEBUG Exiting with 2 decisions
-Combo_Step1MuHypo                       1   0     DEBUG Number of positive decisions for this input: 0
-Combo_Step1MuHypo                       1   0     DEBUG Number of positive decisions for this input: 1
-Combo_Step1MuHypo                       1   0     DEBUG  --- found new decision HLT_mu8_e8 ID#3385806166
-Combo_Step1ElHypo                       1   0     DEBUG Executing Combo_Step1ElHypo...
-Combo_Step1ElHypo                       1   0     DEBUG Running with 2 implicit ReadHandles for previous decisions
-Combo_Step1ElHypo                       1   0     DEBUG and with 2 reco inputs
-Combo_Step1ElHypo                       1   0     DEBUG Found 2 features initialRoI mapped from previous decisions
-Combo_Step1ElHypo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
-Combo_Step1ElHypo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 0
-Combo_Step1ElHypo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
-Combo_Step1ElHypo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 1
-Combo_Step1ElHypo.HLT_mu8_e8            1   0     DEBUG Making new decisions Combo_Step1ElHypo.HLT_mu8_e8
-Combo_Step1ElHypo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 0= 3
-Combo_Step1ElHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_e8 ID#1906825600
-Combo_Step1ElHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
-Combo_Step1ElHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_e20 ID#4230506138
-Combo_Step1ElHypo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 passed by value: 120000
-Combo_Step1ElHypo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 1= 3
-Combo_Step1ElHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_e8 ID#1906825600
-Combo_Step1ElHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
-Combo_Step1ElHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_e20 ID#4230506138
-Combo_Step1ElHypo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 passed by value: 65000
-Combo_Step1ElHypo                       1   0     DEBUG Exiting with 2 decisions
-Combo_Step1ElHypo                       1   0     DEBUG Number of positive decisions for this input: 1
-Combo_Step1ElHypo                       1   0     DEBUG  --- found new decision HLT_mu8_e8 ID#3385806166
-Combo_Step1ElHypo                       1   0     DEBUG Number of positive decisions for this input: 1
-Combo_Step1ElHypo                       1   0     DEBUG  --- found new decision HLT_mu8_e8 ID#3385806166
+Step1MuHypo_Combo                       1   0     DEBUG Executing Step1MuHypo_Combo...
+Step1MuHypo_Combo                       1   0     DEBUG Running with 2 implicit ReadHandles for previous decisions
+Step1MuHypo_Combo                       1   0     DEBUG and with 2 reco inputs
+Step1MuHypo_Combo                       1   0     DEBUG Found 2 features initialRoI mapped from previous decisions
+Step1MuHypo_Combo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
+Step1MuHypo_Combo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 0
+Step1MuHypo_Combo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
+Step1MuHypo_Combo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 1
+Step1MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG Making new decisions Step1MuHypo_Combo.HLT_mu8_e8
+Step1MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 0= 3
+Step1MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu81step ID#2702561248
+Step1MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8 ID#3370546555
+Step1MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
+Step1MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 not passed by value 6500
+Step1MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 1= 3
+Step1MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu81step ID#2702561248
+Step1MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8 ID#3370546555
+Step1MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
+Step1MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 passed by value: 8500
+Step1MuHypo_Combo                       1   0     DEBUG Exiting with 2 decisions
+Step1MuHypo_Combo                       1   0     DEBUG Number of positive decisions for this input: 0
+Step1MuHypo_Combo                       1   0     DEBUG Number of positive decisions for this input: 1
+Step1MuHypo_Combo                       1   0     DEBUG  --- found new decision HLT_mu8_e8 ID#3385806166
+Step1ElHypo_Combo                       1   0     DEBUG Executing Step1ElHypo_Combo...
+Step1ElHypo_Combo                       1   0     DEBUG Running with 2 implicit ReadHandles for previous decisions
+Step1ElHypo_Combo                       1   0     DEBUG and with 2 reco inputs
+Step1ElHypo_Combo                       1   0     DEBUG Found 2 features initialRoI mapped from previous decisions
+Step1ElHypo_Combo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
+Step1ElHypo_Combo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 0
+Step1ElHypo_Combo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
+Step1ElHypo_Combo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 1
+Step1ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG Making new decisions Step1ElHypo_Combo.HLT_mu8_e8
+Step1ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 0= 3
+Step1ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_e8 ID#1906825600
+Step1ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
+Step1ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_e20 ID#4230506138
+Step1ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 passed by value: 120000
+Step1ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 1= 3
+Step1ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_e8 ID#1906825600
+Step1ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
+Step1ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_e20 ID#4230506138
+Step1ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 passed by value: 65000
+Step1ElHypo_Combo                       1   0     DEBUG Exiting with 2 decisions
+Step1ElHypo_Combo                       1   0     DEBUG Number of positive decisions for this input: 1
+Step1ElHypo_Combo                       1   0     DEBUG  --- found new decision HLT_mu8_e8 ID#3385806166
+Step1ElHypo_Combo                       1   0     DEBUG Number of positive decisions for this input: 1
+Step1ElHypo_Combo                       1   0     DEBUG  --- found new decision HLT_mu8_e8 ID#3385806166
 ComboHypo_Step1_mu_em                   1   0     DEBUG Executing ComboHypo_Step1_mu_em...
-ComboHypo_Step1_mu_em                   1   0     DEBUG Found implicit RH from Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with these decisions:
-ComboHypo_Step1_mu_em                   1   0     DEBUG 0 chains passed:
-ComboHypo_Step1_mu_em                   1   0     DEBUG 1 chains passed:
+ComboHypo_Step1_mu_em                   1   0     DEBUG Found implicit RH from Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 2 elements:
+ComboHypo_Step1_mu_em                   1   0     DEBUG Decision with 0 chains passed:
+ComboHypo_Step1_mu_em                   1   0     DEBUG Decision with 1 chains passed:
 ComboHypo_Step1_mu_em                   1   0     DEBUG  +++ HLT_mu8_e8 ID#3385806166
-ComboHypo_Step1_mu_em                   1   0     DEBUG Found implicit RH from Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with these decisions:
-ComboHypo_Step1_mu_em                   1   0     DEBUG 1 chains passed:
+ComboHypo_Step1_mu_em                   1   0     DEBUG Found implicit RH from Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 elements:
+ComboHypo_Step1_mu_em                   1   0     DEBUG Decision with 1 chains passed:
 ComboHypo_Step1_mu_em                   1   0     DEBUG  +++ HLT_mu8_e8 ID#3385806166
-ComboHypo_Step1_mu_em                   1   0     DEBUG 1 chains passed:
+ComboHypo_Step1_mu_em                   1   0     DEBUG Decision with 1 chains passed:
 ComboHypo_Step1_mu_em                   1   0     DEBUG  +++ HLT_mu8_e8 ID#3385806166
-ComboHypo_Step1_mu_em                   1   0     DEBUG Decision map found :
-ComboHypo_Step1_mu_em                   1   0     DEBUG map 0: 
+ComboHypo_Step1_mu_em                   1   0     DEBUG Decision map filled :
+ComboHypo_Step1_mu_em                   1   0     DEBUG map [0]: 
 ComboHypo_Step1_mu_em                   1   0     DEBUG  +++ HLT_mu8_e8 ID#3385806166 mult: 1
-ComboHypo_Step1_mu_em                   1   0     DEBUG map 1: 
+ComboHypo_Step1_mu_em                   1   0     DEBUG map [1]: 
 ComboHypo_Step1_mu_em                   1   0     DEBUG  +++ HLT_mu8_e8 ID#3385806166 mult: 2
 ComboHypo_Step1_mu_em                   1   0     DEBUG Required multiplicity 1 for chain HLT_mu8_e8: observed multiplicity 1 in container 0
 ComboHypo_Step1_mu_em                   1   0     DEBUG Required multiplicity 1 for chain HLT_mu8_e8: observed multiplicity 2 in container 1
 ComboHypo_Step1_mu_em                   1   0     DEBUG Chain HLT_mu8_e8 is accepted
 ComboHypo_Step1_mu_em                   1   0     DEBUG Copying 1 positive decisions to outputs
-ComboHypo_Step1_mu_em                   1   0     DEBUG combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 2 decisions:
+ComboHypo_Step1_mu_em                   1   0     DEBUG combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 2 decisions:
 ComboHypo_Step1_mu_em                   1   0     DEBUG Number of positive decisions for this output: 0
 ComboHypo_Step1_mu_em                   1   0     DEBUG Number of positive decisions for this output: 1
 ComboHypo_Step1_mu_em                   1   0     DEBUG  ---  decision HLT_mu8_e8 ID#3385806166
-ComboHypo_Step1_mu_em                   1   0     DEBUG combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 decisions:
+ComboHypo_Step1_mu_em                   1   0     DEBUG combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 decisions:
 ComboHypo_Step1_mu_em                   1   0     DEBUG Number of positive decisions for this output: 1
 ComboHypo_Step1_mu_em                   1   0     DEBUG  ---  decision HLT_mu8_e8 ID#3385806166
 ComboHypo_Step1_mu_em                   1   0     DEBUG Number of positive decisions for this output: 1
 ComboHypo_Step1_mu_em                   1   0     DEBUG  ---  decision HLT_mu8_e8 ID#3385806166
 TriggerSummaryStep1                     1   0     DEBUG Found 2 Decisions for Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
 TriggerSummaryStep1                     1   0     DEBUG Found 2 Decisions for Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerSummaryStep1                     1   0     DEBUG Found 2 Decisions for combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerSummaryStep1                     1   0     DEBUG Found 2 Decisions for combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerSummaryStep1                     1   0     DEBUG Found 2 Decisions for combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerSummaryStep1                     1   0     DEBUG Found 2 Decisions for combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryStep1                     1   0     DEBUG In summary 5 chains passed:
 TriggerSummaryStep1                     1   0     DEBUG  +++ HLT_e8 ID#1906825600
 TriggerSummaryStep1                     1   0     DEBUG  +++ HLT_mu81step ID#2702561248
@@ -2305,7 +2371,7 @@ FilterStep2_on_Step2_em                 1   0     DEBUG Filter passed creating 1
 FilterStep2_on_Step2_em                 1   0     DEBUG  FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
 FilterStep2_on_Step2_mu_em              1   0     DEBUG Executing FilterStep2_on_Step2_mu_em...
 FilterStep2_on_Step2_mu_em              1   0     DEBUG Running on 2 input keys
-FilterStep2_on_Step2_mu_em              1   0     DEBUG Checking inputHandle combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 2 elements
+FilterStep2_on_Step2_mu_em              1   0     DEBUG Checking inputHandle combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 2 elements
 FilterStep2_on_Step2_mu_em              1   0     DEBUG Input size 2
 FilterStep2_on_Step2_mu_em              1   0     DEBUG Number of positive decisions for this input: 0
 FilterStep2_on_Step2_mu_em              1   0     DEBUG No Input decisions requested by active chains
@@ -2313,8 +2379,8 @@ FilterStep2_on_Step2_mu_em              1   0     DEBUG Number of positive decis
 FilterStep2_on_Step2_mu_em              1   0     DEBUG  -- Positive decision HLT_mu8_e8 ID#3385806166
 FilterStep2_on_Step2_mu_em              1   0     DEBUG Input satisfied at least one active chain
 FilterStep2_on_Step2_mu_em              1   0     DEBUG Output size 1
-FilterStep2_on_Step2_mu_em              1   0     DEBUG Recording output key FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU of size 1 at index 0
-FilterStep2_on_Step2_mu_em              1   0     DEBUG Checking inputHandle combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 elements
+FilterStep2_on_Step2_mu_em              1   0     DEBUG Recording output key FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU of size 1 at index 0
+FilterStep2_on_Step2_mu_em              1   0     DEBUG Checking inputHandle combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 elements
 FilterStep2_on_Step2_mu_em              1   0     DEBUG Input size 2
 FilterStep2_on_Step2_mu_em              1   0     DEBUG Number of positive decisions for this input: 1
 FilterStep2_on_Step2_mu_em              1   0     DEBUG  -- Positive decision HLT_mu8_e8 ID#3385806166
@@ -2323,35 +2389,35 @@ FilterStep2_on_Step2_mu_em              1   0     DEBUG Number of positive decis
 FilterStep2_on_Step2_mu_em              1   0     DEBUG  -- Positive decision HLT_mu8_e8 ID#3385806166
 FilterStep2_on_Step2_mu_em              1   0     DEBUG Input satisfied at least one active chain
 FilterStep2_on_Step2_mu_em              1   0     DEBUG Output size 2
-FilterStep2_on_Step2_mu_em              1   0     DEBUG Recording output key FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM of size 2 at index 1
+FilterStep2_on_Step2_mu_em              1   0     DEBUG Recording output key FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM of size 2 at index 1
 FilterStep2_on_Step2_mu_em              1   0     DEBUG Filter passed creating 2 valid outDecisions DH
-FilterStep2_on_Step2_mu_em              1   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-FilterStep2_on_Step2_mu_em              1   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+FilterStep2_on_Step2_mu_em              1   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+FilterStep2_on_Step2_mu_em              1   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 Step2MuInputMaker                       1   0     DEBUG Executing Step2MuInputMaker...
 Step2MuInputMaker                       1   0     DEBUG  FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU is valid
-Step2MuInputMaker                       1   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU is valid
+Step2MuInputMaker                       1   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU is valid
 Step2MuInputMaker                       1   0     DEBUG number of implicit ReadHandles is 2, 2 are valid
 Step2MuInputMaker                       1   0     DEBUG Got input FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU with 1 elements
 Step2MuInputMaker                       1   0     DEBUG Recording output key Step2MuInputMaker_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU of size 1 at index 0
-Step2MuInputMaker                       1   0     DEBUG Got input FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 1 elements
-Step2MuInputMaker                       1   0     DEBUG Recording output key Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU of size 1 at index 1
+Step2MuInputMaker                       1   0     DEBUG Got input FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 1 elements
+Step2MuInputMaker                       1   0     DEBUG Recording output key Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU of size 1 at index 1
 Step2MuInputMaker                       1   0     DEBUG Got output Step2MuInputMaker_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU with 1 elements
 Step2MuInputMaker                       1   0     DEBUG followed seed link to input 675312197
 Step2MuInputMaker                       1   0     DEBUG  Found feature initialRoI
 Step2MuInputMaker                       1   0     DEBUG  Added initialRoI and initialRoI  to reco object
-Step2MuInputMaker                       1   0     DEBUG Got output Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 1 elements
-Step2MuInputMaker                       1   0     DEBUG followed seed link to input 19295901
+Step2MuInputMaker                       1   0     DEBUG Got output Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 1 elements
+Step2MuInputMaker                       1   0     DEBUG followed seed link to input 1032951570
 Step2MuInputMaker                       1   0     DEBUG  Found feature initialRoI
 Step2MuInputMaker                       1   0     DEBUG Produced 1 reco objects
 Step2MuInputMaker                       1   0     DEBUG  FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU valid
-Step2MuInputMaker                       1   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU valid
+Step2MuInputMaker                       1   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU valid
 Step2MuInputMaker                       1   0     DEBUG number of implicit ReadHandles for input decisions is 2, 2 are valid
 Step2MuInputMaker                       1   0     DEBUG Produced 2 output decisions containers
 Step2MuInputMaker                       1   0     DEBUG Step2MuInputMaker_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU with 1 decisions:
 Step2MuInputMaker                       1   0     DEBUG Number of positive decisions for this output: 2
 Step2MuInputMaker                       1   0     DEBUG  ---  decision HLT_mu81step ID#2702561248
 Step2MuInputMaker                       1   0     DEBUG  ---  decision HLT_mu8 ID#3370546555
-Step2MuInputMaker                       1   0     DEBUG Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 1 decisions:
+Step2MuInputMaker                       1   0     DEBUG Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 1 decisions:
 Step2MuInputMaker                       1   0     DEBUG Number of positive decisions for this output: 1
 Step2MuInputMaker                       1   0     DEBUG  ---  decision HLT_mu8_e8 ID#3385806166
 muMSRecAlg2                             1   0     DEBUG Executing muMSRecAlg2...
@@ -2384,12 +2450,12 @@ Step2MuHypo                             1   0     DEBUG Number of positive decis
 Step2MuHypo                             1   0     DEBUG  --- found new decision HLT_mu8 ID#3370546555
 Step2ElInputMaker                       1   0     DEBUG Executing Step2ElInputMaker...
 Step2ElInputMaker                       1   0     DEBUG  FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM is valid
-Step2ElInputMaker                       1   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM is valid
+Step2ElInputMaker                       1   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM is valid
 Step2ElInputMaker                       1   0     DEBUG number of implicit ReadHandles is 2, 2 are valid
 Step2ElInputMaker                       1   0     DEBUG Got input FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM with 2 elements
 Step2ElInputMaker                       1   0     DEBUG Recording output key Step2ElInputMaker_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM of size 2 at index 0
-Step2ElInputMaker                       1   0     DEBUG Got input FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 elements
-Step2ElInputMaker                       1   0     DEBUG Recording output key Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM of size 2 at index 1
+Step2ElInputMaker                       1   0     DEBUG Got input FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 elements
+Step2ElInputMaker                       1   0     DEBUG Recording output key Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM of size 2 at index 1
 Step2ElInputMaker                       1   0     DEBUG Got output Step2ElInputMaker_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM with 2 elements
 Step2ElInputMaker                       1   0     DEBUG followed seed link to input 568483925
 Step2ElInputMaker                       1   0     DEBUG  Found feature initialRoI
@@ -2397,14 +2463,14 @@ Step2ElInputMaker                       1   0     DEBUG  Added initialRoI and in
 Step2ElInputMaker                       1   0     DEBUG followed seed link to input 568483925
 Step2ElInputMaker                       1   0     DEBUG  Found feature initialRoI
 Step2ElInputMaker                       1   0     DEBUG  Added initialRoI and initialRoI  to reco object
-Step2ElInputMaker                       1   0     DEBUG Got output Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 elements
-Step2ElInputMaker                       1   0     DEBUG followed seed link to input 885326271
+Step2ElInputMaker                       1   0     DEBUG Got output Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 elements
+Step2ElInputMaker                       1   0     DEBUG followed seed link to input 261938146
 Step2ElInputMaker                       1   0     DEBUG  Found feature initialRoI
-Step2ElInputMaker                       1   0     DEBUG followed seed link to input 885326271
+Step2ElInputMaker                       1   0     DEBUG followed seed link to input 261938146
 Step2ElInputMaker                       1   0     DEBUG  Found feature initialRoI
 Step2ElInputMaker                       1   0     DEBUG Produced 2 reco objects
 Step2ElInputMaker                       1   0     DEBUG  FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM valid
-Step2ElInputMaker                       1   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM valid
+Step2ElInputMaker                       1   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM valid
 Step2ElInputMaker                       1   0     DEBUG number of implicit ReadHandles for input decisions is 2, 2 are valid
 Step2ElInputMaker                       1   0     DEBUG Produced 2 output decisions containers
 Step2ElInputMaker                       1   0     DEBUG Step2ElInputMaker_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM with 2 decisions:
@@ -2414,7 +2480,7 @@ Step2ElInputMaker                       1   0     DEBUG  ---  decision HLT_e20 I
 Step2ElInputMaker                       1   0     DEBUG Number of positive decisions for this output: 2
 Step2ElInputMaker                       1   0     DEBUG  ---  decision HLT_e8 ID#1906825600
 Step2ElInputMaker                       1   0     DEBUG  ---  decision HLT_e20 ID#4230506138
-Step2ElInputMaker                       1   0     DEBUG Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 decisions:
+Step2ElInputMaker                       1   0     DEBUG Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 decisions:
 Step2ElInputMaker                       1   0     DEBUG Number of positive decisions for this output: 1
 Step2ElInputMaker                       1   0     DEBUG  ---  decision HLT_mu8_e8 ID#3385806166
 Step2ElInputMaker                       1   0     DEBUG Number of positive decisions for this output: 1
@@ -2465,69 +2531,69 @@ Step2ElHypo                             1   0     DEBUG  --- found new decision
 Step2ElHypo                             1   0     DEBUG Number of positive decisions for this input: 2
 Step2ElHypo                             1   0     DEBUG  --- found new decision HLT_e8 ID#1906825600
 Step2ElHypo                             1   0     DEBUG  --- found new decision HLT_e20 ID#4230506138
-Combo_Step2MuHypo                       1   0     DEBUG Executing Combo_Step2MuHypo...
-Combo_Step2MuHypo                       1   0     DEBUG Running with 1 implicit ReadHandles for previous decisions
-Combo_Step2MuHypo                       1   0     DEBUG and with 1 reco inputs
-Combo_Step2MuHypo                       1   0     DEBUG Found 1 features initialRoI mapped from previous decisions
-Combo_Step2MuHypo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
-Combo_Step2MuHypo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 0
-Combo_Step2MuHypo.HLT_mu8_e8            1   0     DEBUG Making new decisions Combo_Step2MuHypo.HLT_mu8_e8
-Combo_Step2MuHypo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 0= 1
-Combo_Step2MuHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
-Combo_Step2MuHypo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 passed by value: 8500
-Combo_Step2MuHypo                       1   0     DEBUG Exiting with 1 decisions
-Combo_Step2MuHypo                       1   0     DEBUG Number of positive decisions for this input: 1
-Combo_Step2MuHypo                       1   0     DEBUG  --- found new decision HLT_mu8_e8 ID#3385806166
-Combo_Step2ElHypo                       1   0     DEBUG Executing Combo_Step2ElHypo...
-Combo_Step2ElHypo                       1   0     DEBUG Running with 2 implicit ReadHandles for previous decisions
-Combo_Step2ElHypo                       1   0     DEBUG and with 2 reco inputs
-Combo_Step2ElHypo                       1   0     DEBUG Found 2 features initialRoI mapped from previous decisions
-Combo_Step2ElHypo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
-Combo_Step2ElHypo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 0
-Combo_Step2ElHypo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
-Combo_Step2ElHypo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 1
-Combo_Step2ElHypo.HLT_mu8_e8            1   0     DEBUG Making new decisions Combo_Step2ElHypo.HLT_mu8_e8
-Combo_Step2ElHypo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 0= 1
-Combo_Step2ElHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
-Combo_Step2ElHypo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 passed by value: 120000
-Combo_Step2ElHypo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 1= 1
-Combo_Step2ElHypo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
-Combo_Step2ElHypo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 passed by value: 65000
-Combo_Step2ElHypo                       1   0     DEBUG Exiting with 2 decisions
-Combo_Step2ElHypo                       1   0     DEBUG Number of positive decisions for this input: 1
-Combo_Step2ElHypo                       1   0     DEBUG  --- found new decision HLT_mu8_e8 ID#3385806166
-Combo_Step2ElHypo                       1   0     DEBUG Number of positive decisions for this input: 1
-Combo_Step2ElHypo                       1   0     DEBUG  --- found new decision HLT_mu8_e8 ID#3385806166
+Step2MuHypo_Combo                       1   0     DEBUG Executing Step2MuHypo_Combo...
+Step2MuHypo_Combo                       1   0     DEBUG Running with 1 implicit ReadHandles for previous decisions
+Step2MuHypo_Combo                       1   0     DEBUG and with 1 reco inputs
+Step2MuHypo_Combo                       1   0     DEBUG Found 1 features initialRoI mapped from previous decisions
+Step2MuHypo_Combo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
+Step2MuHypo_Combo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 0
+Step2MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG Making new decisions Step2MuHypo_Combo.HLT_mu8_e8
+Step2MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 0= 1
+Step2MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
+Step2MuHypo_Combo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 passed by value: 8500
+Step2MuHypo_Combo                       1   0     DEBUG Exiting with 1 decisions
+Step2MuHypo_Combo                       1   0     DEBUG Number of positive decisions for this input: 1
+Step2MuHypo_Combo                       1   0     DEBUG  --- found new decision HLT_mu8_e8 ID#3385806166
+Step2ElHypo_Combo                       1   0     DEBUG Executing Step2ElHypo_Combo...
+Step2ElHypo_Combo                       1   0     DEBUG Running with 2 implicit ReadHandles for previous decisions
+Step2ElHypo_Combo                       1   0     DEBUG and with 2 reco inputs
+Step2ElHypo_Combo                       1   0     DEBUG Found 2 features initialRoI mapped from previous decisions
+Step2ElHypo_Combo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
+Step2ElHypo_Combo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 0
+Step2ElHypo_Combo                       1   0     DEBUG  Found link from the reco object to feature initialRoI
+Step2ElHypo_Combo                       1   0     DEBUG  Found link from the reco object to the previous decision at position 1
+Step2ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG Making new decisions Step2ElHypo_Combo.HLT_mu8_e8
+Step2ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 0= 1
+Step2ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
+Step2ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 passed by value: 120000
+Step2ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG Number of previous decisions for input 1= 1
+Step2ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG  -- found decision HLT_mu8_e8 ID#3385806166
+Step2ElHypo_Combo.HLT_mu8_e8            1   0     DEBUG   threshold  'Threshold':8000.00 passed by value: 65000
+Step2ElHypo_Combo                       1   0     DEBUG Exiting with 2 decisions
+Step2ElHypo_Combo                       1   0     DEBUG Number of positive decisions for this input: 1
+Step2ElHypo_Combo                       1   0     DEBUG  --- found new decision HLT_mu8_e8 ID#3385806166
+Step2ElHypo_Combo                       1   0     DEBUG Number of positive decisions for this input: 1
+Step2ElHypo_Combo                       1   0     DEBUG  --- found new decision HLT_mu8_e8 ID#3385806166
 ComboHypo_Step2_mu_em                   1   0     DEBUG Executing ComboHypo_Step2_mu_em...
-ComboHypo_Step2_mu_em                   1   0     DEBUG Found implicit RH from Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with these decisions:
-ComboHypo_Step2_mu_em                   1   0     DEBUG 1 chains passed:
+ComboHypo_Step2_mu_em                   1   0     DEBUG Found implicit RH from Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 1 elements:
+ComboHypo_Step2_mu_em                   1   0     DEBUG Decision with 1 chains passed:
 ComboHypo_Step2_mu_em                   1   0     DEBUG  +++ HLT_mu8_e8 ID#3385806166
-ComboHypo_Step2_mu_em                   1   0     DEBUG Found implicit RH from Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with these decisions:
-ComboHypo_Step2_mu_em                   1   0     DEBUG 1 chains passed:
+ComboHypo_Step2_mu_em                   1   0     DEBUG Found implicit RH from Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 elements:
+ComboHypo_Step2_mu_em                   1   0     DEBUG Decision with 1 chains passed:
 ComboHypo_Step2_mu_em                   1   0     DEBUG  +++ HLT_mu8_e8 ID#3385806166
-ComboHypo_Step2_mu_em                   1   0     DEBUG 1 chains passed:
+ComboHypo_Step2_mu_em                   1   0     DEBUG Decision with 1 chains passed:
 ComboHypo_Step2_mu_em                   1   0     DEBUG  +++ HLT_mu8_e8 ID#3385806166
-ComboHypo_Step2_mu_em                   1   0     DEBUG Decision map found :
-ComboHypo_Step2_mu_em                   1   0     DEBUG map 0: 
+ComboHypo_Step2_mu_em                   1   0     DEBUG Decision map filled :
+ComboHypo_Step2_mu_em                   1   0     DEBUG map [0]: 
 ComboHypo_Step2_mu_em                   1   0     DEBUG  +++ HLT_mu8_e8 ID#3385806166 mult: 1
-ComboHypo_Step2_mu_em                   1   0     DEBUG map 1: 
+ComboHypo_Step2_mu_em                   1   0     DEBUG map [1]: 
 ComboHypo_Step2_mu_em                   1   0     DEBUG  +++ HLT_mu8_e8 ID#3385806166 mult: 2
 ComboHypo_Step2_mu_em                   1   0     DEBUG Required multiplicity 1 for chain HLT_mu8_e8: observed multiplicity 1 in container 0
 ComboHypo_Step2_mu_em                   1   0     DEBUG Required multiplicity 1 for chain HLT_mu8_e8: observed multiplicity 2 in container 1
 ComboHypo_Step2_mu_em                   1   0     DEBUG Chain HLT_mu8_e8 is accepted
 ComboHypo_Step2_mu_em                   1   0     DEBUG Copying 1 positive decisions to outputs
-ComboHypo_Step2_mu_em                   1   0     DEBUG combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 1 decisions:
+ComboHypo_Step2_mu_em                   1   0     DEBUG combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 1 decisions:
 ComboHypo_Step2_mu_em                   1   0     DEBUG Number of positive decisions for this output: 1
 ComboHypo_Step2_mu_em                   1   0     DEBUG  ---  decision HLT_mu8_e8 ID#3385806166
-ComboHypo_Step2_mu_em                   1   0     DEBUG combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 decisions:
+ComboHypo_Step2_mu_em                   1   0     DEBUG combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 2 decisions:
 ComboHypo_Step2_mu_em                   1   0     DEBUG Number of positive decisions for this output: 1
 ComboHypo_Step2_mu_em                   1   0     DEBUG  ---  decision HLT_mu8_e8 ID#3385806166
 ComboHypo_Step2_mu_em                   1   0     DEBUG Number of positive decisions for this output: 1
 ComboHypo_Step2_mu_em                   1   0     DEBUG  ---  decision HLT_mu8_e8 ID#3385806166
 TriggerSummaryStep2                     1   0     DEBUG Found 1 Decisions for Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
 TriggerSummaryStep2                     1   0     DEBUG Found 2 Decisions for Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerSummaryStep2                     1   0     DEBUG Found 1 Decisions for combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerSummaryStep2                     1   0     DEBUG Found 2 Decisions for combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerSummaryStep2                     1   0     DEBUG Found 1 Decisions for combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerSummaryStep2                     1   0     DEBUG Found 2 Decisions for combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryStep2                     1   0     DEBUG In summary 4 chains passed:
 TriggerSummaryStep2                     1   0     DEBUG  +++ HLT_e8 ID#1906825600
 TriggerSummaryStep2                     1   0     DEBUG  +++ HLT_mu8 ID#3370546555
@@ -2538,8 +2604,8 @@ TriggerSummaryFinal                     1   0     DEBUG Found 1 Decisions for St
 TriggerSummaryFinal                     1   0     DEBUG Found 1 Decisions for Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
 TriggerSummaryFinal                     1   0     DEBUG Found 2 Decisions for Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
 TriggerSummaryFinal                     1   0     DEBUG Found 2 Decisions for Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerSummaryFinal                     1   0     DEBUG Found 1 Decisions for combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerSummaryFinal                     1   0     DEBUG Found 2 Decisions for combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerSummaryFinal                     1   0     DEBUG Found 1 Decisions for combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerSummaryFinal                     1   0     DEBUG Found 2 Decisions for combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryFinal                     1   0     DEBUG In summary 5 chains passed:
 TriggerSummaryFinal                     1   0     DEBUG  +++ HLT_e8 ID#1906825600
 TriggerSummaryFinal                     1   0     DEBUG  +++ HLT_mu81step ID#2702561248
@@ -2551,18 +2617,18 @@ TriggerSummaryFinal.HLTEDMCreator       1   0     DEBUG The Step2MuHypo_from_Fil
 TriggerSummaryFinal.HLTEDMCreator       1   0     DEBUG The Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU already present
 TriggerSummaryFinal.HLTEDMCreator       1   0     DEBUG The Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM already present
 TriggerSummaryFinal.HLTEDMCreator       1   0     DEBUG The Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM already present
-TriggerSummaryFinal.HLTEDMCreator       1   0     DEBUG The combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU already present
-TriggerSummaryFinal.HLTEDMCreator       1   0     DEBUG The combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM already present
+TriggerSummaryFinal.HLTEDMCreator       1   0     DEBUG The combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU already present
+TriggerSummaryFinal.HLTEDMCreator       1   0     DEBUG The combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM already present
 0_StoreGateSvc_Impl                     1   0   WARNING  setupProxy:: error setting up proxy for key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap and clid 1333228823
- Pre-existing valid DataProxy @0x1eec8000 found in Store for key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap with clid 1333228823
-0_StoreGateSvc_Impl                     1   0   WARNING record_impl: Problem setting up the proxy for object @0x1eb9d3c0
- recorded with key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0x1f8d8c30
+ Pre-existing valid DataProxy @0x19c21cc0 found in Store for key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap with clid 1333228823
+0_StoreGateSvc_Impl                     1   0   WARNING record_impl: Problem setting up the proxy for object @0x1f4e5600
+ recorded with key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0x2012ab50
 VarHandle(StoreGateSvc+Step2MuHypo_fr...1   0     ERROR /build2/atnight/localbuilds/nightlies/master/athena/Control/StoreGate/src/VarHandleBase.cxx:709 (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
                                         1   0     FATAL /build2/atnight/localbuilds/nightlies/master/athena/Control/StoreGate/StoreGate/WriteHandle.icc:887 (StatusCode SG::WriteHandle<T>::record(std::unique_ptr<_Tp>, std::unique_ptr<U>, bool) [with AUXSTORE = xAOD::TrigCompositeAuxContainer_v1; T = DataVector<xAOD::TrigComposite_v1>]): code 0: this->record(std::move(data))
 0_StoreGateSvc_Impl                     1   0   WARNING  setupProxy:: error setting up proxy for key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap and clid 1333228823
- Pre-existing valid DataProxy @0x1eec8280 found in Store for key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap with clid 1333228823
-0_StoreGateSvc_Impl                     1   0   WARNING record_impl: Problem setting up the proxy for object @0x1eb9d720
- recorded with key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0x1f8d8d10
+ Pre-existing valid DataProxy @0x1f724140 found in Store for key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap with clid 1333228823
+0_StoreGateSvc_Impl                     1   0   WARNING record_impl: Problem setting up the proxy for object @0x1f4e5cc0
+ recorded with key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0x2012ac30
 VarHandle(StoreGateSvc+Step2ElHypo_fr...1   0     ERROR /build2/atnight/localbuilds/nightlies/master/athena/Control/StoreGate/src/VarHandleBase.cxx:709 (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
                                         1   0     FATAL /build2/atnight/localbuilds/nightlies/master/athena/Control/StoreGate/StoreGate/WriteHandle.icc:887 (StatusCode SG::WriteHandle<T>::record(std::unique_ptr<_Tp>, std::unique_ptr<U>, bool) [with AUXSTORE = xAOD::TrigCompositeAuxContainer_v1; T = DataVector<xAOD::TrigComposite_v1>]): code 0: this->record(std::move(data))
 TriggerMonitorFinal                     1   0     DEBUG L1 0 N positive decisions 5
@@ -2574,8 +2640,8 @@ TriggerMonitorFinal                     1   0     DEBUG Decision for 1 objects a
 TriggerMonitorFinal                     1   0     DEBUG Decision for 1 objects available in Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
 TriggerMonitorFinal                     1   0     DEBUG Decision for 2 objects available in Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
 TriggerMonitorFinal                     1   0     DEBUG Decision for 2 objects available in Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerMonitorFinal                     1   0     DEBUG Decision for 1 objects available in combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerMonitorFinal                     1   0     DEBUG Decision for 2 objects available in combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerMonitorFinal                     1   0     DEBUG Decision for 1 objects available in combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerMonitorFinal                     1   0     DEBUG Decision for 2 objects available in combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerMonitorFinal                     1   0     DEBUG Event passsed, filling 5
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #2, run #1 on slot 0,  2 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  start processing event #3, run #1 on slot 0,  2 events processed so far  <<<===
@@ -2738,25 +2804,25 @@ Step1ElHypo.HLT_e8                      2   0     DEBUG   threshold  'Threshold'
 Step1ElHypo                             2   0     DEBUG Exiting with 1 decisions
 Step1ElHypo                             2   0     DEBUG Number of positive decisions for this input: 1
 Step1ElHypo                             2   0     DEBUG  --- found new decision HLT_e8 ID#1906825600
-Combo_Step1MuHypo                       2   0     DEBUG Executing Combo_Step1MuHypo...
-Combo_Step1MuHypo                       2   0     DEBUG No implicit RH for previous decisions Step1MuInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1MU: is this expected?
-Combo_Step1ElHypo                       2   0     DEBUG Executing Combo_Step1ElHypo...
-Combo_Step1ElHypo                       2   0     DEBUG No implicit RH for previous decisions Step1ElInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1EM: is this expected?
+Step1MuHypo_Combo                       2   0     DEBUG Executing Step1MuHypo_Combo...
+Step1MuHypo_Combo                       2   0     DEBUG No implicit RH for previous decisions Step1MuInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1MU: is this expected?
+Step1ElHypo_Combo                       2   0     DEBUG Executing Step1ElHypo_Combo...
+Step1ElHypo_Combo                       2   0     DEBUG No implicit RH for previous decisions Step1ElInputMaker_from_FilterStep1_on_L1MUL1EM_from_L1EM: is this expected?
 ComboHypo_Step1_mu_em                   2   0     DEBUG Executing ComboHypo_Step1_mu_em...
-ComboHypo_Step1_mu_em                   2   0     DEBUG No implicit RH from Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-ComboHypo_Step1_mu_em                   2   0     DEBUG No implicit RH from Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
-ComboHypo_Step1_mu_em                   2   0     DEBUG Decision map found :
-ComboHypo_Step1_mu_em                   2   0     DEBUG map 0: 
-ComboHypo_Step1_mu_em                   2   0     DEBUG map 1: 
+ComboHypo_Step1_mu_em                   2   0     DEBUG No implicit RH from Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+ComboHypo_Step1_mu_em                   2   0     DEBUG No implicit RH from Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+ComboHypo_Step1_mu_em                   2   0     DEBUG Decision map filled :
+ComboHypo_Step1_mu_em                   2   0     DEBUG map [0]: 
+ComboHypo_Step1_mu_em                   2   0     DEBUG map [1]: 
 ComboHypo_Step1_mu_em                   2   0     DEBUG Required multiplicity 1 for chain HLT_mu8_e8: observed multiplicity 0 in container 0
 ComboHypo_Step1_mu_em                   2   0     DEBUG Chain HLT_mu8_e8 is rejected
 ComboHypo_Step1_mu_em                   2   0     DEBUG Copying 0 positive decisions to outputs
-ComboHypo_Step1_mu_em                   2   0     DEBUG combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 0 decisions:
-ComboHypo_Step1_mu_em                   2   0     DEBUG combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 0 decisions:
+ComboHypo_Step1_mu_em                   2   0     DEBUG combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 0 decisions:
+ComboHypo_Step1_mu_em                   2   0     DEBUG combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 0 decisions:
 TriggerSummaryStep1                     2   0     DEBUG Found 1 Decisions for Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
 TriggerSummaryStep1                     2   0     DEBUG Found 1 Decisions for Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerSummaryStep1                     2   0     DEBUG Found 0 Decisions for combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerSummaryStep1                     2   0     DEBUG Found 0 Decisions for combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerSummaryStep1                     2   0     DEBUG Found 0 Decisions for combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerSummaryStep1                     2   0     DEBUG Found 0 Decisions for combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryStep1                     2   0     DEBUG In summary 3 chains passed:
 TriggerSummaryStep1                     2   0     DEBUG  +++ HLT_e8 ID#1906825600
 TriggerSummaryStep1                     2   0     DEBUG  +++ HLT_mu81step ID#2702561248
@@ -2786,28 +2852,28 @@ FilterStep2_on_Step2_em                 2   0     DEBUG Filter passed creating 1
 FilterStep2_on_Step2_em                 2   0     DEBUG  FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
 FilterStep2_on_Step2_mu_em              2   0     DEBUG Executing FilterStep2_on_Step2_mu_em...
 FilterStep2_on_Step2_mu_em              2   0     DEBUG Running on 2 input keys
-FilterStep2_on_Step2_mu_em              2   0     DEBUG Checking inputHandle combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 0 elements
+FilterStep2_on_Step2_mu_em              2   0     DEBUG Checking inputHandle combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 0 elements
 FilterStep2_on_Step2_mu_em              2   0     DEBUG Input size 0
 FilterStep2_on_Step2_mu_em              2   0     DEBUG Output size 0
-FilterStep2_on_Step2_mu_em              2   0     DEBUG Checking inputHandle combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 0 elements
+FilterStep2_on_Step2_mu_em              2   0     DEBUG Checking inputHandle combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 0 elements
 FilterStep2_on_Step2_mu_em              2   0     DEBUG Input size 0
 FilterStep2_on_Step2_mu_em              2   0     DEBUG Output size 0
 FilterStep2_on_Step2_mu_em              2   0     DEBUG Filter rejected creating 2 valid outDecisions DH
 Step2MuInputMaker                       2   0     DEBUG Executing Step2MuInputMaker...
 Step2MuInputMaker                       2   0     DEBUG  FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU is valid
-Step2MuInputMaker                       2   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU is not valid
+Step2MuInputMaker                       2   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU is not valid
 Step2MuInputMaker                       2   0     DEBUG number of implicit ReadHandles is 2, 1 are valid
 Step2MuInputMaker                       2   0     DEBUG Got input FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU with 1 elements
 Step2MuInputMaker                       2   0     DEBUG Recording output key Step2MuInputMaker_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU of size 1 at index 0
-Step2MuInputMaker                       2   0     DEBUG Got no decisions from input FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU because handle not valid
+Step2MuInputMaker                       2   0     DEBUG Got no decisions from input FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU because handle not valid
 Step2MuInputMaker                       2   0     DEBUG Got output Step2MuInputMaker_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU with 1 elements
 Step2MuInputMaker                       2   0     DEBUG followed seed link to input 675312197
 Step2MuInputMaker                       2   0     DEBUG  Found feature initialRoI
 Step2MuInputMaker                       2   0     DEBUG  Added initialRoI and initialRoI  to reco object
-Step2MuInputMaker                       2   0     DEBUG Got no decisions from output Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU because handle not valid
+Step2MuInputMaker                       2   0     DEBUG Got no decisions from output Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU because handle not valid
 Step2MuInputMaker                       2   0     DEBUG Produced 1 reco objects
 Step2MuInputMaker                       2   0     DEBUG  FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU valid
-Step2MuInputMaker                       2   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU not valid
+Step2MuInputMaker                       2   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU not valid
 Step2MuInputMaker                       2   0     DEBUG number of implicit ReadHandles for input decisions is 2, 1 are valid
 Step2MuInputMaker                       2   0     DEBUG Produced 1 output decisions containers
 Step2MuInputMaker                       2   0     DEBUG Step2MuInputMaker_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU with 1 decisions:
@@ -2844,19 +2910,19 @@ Step2MuHypo                             2   0     DEBUG Number of positive decis
 Step2MuHypo                             2   0     DEBUG  --- found new decision HLT_mu8 ID#3370546555
 Step2ElInputMaker                       2   0     DEBUG Executing Step2ElInputMaker...
 Step2ElInputMaker                       2   0     DEBUG  FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM is valid
-Step2ElInputMaker                       2   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM is not valid
+Step2ElInputMaker                       2   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM is not valid
 Step2ElInputMaker                       2   0     DEBUG number of implicit ReadHandles is 2, 1 are valid
 Step2ElInputMaker                       2   0     DEBUG Got input FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM with 1 elements
 Step2ElInputMaker                       2   0     DEBUG Recording output key Step2ElInputMaker_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM of size 1 at index 0
-Step2ElInputMaker                       2   0     DEBUG Got no decisions from input FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM because handle not valid
+Step2ElInputMaker                       2   0     DEBUG Got no decisions from input FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM because handle not valid
 Step2ElInputMaker                       2   0     DEBUG Got output Step2ElInputMaker_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM with 1 elements
 Step2ElInputMaker                       2   0     DEBUG followed seed link to input 568483925
 Step2ElInputMaker                       2   0     DEBUG  Found feature initialRoI
 Step2ElInputMaker                       2   0     DEBUG  Added initialRoI and initialRoI  to reco object
-Step2ElInputMaker                       2   0     DEBUG Got no decisions from output Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM because handle not valid
+Step2ElInputMaker                       2   0     DEBUG Got no decisions from output Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM because handle not valid
 Step2ElInputMaker                       2   0     DEBUG Produced 1 reco objects
 Step2ElInputMaker                       2   0     DEBUG  FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM valid
-Step2ElInputMaker                       2   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM not valid
+Step2ElInputMaker                       2   0     DEBUG  FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM not valid
 Step2ElInputMaker                       2   0     DEBUG number of implicit ReadHandles for input decisions is 2, 1 are valid
 Step2ElInputMaker                       2   0     DEBUG Produced 1 output decisions containers
 Step2ElInputMaker                       2   0     DEBUG Step2ElInputMaker_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM with 1 decisions:
@@ -2887,25 +2953,25 @@ Step2ElHypo.HLT_e8                      2   0     DEBUG   threshold  'Threshold'
 Step2ElHypo                             2   0     DEBUG Exiting with 1 decisions
 Step2ElHypo                             2   0     DEBUG Number of positive decisions for this input: 1
 Step2ElHypo                             2   0     DEBUG  --- found new decision HLT_e8 ID#1906825600
-Combo_Step2MuHypo                       2   0     DEBUG Executing Combo_Step2MuHypo...
-Combo_Step2MuHypo                       2   0     DEBUG No implicit RH for previous decisions Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU: is this expected?
-Combo_Step2ElHypo                       2   0     DEBUG Executing Combo_Step2ElHypo...
-Combo_Step2ElHypo                       2   0     DEBUG No implicit RH for previous decisions Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM: is this expected?
+Step2MuHypo_Combo                       2   0     DEBUG Executing Step2MuHypo_Combo...
+Step2MuHypo_Combo                       2   0     DEBUG No implicit RH for previous decisions Step2MuInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU: is this expected?
+Step2ElHypo_Combo                       2   0     DEBUG Executing Step2ElHypo_Combo...
+Step2ElHypo_Combo                       2   0     DEBUG No implicit RH for previous decisions Step2ElInputMaker_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM: is this expected?
 ComboHypo_Step2_mu_em                   2   0     DEBUG Executing ComboHypo_Step2_mu_em...
-ComboHypo_Step2_mu_em                   2   0     DEBUG No implicit RH from Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-ComboHypo_Step2_mu_em                   2   0     DEBUG No implicit RH from Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
-ComboHypo_Step2_mu_em                   2   0     DEBUG Decision map found :
-ComboHypo_Step2_mu_em                   2   0     DEBUG map 0: 
-ComboHypo_Step2_mu_em                   2   0     DEBUG map 1: 
+ComboHypo_Step2_mu_em                   2   0     DEBUG No implicit RH from Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+ComboHypo_Step2_mu_em                   2   0     DEBUG No implicit RH from Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+ComboHypo_Step2_mu_em                   2   0     DEBUG Decision map filled :
+ComboHypo_Step2_mu_em                   2   0     DEBUG map [0]: 
+ComboHypo_Step2_mu_em                   2   0     DEBUG map [1]: 
 ComboHypo_Step2_mu_em                   2   0     DEBUG Required multiplicity 1 for chain HLT_mu8_e8: observed multiplicity 0 in container 0
 ComboHypo_Step2_mu_em                   2   0     DEBUG Chain HLT_mu8_e8 is rejected
 ComboHypo_Step2_mu_em                   2   0     DEBUG Copying 0 positive decisions to outputs
-ComboHypo_Step2_mu_em                   2   0     DEBUG combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 0 decisions:
-ComboHypo_Step2_mu_em                   2   0     DEBUG combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 0 decisions:
+ComboHypo_Step2_mu_em                   2   0     DEBUG combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU with 0 decisions:
+ComboHypo_Step2_mu_em                   2   0     DEBUG combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM with 0 decisions:
 TriggerSummaryStep2                     2   0     DEBUG Found 1 Decisions for Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
 TriggerSummaryStep2                     2   0     DEBUG Found 1 Decisions for Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerSummaryStep2                     2   0     DEBUG Found 0 Decisions for combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerSummaryStep2                     2   0     DEBUG Found 0 Decisions for combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerSummaryStep2                     2   0     DEBUG Found 0 Decisions for combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerSummaryStep2                     2   0     DEBUG Found 0 Decisions for combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryStep2                     2   0     DEBUG In summary 2 chains passed:
 TriggerSummaryStep2                     2   0     DEBUG  +++ HLT_e8 ID#1906825600
 TriggerSummaryStep2                     2   0     DEBUG  +++ HLT_mu8 ID#3370546555
@@ -2914,8 +2980,8 @@ TriggerSummaryFinal                     2   0     DEBUG Found 1 Decisions for St
 TriggerSummaryFinal                     2   0     DEBUG Found 1 Decisions for Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
 TriggerSummaryFinal                     2   0     DEBUG Found 1 Decisions for Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
 TriggerSummaryFinal                     2   0     DEBUG Found 1 Decisions for Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerSummaryFinal                     2   0     DEBUG Found 0 Decisions for combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerSummaryFinal                     2   0     DEBUG Found 0 Decisions for combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerSummaryFinal                     2   0     DEBUG Found 0 Decisions for combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerSummaryFinal                     2   0     DEBUG Found 0 Decisions for combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerSummaryFinal                     2   0     DEBUG In summary 3 chains passed:
 TriggerSummaryFinal                     2   0     DEBUG  +++ HLT_e8 ID#1906825600
 TriggerSummaryFinal                     2   0     DEBUG  +++ HLT_mu81step ID#2702561248
@@ -2925,18 +2991,18 @@ TriggerSummaryFinal.HLTEDMCreator       2   0     DEBUG The Step2MuHypo_from_Fil
 TriggerSummaryFinal.HLTEDMCreator       2   0     DEBUG The Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU already present
 TriggerSummaryFinal.HLTEDMCreator       2   0     DEBUG The Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM already present
 TriggerSummaryFinal.HLTEDMCreator       2   0     DEBUG The Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM already present
-TriggerSummaryFinal.HLTEDMCreator       2   0     DEBUG The combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU already present
-TriggerSummaryFinal.HLTEDMCreator       2   0     DEBUG The combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM already present
+TriggerSummaryFinal.HLTEDMCreator       2   0     DEBUG The combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU already present
+TriggerSummaryFinal.HLTEDMCreator       2   0     DEBUG The combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM already present
 0_StoreGateSvc_Impl                     2   0   WARNING  setupProxy:: error setting up proxy for key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap and clid 1333228823
- Pre-existing valid DataProxy @0x1eec8000 found in Store for key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap with clid 1333228823
-0_StoreGateSvc_Impl                     2   0   WARNING record_impl: Problem setting up the proxy for object @0x1ec6ff80
- recorded with key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0x1ff15490
+ Pre-existing valid DataProxy @0x19c21cc0 found in Store for key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap with clid 1333228823
+0_StoreGateSvc_Impl                     2   0   WARNING record_impl: Problem setting up the proxy for object @0x1f5ad680
+ recorded with key Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU_remap of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0x206ff3b0
 VarHandle(StoreGateSvc+Step2MuHypo_fr...2   0     ERROR /build2/atnight/localbuilds/nightlies/master/athena/Control/StoreGate/src/VarHandleBase.cxx:709 (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
                                         2   0     FATAL /build2/atnight/localbuilds/nightlies/master/athena/Control/StoreGate/StoreGate/WriteHandle.icc:887 (StatusCode SG::WriteHandle<T>::record(std::unique_ptr<_Tp>, std::unique_ptr<U>, bool) [with AUXSTORE = xAOD::TrigCompositeAuxContainer_v1; T = DataVector<xAOD::TrigComposite_v1>]): code 0: this->record(std::move(data))
 0_StoreGateSvc_Impl                     2   0   WARNING  setupProxy:: error setting up proxy for key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap and clid 1333228823
- Pre-existing valid DataProxy @0x1eec8280 found in Store for key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap with clid 1333228823
-0_StoreGateSvc_Impl                     2   0   WARNING record_impl: Problem setting up the proxy for object @0x1ec6f320
- recorded with key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0x1ff153b0
+ Pre-existing valid DataProxy @0x1f724140 found in Store for key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap with clid 1333228823
+0_StoreGateSvc_Impl                     2   0   WARNING record_impl: Problem setting up the proxy for object @0x1f5ae2e0
+ recorded with key Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM_remap of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0x206ff2d0
 VarHandle(StoreGateSvc+Step2ElHypo_fr...2   0     ERROR /build2/atnight/localbuilds/nightlies/master/athena/Control/StoreGate/src/VarHandleBase.cxx:709 (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
                                         2   0     FATAL /build2/atnight/localbuilds/nightlies/master/athena/Control/StoreGate/StoreGate/WriteHandle.icc:887 (StatusCode SG::WriteHandle<T>::record(std::unique_ptr<_Tp>, std::unique_ptr<U>, bool) [with AUXSTORE = xAOD::TrigCompositeAuxContainer_v1; T = DataVector<xAOD::TrigComposite_v1>]): code 0: this->record(std::move(data))
 TriggerMonitorFinal                     2   0     DEBUG L1 0 N positive decisions 5
@@ -2950,18 +3016,18 @@ TriggerMonitorFinal                     2   0     DEBUG Decision for 1 objects a
 TriggerMonitorFinal                     2   0     DEBUG Decision for 1 objects available in Step2MuHypo_from_FilterStep2_on_Step2_mu_from_Step1MuHypo_from_FilterStep1_on_L1MU_from_L1MU
 TriggerMonitorFinal                     2   0     DEBUG Decision for 1 objects available in Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
 TriggerMonitorFinal                     2   0     DEBUG Decision for 1 objects available in Step2ElHypo_from_FilterStep2_on_Step2_em_from_Step1ElHypo_from_FilterStep1_on_L1EM_from_L1EM
-TriggerMonitorFinal                     2   0     DEBUG Decision for 0 objects available in combo_Combo_Step2MuHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1MuHypo_from_FilterStep1_on_L1MUL1EM_from_L1MU
-TriggerMonitorFinal                     2   0     DEBUG Decision for 0 objects available in combo_Combo_Step2ElHypo_from_FilterStep2_on_Step2_mu_em_from_combo_Combo_Step1ElHypo_from_FilterStep1_on_L1MUL1EM_from_L1EM
+TriggerMonitorFinal                     2   0     DEBUG Decision for 0 objects available in combo_Step2MuHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1MuHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1MU
+TriggerMonitorFinal                     2   0     DEBUG Decision for 0 objects available in combo_Step2ElHypo_Combo_from_FilterStep2_on_Step2_mu_em_from_combo_Step1ElHypo_Combo_from_FilterStep1_on_L1MUL1EM_from_L1EM
 TriggerMonitorFinal                     2   0     DEBUG Event passsed, filling 5
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #3, run #1 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 3.4321
+AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 0.96273
 StorageSvc                                         INFO Building shape according to reflection information using shape ID for:
 StorageSvc                                         INFO EventStreamInfo_p3 [11DF1B8C-0DEE-4687-80D7-E74B520ACBB4]
 ClassIDSvc                                         INFO  getRegistryEntries: read 7 CLIDRegistry entries for module ALL
 StreamESD                                          INFO Records written: 4
 Domain[ROOT_All]                                   INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 myESD.pool.root                                    INFO Database being retired...
-Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   CREATE    [ROOT_All] 9F289329-54D1-924F-B939-015CA2FAA049
+Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   CREATE    [ROOT_All] 5FF10EFB-63B1-8245-8821-94DCD30F5261
 Domain[ROOT_All]                                   INFO >   Deaccess DbDomain     UPDATE    [ROOT_All] 
 ApplicationMgr                                     INFO Application Manager Stopped successfully
 IncidentProcAlg1                                   INFO Finalize
@@ -2972,16 +3038,16 @@ Step1MuHypo                                        INFO Finalizing Step1MuHypo..
 Step1ElInputMaker                                  INFO Finalizing Step1ElInputMaker...
 CaloClustering                                     INFO Finalizing CaloClustering...
 Step1ElHypo                                        INFO Finalizing Step1ElHypo...
-Combo_Step1MuHypo                                  INFO Finalizing Combo_Step1MuHypo...
-Combo_Step1ElHypo                                  INFO Finalizing Combo_Step1ElHypo...
+Step1MuHypo_Combo                                  INFO Finalizing Step1MuHypo_Combo...
+Step1ElHypo_Combo                                  INFO Finalizing Step1ElHypo_Combo...
 Step2MuInputMaker                                  INFO Finalizing Step2MuInputMaker...
 muMSRecAlg2                                        INFO Finalizing muMSRecAlg2...
 Step2MuHypo                                        INFO Finalizing Step2MuHypo...
 Step2ElInputMaker                                  INFO Finalizing Step2ElInputMaker...
 CaloClustering2                                    INFO Finalizing CaloClustering2...
 Step2ElHypo                                        INFO Finalizing Step2ElHypo...
-Combo_Step2MuHypo                                  INFO Finalizing Combo_Step2MuHypo...
-Combo_Step2ElHypo                                  INFO Finalizing Combo_Step2ElHypo...
+Step2MuHypo_Combo                                  INFO Finalizing Step2MuHypo_Combo...
+Step2ElHypo_Combo                                  INFO Finalizing Step2ElHypo_Combo...
 TriggerMonitorFinal                                INFO Chain name                   L1,      AfterPS, [... steps ...], Output
 TriggerMonitorFinal                               DEBUG All                           3         3         0         0         3         
 TriggerMonitorFinal                               DEBUG HLT_mu20                      1         1         0         0         0         
@@ -2994,13 +3060,12 @@ IncidentProcAlg2                                   INFO Finalize
 AvalancheSchedulerSvc                              INFO Joining Scheduler thread
 DecisionSvc                                        INFO Finalized successfully.
 EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-XMLCatalog                                         INFO File 'PoolFileCatalog.xml' does not exist. New file created.
 AthDictLoaderSvc                                   INFO in finalize...
 ToolSvc                                            INFO Removing all tools created by ToolSvc
-Combo_Step2ElHypo.HLT_mu8_e8                       INFO Finalizing Combo_Step2ElHypo.HLT_mu8_e8...
-Combo_Step2MuHypo.HLT_mu8_e8                       INFO Finalizing Combo_Step2MuHypo.HLT_mu8_e8...
-Combo_Step1ElHypo.HLT_mu8_e8                       INFO Finalizing Combo_Step1ElHypo.HLT_mu8_e8...
-Combo_Step1MuHypo.HLT_mu8_e8                       INFO Finalizing Combo_Step1MuHypo.HLT_mu8_e8...
+Step2ElHypo_Combo.HLT_mu8_e8                       INFO Finalizing Step2ElHypo_Combo.HLT_mu8_e8...
+Step2MuHypo_Combo.HLT_mu8_e8                       INFO Finalizing Step2MuHypo_Combo.HLT_mu8_e8...
+Step1ElHypo_Combo.HLT_mu8_e8                       INFO Finalizing Step1ElHypo_Combo.HLT_mu8_e8...
+Step1MuHypo_Combo.HLT_mu8_e8                       INFO Finalizing Step1MuHypo_Combo.HLT_mu8_e8...
 Step2MuHypo.HLT_mu8                                INFO Finalizing Step2MuHypo.HLT_mu8...
 Step2MuHypo.HLT_mu20                               INFO Finalizing Step2MuHypo.HLT_mu20...
 Step1MuHypo.HLT_mu8                                INFO Finalizing Step1MuHypo.HLT_mu8...
@@ -3014,10 +3079,10 @@ Step1ElHypo.HLT_e20                                INFO Finalizing Step1ElHypo.H
 *****Chrono*****                                   INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****                                   INFO ****************************************************************************************************
 commitOutput                                       INFO Time User   : Tot=    0 [us] Ave/Min/Max=    0(+-    0)/    0/    0 [us] #=  4
-cRepR_ALL                                          INFO Time User   : Tot=  140 [ms] Ave/Min/Max= 3.33(+- 19.8)/    0/  130 [ms] #= 42
-fRep_ALL                                           INFO Time User   : Tot=  190 [ms] Ave/Min/Max=    5(+- 21.4)/    0/  130 [ms] #= 38
-cRep_ALL                                           INFO Time User   : Tot=  410 [ms] Ave/Min/Max= 10.8(+- 56.4)/    0/  350 [ms] #= 38
-ChronoStatSvc                                      INFO Time User   : Tot= 3.13  [s]                                             #=  1
+cRepR_ALL                                          INFO Time User   : Tot=  120 [ms] Ave/Min/Max= 2.86(+- 16.8)/    0/  110 [ms] #= 42
+fRep_ALL                                           INFO Time User   : Tot=  140 [ms] Ave/Min/Max= 3.68(+- 17.8)/    0/  110 [ms] #= 38
+cRep_ALL                                           INFO Time User   : Tot=  230 [ms] Ave/Min/Max= 6.05(+- 30.7)/    0/  190 [ms] #= 38
+ChronoStatSvc                                      INFO Time User   : Tot= 2.51  [s]                                             #=  1
 *****Chrono*****                                   INFO ****************************************************************************************************
 ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
 ApplicationMgr                                     INFO Application Manager Finalized successfully
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py
index f099bd55a1ac60ebf70ae865885f8b1e42cf46c1..da6703e34147c528deccd2f322dcd8d81cc22230 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py
@@ -137,7 +137,6 @@ if doCombo:
             if "MU" in s: EnabledMuComboChains.append(s +" : "+ c.name)
             if "EM" in s: EnabledElComboChains.append(s +" : "+ c.name) 
 
-    #EnabledComboChains= [c.seed.strip().split("_")[1] +" : "+ c.name for c in CombChains]
     print "enabled Combo chains: ", EnabledMuComboChains,EnabledElComboChains
 
 EnabledChainNamesToCTP = [str(n)+":"+c.name for n,c in enumerate(HLTChains)]
@@ -156,21 +155,17 @@ l1Decoder.prescaler.EventInfo=""
 l1Decoder.Chains="HLTChainsResult"
 
 ctpUnpacker = CTPUnpackingEmulationTool( OutputLevel =  DEBUG, ForceEnableAllChains=False , InputFilename="ctp.dat" )
-ctpUnpacker.CTPToChainMapping = EnabledChainNamesToCTP
-#[ "0:HLT_g100",  "1:HLT_e20", "2:HLT_mu20", "3:HLT_2mu8", "3:HLT_mu8", "33:HLT_2mu8", "15:HLT_mu8_e8" ]
 l1Decoder.ctpUnpacker = ctpUnpacker
 
 emUnpacker = RoIsUnpackingEmulationTool("EMRoIsUnpackingTool", OutputLevel=DEBUG, InputFilename="l1emroi.dat", OutputTrigRoIs="L1EMRoIs", Decisions="L1EM" )
 emUnpacker.ThresholdToChainMapping = EnabledElChains + EnabledElComboChains
 print "EMRoIsUnpackingTool enables chians:"
 print emUnpacker.ThresholdToChainMapping
-#["EM7 : HLT_mu8_e8", "EM20 : HLT_e20", "EM50 : HLT_2g50",   "EM100 : HLT_g100" ]
 
 muUnpacker = RoIsUnpackingEmulationTool("MURoIsUnpackingTool", OutputLevel=DEBUG, InputFilename="l1muroi.dat",  OutputTrigRoIs="L1MURoIs", Decisions="L1MU" )
 muUnpacker.ThresholdToChainMapping = EnabledMuChains + EnabledMuComboChains
 print "MURoIsUnpackingTool enables chians:"
 print muUnpacker.ThresholdToChainMapping
-#["MU6 : HLT_mu6", "MU8 : HLT_mu8", "MU8 : HLT_2mu8",  "MU8 : HLT_mu8_e8",  "MU10 : HLT_mu20",   "EM100 : HLT_g100" ]
 
 l1Decoder.roiUnpackers = [emUnpacker, muUnpacker]
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/IDCalo.py b/Trigger/TrigValidation/TrigUpgradeTest/share/IDCalo.py
index 1fe7ac27c36be1c8194eeb7e565ae211664f0d91..f7079dd617655acd52d977dba66bbc6440b9e542 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/IDCalo.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/IDCalo.py
@@ -60,11 +60,12 @@ if TriggerFlags.doID:
   (viewAlgs, eventAlgs) = makeInDetAlgs()
 
   from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_eGamma
-  
-  TrigFastTrackFinder_eGamma.isRoI_Seeded = True
-  TrigFastTrackFinder_eGamma.RoIs = "EMViewRoIs"
-  viewAlgs.append(TrigFastTrackFinder_eGamma())
 
+  theTrigFastTrackFinder_eGamma = TrigFastTrackFinder_eGamma()
+  theTrigFastTrackFinder_eGamma.isRoI_Seeded = True
+  theTrigFastTrackFinder_eGamma.RoIs = "EMViewRoIs"
+  #theTrigFastTrackFinder_eGamma.OutputLevel=VERBOSE
+  viewAlgs.append(theTrigFastTrackFinder_eGamma)
 
   for eventAlg in eventAlgs:
     viewSeq += eventAlg
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.menu.py
index d3837d00caff8ec81ca31ff819e6ef648dc5171c..0d63f68749000e1adc20c9ae0d17de1855fe1415 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.menu.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.menu.py
@@ -55,7 +55,7 @@ for unpack in topSequence.L1DecoderTest.rerunRoiUnpackers:
         unpack.SourceDecisions="L1MU"
         
 # this is a temporary hack to include new test chains
-EnabledChainNamesToCTP = [str(n)+":"+c.name for n,c in enumerate(testChains)]
+EnabledChainNamesToCTP = dict([ (c.name, c.seed)  for c in testChains])
 topSequence.L1DecoderTest.ctpUnpacker.CTPToChainMapping = EnabledChainNamesToCTP
 
 EnabledElChains= [c.seed.strip().split("_")[1] +" : "+ c.name for c in testChains]
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py
index dd08b6a25702b964de34de64f0d65193125842a7..e4b5837ae369e1abf5db496331ba86660c6cc9f6 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py
@@ -250,7 +250,7 @@ from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT, DecisionC
 mon = TrigSignatureMoniMT()
 mon.FinalDecisions = [ "ElectronL2Decisions", "MuonL2Decisions", "WhateverElse" ]
 from TrigUpgradeTest.TestUtils import MenuTest
-mon.ChainsList = [ x.split(":")[1] for x in  MenuTest.CTPToChainMapping ]
+mon.ChainsList = list( set( MenuTest.CTPToChainMapping.keys() ) )
 mon.OutputLevel = DEBUG
 
 step1Collector = DecisionCollectorTool("Step1Collector")
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma_mu.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.py
similarity index 93%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/egamma_mu.menu.py
rename to Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.py
index 42182bc8f209b2120115013253b814f065a2bd69..38dd62d3d78e0c372af4cef0fda08d212b675ebd 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma_mu.menu.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.py
@@ -5,6 +5,8 @@
 # import flags
 include("TrigUpgradeTest/testHLT_MT.py")
 
+#Currently only runs egamma and mu chains but expect to expand
+
 
 ##########################################
 # menu
@@ -31,7 +33,7 @@ egammaChains  = [
     Chain(name='HLT_e5_etcut',      Seed="L1_EM3",  ChainSteps=[step1, step2]  ),
     Chain(name='HLT_e7_etcut',      Seed="L1_EM3",  ChainSteps=[step1, step2]  )
     ]
- 
+
 
 
 # muon chains
@@ -46,7 +48,7 @@ if TriggerFlags.doID==True:
     MuonChains += [Chain(name='HLT_mu6Comb', Seed="L1_MU6",  ChainSteps=[step1mufast, step2muComb ])]
     MuonChains += [Chain(name='HLT_2mu6Comb', Seed="L1_MU6", ChainSteps=[step1mufast, step2muComb ])]
 
-    
+
 # combo chains
 comboChains= []
 comboStep=ChainStep("Step1_mufast_et", [muFastStep,fastCaloStep])
@@ -54,8 +56,7 @@ comboChains +=  [Chain(name='HLT_mu6_e3_etcut', Seed="L1_MU6_EM3",  ChainSteps=[
 
 
 # sum all
-testChains = egammaChains + MuonChains
-#+ comboChains
+testChains = egammaChains + MuonChains+ comboChains
 
 
 #################################
@@ -78,18 +79,18 @@ for unpack in topSequence.L1DecoderTest.roiUnpackers:
     if unpack.name() is "MURoIsUnpackingTool":
         unpack.Decisions="L1MU"
         muUnpacker=unpack
-        
+
 for unpack in topSequence.L1DecoderTest.rerunRoiUnpackers:
     if unpack.name() is "EMRerunRoIsUnpackingTool":
         unpack.Decisions="RerunL1EM"
         unpack.SourceDecisions="L1EM"
-   
+
     if unpack.name() is "MURerunRoIsUnpackingTool":
         unpack.Decisions="RerunL1MU"
         unpack.SourceDecisions="L1MU"
-  
+
 # this is a temporary hack to include new test chains
-EnabledChainNamesToCTP = [str(n)+":"+c.name for n,c in enumerate(testChains)]
+EnabledChainNamesToCTP = dict([ (c.name, c.seed)  for c in testChains])
 topSequence.L1DecoderTest.ctpUnpacker.CTPToChainMapping = EnabledChainNamesToCTP
 
 EnabledElChains= [c.seed.strip().split("_")[1] +" : "+ c.name for c in egammaChains]
@@ -99,7 +100,7 @@ for c in comboChains:
         seeds.pop(0) #remove first L1 string
         for s in seeds:
             if "MU" in s: EnabledMuComboChains.append(s +" : "+ c.name)
-            if "EM" in s: EnabledElComboChains.append(s +" : "+ c.name) 
+            if "EM" in s: EnabledElComboChains.append(s +" : "+ c.name)
 
 muUnpacker.ThresholdToChainMapping = EnabledMuChains + EnabledMuComboChains
 emUnpacker.ThresholdToChainMapping = EnabledElChains + EnabledElComboChains
@@ -116,11 +117,8 @@ makeHLTTree(testChains)
 
 
 
-##########################################  
+##########################################
 # Some debug
-##########################################  
+##########################################
 from AthenaCommon.AlgSequence import dumpSequence
 dumpSequence(topSequence)
-
-
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py
index aa716ba2118db089337f250d554ae58acbf61f26..8b6169dc82d9c8efadb1614d6ec27f3770c4f20a 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py
@@ -23,8 +23,6 @@ AlgScheduler.ShowDataDependencies( True )
 AlgScheduler.setDataLoaderAlg( 'SGInputLoader' )
 
 
-
-
 # ===============================================================================================
 #               Setup CF(Control Flow)
 # ===============================================================================================
@@ -47,31 +45,32 @@ if  TriggerFlags.doMuon==True:
     ##########################################
 
     from TrigUpgradeTest.MenuComponents import Chain, ChainStep
-    from TrigUpgradeTest.muMenuDefs import muFastStep, muCombStep, doL2SA, doL2CB, doEFSA
+    from TrigUpgradeTest.muMenuDefs import muFastStep, muCombStep, muonEFSAStep, doL2SA, doL2CB, doEFSA
 
     MenuChains  = []
 
     step1mufast=ChainStep("Step1_mufast", [muFastStep])
+    step2muComb=ChainStep("Step2_muComb", [muCombStep])
+    step3muEFSA=ChainStep("Step3_muEFSA", [muonEFSAStep])
 
     # add one chain wihtout tracking
-    MenuChains += [Chain(name='HLT_mu6fast', Seed="L1_MU6",  ChainSteps=[step1mufast ])]
+    MenuChains += [Chain(name='HLT_mu6fast', Seed="L1_MU6",  ChainSteps=[step1mufast])]
     
     if TriggerFlags.doID==False:
         if doL2SA==True  and doL2CB==False and doEFSA==False:           
             MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6",  ChainSteps=[step1mufast ])]
             MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[step1mufast ])]
         if doL2SA==False and doL2CB==False and doEFSA==True: 
-            MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6",  ChainSteps=[step1mufast ])]
-            MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[step1mufast ])]
+            MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6",  ChainSteps=[step1mufast, step3muEFSA ])]
+            MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[step1mufast, step3muEFSA ])]
     elif TriggerFlags.doID==True:
-        step2muComb=ChainStep("Step2_muComb", [muCombStep])
+        #step2muComb=ChainStep("Step2_muComb", [muCombStep])
         if doL2SA==True  and doL2CB==True  and doEFSA==False:
             MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6",  ChainSteps=[step1mufast, step2muComb ])]
             MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[step1mufast, step2muComb ])]
         if doL2SA==True  and doL2CB==True  and doEFSA==True:
-            MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6",  ChainSteps=[step1mufast, step2muComb ])]
-            MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[step1mufast, step2muComb ])]           
-    
+            MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6",  ChainSteps=[step1mufast, step2muComb, step3muEFSA ])]
+            MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[step1mufast, step2muComb, step3muEFSA ])]           
     
             
 
@@ -112,9 +111,9 @@ if  TriggerFlags.doMuon==True:
         if unpack.name() is "MURerunRoIsUnpackingTool":
             unpack.Decisions="RerunL1MU"
             unpack.SourceDecisions="L1MU"
-            
+           
     # this is a temporary hack to include new test chains
-    EnabledChainNamesToCTP = [str(n)+":"+c.name for n,c in enumerate(MenuChains)]
+    EnabledChainNamesToCTP = dict([ (c.name, c.seed)  for c in MenuChains])
     topSequence.L1DecoderTest.ctpUnpacker.CTPToChainMapping = EnabledChainNamesToCTP
 
     EnabledMuChains= [c.seed.strip().split("_")[1] +" : "+ c.name for c in MenuChains]
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py
index 7f9aaa41d38b4eab51bf7a93df26c111777321d7..50c120ed89da9a38a482f6f861e0745f02e49544 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py
@@ -1,4 +1,4 @@
-# 
+#
 #  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration 
 # 
 #  OutputLevel: INFO < DEBUG < VERBOSE 
@@ -125,15 +125,6 @@ if TriggerFlags.doMuon:
   if doEFSA:
 
     efMuViewNode = seqAND("efMuViewNode")
-    efMuViewsMaker = EventViewCreatorAlgorithm("efMuViewsMaker", OutputLevel=DEBUG)
-    efMuViewsMaker.ViewFallThrough = True
-    # probably wrong input to the EVMaker
-    efMuViewsMaker.InputMakerInputDecisions = ["MURoIDecisions"]
-    efMuViewsMaker.InputMakerOutputDecisions = ["MURoIDecisionsOutputEF"]
-    efMuViewsMaker.RoIsLink = "initialRoI" # -||-
-    efMuViewsMaker.InViewRoIs = "MURoIs" # contract with the consumer
-    efMuViewsMaker.Views = "EFMUViewRoIs"
-    efMuViewsMaker.ViewNodeName = efMuViewNode.name()
 
   if doEFSA or doL2SA:
     ### ==================== Data prepartion needed for the EF and L2 SA #######################333
@@ -236,6 +227,7 @@ if TriggerFlags.doMuon:
       from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RPC_RawDataProviderTool
       MuonRpcRawDataProviderTool = Muon__RPC_RawDataProviderTool(name    = "MuonRpcRawDataProviderTool",
                                                                  Decoder = RPCRodDecoder )
+
       ToolSvc += MuonRpcRawDataProviderTool
   
       from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RpcRdoToPrepDataTool
@@ -326,17 +318,18 @@ if TriggerFlags.doMuon:
 #               Setup L2MuonSA
 # ===============================================================================================
  
-  if doL2SA:
 
-    svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection = False
 
-    ### set up L1RoIsFilter ###
-    filterL1RoIsAlg = RoRSeqFilter("filterL1RoIsAlg")
-    filterL1RoIsAlg.Input = ["MURoIDecisions"]
-    filterL1RoIsAlg.Output = ["FilteredMURoIDecisions"]
-    filterL1RoIsAlg.Chains = testChains
-    filterL1RoIsAlg.OutputLevel = DEBUG
+  svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection = False
+
+  ### set up L1RoIsFilter ###
+  filterL1RoIsAlg = RoRSeqFilter("filterL1RoIsAlg")
+  filterL1RoIsAlg.Input = ["MURoIDecisions"]
+  filterL1RoIsAlg.Output = ["FilteredMURoIDecisions"]
+  filterL1RoIsAlg.Chains = testChains
+  filterL1RoIsAlg.OutputLevel = DEBUG
 
+  if doL2SA:
     # set the EVCreator
     l2MuViewsMaker = EventViewCreatorAlgorithm("l2MuViewsMaker", OutputLevel=DEBUG)
     l2MuViewsMaker.ViewFallThrough = True
@@ -488,10 +481,27 @@ if TriggerFlags.doMuon:
 # ===============================================================================================
 
   if doEFSA:
- ### RoRSeqFilter step2 ###
+
+    efMuViewsMaker = EventViewCreatorAlgorithm("efMuViewsMaker", OutputLevel=DEBUG)
+    efMuViewsMaker.ViewFallThrough = True
+    # probably wrong input to the EVMaker
+    efMuViewsMaker.InputMakerInputDecisions = filterL1RoIsAlg.Output
+    efMuViewsMaker.InputMakerOutputDecisions = ["MURoIDecisionsOutputEF"]
+    efMuViewsMaker.RoIsLink = "initialRoI" # -||-
+    efMuViewsMaker.InViewRoIs = "MURoIs" # contract with the consumer
+    efMuViewsMaker.Views = "EFMUViewRoIs"
+    efMuViewsMaker.ViewNodeName = efMuViewNode.name()
+
+    
+    ### RoRSeqFilter step2 ###
     filterEFSAAlg = RoRSeqFilter("filterEFSAAlg")
-    filterEFSAAlg.Input = [trigmuCombHypo.HypoOutputDecisions]
-    filterEFSAAlg.Output = ["Filtered"+trigmuCombHypo.HypoOutputDecisions]
+    if doL2CB and doL2SA:
+      filterEFSAAlg.Input = [trigmuCombHypo.HypoOutputDecisions]
+      filterEFSAAlg.Output = ["Filtered"+trigmuCombHypo.HypoOutputDecisions]
+    else :
+      # for now just use the L1 input when L2 is not running
+      filterEFSAAlg.Input = ["MURoIDecisions"]
+      filterEFSAAlg.Output = ["FilteredMURoIDecisionsForEF"]
     filterEFSAAlg.Chains = testChains
     filterEFSAAlg.OutputLevel = DEBUG
     
@@ -591,15 +601,13 @@ if TriggerFlags.doMuon:
     trigMuonEFSAHypo = TrigMuonEFMSonlyHypoConfig("MuonEFSAHypoAlg")
     trigMuonEFSAHypo.OutputLevel = DEBUG
 
-    trigMuonEFSAHypo.ViewRoIs = efMuViewsMaker.Views
     trigMuonEFSAHypo.MuonDecisions = "Muons"
-    trigMuonEFSAHypo.RoIs = efMuViewsMaker.InViewRoIs
-    trigMuonEFSAHypo.Decisions = "EFMuonSADecisions"
-    trigMuonEFSAHypo.L1Decisions = efMuViewsMaker.InputMakerInputDecisions[0]
+    trigMuonEFSAHypo.HypoOutputDecisions = "EFMuonSADecisions"
+    trigMuonEFSAHypo.HypoInputDecisions = efMuViewsMaker.InputMakerOutputDecisions[0]
 
     trigMuonEFSAHypo.HypoTools = [ trigMuonEFSAHypo.TrigMuonEFMSonlyHypoToolFromName( "TrigMuonEFMSonlyHypoTool", c ) for c in testChains ] 
 
-    muonEFSADecisionsDumper = DumpDecisions("muonEFSADecisionsDumper", OutputLevel=DEBUG, Decisions = trigMuonEFSAHypo.Decisions )
+    muonEFSADecisionsDumper = DumpDecisions("muonEFSADecisionsDumper", OutputLevel=DEBUG, Decisions = trigMuonEFSAHypo.HypoOutputDecisions )
     muonEFSAStep = seqAND("muonEFSAStep", [filterEFSAAlg, efMuViewsMaker, efMuViewNode, trigMuonEFSAHypo, muonEFSADecisionsDumper])
 
 
@@ -633,7 +641,7 @@ if TriggerFlags.doMuon==True:
   if doEFSA==True and doL2SA==False and doL2CB==False:
     summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) 
     summary.InputDecision = "HLTChains" 
-    summary.FinalDecisions = [ trigMuonEFSAHypo.Decisions ]
+    summary.FinalDecisions = [ trigMuonEFSAHypo.HypoOutputDecisions ]
     summary.OutputLevel = DEBUG 
     step0 = parOR("step0", [ muonEFSAStep ] )
     stepfilter = parOR("stepfilter", [ filterL1RoIsAlg ] )
@@ -641,7 +649,7 @@ if TriggerFlags.doMuon==True:
 
     mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) 
     mon.InputDecision = "HLTChains" 
-    mon.FinalDecisions = [ trigMuonEFSAHypo.Decisions, "WhateverElse" ] 
+    mon.FinalDecisions = [ trigMuonEFSAHypo.HypoOutputDecisions, "WhateverElse" ] 
     mon.HLTSummary = "MonitoringSummary" 
     mon.OutputLevel = DEBUG 
     hltTop = seqOR( "hltTop", [ HLTsteps, mon] )
@@ -674,7 +682,7 @@ if TriggerFlags.doMuon==True and TriggerFlags.doID==True:
     from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg 
     summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) 
     summary.InputDecision = "HLTChains" 
-    summary.FinalDecisions = [ trigMuonEFSAHypo.Decisions ]
+    summary.FinalDecisions = [ trigMuonEFSAHypo.HypoOutputDecisions ]
     summary.OutputLevel = DEBUG 
     step0 = parOR("step0", [ muFastStep ] )
     step1 = parOR("step1", [ muCombStep ] )
@@ -688,7 +696,7 @@ if TriggerFlags.doMuon==True and TriggerFlags.doID==True:
 
     mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) 
     mon.InputDecision = "HLTChains" 
-    mon.FinalDecisions = [ trigMuonEFSAHypo.Decisions, "WhateverElse" ] 
+    mon.FinalDecisions = [ trigMuonEFSAHypo.HypoOutputDecisions, "WhateverElse" ] 
     mon.HLTSummary = "MonitoringSummary" 
     mon.OutputLevel = DEBUG 
     hltTop = seqOR( "hltTop", [ HLTsteps, mon] )
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
index 601da52d4463d6765027deb8a4f970700db9cb24..d2252b6be4106ef672d6853993e2f8ab62a5fdf8 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
@@ -412,9 +412,9 @@ if opt.doL1Sim:
         # interesting is that this JO sets inexisting properties, commented out below
         LVL1TGCTrigger__LVL1TGCTrigger("LVL1TGCTrigger",
                                        InputData_perEvent  = "TGC_DIGITS", 
-                                      # ASDOutDataLocation = "/Event/ASDOutDataLocation",
+                                      # ASDOutDataLocation = "ASDOutDataLocation",
                                       # MuonTrigConfig     = "/Run/MuonTrigConfig",
-                                       MuCTPIInput_TGC     = "/Event/L1MuctpiStoreTGC",
+                                       MuCTPIInput_TGC     = "L1MuctpiStoreTGC",
                                        MaskFileName        = "TrigT1TGCMaskedChannel.db",
                                        MaskFileName12      = "TrigT1TGCMaskedChannel._12.db",
                                        OutputLevel         = logLevel),
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_mu_menu.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu.sh
similarity index 85%
rename from Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_mu_menu.sh
rename to Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu.sh
index 7ea9726d2d28365c1535cc0d52dec16fe6942287..70a72752f3c4a62d11707ee4f71c8b167bf3edaf 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_mu_menu.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu.sh
@@ -2,4 +2,4 @@
 # art-type: build
 # art-ci: master
 
-athena --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/egamma_mu.menu.py
+athena --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/fullMenu.py
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v3_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v5_grid.sh
similarity index 77%
rename from Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v3_grid.sh
rename to Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v5_grid.sh
index 8199cb3546e760410aa55522d34ce27e26d76ecb..8eb3a8efcfab89a4d493f1b69a9129e9d0a61948 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v3_grid.sh
+++ b/Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v5_grid.sh
@@ -1,13 +1,11 @@
 #!/bin/bash
 
-# art-description: Heavy ion physics v3 TriggerTest on MC
+# art-description: Heavy ion MC v5 TriggerTest on MC
 # art-type: grid
 # art-include: 21.1/AthenaP1
 # art-include: 21.1-dev/AthenaP1
 # art-include: 21.0/Athena
 # art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: master/AthenaP1
 # art-output: HLTChain.txt
 # art-output: HLTTE.txt
 # art-output: L1AV.txt
@@ -21,8 +19,8 @@
 # art-output: *perfmon*
 # art-output: TotalEventsProcessed.txt
 
-export NAME="physics_hi_v3_grid"
-export MENU="Physics_HI_v3"
+export NAME="mc_hi_v5_grid"
+export MENU="MC_HI_v5"
 export EVENTS="500"
 export INPUT="pbpb"
 
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v4_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v4_grid.sh
index 894ab2a480895a259cf099b1930b8aa61e700b63..39bf4ecf52fc3759d6e4c4bc92cd91304c5f7124 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v4_grid.sh
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v4_grid.sh
@@ -21,7 +21,7 @@
 # art-output: *perfmon*
 # art-output: TotalEventsProcessed.txt
 
-export NAME="physics_pp_v7_aod_grid"
+export NAME="physics_hi_v4_grid"
 export MENU="Physics_HI_v4"
 export EVENTS="500"
 export INPUT="pbpb"
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v3_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v5_build.sh
similarity index 77%
rename from Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v3_build.sh
rename to Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v5_build.sh
index bd892dc7d2bde910c247f2fd61c6530f4da2644e..120b8527adc7c89f002d9c1a606a665d970af5eb 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v3_build.sh
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v5_build.sh
@@ -1,13 +1,11 @@
 #!/bin/bash
 
-# art-description: Heavy ion physics v3 TriggerTest on MC
+# art-description: Heavy ion physics v5 TriggerTest on MC
 # art-type: build
 # art-include: 21.1/AthenaP1
 # art-include: 21.1-dev/AthenaP1
 # art-include: 21.0/Athena
 # art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: master/AthenaP1
 # art-output: HLTChain.txt
 # art-output: HLTTE.txt
 # art-output: L1AV.txt
@@ -21,8 +19,8 @@
 # art-output: *perfmon*
 # art-output: TotalEventsProcessed.txt
 
-export NAME="physics_hi_v3_build"
-export MENU="Physics_HI_v3"
+export NAME="physics_hi_v5_build"
+export MENU="Physics_HI_v5"
 export EVENTS="5"
 export INPUT="pbpb"
 export COST_MONITORING="False"
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v3_tight_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v5_grid.sh
similarity index 75%
rename from Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v3_tight_grid.sh
rename to Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v5_grid.sh
index b197e89d75a615d539a3412eaa1ad77e1bffb14e..38f3c83c8110529c7b4e30d288f92672692b77f6 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v3_tight_grid.sh
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v5_grid.sh
@@ -1,13 +1,11 @@
 #!/bin/bash
 
-# art-description: Heavy ion MC v3 tight TriggerTest on MC
+# art-description: Heavy ion physics v5 TriggerTest on MC
 # art-type: grid
 # art-include: 21.1/AthenaP1
 # art-include: 21.1-dev/AthenaP1
 # art-include: 21.0/Athena
 # art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: master/AthenaP1
 # art-output: HLTChain.txt
 # art-output: HLTTE.txt
 # art-output: L1AV.txt
@@ -21,8 +19,8 @@
 # art-output: *perfmon*
 # art-output: TotalEventsProcessed.txt
 
-export NAME="mc_hi_v3_tight_grid"
-export MENU="MC_HI_v3_tight_mc_prescale"
+export NAME="physics_hi_v5_grid"
+export MENU="Physics_HI_v5"
 export EVENTS="500"
 export INPUT="pbpb"
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py
index a146d86d0c70409aeb03b9609495b8b30ca06593..11811cb3ecf1392ab8d43fd029206533f6ab98c4 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py
@@ -735,13 +735,6 @@ class L2EFChain_mu(L2EFChainDef):
       log.error("Chain built with %s but so far only l2muonSA is supported." % (self.chainPart['L2SAAlg']))
       return False
 
-    from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_MuonA     # ---> this is Run1 tracking - keep it here
-    theTrigL2SiTrackFinder_MuonA = TrigL2SiTrackFinder_MuonA()
-    from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_MuonB
-    theTrigL2SiTrackFinder_MuonB = TrigL2SiTrackFinder_MuonB()
-    from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_MuonC
-    theTrigL2SiTrackFinder_MuonC = TrigL2SiTrackFinder_MuonC()
-
     from TrigInDetConf.TrigInDetFTKSequence import TrigInDetFTKSequence
     if "FTKRefit" in self.chainPart['L2IDAlg']:
       [trkfast, trkprec] = TrigInDetFTKSequence("Muon","muon",sequenceFlavour=["refit","PT"]).getSequence()
@@ -791,6 +784,13 @@ class L2EFChain_mu(L2EFChainDef):
     EFinputTE = ''
 
     if "L2Star" in self.chainPart['L2IDAlg']:                             # ---> this is Run1 tracking - keep it here
+      from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_MuonA     # ---> this is Run1 tracking - keep it here
+      theTrigL2SiTrackFinder_MuonA = TrigL2SiTrackFinder_MuonA()
+      from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_MuonB
+      theTrigL2SiTrackFinder_MuonB = TrigL2SiTrackFinder_MuonB()
+      from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_MuonC
+      theTrigL2SiTrackFinder_MuonC = TrigL2SiTrackFinder_MuonC()
+
       self.L2sequenceList += [[['L2_mu_step1'],
                                [theTrigL2SiTrackFinder_MuonA, 
                                 theTrigL2SiTrackFinder_MuonB,
diff --git a/docs/TreeViewTemplate.html b/docs/TreeViewTemplate.html
new file mode 100644
index 0000000000000000000000000000000000000000..0433a1f2e9c58584a459d58b5d071adbd6e22a82
--- /dev/null
+++ b/docs/TreeViewTemplate.html
@@ -0,0 +1,48 @@
+<html>
+
+<head>
+    <title></title>
+    <link rel="stylesheet" href="tree/screen.css">
+    <link rel="stylesheet" href="tree/jquery.treeview.css">
+    <script src="tree/jquery.js" type="text/javascript"></script>
+    <script src="tree/jquery.cookie.js" type="text/javascript"></script>
+    <script src="tree/jquery.treeview.js" type="text/javascript"></script>
+    <script>
+    $(document).ready(function(){
+        $("#browser").treeview({
+        control: "#tree_control_",
+        collapsed: true,
+	animated: 100
+        });
+    });
+    </script>	
+    <style>
+    body{margin:4px 8px;}
+    a { text-decoration: none;}
+    a:link, a:visited {color: blue;}
+    a:hover {color: red;}
+    </style>
+</head>
+
+<body>
+<table border="0" cellspacing="0" style="font-size: 11px;">
+<tr>
+<td>
+<div id="tree_control_" style="padding:5px">
+    <a title="Collapse the entire tree below" href="#"> Collapse All</a>
+    <a title="Expand the entire tree below" href="#"> Expand All</a>
+</div>
+</td>
+<!-- <td><a target="_blank" href="" id="twiki" style="vertical-align: middle;"><img src="tree/twiki.gif" /></a></td> -->
+</tr>
+</table>
+
+<!-- Tree -->
+<ul id="browser" class="filetree treeview">
+%s
+
+</ul>
+<!-- Tree -->
+
+</body>
+</html>
diff --git a/docs/createGrid.py b/docs/createGrid.py
new file mode 100644
index 0000000000000000000000000000000000000000..a0d2cd1b55633512916a3673464bb4be0edd5071
--- /dev/null
+++ b/docs/createGrid.py
@@ -0,0 +1,215 @@
+import os
+indexfile = "html/index.html"
+docsfile  = "html/doxygen.css"
+
+rootdir = os.path.abspath('./')
+rootdir+='/'
+print rootdir
+
+path = rootdir + '/docs/'
+
+def ReadFile(fileName, pathFlag = True):
+#   """This method reads file directly or from path."""
+   if pathFlag:
+     print("Read:", path+fileName)
+     f = open(path+fileName)
+   else:
+     f = open(path+fileName)
+     print("Read:", path+fileName)
+   data = f.read()
+   f.close()
+   return data
+
+
+def HTMLTreeBegin( title, links = {}):
+   html = '\n<li>\n<div class="hitarea expandable-hitarea"></div>\n'
+   html = html + '<span class="folder">%s\n' % title
+   for i in links.keys():
+     html = html + '<a target="_blank" href="%s">[%s]</a> \n' % (links[i], i)
+   html = html + '</span>\n'
+   html = html + '<ul style="display: block;">\n'
+   return html
+
+def WriteFile( fileName, data):
+#   This method writes data
+   print("Write:", path + fileName)
+   f = open(path + fileName, "w")
+   f.write(data)
+   f.close()
+
+def HTMLTreeEnd():
+   return '</li></ul>\n\n'
+
+def Fixcssfile( filename ):
+   addition = """/** atlas insert **/
+.doxyTable{
+    border-collapse:collapse;
+    border:1px solid lightBlue;
+    width: 70%;
+    margin:0 auto;
+}
+
+.doxyTable tr:not(:first-child) {
+    background: #eeeeff;
+    border-spacing: 0px;
+    padding: 0px;
+    border-bottom: 1px solid #c1c1dc;
+}
+
+.doxyTable tr:hover {
+    background: #cde4ec;
+}
+
+.doxyTable td {
+    padding:8px;
+    cursor:pointer;
+}
+
+.accordion {
+    display: none;
+    width: 100%;
+}
+
+div.content {}
+
+div.content h1, h2 {
+    text-align: center;
+}
+"""
+   text = ReadFile(filename)
+   if("/** atlas insert **/" in text):
+      print "Skipping rewriting css"
+      return
+   text += addition
+   WriteFile(filename, text)
+
+def __NewTreePage( domain, package):
+   content = ''
+   content += HTMLTreeBegin(domain)
+   for i in package[domain]:
+     content += HTMLTreeAddItem(i, 'https://gitlab.cern.ch/atlas/athena/tree/master/' + domain + '/'+ i, folder = True)
+   content += HTMLTreeEnd()
+
+   temp = treePageTamplate % (content)
+   WriteFile("html/iframes/%s.html" % domain.lower().replace(' ', '_'), temp)
+
+def CreateNewMainPage(outputFileName, packagemap):
+   contents = """
+<script>function changeState(item) {
+    item.slideToggle("slow");
+}
+
+$( document ).ready(function() {
+    $(".doxyTable > tbody > tr").each(function(){
+        var row = $(this);
+        // skip first row (header), you dont need to assing it accordion
+        // trigger function. it is also the same for rows which doesn't have
+        // id attribute. if a row doesn't have id attr, that means it is
+        // accordion row
+        if(row.attr('id') == 'header' || !row.attr('id')) return;
+
+        // if it has id attribute, assign trigger function
+        row.click(function(){
+            $('div#'+row.attr('id')).slideToggle(256);
+            // we dont want to load whole iframes before they are showed
+            var iframe = $('div#'+row.attr('id')).find('iframe');
+            // no need to set the source again again if already set
+            if(iframe.attr('src')) return;
+
+            iframe.attr('src', iframe.attr('data-src'));
+        });
+    });
+});</script>
+
+   <table class="doxyTable" border="0" cellpadding="0" cellspacing="0">
+   <tr class="top" valign="top">
+   <th class="domain">Domain</th>
+   </tr>
+   """
+   keysI = sorted(packagemap.keys())
+
+
+   for i in keysI:
+      if i=='': continue
+#      contents = contents + '\n<tr class="DCRow">\n'    ######### TAG: TR1
+#      contents = contents + """<td width="50%%" style="padding:8px;cursor:pointer" onclick="toggleHoba('hoba_%s', 'iframes/%s.html')" id="hoba_%s"><a>%s</a></td>\n""" % (i.replace(' ', '_'), i.lower().replace(' ', '_'), i.replace(' ', '_'), i)
+#      contents = contents + '</td>\n'
+#      contents = contents + '</tr>\n\n'               ######### TAG: TR1
+#      contents = contents + """<tr><td colspan="2" style="background:#d7dbe3">
+#        <div style="display:none;" id="hoba_%s_div"><iframe width="100%%" frameborder="0"></iframe></div>
+#        </td></tr>""" % (i.replace(' ', '_'))
+      tagsafe = i.replace(' ', '_')
+      tagsafelc = i.lower().replace(' ', '_')
+
+      basic = """<tr id="{0}"><td width="50%">{0}</td></tr><tr style="padding:0"><td colspan="2" style="padding:0">
+<div class="accordion" id="{0}">
+<iframe width="100%" height="250px" frameborder="0" data-src="iframes/{1}.html"> </iframe>
+</div></td></tr>"""
+      basic = basic.format(tagsafe, tagsafelc)
+      contents += basic
+
+   contents += "</table>"
+   stamp = "</div></div><!-- contents -->"
+   contents += stamp
+   mainPageTemplate = ReadFile(indexfile)
+#   print mainPageTemplate
+   WriteFile(outputFileName, mainPageTemplate.replace(stamp, contents))
+
+def HTMLTreeAddItem( title, links = None, endNode = False, folder = False):
+    if endNode: html = '\t<li class="last">'
+    else: html = '\t<li>'
+    
+    if isinstance(links, str) or isinstance(links, type(u'')):
+        if folder:
+            html = html + '\t<a href="%s" target="_blank" class=""><span class="emptyFolder">%s</span></a>\n' % (links, title)
+        else:
+            html = html + '\t<a href="%s" target="_blank" class=""><span class="file">%s</span></a>\n' % (links, title)
+    elif isinstance(links, dict):
+         if folder:
+            html = html + '<span class="emptyFolder">%s ' % title
+         else:
+             html = html + '<span class="file">%s ' % title
+         for i in links.keys():
+             html = html + '<a target="_blank" href="%s">[%s]</a> \n' % (links[i], i)
+         html = html + '</span>'
+    else:
+        html = html + '\t<span class="file">%s</span>\n' % title
+    return html + '\t</li>\n'
+        
+
+
+
+
+#packagelist=[]
+packagemap ={}
+
+for subdir, dirs, files in os.walk(rootdir):
+    if 'CMakeLists.txt' in files :
+#       packagelist.append(subdir);
+       package =  subdir[len(rootdir):]
+       i = package.find('/')
+       if i<0 : i=0
+       category = package[0: i ]
+       if category in packagemap:
+          packagemap[category].append(package[i+1:])
+       else:
+          packagemap[category] = [package[i+1:]]
+#       print package
+
+#for st in packagelist:
+#   print st;
+#print packagemap
+#print treePageTamplate
+framesdir = path+ 'html/iframes'
+if not os.path.exists(framesdir):
+    os.makedirs(framesdir)
+#category = 
+treePageTamplate=ReadFile("TreeViewTemplate.html", pathFlag = True)
+for k in packagemap.keys():
+   __NewTreePage(str(k), packagemap);
+
+
+
+CreateNewMainPage(indexfile, packagemap)
+Fixcssfile(docsfile)
+
diff --git a/graphics/VP1/VP1Base/src/VP1Collection.cxx b/graphics/VP1/VP1Base/src/VP1Collection.cxx
index c7b3975e3595823b65421ab988ab74e7ae659511..1672b8ed46e3188e66dec9f69585631b2fabdd08 100644
--- a/graphics/VP1/VP1Base/src/VP1Collection.cxx
+++ b/graphics/VP1/VP1Base/src/VP1Collection.cxx
@@ -107,9 +107,11 @@ VP1CollStates VP1Collection::getStates(QList<VP1Collection*> cols)
 //____________________________________________________________________
 void VP1Collection::applyStates(QList<VP1Collection*> cols, const VP1CollStates& states)
 {
+	VP1Msg::messageDebug("VP1Collection::applyStates() - start...");
   foreach (VP1Collection* col,cols)
     if (states.contains(col->persistifiableID()))
       col->setState(states.value(col->persistifiableID()));
+	VP1Msg::messageDebug("VP1Collection::applyStates() - end.");
 }
 
 //____________________________________________________________________
diff --git a/graphics/VP1/VP1Base/src/vp1etaphicutform.ui b/graphics/VP1/VP1Base/src/vp1etaphicutform.ui
index ed702cea85932f1c97f0dc35278acc9216f87101..e0299135971a5a566c30968c41392ef89e7cd529 100644
--- a/graphics/VP1/VP1Base/src/vp1etaphicutform.ui
+++ b/graphics/VP1/VP1Base/src/vp1etaphicutform.ui
@@ -17,7 +17,16 @@
    <property name="spacing">
     <number>6</number>
    </property>
-   <property name="margin">
+   <property name="leftMargin">
+    <number>0</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>0</number>
+   </property>
+   <property name="bottomMargin">
     <number>0</number>
    </property>
    <item>
@@ -124,7 +133,7 @@
              <double>-99.989999999999995</double>
             </property>
             <property name="maximum">
-             <double>0.000000000000000</double>
+             <double>99.000000000000000</double>
             </property>
             <property name="singleStep">
              <double>0.100000000000000</double>
@@ -150,7 +159,7 @@
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
             <property name="minimum">
-             <double>0.000000000000000</double>
+             <double>-99.000000000000000</double>
             </property>
             <property name="singleStep">
              <double>0.100000000000000</double>
diff --git a/graphics/VP1/VP1Gui/CMakeLists.txt b/graphics/VP1/VP1Gui/CMakeLists.txt
index 4836ccc674de0b22e12fe1f7b07196d337fa7568..c4a375db06b8ddb3873bc498f268d520fa5b88be 100644
--- a/graphics/VP1/VP1Gui/CMakeLists.txt
+++ b/graphics/VP1/VP1Gui/CMakeLists.txt
@@ -15,7 +15,7 @@ atlas_depends_on_subdirs(
    )
 
 # External dependencies:
-find_package( Qt5 COMPONENTS Core OpenGL Gui Network PrintSupport HINTS ${QT5_ROOT} )
+find_package( Qt5 COMPONENTS Core OpenGL Gui Network PrintSupport Widgets )
 find_package( Coin3D )
 find_package( SoQt )
 
diff --git a/graphics/VP1/VP1Gui/VP1Gui/VP1Authenticator.h b/graphics/VP1/VP1Gui/VP1Gui/VP1Authenticator.h
index c177fbae5b3b3b26515988b3dee8e63ac6d494b9..7eb9caf063c7d8f9235afc18612aaff15de4ef80 100644
--- a/graphics/VP1/VP1Gui/VP1Gui/VP1Authenticator.h
+++ b/graphics/VP1/VP1Gui/VP1Gui/VP1Authenticator.h
@@ -14,7 +14,7 @@
 #ifndef VP1AUTHENTICATOR_H
 #define VP1AUTHENTICATOR_H
 
-#include "ui_vp1authenticator.h"
+#include "../src/ui_vp1authenticator.h"
 
 #include <QObject>
 #include <QDialog>
diff --git a/graphics/VP1/VP1Gui/VP1Gui/VP1MainWindow.h b/graphics/VP1/VP1Gui/VP1Gui/VP1MainWindow.h
index d70dad7f6131421138d1f1909d45debdfb93e0b4..7c6a48ee98f952fd479906a78504086b56c75ea1 100644
--- a/graphics/VP1/VP1Gui/VP1Gui/VP1MainWindow.h
+++ b/graphics/VP1/VP1Gui/VP1Gui/VP1MainWindow.h
@@ -15,8 +15,8 @@
 #ifndef VP1MainWindow_H
 #define VP1MainWindow_H
 
-// include VP1 Qt views
-#include "ui_vp1mainwindow.h"
+// include the related GUI
+#include "../src/ui_vp1mainwindow.h"
 
 // include VP1
 #include "VP1Gui/VP1TcpServer.h"
diff --git a/graphics/VP1/VP1Gui/VP1Gui/vp1authenticator.ui b/graphics/VP1/VP1Gui/VP1Gui/vp1authenticator.ui
deleted file mode 100644
index 21c8e392025e3b85de2e9aa4568ab6b7a34d8cf3..0000000000000000000000000000000000000000
--- a/graphics/VP1/VP1Gui/VP1Gui/vp1authenticator.ui
+++ /dev/null
@@ -1,209 +0,0 @@
-<ui version="4.0" >
- <class>dlgAuthentication</class>
- <widget class="QDialog" name="dlgAuthentication" >
-  <property name="windowModality" >
-   <enum>Qt::ApplicationModal</enum>
-  </property>
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>380</width>
-    <height>447</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>Login</string>
-  </property>
-  <property name="sizeGripEnabled" >
-   <bool>false</bool>
-  </property>
-  <property name="modal" >
-   <bool>false</bool>
-  </property>
-  <layout class="QGridLayout" name="gridLayout_3" >
-   <item row="0" column="0" colspan="3" >
-    <widget class="QLabel" name="lblTitle" >
-     <property name="font" >
-      <font>
-       <pointsize>12</pointsize>
-      </font>
-     </property>
-     <property name="text" >
-      <string>Please enter your NICE login and password</string>
-     </property>
-     <property name="alignment" >
-      <set>Qt::AlignCenter</set>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0" >
-    <spacer name="horizontalSpacer_5" >
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeHint" stdset="0" >
-      <size>
-       <width>32</width>
-       <height>20</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="1" column="1" >
-    <widget class="QWidget" native="1" name="wdgBackground" >
-     <layout class="QGridLayout" name="gridLayout_2" >
-      <item row="0" column="0" >
-       <spacer name="horizontalSpacer" >
-        <property name="orientation" >
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0" >
-         <size>
-          <width>18</width>
-          <height>52</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item row="0" column="1" colspan="2" >
-       <layout class="QGridLayout" name="gridLayout" >
-        <item row="0" column="0" >
-         <widget class="QLabel" name="lblPers" >
-          <property name="text" >
-           <string>Login</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1" >
-         <widget class="QLineEdit" name="inpPers" />
-        </item>
-        <item row="1" column="0" >
-         <widget class="QLabel" name="lblPhr" >
-          <property name="text" >
-           <string>Password</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="1" >
-         <widget class="QLineEdit" name="inpPhr" >
-          <property name="echoMode" >
-           <enum>QLineEdit::Password</enum>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-      <item row="0" column="3" >
-       <spacer name="horizontalSpacer_2" >
-        <property name="orientation" >
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0" >
-         <size>
-          <width>28</width>
-          <height>52</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item row="1" column="0" >
-       <spacer name="horizontalSpacer_3" >
-        <property name="orientation" >
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0" >
-         <size>
-          <width>18</width>
-          <height>24</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item row="1" column="1" >
-       <widget class="QPushButton" name="pbtnLogin" >
-        <property name="text" >
-         <string>Login</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="2" >
-       <widget class="QPushButton" name="pbtnCancel" >
-        <property name="text" >
-         <string>Cancel</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="3" >
-       <spacer name="horizontalSpacer_4" >
-        <property name="orientation" >
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0" >
-         <size>
-          <width>28</width>
-          <height>24</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item row="2" column="0" colspan="4" >
-       <widget class="QTextEdit" name="teditError" >
-        <property name="enabled" >
-         <bool>true</bool>
-        </property>
-        <property name="autoFillBackground" >
-         <bool>false</bool>
-        </property>
-        <property name="readOnly" >
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="3" column="2" >
-       <spacer name="verticalSpacer_2" >
-        <property name="orientation" >
-         <enum>Qt::Vertical</enum>
-        </property>
-        <property name="sizeHint" stdset="0" >
-         <size>
-          <width>20</width>
-          <height>40</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="1" column="2" >
-    <spacer name="horizontalSpacer_6" >
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeHint" stdset="0" >
-      <size>
-       <width>31</width>
-       <height>20</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="2" column="1" >
-    <spacer name="verticalSpacer" >
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0" >
-      <size>
-       <width>20</width>
-       <height>35</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/graphics/VP1/VP1Gui/VP1Gui/vp1mainwindow.ui b/graphics/VP1/VP1Gui/VP1Gui/vp1mainwindow.ui
deleted file mode 100644
index 16e2408a78516bc715e3f500c5f5ed8b5dd49ddd..0000000000000000000000000000000000000000
--- a/graphics/VP1/VP1Gui/VP1Gui/vp1mainwindow.ui
+++ /dev/null
@@ -1,853 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>VP1MainWindow</class>
- <widget class="QMainWindow" name="VP1MainWindow">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>1002</width>
-    <height>650</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Virtual Point 1</string>
-  </property>
-  <property name="windowIcon">
-   <iconset resource="vp1.qrc">
-    <normaloff>:/vp1/icons/icons/3d_32x32.png</normaloff>:/vp1/icons/icons/3d_32x32.png</iconset>
-  </property>
-  <widget class="QWidget" name="centralwidget">
-   <layout class="QVBoxLayout">
-    <property name="leftMargin">
-     <number>6</number>
-    </property>
-    <property name="topMargin">
-     <number>5</number>
-    </property>
-    <property name="rightMargin">
-     <number>7</number>
-    </property>
-    <property name="bottomMargin">
-     <number>0</number>
-    </property>
-    <item>
-     <widget class="QSplitter" name="splitter_leftright">
-      <property name="orientation">
-       <enum>Qt::Horizontal</enum>
-      </property>
-      <widget class="QWidget" name="widget_controlsContainer" native="true">
-       <layout class="QVBoxLayout">
-        <property name="spacing">
-         <number>4</number>
-        </property>
-        <property name="leftMargin">
-         <number>0</number>
-        </property>
-        <property name="topMargin">
-         <number>3</number>
-        </property>
-        <property name="rightMargin">
-         <number>0</number>
-        </property>
-        <property name="bottomMargin">
-         <number>0</number>
-        </property>
-        <item>
-         <widget class="QGroupBox" name="groupBox_channelcontrols">
-          <property name="enabled">
-           <bool>false</bool>
-          </property>
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="title">
-           <string>Controls - No channel selected</string>
-          </property>
-          <layout class="QVBoxLayout">
-           <property name="spacing">
-            <number>6</number>
-           </property>
-           <property name="margin">
-            <number>4</number>
-           </property>
-           <item>
-            <layout class="QHBoxLayout">
-             <property name="spacing">
-              <number>6</number>
-             </property>
-             <property name="margin">
-              <number>0</number>
-             </property>
-             <item>
-              <widget class="QPushButton" name="pushButton_channelfullscreen">
-               <property name="toolTip">
-                <string>Show current channel fullscreen</string>
-               </property>
-               <property name="text">
-                <string/>
-               </property>
-               <property name="icon">
-                <iconset resource="vp1.qrc">
-                 <normaloff>:/vp1/icons/icons/window_fullscreen_32x32.png</normaloff>:/vp1/icons/icons/window_fullscreen_32x32.png</iconset>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <widget class="QPushButton" name="pushButton_channelinformation">
-               <property name="text">
-                <string/>
-               </property>
-               <property name="icon">
-                <iconset resource="vp1.qrc">
-                 <normaloff>:/vp1/icons/icons/info_32x32.png</normaloff>:/vp1/icons/icons/info_32x32.png</iconset>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <spacer>
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>1</width>
-                 <height>20</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-             <item>
-              <widget class="QPushButton" name="pushButton_printchannel">
-               <property name="toolTip">
-                <string>Print channel snapshot</string>
-               </property>
-               <property name="text">
-                <string/>
-               </property>
-               <property name="icon">
-                <iconset resource="vp1.qrc">
-                 <normaloff>:/vp1/icons/icons/fileprint_32x32.png</normaloff>:/vp1/icons/icons/fileprint_32x32.png</iconset>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <widget class="QPushButton" name="pushButton_savesnapshotchannel">
-               <property name="toolTip">
-                <string>Save channel snapshot to image file</string>
-               </property>
-               <property name="text">
-                <string/>
-               </property>
-               <property name="icon">
-                <iconset resource="vp1.qrc">
-                 <normaloff>:/vp1/icons/icons/camera.png</normaloff>:/vp1/icons/icons/camera.png</iconset>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <widget class="QPushButton" name="pushButton_saveAllChannels">
-               <property name="toolTip">
-                <string>Save all tabs/channels as images in different files</string>
-               </property>
-               <property name="text">
-                <string/>
-               </property>
-               <property name="icon">
-                <iconset resource="vp1.qrc">
-                 <normaloff>:/vp1/icons/icons/window_list_32x32.png</normaloff>:/vp1/icons/icons/window_list_32x32.png</iconset>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <spacer name="horizontalSpacer_3">
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>40</width>
-                 <height>20</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-             <item>
-              <widget class="QPushButton" name="pushButton_makeEventDisplay">
-               <property name="toolTip">
-                <string>Combine current tabs/channels into a single event display</string>
-               </property>
-               <property name="text">
-                <string/>
-               </property>
-               <property name="icon">
-                <iconset resource="vp1.qrc">
-                 <normaloff>:/vp1/icons/icons/event_display_32x32.png</normaloff>:/vp1/icons/icons/event_display_32x32.png</iconset>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <widget class="QPushButton" name="pushButton_3D">
-               <property name="toolTip">
-                <string>Open the 3D Stereo tools</string>
-               </property>
-               <property name="text">
-                <string/>
-               </property>
-               <property name="icon">
-                <iconset resource="vp1.qrc">
-                 <normaloff>:/vp1/icons/icons/3D_mode_24x24.png</normaloff>:/vp1/icons/icons/3D_mode_24x24.png</iconset>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </item>
-           <item>
-            <widget class="Line" name="line">
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QStackedWidget" name="stackedWidget_customcontrols">
-             <widget class="QWidget" name="page"/>
-             <widget class="QWidget" name="page_2"/>
-            </widget>
-           </item>
-          </layout>
-         </widget>
-        </item>
-        <item>
-         <widget class="QGroupBox" name="groupBox_cruise">
-          <property name="enabled">
-           <bool>false</bool>
-          </property>
-          <property name="title">
-           <string>Cruise Mode [off]</string>
-          </property>
-          <layout class="QHBoxLayout">
-           <item>
-            <layout class="QHBoxLayout">
-             <property name="spacing">
-              <number>0</number>
-             </property>
-             <item>
-              <widget class="QRadioButton" name="radioButton_cruise_event">
-               <property name="text">
-                <string>Evt</string>
-               </property>
-               <property name="checked">
-                <bool>true</bool>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <widget class="QRadioButton" name="radioButton_cruise_tab">
-               <property name="text">
-                <string>Tab</string>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <widget class="QRadioButton" name="radioButton_cruise_both">
-               <property name="text">
-                <string>Both</string>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </item>
-           <item>
-            <spacer>
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>1</width>
-               <height>10</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-          </layout>
-         </widget>
-        </item>
-        <item>
-         <widget class="QGroupBox" name="groupBox_event">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="title">
-           <string>Event [No event loaded]</string>
-          </property>
-          <layout class="QHBoxLayout">
-           <property name="spacing">
-            <number>6</number>
-           </property>
-           <property name="margin">
-            <number>4</number>
-           </property>
-           <item>
-            <widget class="QPushButton" name="pushButton_eventseek">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
-             <property name="text">
-              <string>Seek</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QSpinBox" name="spinBox_cruise">
-             <property name="alignment">
-              <set>Qt::AlignRight</set>
-             </property>
-             <property name="suffix">
-              <string> s</string>
-             </property>
-             <property name="minimum">
-              <number>1</number>
-             </property>
-             <property name="maximum">
-              <number>999</number>
-             </property>
-             <property name="value">
-              <number>10</number>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QPushButton" name="pushButton_cruise">
-             <property name="focusPolicy">
-              <enum>Qt::NoFocus</enum>
-             </property>
-             <property name="text">
-              <string/>
-             </property>
-             <property name="icon">
-              <iconset resource="vp1.qrc">
-               <normaloff>:/vp1/icons/icons/redo_32x32.png</normaloff>:/vp1/icons/icons/redo_32x32.png</iconset>
-             </property>
-             <property name="checkable">
-              <bool>true</bool>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QPushButton" name="pushButton_nextevent">
-             <property name="toolTip">
-              <string>Proceed to next event [Ctrl-N]</string>
-             </property>
-             <property name="text">
-              <string/>
-             </property>
-             <property name="icon">
-              <iconset resource="vp1.qrc">
-               <normaloff>:/vp1/icons/icons/forward_32x32.png</normaloff>:/vp1/icons/icons/forward_32x32.png</iconset>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <spacer>
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>40</width>
-               <height>20</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-          </layout>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QSplitter" name="splitter_tabwidget_messagebox">
-       <property name="frameShape">
-        <enum>QFrame::NoFrame</enum>
-       </property>
-       <property name="lineWidth">
-        <number>0</number>
-       </property>
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-       <widget class="QStackedWidget" name="stackedWidget_central">
-        <property name="frameShape">
-         <enum>QFrame::NoFrame</enum>
-        </property>
-        <property name="lineWidth">
-         <number>0</number>
-        </property>
-        <property name="currentIndex">
-         <number>1</number>
-        </property>
-        <widget class="QWidget" name="page_tabwidget">
-         <layout class="QVBoxLayout">
-          <item>
-           <widget class="VP1TabWidget" name="tabWidget_central">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Ignored" vsizetype="Ignored">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="minimumSize">
-             <size>
-              <width>200</width>
-              <height>200</height>
-             </size>
-            </property>
-            <property name="currentIndex">
-             <number>-1</number>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-        <widget class="QWidget" name="page_instructions">
-         <layout class="QVBoxLayout">
-          <item>
-           <widget class="QFrame" name="frame_instructions">
-            <property name="frameShape">
-             <enum>QFrame::StyledPanel</enum>
-            </property>
-            <property name="frameShadow">
-             <enum>QFrame::Raised</enum>
-            </property>
-            <layout class="QVBoxLayout" name="verticalLayout_2">
-             <property name="spacing">
-              <number>0</number>
-             </property>
-             <item>
-              <spacer name="verticalSpacer_2">
-               <property name="orientation">
-                <enum>Qt::Vertical</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>20</width>
-                 <height>1</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-             <item>
-              <layout class="QHBoxLayout" name="horizontalLayout_2">
-               <property name="spacing">
-                <number>0</number>
-               </property>
-               <item>
-                <spacer name="horizontalSpacer">
-                 <property name="orientation">
-                  <enum>Qt::Horizontal</enum>
-                 </property>
-                 <property name="sizeType">
-                  <enum>QSizePolicy::Expanding</enum>
-                 </property>
-                 <property name="sizeHint" stdset="0">
-                  <size>
-                   <width>1</width>
-                   <height>20</height>
-                  </size>
-                 </property>
-                </spacer>
-               </item>
-               <item>
-                <layout class="QVBoxLayout" name="verticalLayout">
-                 <property name="spacing">
-                  <number>13</number>
-                 </property>
-                 <item>
-                  <widget class="QLabel" name="label">
-                   <property name="maximumSize">
-                    <size>
-                     <width>500</width>
-                     <height>16777215</height>
-                    </size>
-                   </property>
-                   <property name="text">
-                    <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:14pt; font-weight:600; font-style:italic;&quot;&gt;Welcome to Virtual Point 1&lt;/span&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt; font-weight:600; font-style:italic;&quot;&gt; &lt;/span&gt;&lt;a href=&quot;[http://cern.ch/atlas-vp1]&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;[http://cern.ch/atlas-vp1]&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;VP1 is now uses plugins to  process and present the data and&lt;/p&gt;
-&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;detector information which is available in the ATHENA process it runs on top of.&lt;/p&gt;
-&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Most users should proceed by selecting one of these modes:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                   </property>
-                  </widget>
-                 </item>
-                 <item>
-                  <layout class="QHBoxLayout" name="horizontalLayout">
-                   <property name="spacing">
-                    <number>0</number>
-                   </property>
-                   <item>
-                    <spacer>
-                     <property name="orientation">
-                      <enum>Qt::Horizontal</enum>
-                     </property>
-                     <property name="sizeType">
-                      <enum>QSizePolicy::Expanding</enum>
-                     </property>
-                     <property name="sizeHint" stdset="0">
-                      <size>
-                       <width>1</width>
-                       <height>20</height>
-                      </size>
-                     </property>
-                    </spacer>
-                   </item>
-                   <item>
-                    <layout class="QGridLayout" name="gridLayout">
-                     <property name="spacing">
-                      <number>2</number>
-                     </property>
-                     <item row="0" column="0" colspan="3">
-                      <widget class="QPushButton" name="pushButton_quicksetup_3dcocktail">
-                       <property name="toolTip">
-                        <string>Launch the VP13DCocktailPlugin within a new tab</string>
-                       </property>
-                       <property name="text">
-                        <string>All studies</string>
-                       </property>
-                      </widget>
-                     </item>
-                     <item row="1" column="0">
-                      <widget class="QPushButton" name="pushButton_quicksetup_trackingstudies">
-                       <property name="toolTip">
-                        <string>Launch the VP1TrackPlugin within a new tab</string>
-                       </property>
-                       <property name="text">
-                        <string>Tracking only studies</string>
-                       </property>
-                      </widget>
-                     </item>
-                     <item row="1" column="1">
-                      <widget class="QPushButton" name="pushButton_quicksetup_calostudies">
-                       <property name="toolTip">
-                        <string>Launch the VP1CaloPlugin within a new tab</string>
-                       </property>
-                       <property name="text">
-                        <string>Calo only studies</string>
-                       </property>
-                      </widget>
-                     </item>
-                     <item row="1" column="2">
-                      <widget class="QPushButton" name="pushButton_quicksetup_geometrystudies">
-                       <property name="toolTip">
-                        <string>Launch the VP1GeometryPlugin within a new tab</string>
-                       </property>
-                       <property name="text">
-                        <string>Geometry studies</string>
-                       </property>
-                      </widget>
-                     </item>
-                     <item row="2" column="0" colspan="3">
-                      <widget class="QPushButton" name="pushButton_quicksetup_analysisstudies">
-                       <property name="toolTip">
-                        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Launch the Analysis Object (AOD) plugin within a new tab.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                       </property>
-                       <property name="text">
-                        <string>Analysis Object (AOD) only studies</string>
-                       </property>
-                      </widget>
-                     </item>
-                    </layout>
-                   </item>
-                   <item>
-                    <spacer>
-                     <property name="orientation">
-                      <enum>Qt::Horizontal</enum>
-                     </property>
-                     <property name="sizeType">
-                      <enum>QSizePolicy::Expanding</enum>
-                     </property>
-                     <property name="sizeHint" stdset="0">
-                      <size>
-                       <width>1</width>
-                       <height>20</height>
-                      </size>
-                     </property>
-                    </spacer>
-                   </item>
-                  </layout>
-                 </item>
-                 <item>
-                  <widget class="QLabel" name="label_2">
-                   <property name="maximumSize">
-                    <size>
-                     <width>500</width>
-                     <height>16777215</height>
-                    </size>
-                   </property>
-                   <property name="text">
-                    <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
-&lt;tr&gt;
-&lt;td style=&quot;border: none;&quot;&gt;
-&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;Advanced users might wish to take full advantage of the flexible configuration&lt;/span&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;capabilities of VP1 by loading and configuring plugins via the &amp;quot;Quick Launch&amp;quot;&lt;/span&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;and &amp;quot;Configuration&amp;quot; menus, and by right-clicking tabs.&lt;/span&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;Note that it is possible &lt;/span&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;to save and load configurations &lt;/span&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;from the &amp;quot;Configuration&amp;quot; menu.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                   </property>
-                  </widget>
-                 </item>
-                </layout>
-               </item>
-               <item>
-                <spacer name="horizontalSpacer_2">
-                 <property name="orientation">
-                  <enum>Qt::Horizontal</enum>
-                 </property>
-                 <property name="sizeType">
-                  <enum>QSizePolicy::Expanding</enum>
-                 </property>
-                 <property name="sizeHint" stdset="0">
-                  <size>
-                   <width>1</width>
-                   <height>20</height>
-                  </size>
-                 </property>
-                </spacer>
-               </item>
-              </layout>
-             </item>
-             <item>
-              <spacer name="verticalSpacer">
-               <property name="orientation">
-                <enum>Qt::Vertical</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>20</width>
-                 <height>1</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-            </layout>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </widget>
-       <widget class="VP1TextBrowser" name="textBrowser_channelmessages">
-        <property name="toolTip">
-         <string>Message box. Displays messages from channels and systems.</string>
-        </property>
-        <property name="html">
-         <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
-&lt;tr&gt;
-&lt;td style=&quot;border: none;&quot;&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
-        </property>
-        <property name="textInteractionFlags">
-         <set>Qt::TextSelectableByMouse</set>
-        </property>
-       </widget>
-      </widget>
-     </widget>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QMenuBar" name="menubar">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>1002</width>
-     <height>25</height>
-    </rect>
-   </property>
-   <widget class="QMenu" name="menuConfiguration">
-    <property name="title">
-     <string>&amp;Configuration</string>
-    </property>
-    <addaction name="separator"/>
-   </widget>
-   <widget class="QMenu" name="menu_Style">
-    <property name="title">
-     <string>&amp;Style</string>
-    </property>
-   </widget>
-   <widget class="QMenu" name="menuQuick_Launch">
-    <property name="title">
-     <string>&amp;Quick Launch</string>
-    </property>
-    <addaction name="action_quicklaunch_3dcocktail"/>
-    <addaction name="action_quicklaunch_Tracking_studies"/>
-    <addaction name="action_quicklaunch_Calo_studies"/>
-    <addaction name="action_quicklaunch_Geometry_studies"/>
-    <addaction name="action_quicklaunch_trackcalo_commis"/>
-    <addaction name="action_quicklaunch_Storegate_browser"/>
-    <addaction name="separator"/>
-    <addaction name="action_exit_VP1"/>
-   </widget>
-   <addaction name="menuQuick_Launch"/>
-   <addaction name="menuConfiguration"/>
-   <addaction name="menu_Style"/>
-  </widget>
-  <widget class="QStatusBar" name="statusbar"/>
-  <action name="actionLoad_plugin">
-   <property name="text">
-    <string>Load plugin</string>
-   </property>
-  </action>
-  <action name="actionAdd_empty_tab2">
-   <property name="text">
-    <string>&amp;Add empty tab</string>
-   </property>
-  </action>
-  <action name="actionInfo_about_loaded_plugins">
-   <property name="enabled">
-    <bool>false</bool>
-   </property>
-   <property name="text">
-    <string>&amp;Info about loaded plugins</string>
-   </property>
-  </action>
-  <action name="actionLaunch_config_dialog">
-   <property name="text">
-    <string>Launch &amp;config dialog</string>
-   </property>
-  </action>
-  <action name="actionLoad_tab_configuration_from_file">
-   <property name="text">
-    <string>&amp;Load tab configuration from file</string>
-   </property>
-  </action>
-  <action name="actionSave_current_tabs2">
-   <property name="text">
-    <string>&amp;Save current tab configuration to file</string>
-   </property>
-  </action>
-  <action name="actionDummyLoadPlugSubMenu">
-   <property name="text">
-    <string>DummyLoadPlugSubMenu</string>
-   </property>
-  </action>
-  <action name="actionLoad_Plugin">
-   <property name="text">
-    <string>Load Plugin</string>
-   </property>
-  </action>
-  <action name="action_quicklaunch_Tracking_studies">
-   <property name="text">
-    <string>&amp;Tracking only studies</string>
-   </property>
-   <property name="statusTip">
-    <string>Launch a tab with a track channel</string>
-   </property>
-  </action>
-  <action name="action_quicklaunch_Calo_studies">
-   <property name="text">
-    <string>&amp;Calo only studies</string>
-   </property>
-   <property name="statusTip">
-    <string>Launch a tab with a calo cells channel</string>
-   </property>
-  </action>
-  <action name="action_quicklaunch_Geometry_studies">
-   <property name="text">
-    <string>&amp;Geometry studies</string>
-   </property>
-   <property name="statusTip">
-    <string>Launch a tab with a geometry channel</string>
-   </property>
-  </action>
-  <action name="action_exit_VP1">
-   <property name="text">
-    <string>E&amp;xit VP1</string>
-   </property>
-   <property name="statusTip">
-    <string>Close down VP1</string>
-   </property>
-  </action>
-  <action name="action_quicklaunch_Storegate_browser">
-   <property name="text">
-    <string>&amp;Storegate browser</string>
-   </property>
-   <property name="statusTip">
-    <string>Launch a tab with a banks channel</string>
-   </property>
-  </action>
-  <action name="action_quicklaunch_3dcocktail">
-   <property name="text">
-    <string>&amp;All studies (3D cocktail)</string>
-   </property>
-  </action>
-  <action name="action_quicklaunch_trackcalo_commis">
-   <property name="text">
-    <string>T&amp;rack/Calo commis. studies</string>
-   </property>
-  </action>
-  <action name="action_file_Add_event_file">
-   <property name="text">
-    <string>&amp;Add event file ...</string>
-   </property>
-  </action>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>VP1TabWidget</class>
-   <extends>QTabWidget</extends>
-   <header>VP1Base/VP1TabWidget.h</header>
-   <container>1</container>
-  </customwidget>
-  <customwidget>
-   <class>VP1TextBrowser</class>
-   <extends>QTextBrowser</extends>
-   <header>VP1Gui/VP1TextBrowser.h</header>
-  </customwidget>
- </customwidgets>
- <tabstops>
-  <tabstop>pushButton_channelfullscreen</tabstop>
-  <tabstop>pushButton_channelinformation</tabstop>
-  <tabstop>radioButton_cruise_event</tabstop>
-  <tabstop>radioButton_cruise_tab</tabstop>
-  <tabstop>radioButton_cruise_both</tabstop>
-  <tabstop>spinBox_cruise</tabstop>
-  <tabstop>pushButton_nextevent</tabstop>
-  <tabstop>pushButton_eventseek</tabstop>
-  <tabstop>tabWidget_central</tabstop>
-  <tabstop>textBrowser_channelmessages</tabstop>
- </tabstops>
- <resources>
-  <include location="vp1.qrc"/>
- </resources>
- <connections/>
-</ui>
diff --git a/graphics/VP1/VP1Gui/src/VP1Authenticator.cxx b/graphics/VP1/VP1Gui/src/VP1Authenticator.cxx
index a0254f938de1f970b54c1396347fa84f18bc5dc1..7f725f9300fe51a4a86a8730f74cd9f320d4100b 100644
--- a/graphics/VP1/VP1Gui/src/VP1Authenticator.cxx
+++ b/graphics/VP1/VP1Gui/src/VP1Authenticator.cxx
@@ -3,6 +3,7 @@
 */
 
 #include "VP1Gui/VP1Authenticator.h"
+
 #include "VP1Base/VP1QtUtils.h"
 
 #include <QNetworkAccessManager>
diff --git a/graphics/VP1/VP1Gui/src/VP1MainWindow.cxx b/graphics/VP1/VP1Gui/src/VP1MainWindow.cxx
index b5299d206761574168b9908707d2b6eb84b518f8..9eae4f616a5f615a442547ea54a3f1824cca2786 100644
--- a/graphics/VP1/VP1Gui/src/VP1MainWindow.cxx
+++ b/graphics/VP1/VP1Gui/src/VP1MainWindow.cxx
@@ -13,6 +13,7 @@
 /////////////////////////////////////////////////////////////
 
 #include "VP1Gui/VP1MainWindow.h"
+
 #include "VP1Gui/VP1ChannelManager.h"
 #include "VP1Gui/VP1TabManager.h"
 #include "VP1Gui/VP1ExecutionScheduler.h"
@@ -910,7 +911,8 @@ void VP1MainWindow::setRunEvtNumber(const int& r, const unsigned long long& e, c
 				+ QString(time>0 ? ", time: "+QDateTime::fromTime_t(time).toString(Qt::ISODate).replace('T',' ') : "")
 				+ QString(m_currentStream.isEmpty()?"":", "+m_currentStream);
 		setWindowTitle("Virtual Point 1 ["+expandedevtstr+"]");
-		groupBox_event->setTitle("Event ["+evtstr+"]");
+		groupBox_event->setTitle("Event [loaded]");
+		label_run_event->setText("["+evtstr+"]");
 
 		addToMessageBox("New event: "+expandedevtstr,"color:#ff0000");
 
diff --git a/graphics/VP1/VP1Gui/src/vp1mainwindow.ui b/graphics/VP1/VP1Gui/src/vp1mainwindow.ui
index 16e2408a78516bc715e3f500c5f5ed8b5dd49ddd..080aba0ec67858f2f0c8fecb772ab4c415da5afa 100644
--- a/graphics/VP1/VP1Gui/src/vp1mainwindow.ui
+++ b/graphics/VP1/VP1Gui/src/vp1mainwindow.ui
@@ -71,7 +71,16 @@
            <property name="spacing">
             <number>6</number>
            </property>
-           <property name="margin">
+           <property name="leftMargin">
+            <number>4</number>
+           </property>
+           <property name="topMargin">
+            <number>4</number>
+           </property>
+           <property name="rightMargin">
+            <number>4</number>
+           </property>
+           <property name="bottomMargin">
             <number>4</number>
            </property>
            <item>
@@ -79,7 +88,16 @@
              <property name="spacing">
               <number>6</number>
              </property>
-             <property name="margin">
+             <property name="leftMargin">
+              <number>0</number>
+             </property>
+             <property name="topMargin">
+              <number>0</number>
+             </property>
+             <property name="rightMargin">
+              <number>0</number>
+             </property>
+             <property name="bottomMargin">
               <number>0</number>
              </property>
              <item>
@@ -178,7 +196,7 @@
              <item>
               <widget class="QPushButton" name="pushButton_makeEventDisplay">
                <property name="toolTip">
-                <string>Combine current tabs/channels into a single event display</string>
+                <string>Event Display Editor: Combine current tabs/channels into a single event display, with logo and event details, ready for publication.</string>
                </property>
                <property name="text">
                 <string/>
@@ -292,81 +310,108 @@
            <property name="spacing">
             <number>6</number>
            </property>
-           <property name="margin">
+           <property name="leftMargin">
+            <number>4</number>
+           </property>
+           <property name="topMargin">
+            <number>4</number>
+           </property>
+           <property name="rightMargin">
+            <number>4</number>
+           </property>
+           <property name="bottomMargin">
             <number>4</number>
            </property>
            <item>
-            <widget class="QPushButton" name="pushButton_eventseek">
-             <property name="enabled">
-              <bool>false</bool>
-             </property>
-             <property name="text">
-              <string>Seek</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QSpinBox" name="spinBox_cruise">
-             <property name="alignment">
-              <set>Qt::AlignRight</set>
-             </property>
-             <property name="suffix">
-              <string> s</string>
-             </property>
-             <property name="minimum">
-              <number>1</number>
-             </property>
-             <property name="maximum">
-              <number>999</number>
-             </property>
-             <property name="value">
-              <number>10</number>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QPushButton" name="pushButton_cruise">
-             <property name="focusPolicy">
-              <enum>Qt::NoFocus</enum>
-             </property>
-             <property name="text">
-              <string/>
-             </property>
-             <property name="icon">
-              <iconset resource="vp1.qrc">
-               <normaloff>:/vp1/icons/icons/redo_32x32.png</normaloff>:/vp1/icons/icons/redo_32x32.png</iconset>
-             </property>
-             <property name="checkable">
-              <bool>true</bool>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QPushButton" name="pushButton_nextevent">
-             <property name="toolTip">
-              <string>Proceed to next event [Ctrl-N]</string>
-             </property>
-             <property name="text">
-              <string/>
-             </property>
-             <property name="icon">
-              <iconset resource="vp1.qrc">
-               <normaloff>:/vp1/icons/icons/forward_32x32.png</normaloff>:/vp1/icons/icons/forward_32x32.png</iconset>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <spacer>
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>40</width>
-               <height>20</height>
-              </size>
-             </property>
-            </spacer>
+            <layout class="QVBoxLayout" name="verticalLayout_3">
+             <item>
+              <widget class="QLabel" name="label_run_event">
+               <property name="text">
+                <string>TextLabel</string>
+               </property>
+               <property name="textInteractionFlags">
+                <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <layout class="QHBoxLayout" name="horizontalLayout_3">
+               <item>
+                <widget class="QPushButton" name="pushButton_nextevent">
+                 <property name="toolTip">
+                  <string>Proceed to next event [Ctrl-N]</string>
+                 </property>
+                 <property name="text">
+                  <string/>
+                 </property>
+                 <property name="icon">
+                  <iconset resource="vp1.qrc">
+                   <normaloff>:/vp1/icons/icons/forward_32x32.png</normaloff>:/vp1/icons/icons/forward_32x32.png</iconset>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QPushButton" name="pushButton_eventseek">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                 <property name="text">
+                  <string>Seek</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QPushButton" name="pushButton_cruise">
+                 <property name="focusPolicy">
+                  <enum>Qt::NoFocus</enum>
+                 </property>
+                 <property name="text">
+                  <string/>
+                 </property>
+                 <property name="icon">
+                  <iconset resource="vp1.qrc">
+                   <normaloff>:/vp1/icons/icons/redo_32x32.png</normaloff>:/vp1/icons/icons/redo_32x32.png</iconset>
+                 </property>
+                 <property name="checkable">
+                  <bool>true</bool>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QSpinBox" name="spinBox_cruise">
+                 <property name="alignment">
+                  <set>Qt::AlignRight</set>
+                 </property>
+                 <property name="suffix">
+                  <string> s</string>
+                 </property>
+                 <property name="minimum">
+                  <number>1</number>
+                 </property>
+                 <property name="maximum">
+                  <number>999</number>
+                 </property>
+                 <property name="value">
+                  <number>10</number>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <spacer>
+                 <property name="orientation">
+                  <enum>Qt::Horizontal</enum>
+                 </property>
+                 <property name="sizeHint" stdset="0">
+                  <size>
+                   <width>40</width>
+                   <height>20</height>
+                  </size>
+                 </property>
+                </spacer>
+               </item>
+              </layout>
+             </item>
+            </layout>
            </item>
           </layout>
          </widget>
@@ -661,19 +706,22 @@ p, li { white-space: pre-wrap; }
          <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
 &lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
 &lt;tr&gt;
 &lt;td style=&quot;border: none;&quot;&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
 &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
 &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
 &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
 &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
         </property>
         <property name="textInteractionFlags">
          <set>Qt::TextSelectableByMouse</set>
@@ -690,7 +738,7 @@ p, li { white-space: pre-wrap; }
      <x>0</x>
      <y>0</y>
      <width>1002</width>
-     <height>25</height>
+     <height>22</height>
     </rect>
    </property>
    <widget class="QMenu" name="menuConfiguration">
@@ -840,9 +888,6 @@ p, li { white-space: pre-wrap; }
   <tabstop>radioButton_cruise_event</tabstop>
   <tabstop>radioButton_cruise_tab</tabstop>
   <tabstop>radioButton_cruise_both</tabstop>
-  <tabstop>spinBox_cruise</tabstop>
-  <tabstop>pushButton_nextevent</tabstop>
-  <tabstop>pushButton_eventseek</tabstop>
   <tabstop>tabWidget_central</tabstop>
   <tabstop>textBrowser_channelmessages</tabstop>
  </tabstops>
diff --git a/graphics/VP1/VP1Systems/VP1AODSystems/VP1AODSystems/JetCollectionSettingsButton.h b/graphics/VP1/VP1Systems/VP1AODSystems/VP1AODSystems/JetCollectionSettingsButton.h
index 1329680f9480998dd106e2d0052b2087338b191c..d860ec6b007fbe5da8dcfdb3f7dc6c5c28714c43 100644
--- a/graphics/VP1/VP1Systems/VP1AODSystems/VP1AODSystems/JetCollectionSettingsButton.h
+++ b/graphics/VP1/VP1Systems/VP1AODSystems/VP1AODSystems/JetCollectionSettingsButton.h
@@ -141,7 +141,9 @@ private:
   void enableRandomColours(bool);
 
   void emitRerandomise();
-  //	void emitMaxR();
+
+  void checkSelection();
+
     
 };
 
diff --git a/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleCollHandle_Jet.cxx b/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleCollHandle_Jet.cxx
index 3824b13797e8ffb773b6dbf4672772cc23b10b23..95f34ab32809e62ca3df79ad63fd092078170d77 100644
--- a/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleCollHandle_Jet.cxx
+++ b/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleCollHandle_Jet.cxx
@@ -201,9 +201,6 @@ void IParticleCollHandle_Jet::init(VP1MaterialButtonBase*)
   //  m_d->bTaggingTexture->ref();
   //  m_d->bTaggingMaterial->ref();
 
-  //updateBTaggingAllJets();
-  //==========
-
 }
 
 
@@ -240,7 +237,6 @@ void IParticleCollHandle_Jet::setupSettingsFromControllerSpecific(AODSystemContr
 
   // maxR
   connect(controller, SIGNAL(maxRChanged(const double&)), this, SLOT(setMaxR(const double&)));
-//  connect(controller, SIGNAL(signalMaxR(bool)), this, SLOT(setIsMaxR(bool)));
 
   // b-tagging
   connect(controller, SIGNAL(bTaggingEnabledChanged(const bool&)), this, SLOT(setBTaggingEnabled(const bool&)));
@@ -328,14 +324,19 @@ void IParticleCollHandle_Jet::setMaxR(const double& maxR)
   messageVerbose("IParticleCollHandle_Jet::setMaxR() - maxR: " + QString::number(maxR));
   //	messageVerbose("setMaxR to: " + str(maxR)+str(", from: ")+str(m_d->maxR));
 
-  if (m_d->maxR == maxR) // no changes
+  if (m_d->maxR == maxR){ // no changes
+    messageDebug("no changes, returning...");
     return;
+    }
 
   m_d->maxR = maxR;
 
-  if (!isLoaded())
+  if (!isLoaded()) {
+    messageDebug("is not loaded, returning...");
     return;
+    }
 
+  messageDebug("modifying MaxR for all jets...");
   largeChangesBegin();
   handleIterationBegin();
   AODHandleBase* handle=0;
@@ -812,6 +813,8 @@ void IParticleCollHandle_Jet::resetCachedValuesCuts()
 	setBTaggingEnabled(m_d->collSettingsButton->bTaggingEnabled());
 	setBTaggingTagger(m_d->collSettingsButton->bTaggingTagger());
 	setBTaggingCut(m_d->collSettingsButton->bTaggingCut());
+	// maxR
+	setMaxR(m_d->collSettingsButton->maxR());
 }
 
 void IParticleCollHandle_Jet::dumpToJSON( std::ofstream& str) const {
diff --git a/graphics/VP1/VP1Systems/VP1AODSystems/src/JetCollectionSettingsButton.cxx b/graphics/VP1/VP1Systems/VP1AODSystems/src/JetCollectionSettingsButton.cxx
index 0dceacadb81f50cf86efc8d98c7280bfc4cf8f4c..94e268465519ce18bfaa4e39ecc0af07e0d2bbc2 100644
--- a/graphics/VP1/VP1Systems/VP1AODSystems/src/JetCollectionSettingsButton.cxx
+++ b/graphics/VP1/VP1Systems/VP1AODSystems/src/JetCollectionSettingsButton.cxx
@@ -320,8 +320,7 @@ JetCollectionSettingsButton::JetCollectionSettingsButton(QWidget * parent,int di
 	connect(m_d->ui_disp.checkBox_maxR, SIGNAL(toggled(bool)), this, SLOT(enableMaxR(bool)));
 	connect(m_d->ui_disp.checkBox_maxR, SIGNAL(toggled(bool)), this, SLOT(possibleChange_maxR()));
 	connect(m_d->ui_disp.doubleSpinBox_maxR, SIGNAL(valueChanged(double)), this, SLOT(possibleChange_maxR()));
-	this->enableMaxR(false);
-
+	this->enableMaxR(false); // init
 
 	// BTagging
 	connect(m_d->ui_disp.bTaggingCheckBox, SIGNAL(toggled(bool)), this, SLOT(possibleChange_bTaggingEnabled(bool)) );
@@ -719,17 +718,40 @@ void JetCollectionSettingsButton::restoreFromState( const QByteArray& ba){
 
 	updateButton();
 
-	// after restoring the state, check if b-tagging checkbox is enabled,
+	// after restoring the state, check status of selection cuts
+	checkSelection();
+
+
+}
+
+//____________________________________________________________________
+void JetCollectionSettingsButton::checkSelection()
+{
+	messageDebug("JetCollectionSettingsButton::checkSelection()");
+
+    // -- b-tagging settings/cuts
 	messageDebug("updating b-tagging status for collection " + m_d->name + "...");
 	if (m_d->ui_disp.bTaggingCheckBox->isChecked()) {
 		possibleChange_bTaggingEnabled(true); // init the b-tagging toolbox as active
-
+		possibleChange_bTaggingCut();
+		if (m_d->ui_disp.radioButton_material->isChecked())
+			possibleChange_bTaggingRenderingMaterial(true);
+		else if (m_d->ui_disp.radioButton_skins->isChecked())
+			possibleChange_bTaggingRenderingSkin(true);
+		possibleChange_bTaggingTagger();
 	}
 	else
 		possibleChange_bTaggingEnabled(false); // init the b-tagging toolbox as not-active
 
-
-	//FIXME - anything else need updating?
+	// -- other cuts
+	messageDebug("updating other selection cuts for collection " + m_d->name + "...");
+    possibleChange_maxR();
+    possibleChange_cutAllowedEta();
+    possibleChange_cutAllowedPhi();
+    possibleChange_cutAllowedPt();
+    possibleChange_scale();
+    possibleChange_randomJetColours();
+    //FIXME - anything else need updating?
 }
 
 //____________________________________________________________________
@@ -879,7 +901,7 @@ void JetCollectionSettingsButton::possibleChange_maxR()
 		return;
 	}
 
-	messageVerbose("setting maxR");
+	messageDebug("setting maxR: "+QString::number(maxR()));
 	m_d->last_maxR = maxR();
 	emit maxRChanged(m_d->last_maxR);
 }
diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollectionSettingsButton.cxx b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollectionSettingsButton.cxx
index 4e09010a0f12518eec88ed88b6af3cab1670979d..d5797609eb590281379fb314e32b0aec5713c3e9 100644
--- a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollectionSettingsButton.cxx
+++ b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollectionSettingsButton.cxx
@@ -35,7 +35,7 @@ public:
   Imp():theclass(0),editwindow(0),matButton(0), trackDrawStyle(0), trackLightModel(0),
   last_trackTubeRadius(0.0),last_cutTruthFromIROnly{}, last_cutExcludeBarcodeZero{}, 
   last_cutTruthExcludeNeutrals{},last_cutOnlyVertexAssocTracks{},last_useDefaultCuts{},
-  dim(0){
+  dim(0), serialization_version(0){
     //nop
   }
   TrackCollectionSettingsButton * theclass;
@@ -64,6 +64,8 @@ public:
   QPoint dragStartPosition;
   
   void initEditWindow();
+
+  int serialization_version;
 };
 
 //____________________________________________________________________
@@ -94,6 +96,10 @@ TrackCollectionSettingsButton::TrackCollectionSettingsButton(QWidget * parent,in
   m_d->theclass = this;
   m_d->initEditWindow();
   
+  // declare the current serialization version number
+  m_d->serialization_version = 2;
+
+
   //Draw Styles / Complexity:
   VP1QtInventorUtils::setLimitsLineWidthSlider(m_d->editwindow_ui.horizontalSlider_trackWidth);
   VP1QtInventorUtils::setValueLineWidthSlider(m_d->editwindow_ui.horizontalSlider_trackWidth,1.0);  
@@ -384,7 +390,10 @@ void TrackCollectionSettingsButton::dropEvent(QDropEvent *event)
 QByteArray TrackCollectionSettingsButton::saveState() const{
   // messageVerbose("getState");
   // if (m_d->editwindow_ui.checkBox_tracksUseBaseLightModel->isChecked()) messageVerbose("checked!");
-  VP1Serialise serialise(2/*version*/);
+  
+  // start serializing data with the current version number,
+  // which is declared in the contructor
+  VP1Serialise serialise(m_d->serialization_version/*version*/);
   
   serialise.save(m_d->matButton);  
   // serialise.disableUnsavedChecks();
@@ -427,8 +436,11 @@ QByteArray TrackCollectionSettingsButton::saveState() const{
 void TrackCollectionSettingsButton::restoreFromState( const QByteArray& ba){
    
   VP1Deserialise state(ba,systemBase());
-  if (state.version()<0||state.version()>1)
+
+  if (state.version()<0||state.version()>2) {
+    message("Version of 'TrackCollectionSettingsButton' settings file not recognized: "+QString::number(state.version())+" [current: "+QString::number(m_d->serialization_version)+"]. Ignoring...");
     return;//Ignore silently
+    }
   state.restore(m_d->matButton);
   state.restore(m_d->editwindow_ui.horizontalSlider_trackWidth);
   state.restore(m_d->editwindow_ui.checkBox_trackTubes);
diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackSystemController.cxx b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackSystemController.cxx
index 29f40270ed14166b767935565002803ebc454790..79eb76b499545b3c55ecbde5d40bc1d31914be00 100644
--- a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackSystemController.cxx
+++ b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackSystemController.cxx
@@ -9,6 +9,7 @@
 //                                                            //
 //  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
 //  Initial version: February 2008                            //
+//  Updates: Riccardo Maria Bianchi (rbianchi@cern.ch)        //
 //                                                            //
 ////////////////////////////////////////////////////////////////
 
@@ -284,21 +285,6 @@ TrackSystemController::TrackSystemController(IVP1System * sys)
   m_d->ui_cuts.etaPhiCutWidget->setSystemBasePointer(systemBase());
 
   //Draw Styles / Complexity:
-  // VP1QtInventorUtils::setLimitsLineWidthSlider(m_d->ui_col.horizontalSlider_trackWidth);
-  // VP1QtInventorUtils::setValueLineWidthSlider(m_d->ui_col.horizontalSlider_trackWidth,1.0);
-  // VP1QtInventorUtils::setLimitsLineWidthSlider(m_d->ui_ascobjs.horizontalSlider_linewidths);
-  // VP1QtInventorUtils::setValueLineWidthSlider(m_d->ui_ascobjs.horizontalSlider_linewidths,1.0);
-  // VP1QtInventorUtils::setLimitsPointSizeSlider(m_d->ui_ascobjs.horizontalSlider_pointsizes);
-  // VP1QtInventorUtils::setValuePointSizeSlider(m_d->ui_ascobjs.horizontalSlider_pointsizes,3.0);
-
-  // m_d->trackDrawStyle = new SoDrawStyle;
-  // m_d->trackDrawStyle->setName("TrackDrawStyle");
-  // m_d->trackDrawStyle->ref();
-  //  updateTrackDrawStyle();
-
-  // addUpdateSlot(SLOT(updateTrackDrawStyle()));
-  // connectToLastUpdateSlot(m_d->ui_col.horizontalSlider_trackWidth);
-
   m_d->ascObjDrawStyle = new SoDrawStyle;
   m_d->ascObjDrawStyle->setName("AscObjDrawStyle");
   m_d->ascObjDrawStyle->ref();
@@ -312,26 +298,12 @@ TrackSystemController::TrackSystemController(IVP1System * sys)
   addUpdateSlot(SLOT(updateAscObjComplexity()));
   connectToLastUpdateSlot(m_d->ui_ascobjs.horizontalSlider_complexity);
 
-  // m_d->trackLightModel = new SoLightModel;
-  // m_d->trackLightModel->setName("TrackLightModel");
-  // m_d->trackLightModel->ref();
-  // addUpdateSlot(SLOT(updateTrackLightModel()));
-  // connectToLastUpdateSlot(m_d->ui_col.checkBox_tracksUseBaseLightModel);
-
   //Refit ui is dependent on env variable:
   m_d->ui_int.radioButton_selmode_trackfits->setVisible(VP1QtUtils::environmentVariableIsOn("VP1_DEVEL_ENABLEREFIT"));
   m_d->ui_int.groupBox_refitting->setEnabled(VP1QtUtils::environmentVariableIsOn("VP1_DEVEL_ENABLEREFIT"));
   connect(m_d->ui_int.comboBox_fitterMode,SIGNAL(currentIndexChanged(int)),this,SLOT(updateFitPRDButtonState()));
   
-  //m_d->ui_ascobjs.checkBox_usecolour_meas_outliers->setEnabled(false);
-  //m_d->ui_ascobjs.matButton_meas_outliers->setEnabled(false);
-  //m_d->ui_ascobjs.horizontalSlider_materialeffectsontrack_scale->setEnabled(false);
-  //m_d->ui_ascobjs.label_mateffects_scale->setEnabled(false);
-  // m_d->ui_ascobjs.checkBox_materialeffectsontrack_forceposontrack->setEnabled(false);
-  // m_d->ui_extrap.groupBox_otheroptions->setEnabled(false);
-  // m_d->ui_extrap.radioButton_helical->setEnabled(false);
-
-
+ 
   //Disable elements based on job configuration:
 
   if (!VP1JobConfigInfo::hasMuonGeometry()) {
@@ -627,10 +599,11 @@ SoMaterial * TrackSystemController::Imp::createMaterial(const int& r,const int&
 }
 
 //____________________________________________________________________
+
 void TrackSystemController::Imp::initMaterials()
 {
   //By PID => Electrons and muons:.
-  ui_col.matButton_electrons->setMaterial(createMaterial(205,103,255));//purple
+  ui_col.matButton_electrons->setMaterial(createMaterial(255,0,0)); //red; //(205,103,255));//purple
   ui_col.matButton_muons->setMaterial(createMaterial(71,255,51));//green
 
   //By PID => Charged: bluish colours