diff --git a/AtlasTest/ControlTest/CMakeLists.txt b/AtlasTest/ControlTest/CMakeLists.txt
index 640297314970e4bdeccb13dfedb67dcff25bdd7e..9b4b0e7c0c50b9bcdff5204a6f18fc85010f6efd 100644
--- a/AtlasTest/ControlTest/CMakeLists.txt
+++ b/AtlasTest/ControlTest/CMakeLists.txt
@@ -127,6 +127,12 @@ atlas_add_test( test_interactive_athena
    PROPERTIES TIMEOUT 300
    EXTRA_PATTERNS "^Py:ConfigurableDb +(WARNING|INFO|ERROR)|Py:Athena +INFO including file |Warning in .TEnvRec::ChangeValue.: duplicate entry|calling initialize_|ToolSvc.finalize.. +INFO| [A-Z]+ 2[0-9][0-9][0-9]$$|^Py:Athena +INFO|[Rr]oo[Ff]it|NIKHEF|DeprecationWarning: object.__new__|^  newobj =|^\*+$$|drop-and-reload|^ *$$|we will keep the configuration around|ApplicationMgr +INFO|Start StoreGateSvc|already in TClassTable" )
 
+atlas_add_test( test_cfgItemList
+                SCRIPT test/test_cfgItemList.sh )
+
+atlas_add_test( test_keyStore
+                SCRIPT test/test_keyStore.sh )
+
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/StoreGateTestCommon.txt share/*.py )
diff --git a/AtlasTest/ControlTest/share/ProxyProviderSvc_test.ref b/AtlasTest/ControlTest/share/ProxyProviderSvc_test.ref
index 8930ae1ace3b43b7bd2b687d13bae4b0d6ed7773..bd6986a7717ea9410bc609bcd51dcc567a1a25ad 100644
--- a/AtlasTest/ControlTest/share/ProxyProviderSvc_test.ref
+++ b/AtlasTest/ControlTest/share/ProxyProviderSvc_test.ref
@@ -20,7 +20,7 @@ ApplicationMgr      DEBUG Getting my own properties
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
-                                          running on karma on Fri Jul 13 02:23:28 2018
+                                          running on karma on Tue Jul 17 15:42:25 2018
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ServiceManager      DEBUG Initializing service DetectorStore
@@ -30,8 +30,8 @@ DetectorStore       DEBUG trying to create store SGImplSvc/DetectorStore_Impl
 EventPersistenc...  DEBUG  'CnvServices':[ 'ToyConversionSvc' ]
 EventPersistenc...  DEBUG Service base class initialized successfully
 ClassIDSvc          DEBUG Service base class initialized successfully
-ClassIDSvc           INFO  getRegistryEntries: read 1976 CLIDRegistry entries for module ALL
-ClassIDSvc          DEBUG processCLIDDB: read 693 entries from CLIDDB file: /home/sss/atlas/dvtest/build/share/clid.db
+ClassIDSvc           INFO  getRegistryEntries: read 2468 CLIDRegistry entries for module ALL
+ClassIDSvc          DEBUG processCLIDDB: read 702 entries from CLIDDB file: /home/sss/atlas/dvtest/build/share/clid.db
 ProxyProviderSvc  VERBOSE Initializing ProxyProviderSvc - package version SGComps-00-00-00
 ProxyProviderSvc  VERBOSE ServiceLocatorHelper::service: found service EventPersistencySvc
 ServiceManager      DEBUG Initializing service HistoryStore
@@ -60,7 +60,7 @@ StoreGateSvc_Impl VERBOSE Initializing StoreGateSvc_Impl - package version Store
 StoreGateSvc_Impl   DEBUG Service base class initialized successfully
 StoreGateSvc_Impl VERBOSE ServiceLocatorHelper::service: found service EventPersistencySvc
 StoreGateSvc_Impl VERBOSE ServiceLocatorHelper::service: found service ClassIDSvc
-StoreGateSvc_Impl   DEBUG  Bound handle 0x7fff16ebac50 to proxy 0x162efe0
+StoreGateSvc_Impl   DEBUG  Bound handle 0x7ffc9a030060 to proxy 0x955930
 ToyConversionSvc    DEBUG Service base class initialized successfully
 EventPersistenc...VERBOSE ServiceLocatorHelper::service: found service ToyConversionSvc
 EventPersistenc...   INFO Added successfully Conversion service:ToyConversionSvc
@@ -68,29 +68,29 @@ ClassIDSvc           INFO  getRegistryEntries: read 374 CLIDRegistry entries for
 <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
 SGImplSvc(StoreGateSvc_Impl)::dump():
 Found 1 proxy for ClassID 8107 (Bar): 
- flags: (  valid,   locked,  reset) --- data:  0x1630c20 --- key: aBar
+ flags: (  valid,   locked,  reset) --- data:   0x957570 --- key: aBar
 <<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
 
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object aFoo  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved const pointer to object aFoo  of type Foo(CLID 8101)
 Now we expect to see an error message:
 ----Error Message Starts--->>
 ToyConversionSvc     INFO No converter for object   CLID= 8109
 DataProxy         WARNING accessData: conversion failed for data object 8109/aFooBar
  Returning NULL DataObject pointer  
-SG::DataProxy_castWARNING this proxy 0x1640bb0 has a NULL data object ptr
+SG::DataProxy_castWARNING this proxy 0x967500 has a NULL data object ptr
 <<---Error Message Ends-------
 *** ProxyProviderSvc_test OK ***
 *** ProxyProviderSvc_test RecordBeforeRead BEGINS ***
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-DataProxy         VERBOSE requestRelease():  reset object aBar CLID 8107 address 0x1630c20
-DataProxy         VERBOSE requestRelease():  reset object aFoo CLID 8101 address 0x163d680
+DataProxy         VERBOSE requestRelease():  reset object aBar CLID 8107 address 0x957570
+DataProxy         VERBOSE requestRelease():  reset object aFoo CLID 8101 address 0x963fd0
 DataProxy         VERBOSE requestRelease():  reset object aFooBar CLID 8109 address 0
 StoreGateSvc_Impl WARNING record_impl: you are recording an object with key existingFoo, type Foo (CLID 8101)
  There is already a persistent version of this object. Recording a duplicate may lead to unreproducible results and it is deprecated.
-StoreGateSvc_Impl   DEBUG Recorded object @0x162f2c0 with key existingFoo of type Foo(CLID 8101)
- in DataObject @0x163d680
+StoreGateSvc        DEBUG Recorded object @0x955c10 with key existingFoo of type Foo(CLID 8101)
+ in DataObject @0x963fd0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object existingFoo  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved const pointer to object existingFoo  of type Foo(CLID 8101)
 6.28
 *** ProxyProviderSvc_test RecordBeforeRead OK ***
 
@@ -103,27 +103,26 @@ Now we expect to see an error message:
 <<---Error Message Ends-------
 StoreGateSvc_Impl WARNING record_impl: you are recording an object with key privFoo, type Foo (CLID 8101)
  There is already a persistent version of this object. Recording a duplicate may lead to unreproducible results and it is deprecated.
-StoreGateSvc_Impl   DEBUG Recorded object @0x164b1a0 with key privFoo of type Foo(CLID 8101)
- in DataObject @0x1649540
+StoreGateSvc        DEBUG Recorded object @0x971af0 with key privFoo of type Foo(CLID 8101)
+ in DataObject @0x96fe90
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG overwrite: Recorded object @0x162fe10 with key privFoo of type Foo(CLID 8101)
- in DataObject @0x1641470
+StoreGateSvc        DEBUG overwrite: Recorded object @0x971ab0 with key privFoo of type Foo(CLID 8101)
+ in DataObject @0x967d80
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object privFoo  of type Foo(CLID 8101)
-StoreGateSvc_Impl   DEBUG Recorded object @0x164b160 with key silly33 of type Foo(CLID 8101)
- in DataObject @0x16434f0
+StoreGateSvc        DEBUG Retrieved non-const pointer to object privFoo  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Recorded object @0x971ad0 with key silly33 of type Foo(CLID 8101)
+ in DataObject @0x969e00
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object silly33  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object silly33  of type Foo(CLID 8101)
 Now we expect to see an error message:
 ----Error Message Starts--->>
 StoreGateSvc_Impl WARNING SGImplSvc::typeless_readPrivateCopy: did not find object of type Foo with key silly33
 SG::fromStorable  WARNING null input pointer 
 <<---Error Message Ends-------
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object silly33  of type Foo(CLID 8101)
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object silly33  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object silly33  of type Foo(CLID 8101)
 Now we expect to see an error message:
 ----Error Message Starts--->>
-StoreGateSvc_Impl WARNING retrieve(non-const): No valid proxy for object silly33  of type Foo(CLID 8101) 
+StoreGateSvc      WARNING retrieve(non-const): No valid proxy for object silly33  of type Foo(CLID 8101) 
  Try to use a const retrieve
 <<---Error Message Ends-------
 *** ProxyProviderSvc_test readPrivate OK ***
@@ -133,9 +132,9 @@ Now we expect to see an error message:
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
 DataProxy         VERBOSE requestRelease():  release  object aBar CLID 8107 address 0
 DataProxy         VERBOSE requestRelease():  release  object silly33 CLID 8101 address 0
-DataProxy         VERBOSE requestRelease():  release  object privFoo CLID 8101 address 0x1641470
+DataProxy         VERBOSE requestRelease():  release  object privFoo CLID 8101 address 0x967d80
 DataProxy         VERBOSE requestRelease():  release  object diskFoo CLID 8101 address 0
-DataProxy         VERBOSE requestRelease():  release  object existingFoo CLID 8101 address 0x163d680
+DataProxy         VERBOSE requestRelease():  release  object existingFoo CLID 8101 address 0x963fd0
 DataProxy         VERBOSE requestRelease():  release  object aFooBar CLID 8109 address 0
 DataProxy         VERBOSE requestRelease():  release  object aFoo CLID 8101 address 0
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
@@ -153,28 +152,28 @@ StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
 DataProxy         VERBOSE requestRelease():  release  object NOT_HLTAutoKey_3 CLID 8101 address 0
 DataProxy         VERBOSE requestRelease():  release  object HLTAutoKey_1 CLID 8101 address 0
 =============Event #0 starts
-StoreGateSvc_Impl   DEBUG overwrite: Recorded object @0x164b160 with key toOverwrite of type FooBar(CLID 8109)
- in DataObject @0x163f2c0
+StoreGateSvc        DEBUG overwrite: Recorded object @0x971ad0 with key toOverwrite of type FooBar(CLID 8109)
+ in DataObject @0x965c10
  object modifiable when retrieved
 Overwritten FooBar i=0
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-DataProxy         VERBOSE requestRelease():  release  object toOverwrite CLID 8109 address 0x163f2c0
+DataProxy         VERBOSE requestRelease():  release  object toOverwrite CLID 8109 address 0x965c10
 FooBar i=0 deleted
 =============Event #1 starts
-StoreGateSvc_Impl   DEBUG overwrite: Recorded object @0x162ee10 with key toOverwrite of type FooBar(CLID 8109)
- in DataObject @0x163f2c0
+StoreGateSvc        DEBUG overwrite: Recorded object @0x949920 with key toOverwrite of type FooBar(CLID 8109)
+ in DataObject @0x965c10
  object modifiable when retrieved
 Overwritten FooBar i=1
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-DataProxy         VERBOSE requestRelease():  release  object toOverwrite CLID 8109 address 0x163f2c0
+DataProxy         VERBOSE requestRelease():  release  object toOverwrite CLID 8109 address 0x965c10
 FooBar i=1 deleted
 =============Event #2 starts
-StoreGateSvc_Impl   DEBUG overwrite: Recorded object @0x16493b0 with key toOverwrite of type FooBar(CLID 8109)
- in DataObject @0x163f2c0
+StoreGateSvc        DEBUG overwrite: Recorded object @0x96fd00 with key toOverwrite of type FooBar(CLID 8109)
+ in DataObject @0x965c10
  object modifiable when retrieved
 Overwritten FooBar i=2
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-DataProxy         VERBOSE requestRelease():  release  object toOverwrite CLID 8109 address 0x163f2c0
+DataProxy         VERBOSE requestRelease():  release  object toOverwrite CLID 8109 address 0x965c10
 FooBar i=2 deleted
 *** ProxyProviderSvc_test Overwrite OK ***
 
diff --git a/AtlasTest/ControlTest/share/StoreGateSvcClient_test.ref b/AtlasTest/ControlTest/share/StoreGateSvcClient_test.ref
index b61b8b553826fa02b63e2981b2cb0a52b3eeb780..c1d593439c50e201a14be2db8ca3547e7afc4817 100644
--- a/AtlasTest/ControlTest/share/StoreGateSvcClient_test.ref
+++ b/AtlasTest/ControlTest/share/StoreGateSvcClient_test.ref
@@ -12,10 +12,10 @@ JobOptionsSvc        INFO Job options successfully read in from ../share/StoreGa
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
-                                          running on karma on Mon Jul 16 11:42:43 2018
+                                          running on karma on Tue Jul 17 15:37:37 2018
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-ClassIDSvc           INFO  getRegistryEntries: read 2472 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2474 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.
@@ -31,100 +31,100 @@ StoreGateSvc_Impl   DEBUG Service base class initialized successfully
 StoreGateSvc_Impl VERBOSE ServiceLocatorHelper::service: found service EventPersistencySvc
 StoreGateSvc_Impl VERBOSE ServiceLocatorHelper::service: found service ClassIDSvc
 *** StoreGateSvcClient_test record BEGINS ***
-StoreGateSvc_Impl   DEBUG Recorded object @0x16588f0 with key pFoo1 of type Foo(CLID 8101)
- in DataObject @0x1658e10
+StoreGateSvc        DEBUG Recorded object @0xfe9900 with key pFoo1 of type Foo(CLID 8101)
+ in DataObject @0xfe9e20
  object modifiable when retrieved
 Now we expect to see an error message:
 ----Error Message Starts--->>
 StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key pFoo1 and clid 8101
- Pre-existing valid DataProxy @0x1658f80 found in Store for key pFoo1 with clid 8101
+ Pre-existing valid DataProxy @0xfe9f90 found in Store for key pFoo1 with clid 8101
 ClassIDSvc           INFO  getRegistryEntries: read 372 CLIDRegistry entries for module ALL
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x1658ef0
- recorded with key pFoo1 of type Foo (CLID 8101) in DataObject @0x16597e0
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0xfea620
+ recorded with key pFoo1 of type Foo (CLID 8101) in DataObject @0xfea7d0
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
 StoreGateSvc_Impl WARNING record_impl: failed for key=pFoo2, type Foo (CLID 8101)
- object @0x16588f0 already in store with key=pFoo1. Will not record a duplicate! 
+ object @0xfe9900 already in store with key=pFoo1. Will not record a duplicate! 
 <<---Error Message Ends-------
-StoreGateSvc_Impl   DEBUG Recorded object @0x1659830 with key pFoo2 of type Foo(CLID 8101)
- in DataObject @0x1666200
+StoreGateSvc        DEBUG Recorded object @0xfea840 with key pFoo2 of type Foo(CLID 8101)
+ in DataObject @0xff7210
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1658ed0 with key cpFoo of type Foo(CLID 8101)
- in DataObject @0x1666090
+StoreGateSvc        DEBUG Recorded object @0xfc7e80 with key cpFoo of type Foo(CLID 8101)
+ in DataObject @0xff70a0
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1658f10 with key silly of type Foo(CLID 8101)
- in DataObject @0x16720c0
+StoreGateSvc        DEBUG Recorded object @0xfea820 with key silly of type Foo(CLID 8101)
+ in DataObject @0x10030d0
  object modifiable when retrieved
 Now we expect to see an error message:
 ----Error Message Starts--->>
 StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key silly and clid 8101
- Pre-existing valid DataProxy @0x16692b0 found in Store for key silly with clid 8101
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x1636e70
- recorded with key silly of type Foo (CLID 8101) in DataObject @0x166fed0
+ Pre-existing valid DataProxy @0xffa2c0 found in Store for key silly with clid 8101
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0xfc7ea0
+ recorded with key silly of type Foo (CLID 8101) in DataObject @0x1000ee0
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
 StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key silly and clid 8101
- Pre-existing valid DataProxy @0x16692b0 found in Store for key silly with clid 8101
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x1673bd0
- recorded with key silly of type Foo (CLID 8101) in DataObject @0x166ffc0
+ Pre-existing valid DataProxy @0xffa2c0 found in Store for key silly with clid 8101
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x1003e90
+ recorded with key silly of type Foo (CLID 8101) in DataObject @0x1000fd0
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
 StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key silly and clid 8101
- Pre-existing valid DataProxy @0x16692b0 found in Store for key silly with clid 8101
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x1673b50
- recorded with key silly of type Foo (CLID 8101) in DataObject @0x1670040
+ Pre-existing valid DataProxy @0xffa2c0 found in Store for key silly with clid 8101
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x1004bc0
+ recorded with key silly of type Foo (CLID 8101) in DataObject @0x1001050
 <<---Error Message Ends-------
-StoreGateSvc_Impl   DEBUG Recorded object @0x16324a0 with key UnLocked of type Foo(CLID 8101)
- in DataObject @0x1671f50
+StoreGateSvc        DEBUG Recorded object @0x1002dd0 with key UnLocked of type Foo(CLID 8101)
+ in DataObject @0x1002f60
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1673c20 with key Locked of type Foo(CLID 8101)
- in DataObject @0x1669d50
+StoreGateSvc        DEBUG Recorded object @0xfc34b0 with key Locked of type Foo(CLID 8101)
+ in DataObject @0xffad60
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1671d10 with key LockedReset of type Foo(CLID 8101)
- in DataObject @0x166bdd0
+StoreGateSvc        DEBUG Recorded object @0x1003e10 with key LockedReset of type Foo(CLID 8101)
+ in DataObject @0xffcde0
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1659610 with key UnLockedReset of type Foo(CLID 8101)
- in DataObject @0x1671e40
+StoreGateSvc        DEBUG Recorded object @0x1004b80 with key UnLockedReset of type Foo(CLID 8101)
+ in DataObject @0x1002e50
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1671c10 with key LockedDelete of type Foo(CLID 8101)
- in DataObject @0x1668280
+StoreGateSvc        DEBUG Recorded object @0xfe9ee0 with key LockedDelete of type Foo(CLID 8101)
+ in DataObject @0xff9290
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1673b90 with key UnLockedDelete of type Foo(CLID 8101)
- in DataObject @0x1668350
+StoreGateSvc        DEBUG Recorded object @0x1004ba0 with key UnLockedDelete of type Foo(CLID 8101)
+ in DataObject @0xff9360
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1671b50 with key Const of type Foo(CLID 8101)
- in DataObject @0x166a1a0
+StoreGateSvc        DEBUG Recorded object @0x1002c20 with key Const of type Foo(CLID 8101)
+ in DataObject @0xffb1b0
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1671f30 with key Const2 of type Foo(CLID 8101)
- in DataObject @0x166a300
+StoreGateSvc        DEBUG Recorded object @0x1002c00 with key Const2 of type Foo(CLID 8101)
+ in DataObject @0xffb310
  object not modifiable when retrieved
 Now we expect to see an error message:
 ----Error Message Starts--->>
 StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key Const and clid 8101
- Pre-existing valid DataProxy @0x16717c0 found in Store for key Const with clid 8101
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x1670d80
- recorded with key Const of type Foo (CLID 8101) in DataObject @0x166a420
+ Pre-existing valid DataProxy @0x10027d0 found in Store for key Const with clid 8101
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x1002b60
+ recorded with key Const of type Foo (CLID 8101) in DataObject @0xffb430
 <<---Error Message Ends-------
-StoreGateSvc_Impl   DEBUG Recorded object @0x1672d80 with key ow of type Foo(CLID 8101)
- in DataObject @0x166c1d0
+StoreGateSvc        DEBUG Recorded object @0x1002b00 with key ow of type Foo(CLID 8101)
+ in DataObject @0xffd1e0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG overwrite: Recorded object @0x166fd40 with key ow of type Foo(CLID 8101)
- in DataObject @0x166c2f0
+StoreGateSvc        DEBUG overwrite: Recorded object @0x1002d70 with key ow of type Foo(CLID 8101)
+ in DataObject @0xffd300
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG overwrite: Recorded object @0x166fce0 with key ow of type Foo(CLID 8101)
- in DataObject @0x166c1d0
+StoreGateSvc        DEBUG overwrite: Recorded object @0x1002b00 with key ow of type Foo(CLID 8101)
+ in DataObject @0xffd1e0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x166feb0 with key ow2 of type Foo(CLID 8101)
- in DataObject @0x166c2f0
+StoreGateSvc        DEBUG Recorded object @0x1001e10 with key ow2 of type Foo(CLID 8101)
+ in DataObject @0xffd300
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG overwrite: Recorded object @0x1671d60 with key ow2 of type Foo(CLID 8101)
- in DataObject @0x166c450
+StoreGateSvc        DEBUG overwrite: Recorded object @0x1000d50 with key ow2 of type Foo(CLID 8101)
+ in DataObject @0xffd460
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG overwrite: Recorded object @0x1673b70 with key ow2 of type Foo(CLID 8101)
- in DataObject @0x166c2f0
+StoreGateSvc        DEBUG overwrite: Recorded object @0x1000ca0 with key ow2 of type Foo(CLID 8101)
+ in DataObject @0xffd300
  object not modifiable when retrieved
 *** StoreGateSvcClient_test records OK ***
 
@@ -136,29 +136,29 @@ StoreGateSvc_Impl   DEBUG overwrite: Recorded object @0x1673b70 with key ow2 of
 *** StoreGateSvcClient_test retrieve BEGINS ***
 Now we expect to see an error message:
 ----Error Message Starts--->>
-StoreGateSvc_Impl WARNING retrieve(default): No valid proxy for default object 
+StoreGateSvc      WARNING retrieve(default): No valid proxy for default object 
  of type Foo(CLID 8101)
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
-StoreGateSvc_Impl WARNING retrieve(default): No valid proxy for default object 
+StoreGateSvc      WARNING retrieve(default): No valid proxy for default object 
  of type NotThere(CLID 8103)
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
-StoreGateSvc_Impl WARNING retrieve(default): No valid proxy for default object  of type Foo(CLID 8101)
+StoreGateSvc      WARNING retrieve(default): No valid proxy for default object  of type Foo(CLID 8101)
  Try to use a const retrieve 
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
-StoreGateSvc_Impl WARNING retrieve(default): No valid proxy for default object 
+StoreGateSvc      WARNING retrieve(default): No valid proxy for default object 
  of type Foo(CLID 8101)
 <<---Error Message Ends-------
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object UnLocked  of type Foo(CLID 8101)
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object UnLocked  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved const pointer to object UnLocked  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved const pointer to object UnLocked  of type Foo(CLID 8101)
 Now we expect to see an error message:
 ----Error Message Starts--->>
-StoreGateSvc_Impl WARNING retrieve(const): No valid proxy for object UnLockedxxx  of type Foo(CLID 8101)
+StoreGateSvc      WARNING retrieve(const): No valid proxy for object UnLockedxxx  of type Foo(CLID 8101)
 <<---Error Message Ends-------
 StoreGateSvc_Impl   DEBUG retrieve(range): no object found  of type NotThere(CLID 8103)
 StoreGateSvc_Impl   DEBUG retrieve(range): Can't initialize iterator for object range  of type NotThere(CLID 8103)
@@ -167,15 +167,15 @@ StoreGateSvc_Impl   DEBUG retrieve(range): Can't initialize iterator for object
 
 *** StoreGateSvcClient_test tryRetrieve BEGINS ***
 we should see no WARNING message for failed retrieves
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object UnLocked  of type Foo(CLID 8101)
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object UnLocked  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved const pointer to object UnLocked  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved const pointer to object UnLocked  of type Foo(CLID 8101)
 *** StoreGateSvcClient_test tryRetrieve OK ***
 
 
 *** StoreGateSvcClient_test symlinks BEGINS ***
 Now we expect to see an error message:
 ----Error Message Starts--->>
-StoreGateSvc_Impl WARNING retrieve(default): No valid proxy for default object 
+StoreGateSvc      WARNING retrieve(default): No valid proxy for default object 
  of type Foo(CLID 8101)
 <<---Error Message Ends-------
 Now we expect to see an error message:
@@ -186,87 +186,86 @@ Now we expect to see an error message:
 ----Error Message Starts--->>
 StoreGateSvc_Impl WARNING addSymLink: no target DataProxy found. Sorry, can't link to a non-existing data object
 <<---Error Message Ends-------
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object UnLocked  of type Base(CLID 8100)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object UnLocked  of type Base(CLID 8100)
 Now we expect to see an error message:
 ----Error Message Starts--->>
 StoreGateSvc_Impl WARNING addSymLink: no target DataProxy found. Sorry, can't link to a non-existing data object
 <<---Error Message Ends-------
-StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const pointer to default object 
+StoreGateSvc        DEBUG retrieve(default): Retrieved const pointer to default object 
  of type Base(CLID 8100)
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object UnLocked  of type Base(CLID 8100)
+StoreGateSvc        DEBUG Retrieved const pointer to object UnLocked  of type Base(CLID 8100)
 Now we expect to see an error message:
 ----Error Message Starts--->>
-StoreGateSvc_Impl WARNING retrieve(const): No valid proxy for object modSully  of type Base(CLID 8100)
+StoreGateSvc      WARNING retrieve(const): No valid proxy for object modSully  of type Base(CLID 8100)
 <<---Error Message Ends-------
 *** StoreGateSvcClient_test symlinks OK ***
 
 
 *** StoreGateSvcClient_test readPrivateCopy BEGINS ***
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object silly  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved const pointer to object silly  of type Foo(CLID 8101)
 StoreGateSvc_Impl WARNING SGImplSvc::typeless_readPrivateCopy: did not find object of type Foo with key silly
 SG::fromStorable  WARNING null input pointer 
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object silly  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved const pointer to object silly  of type Foo(CLID 8101)
 *** StoreGateSvcClient_test readPrivateCopy OK ***
 *** StoreGateSvcClient_test retrievePrivateCopy BEGINS ***
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object silly  of type Foo(CLID 8101)
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object silly  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved const pointer to object silly  of type Foo(CLID 8101)
 Now we expect to see an error message:
 ----Error Message Starts--->>
-StoreGateSvc_Impl WARNING retrieve(const): No valid proxy for object silly  of type Foo(CLID 8101)
+StoreGateSvc      WARNING retrieve(const): No valid proxy for object silly  of type Foo(CLID 8101)
 <<---Error Message Ends-------
 *** StoreGateSvcClient_test retrievePrivateCopy OK ***
 *** StoreGateSvcClient_test remove BEGINS ***
 Now we expect to see an error message:
 ----Error Message Starts--->>
-StoreGateSvc_Impl WARNING retrieve(default): No valid proxy for default object  of type Foo(CLID 8101)
+StoreGateSvc      WARNING retrieve(default): No valid proxy for default object  of type Foo(CLID 8101)
  Try to use a const retrieve 
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
-StoreGateSvc_Impl WARNING retrieve(non-const): No valid proxy for object   of type Foo(CLID 8101) 
+StoreGateSvc      WARNING retrieve(non-const): No valid proxy for object   of type Foo(CLID 8101) 
  Try to use a const retrieve
 <<---Error Message Ends-------
-StoreGateSvc_Impl   DEBUG Recorded object @0x166fb70 with key pFooKey of type Foo(CLID 8101)
- in DataObject @0x16720c0
+StoreGateSvc        DEBUG Recorded object @0x1000db0 with key pFooKey of type Foo(CLID 8101)
+ in DataObject @0x10030d0
  object modifiable when retrieved
  Now we expect to see an error for invalid proxy >>> 
-StoreGateSvc_Impl WARNING retrieve(non-const): No valid proxy for object pFooKey  of type Foo(CLID 8101) 
+StoreGateSvc      WARNING retrieve(non-const): No valid proxy for object pFooKey  of type Foo(CLID 8101) 
  Try to use a const retrieve
  end of error >>>>>>>>>>>>> 
-StoreGateSvc_Impl   DEBUG Recorded object @0x1672e00 with key pFooKey of type Foo(CLID 8101)
- in DataObject @0x16720c0
+StoreGateSvc        DEBUG Recorded object @0x1000cf0 with key pFooKey of type Foo(CLID 8101)
+ in DataObject @0x10030d0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1670e00 with key pFooKey of type Foo(CLID 8101)
- in DataObject @0x16720c0
+StoreGateSvc        DEBUG Recorded object @0x1003d90 with key pFooKey of type Foo(CLID 8101)
+ in DataObject @0x10030d0
  object modifiable when retrieved
 *** StoreGateSvcClient_test removes OK ***
 
 
 
 *** StoreGateSvcClient_test testCreate BEGINS ***
-StoreGateSvc_Impl   DEBUG Recorded object @0x1672e00 with key pCreateFooDefault of type Foo(CLID 8101)
- in DataObject @0x16720c0
+StoreGateSvc        DEBUG Recorded object @0x1000db0 with key pCreateFooDefault of type Foo(CLID 8101)
+ in DataObject @0x10030d0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1658f10 with key pCreateFoo1 of type Foo(CLID 8101)
- in DataObject @0x16703a0
+StoreGateSvc        DEBUG Recorded object @0x1000d50 with key pCreateFoo1 of type Foo(CLID 8101)
+ in DataObject @0x10013b0
  object modifiable when retrieved
 Now we expect to see an error message:
 ----Error Message Starts--->>
 StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key pCreateFoo1 and clid 8101
- Pre-existing valid DataProxy @0x166d3b0 found in Store for key pCreateFoo1 with clid 8101
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x166fda0
- recorded with key pCreateFoo1 of type Foo (CLID 8101) in DataObject @0x16704d0
-StoreGateSvc        ERROR create: problem recording created object @0x166fda0 using key pCreateFoo1
+ Pre-existing valid DataProxy @0xffe3c0 found in Store for key pCreateFoo1 with clid 8101
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x1002ae0
+ recorded with key pCreateFoo1 of type Foo (CLID 8101) in DataObject @0x10014e0
+StoreGateSvc        ERROR create: problem recording created object @0x1002ae0 using key pCreateFoo1
 <<---Error Message Ends-------
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object pCreateFoo1  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object pCreateFoo1  of type Foo(CLID 8101)
 *** StoreGateSvcClient_test testCreate OK ***
 
 
 *** StoreGateSvcClient_test bind BEGINS ***
-StoreGateSvc_Impl   DEBUG Recorded object @0x166fad0 with key fooKey of type Foo(CLID 8101)
- in DataObject @0x1670550
+StoreGateSvc        DEBUG Recorded object @0x1000a60 with key fooKey of type Foo(CLID 8101)
+ in DataObject @0x1001560
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG  Bound handle 0x7ffc1da4ae50 to proxy 0x1673840
+StoreGateSvc_Impl   DEBUG  Bound handle 0x7ffdc6567200 to proxy 0x1004850
 *** StoreGateSvcClient_test bind OK ***
 
 
@@ -275,148 +274,148 @@ Testing dump:
 <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
 SGImplSvc(StoreGateSvc_Impl)::dump():
 Found 1 proxy for ClassID 8100 (Base): 
- flags: (  valid, UNLOCKED,  reset) --- data:  0x1671f50 --- key: UnLocked
+ flags: (  valid, UNLOCKED,  reset) --- data:  0x1002f60 --- key: UnLocked
 Found 17 proxies for ClassID 8101 (Foo): 
- flags: (  valid,   locked,  reset) --- data:  0x166a1a0 --- key: Const
- flags: (  valid,   locked,  reset) --- data:  0x166a300 --- key: Const2
- flags: (  valid,   locked,  reset) --- data:  0x1669d50 --- key: Locked
- flags: (  valid,   locked, DELETE) --- data:  0x1668280 --- key: LockedDelete
- flags: (  valid,   locked,  reset) --- data:  0x166bdd0 --- key: LockedReset
- flags: (  valid, UNLOCKED,  reset) --- data:  0x1671f50 --- key: UnLocked
- flags: (  valid, UNLOCKED, DELETE) --- data:  0x1668350 --- key: UnLockedDelete
- flags: (  valid, UNLOCKED,  reset) --- data:  0x1671e40 --- key: UnLockedReset
- flags: (  valid,   locked,  reset) --- data:  0x1666090 --- key: cpFoo
- flags: (  valid, UNLOCKED,  reset) --- data:  0x1670550 --- key: fooKey
- flags: (  valid, UNLOCKED, DELETE) --- data:  0x166c1d0 --- key: ow
- flags: (  valid,   locked, DELETE) --- data:  0x166c2f0 --- key: ow2
- flags: (  valid, UNLOCKED,  reset) --- data:  0x16703a0 --- key: pCreateFoo1
- flags: (  valid, UNLOCKED,  reset) --- data:  0x16720c0 --- key: pCreateFooDefault
- flags: (  valid, UNLOCKED,  reset) --- data:  0x1658e10 --- key: pFoo1
- flags: (  valid, UNLOCKED,  reset) --- data:  0x1666200 --- key: pFoo2
+ flags: (  valid,   locked,  reset) --- data:   0xffb1b0 --- key: Const
+ flags: (  valid,   locked,  reset) --- data:   0xffb310 --- key: Const2
+ flags: (  valid,   locked,  reset) --- data:   0xffad60 --- key: Locked
+ flags: (  valid,   locked, DELETE) --- data:   0xff9290 --- key: LockedDelete
+ flags: (  valid,   locked,  reset) --- data:   0xffcde0 --- key: LockedReset
+ flags: (  valid, UNLOCKED,  reset) --- data:  0x1002f60 --- key: UnLocked
+ flags: (  valid, UNLOCKED, DELETE) --- data:   0xff9360 --- key: UnLockedDelete
+ flags: (  valid, UNLOCKED,  reset) --- data:  0x1002e50 --- key: UnLockedReset
+ flags: (  valid,   locked,  reset) --- data:   0xff70a0 --- key: cpFoo
+ flags: (  valid, UNLOCKED,  reset) --- data:  0x1001560 --- key: fooKey
+ flags: (  valid, UNLOCKED, DELETE) --- data:   0xffd1e0 --- key: ow
+ flags: (  valid,   locked, DELETE) --- data:   0xffd300 --- key: ow2
+ flags: (  valid, UNLOCKED,  reset) --- data:  0x10013b0 --- key: pCreateFoo1
+ flags: (  valid, UNLOCKED,  reset) --- data:  0x10030d0 --- key: pCreateFooDefault
+ flags: (  valid, UNLOCKED,  reset) --- data:   0xfe9e20 --- key: pFoo1
+ flags: (  valid, UNLOCKED,  reset) --- data:   0xff7210 --- key: pFoo2
  flags: (INVALID, UNLOCKED,  reset) --- data:          0 --- key: silly
 <<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
 
 <<--------
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
-StoreGateSvc_Impl   DEBUG Recorded object @0x1665ef0 with key d1 of type D1(CLID 8112)
- in DataObject @0x16704d0
- object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object d1  of type B1(CLID 8111)
-0x1658320
-0x16571a0StoreGateSvc
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object d1Alias  of type D1(CLID 8112)
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object d1AnotherAlias  of type D1(CLID 8112)
-StoreGateSvc_Impl   DEBUG Recorded object @0x1672a60 with key d2 of type D1(CLID 8112)
- in DataObject @0x1667e40
- object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object d2  of type D1(CLID 8112)
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object d1Alias  of type D1(CLID 8112)
+StoreGateSvc        DEBUG Recorded object @0xff6f00 with key d1 of type D1(CLID 8112)
+ in DataObject @0x10014e0
+ object modifiable when retrieved
+StoreGateSvc        DEBUG Retrieved non-const pointer to object d1  of type B1(CLID 8111)
+0xfe9330
+0xfe81b0StoreGateSvc
+StoreGateSvc        DEBUG Retrieved non-const pointer to object d1Alias  of type D1(CLID 8112)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object d1AnotherAlias  of type D1(CLID 8112)
+StoreGateSvc        DEBUG Recorded object @0x1003a70 with key d2 of type D1(CLID 8112)
+ in DataObject @0xff8e50
+ object modifiable when retrieved
+StoreGateSvc        DEBUG Retrieved non-const pointer to object d2  of type D1(CLID 8112)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object d1Alias  of type D1(CLID 8112)
 Found key = d1Alias for object D1 in StoreGate 
 Found key = d2 for object D1 in StoreGate 
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object dd  of type D1(CLID 8112)
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object dd  of type B1(CLID 8111)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object dd  of type D1(CLID 8112)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object dd  of type B1(CLID 8111)
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object dd  of type D1(CLID 8112)
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object dd  of type B1(CLID 8111)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object dd  of type D1(CLID 8112)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object dd  of type B1(CLID 8111)
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
 
 *** StoreGateSvcClient_test transientSwap BEGINS ***
-StoreGateSvc_Impl   DEBUG Recorded object @0x166fb90 with key pSwapFoo1 of type Foo(CLID 8101)
- in DataObject @0x1666200
+StoreGateSvc        DEBUG Recorded object @0x1002f40 with key pSwapFoo1 of type Foo(CLID 8101)
+ in DataObject @0xff7210
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x166ed00 with key pSwapFoo2 of type Foo(CLID 8101)
- in DataObject @0x166a150
+StoreGateSvc        DEBUG Recorded object @0xfe9920 with key pSwapFoo2 of type Foo(CLID 8101)
+ in DataObject @0xffb160
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object pSwapFoo1  of type Foo(CLID 8101)
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object pSwapFoo2  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object pSwapFoo1  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object pSwapFoo2  of type Foo(CLID 8101)
 *** StoreGateSvcClient_test transientSwap OK ***
 
 
 
 *** StoreGateSvcClient_test VersionedKey BEGINS ***
-StoreGateSvc_Impl   DEBUG Recorded object @0x1673c70 with key aVersObj of type Foo(CLID 8101)
- in DataObject @0x1667dc0
+StoreGateSvc        DEBUG Recorded object @0xec4d50 with key aVersObj of type Foo(CLID 8101)
+ in DataObject @0xff8dd0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object aVersObj  of type Foo(CLID 8101)
-StoreGateSvc_Impl   DEBUG Recorded object @0x166fc90 with key ;77;aVersObj of type Foo(CLID 8101)
- in DataObject @0x166a300
+StoreGateSvc        DEBUG Retrieved non-const pointer to object aVersObj  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Recorded object @0x1000a80 with key ;77;aVersObj of type Foo(CLID 8101)
+ in DataObject @0xffb310
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object ;77;aVersObj  of type Foo(CLID 8101)
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object aVersObj  of type Foo(CLID 8101)
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object ;00;aVersObj  of type Foo(CLID 8101)
-StoreGateSvc_Impl   DEBUG Recorded object @0x1659830 with key ;88;aVersObj of type Foo(CLID 8101)
- in DataObject @0x166bdd0
+StoreGateSvc        DEBUG Retrieved non-const pointer to object ;77;aVersObj  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object aVersObj  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object ;00;aVersObj  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Recorded object @0xfc34b0 with key ;88;aVersObj of type Foo(CLID 8101)
+ in DataObject @0xffcde0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object ;88;aVersObj  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object ;88;aVersObj  of type Foo(CLID 8101)
 Now we expect to see an error message:
 ----Error Message Starts--->>
 StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key ;88;aVersObj and clid 8101
- Pre-existing valid DataProxy @0x166d3b0 found in Store for key ;88;aVersObj with clid 8101
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x1671d10
- recorded with key ;88;aVersObj of type Foo (CLID 8101) in DataObject @0x166bf40
+ Pre-existing valid DataProxy @0xffe3c0 found in Store for key ;88;aVersObj with clid 8101
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x1001d90
+ recorded with key ;88;aVersObj of type Foo (CLID 8101) in DataObject @0xffcf50
 <<---Error Message Ends-------
-StoreGateSvc_Impl   DEBUG Recorded object @0x166fa70 with key ;66;aVersObj of type Foo(CLID 8101)
- in DataObject @0x166a270
+StoreGateSvc        DEBUG Recorded object @0x1002c70 with key ;66;aVersObj of type Foo(CLID 8101)
+ in DataObject @0xffb280
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object aVersObj  of type Foo(CLID 8101)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object aVersObj  of type Foo(CLID 8101)
 *** StoreGateSvcClient_test VersionedKey OK ***
 
 
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
 *** test_DVL_conversions
-StoreGateSvc_Impl   DEBUG Recorded object @0x1668950 with key contd of type CV(CLID 82734625)
- in DataObject @0x16667d0
+StoreGateSvc        DEBUG Recorded object @0xff9960 with key contd of type CV(CLID 82734625)
+ in DataObject @0xff77e0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object contd  of type DataVector<C>(CLID 82734623)
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object contd  of type DataVector<B>(CLID 82734621)
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object contd  of type DataVector<A>(CLID 82734619)
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object contd  of type DataVector<A>(CLID 82734619)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object contd  of type DataVector<C>(CLID 82734623)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object contd  of type DataVector<B>(CLID 82734621)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object contd  of type DataVector<A>(CLID 82734619)
+StoreGateSvc        DEBUG Retrieved non-const pointer to object contd  of type DataVector<A>(CLID 82734619)
 *** test_const_DVL
-StoreGateSvc_Impl   DEBUG Recorded object @0x1674860 with key dvl of type CV(CLID 82734625)
- in DataObject @0x1666720
+StoreGateSvc        DEBUG Recorded object @0x1005870 with key dvl of type CV(CLID 82734625)
+ in DataObject @0xff7730
  object not modifiable when retrieved
-StoreGateSvc_Impl WARNING retrieve(non-const): No valid proxy for object dvl  of type CV(CLID 82734625) 
+StoreGateSvc      WARNING retrieve(non-const): No valid proxy for object dvl  of type CV(CLID 82734625) 
  Try to use a const retrieve
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object dvl  of type CV(CLID 82734625)
-StoreGateSvc_Impl   DEBUG Recorded object @0x1643140 with key dvl2 of type CV(CLID 82734625)
- in DataObject @0x1666360
+StoreGateSvc        DEBUG Retrieved const pointer to object dvl  of type CV(CLID 82734625)
+StoreGateSvc        DEBUG Recorded object @0xfd4150 with key dvl2 of type CV(CLID 82734625)
+ in DataObject @0xff7370
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object dvl2  of type CV(CLID 82734625)
+StoreGateSvc        DEBUG Retrieved const pointer to object dvl2  of type CV(CLID 82734625)
 *** test_copy_conversions
-StoreGateSvc_Impl   DEBUG Recorded object @0x1673c20 with key x of type Athena_test::X(CLID 82734627)
- in DataObject @0x166a1a0
+StoreGateSvc        DEBUG Recorded object @0x1002b20 with key x of type Athena_test::X(CLID 82734627)
+ in DataObject @0xffb1b0
  object modifiable when retrieved
 SG::DataProxy_castWARNING Request for a non-const object via copying conversion; requested CLID = 82734628, proxy primary ID is 82734627
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object x  of type Athena_test::Y(CLID 82734628)
-StoreGateSvc_Impl WARNING retrieve(const): No valid proxy for object x  of type Athena_test::A(CLID 82734609)
+StoreGateSvc        DEBUG Retrieved const pointer to object x  of type Athena_test::Y(CLID 82734628)
+StoreGateSvc      WARNING retrieve(const): No valid proxy for object x  of type Athena_test::A(CLID 82734609)
 
 *** StoreGateSvcClient_test Keys BEGINS ***
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-StoreGateSvc_Impl   DEBUG Recorded object @0x1671b10 with key LockReset of type Foo(CLID 8101)
- in DataObject @0x166a1a0
+StoreGateSvc        DEBUG Recorded object @0x1000ca0 with key LockReset of type Foo(CLID 8101)
+ in DataObject @0xffb1b0
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1659830 with key UnLockReset of type Foo(CLID 8101)
- in DataObject @0x1670d20
+StoreGateSvc        DEBUG Recorded object @0xf23730 with key UnLockReset of type Foo(CLID 8101)
+ in DataObject @0xffb6b0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1673c70 with key LockDelete of type Foo(CLID 8101)
- in DataObject @0x166a6a0
+StoreGateSvc        DEBUG Recorded object @0xec4d50 with key LockDelete of type Foo(CLID 8101)
+ in DataObject @0xfface0
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1671cc0 with key UnLockDelete of type Foo(CLID 8101)
- in DataObject @0x1669cd0
+StoreGateSvc        DEBUG Recorded object @0x1002c00 with key UnLockDelete of type Foo(CLID 8101)
+ in DataObject @0x1003200
  object modifiable when retrieved
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
-StoreGateSvc_Impl   DEBUG Recorded object @0x1670d00 with key LockReset of type Foo(CLID 8101)
- in DataObject @0x166bd50
+StoreGateSvc        DEBUG Recorded object @0x1002bb0 with key LockReset of type Foo(CLID 8101)
+ in DataObject @0x10010d0
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1658ed0 with key UnLockReset of type Foo(CLID 8101)
- in DataObject @0x1669cd0
+StoreGateSvc        DEBUG Recorded object @0xfc7e80 with key UnLockReset of type Foo(CLID 8101)
+ in DataObject @0x10017e0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x166fc90 with key LockDelete of type Foo(CLID 8101)
- in DataObject @0x16721f0
+StoreGateSvc        DEBUG Recorded object @0x1002b20 with key LockDelete of type Foo(CLID 8101)
+ in DataObject @0x10032b0
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1671cc0 with key UnLockDelete of type Foo(CLID 8101)
- in DataObject @0x1670220
+StoreGateSvc        DEBUG Recorded object @0x1004c80 with key UnLockDelete of type Foo(CLID 8101)
+ in DataObject @0xff73f0
  object modifiable when retrieved
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
@@ -424,50 +423,50 @@ StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
 *** StoreGateSvcClient_test Keys ENDS ***
 
 *** StoreGateSvcClient_test retrieveAux BEGINS ***
-StoreGateSvc_Impl   DEBUG Recorded object @0x166ff20 with key BVec of type TestVector<BX>(CLID 82735621)
- in DataObject @0x16590c0
+StoreGateSvc        DEBUG Recorded object @0xfd4150 with key BVec of type TestVector<BX>(CLID 82735621)
+ in DataObject @0xfea0d0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x166fdc0 with key BVecAux. of type TestAuxStore(CLID 125030194)
- in DataObject @0x166a3d0
+StoreGateSvc        DEBUG Recorded object @0x1000dd0 with key BVecAux. of type TestAuxStore(CLID 125030194)
+ in DataObject @0xffb3e0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1671480 with key CVec of type TestVector<BX>(CLID 82735621)
- in DataObject @0x1671f50
+StoreGateSvc        DEBUG Recorded object @0x1005870 with key CVec of type TestVector<BX>(CLID 82735621)
+ in DataObject @0x1002f60
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x166e400 with key CVecAux. of type TestAuxStore(CLID 125030194)
- in DataObject @0x166bd50
+StoreGateSvc        DEBUG Recorded object @0xfff410 with key CVecAux. of type TestAuxStore(CLID 125030194)
+ in DataObject @0x10010d0
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1673670 with key ErrorVec of type TestVector<BX>(CLID 82735621)
- in DataObject @0x166a1a0
- object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x166fe50 with key BBVec of type TestVector<BBX>(CLID 125040193)
- in DataObject @0x1671430
- object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1670170 with key BBVecAux. of type TestAuxStore(CLID 125030194)
- in DataObject @0x16720c0
- object modifiable when retrieved
-StoreGateSvc_Impl VERBOSE called associateAux_impl non const for key BVec
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object BVec  of type TestVector<BX>(CLID 82735621)
-StoreGateSvc_Impl VERBOSE called associateAux_impl non const for key BVec
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object BVec  of type TestVector<BX>(CLID 82735621)
-StoreGateSvc_Impl VERBOSE called associateAux_impl const for key CVec
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object CVec  of type TestVector<BX>(CLID 82735621)
-StoreGateSvc_Impl VERBOSE called associateAux_impl const for key ErrorVec
-StoreGateSvc_Impl   DEBUG Retrieved const pointer to object ErrorVec  of type TestVector<BX>(CLID 82735621)
-StoreGateSvc_Impl   DEBUG Recorded object @0x1671bf0 with key BStand of type BX(CLID 82835621)
- in DataObject @0x1667d70
- object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1665ff0 with key BStandAux. of type TestAuxStore(CLID 125030194)
- in DataObject @0x1669da0
- object modifiable when retrieved
-StoreGateSvc_Impl VERBOSE called associateAux_impl non const for key BStand
-StoreGateSvc_Impl   DEBUG Retrieved non-const pointer to object BStand  of type BX(CLID 82835621)
+StoreGateSvc        DEBUG Recorded object @0xff9960 with key ErrorVec of type TestVector<BX>(CLID 82735621)
+ in DataObject @0xffb1b0
+ object modifiable when retrieved
+StoreGateSvc        DEBUG Recorded object @0xff7b60 with key BBVec of type TestVector<BBX>(CLID 125040193)
+ in DataObject @0xffcd60
+ object modifiable when retrieved
+StoreGateSvc        DEBUG Recorded object @0xff7000 with key BBVecAux. of type TestAuxStore(CLID 125030194)
+ in DataObject @0xff7210
+ object modifiable when retrieved
+StoreGateSvc_Impl VERBOSE called associateAux_impl for key BVec
+StoreGateSvc        DEBUG Retrieved non-const pointer to object BVec  of type TestVector<BX>(CLID 82735621)
+StoreGateSvc_Impl VERBOSE called associateAux_impl for key BVec
+StoreGateSvc        DEBUG Retrieved non-const pointer to object BVec  of type TestVector<BX>(CLID 82735621)
+StoreGateSvc_Impl VERBOSE called associateAux_impl for key CVec
+StoreGateSvc        DEBUG Retrieved const pointer to object CVec  of type TestVector<BX>(CLID 82735621)
+StoreGateSvc_Impl VERBOSE called associateAux_impl for key ErrorVec
+StoreGateSvc        DEBUG Retrieved const pointer to object ErrorVec  of type TestVector<BX>(CLID 82735621)
+StoreGateSvc        DEBUG Recorded object @0xfea120 with key BStand of type BX(CLID 82835621)
+ in DataObject @0xffadb0
+ object modifiable when retrieved
+StoreGateSvc        DEBUG Recorded object @0xffeeb0 with key BStandAux. of type TestAuxStore(CLID 125030194)
+ in DataObject @0x1001e80
+ object modifiable when retrieved
+StoreGateSvc_Impl VERBOSE called associateAux_impl for key BStand
+StoreGateSvc        DEBUG Retrieved non-const pointer to object BStand  of type BX(CLID 82835621)
 *** StoreGateSvcClient_test retrieveAux OK ***
 
 
 
 *** StoreGateSvcClient_test testBoundReset BEGINS ***
-StoreGateSvc_Impl   DEBUG overwrite: Recorded object @0x1671f30 with key testBoundReset of type int(CLID 244260744)
- in DataObject @0x1668620
+StoreGateSvc        DEBUG overwrite: Recorded object @0x1000cf0 with key testBoundReset of type int(CLID 244260744)
+ in DataObject @0xff9630
  object modifiable when retrieved
 
 *** StoreGateSvcClient_test testBoundReset OK ***
@@ -477,13 +476,13 @@ StoreGateSvc_Impl   DEBUG overwrite: Recorded object @0x1671f30 with key testBou
 *** StoreGateSvcClient_test testRecordObject BEGINS ***
 >>> test duplicate record1
 StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key obj101 and clid 8101
- Pre-existing valid DataProxy @0x16684e0 found in Store for key obj101 with clid 8101
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x1533d70
- recorded with key obj101 of type Foo (CLID 8101) in DataObject @0x1672ef0
+ Pre-existing valid DataProxy @0xff94f0 found in Store for key obj101 with clid 8101
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0xfe9f20
+ recorded with key obj101 of type Foo (CLID 8101) in DataObject @0x1004170
 <<< test duplicate record1
 >>> test duplicate record2
 StoreGateSvc_Impl WARNING record_impl: failed for key=obj999, type Foo (CLID 8101)
- object @0x1671ad0 already in store with key=obj101. Will not record a duplicate! 
+ object @0x1000c50 already in store with key=obj101. Will not record a duplicate! 
 <<< test duplicate record2
 >>> test duplicate error
 StoreGateSvc_Impl   ERROR SGImplSvc::recordObject: existing object found with 8101[Foo] obj101 but neither clid 543543[] nor key obj101xxx match.
@@ -497,12 +496,12 @@ StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
 
 *** StoreGateSvcClient_test testWriteAux OK ***
 *** test_lock
-StoreGateSvc_Impl   DEBUG Recorded object @0x1668b00 with key lockable1 of type Lockable(CLID 82734636)
- in DataObject @0x1670f50
+StoreGateSvc        DEBUG Recorded object @0xfea840 with key lockable1 of type Lockable(CLID 82734636)
+ in DataObject @0x1003fe0
  object modifiable when retrieved
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-StoreGateSvc_Impl   DEBUG Recorded object @0x1671f30 with key lockable1 of type Lockable(CLID 82734636)
- in DataObject @0x1671090
+StoreGateSvc        DEBUG Recorded object @0xfea840 with key lockable1 of type Lockable(CLID 82734636)
+ in DataObject @0x1002f60
  object modifiable when retrieved
 StoreGateSvc      VERBOSE Finalizing StoreGateSvc - package version StoreGate-00-00-00
 StoreGateSvc_Impl VERBOSE Finalizing StoreGateSvc_Impl - package version StoreGate-00-00-00
@@ -511,42 +510,42 @@ StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
 Now we expect to see an error message:
 ----Error Message Starts--->>
 DetectorStore_ImplWARNING  setupProxy:: error setting up proxy for key pFoo1 and clid 8101
- Pre-existing valid DataProxy @0x166a560 found in Store for key pFoo1 with clid 8101
-DetectorStore_ImplWARNING record_impl: Problem setting up the proxy for object @0x1666da0
- recorded with key pFoo1 of type Foo (CLID 8101) in DataObject @0x1672ef0
+ Pre-existing valid DataProxy @0xffb570 found in Store for key pFoo1 with clid 8101
+DetectorStore_ImplWARNING record_impl: Problem setting up the proxy for object @0xff7db0
+ recorded with key pFoo1 of type Foo (CLID 8101) in DataObject @0x1001e80
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
 DetectorStore_ImplWARNING record_impl: failed for key=pFoo2, type Foo (CLID 8101)
- object @0x166fb90 already in store with key=pFoo1. Will not record a duplicate! 
+ object @0x1002c00 already in store with key=pFoo1. Will not record a duplicate! 
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
 DetectorStore_ImplWARNING  setupProxy:: error setting up proxy for key silly and clid 8101
- Pre-existing valid DataProxy @0x1672fa0 found in Store for key silly with clid 8101
-DetectorStore_ImplWARNING record_impl: Problem setting up the proxy for object @0x1671b10
- recorded with key silly of type Foo (CLID 8101) in DataObject @0x16711c0
+ Pre-existing valid DataProxy @0xffa590 found in Store for key silly with clid 8101
+DetectorStore_ImplWARNING record_impl: Problem setting up the proxy for object @0x1000a80
+ recorded with key silly of type Foo (CLID 8101) in DataObject @0x1003eb0
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
 DetectorStore_ImplWARNING  setupProxy:: error setting up proxy for key silly and clid 8101
- Pre-existing valid DataProxy @0x1672fa0 found in Store for key silly with clid 8101
-DetectorStore_ImplWARNING record_impl: Problem setting up the proxy for object @0x166fa90
- recorded with key silly of type Foo (CLID 8101) in DataObject @0x1672420
+ Pre-existing valid DataProxy @0xffa590 found in Store for key silly with clid 8101
+DetectorStore_ImplWARNING record_impl: Problem setting up the proxy for object @0x1002cd0
+ recorded with key silly of type Foo (CLID 8101) in DataObject @0xffb280
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
 DetectorStore_ImplWARNING  setupProxy:: error setting up proxy for key silly and clid 8101
- Pre-existing valid DataProxy @0x1672fa0 found in Store for key silly with clid 8101
-DetectorStore_ImplWARNING record_impl: Problem setting up the proxy for object @0x166fa70
- recorded with key silly of type Foo (CLID 8101) in DataObject @0x16705a0
+ Pre-existing valid DataProxy @0xffa590 found in Store for key silly with clid 8101
+DetectorStore_ImplWARNING record_impl: Problem setting up the proxy for object @0x1002c70
+ recorded with key silly of type Foo (CLID 8101) in DataObject @0x1002440
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
 DetectorStore_ImplWARNING  setupProxy:: error setting up proxy for key Const and clid 8101
- Pre-existing valid DataProxy @0x1673340 found in Store for key Const with clid 8101
-DetectorStore_ImplWARNING record_impl: Problem setting up the proxy for object @0x16722f0
- recorded with key Const of type Foo (CLID 8101) in DataObject @0x1667e40
+ Pre-existing valid DataProxy @0x1004380 found in Store for key Const with clid 8101
+DetectorStore_ImplWARNING record_impl: Problem setting up the proxy for object @0xffad30
+ recorded with key Const of type Foo (CLID 8101) in DataObject @0xffd390
 <<---Error Message Ends-------
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvcTool           INFO IOVRanges will be checked at every Event
diff --git a/AtlasTest/ControlTest/share/test_cfgItemList.ref b/AtlasTest/ControlTest/share/test_cfgItemList.ref
new file mode 100644
index 0000000000000000000000000000000000000000..28aeccbef3951e9cf37f9199dbc939112c3dd809
--- /dev/null
+++ b/AtlasTest/ControlTest/share/test_cfgItemList.ref
@@ -0,0 +1,18 @@
+Py:Athena            INFO [CfgItemList] test running...
+Py:Athena            INFO Should see a warning about attempt at adding invalid element...
+Py:CfgItemList    WARNING Attempt to add an invalid element: 'Bla#Blah*'
+Py:CfgItemList    WARNING      ==> Ignoring invalid element: 'Bla#Blah*'
+Py:Athena            INFO Creating an AthenaPoolOutputStream...
+Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc62-opt] [atlas-work3e/f3b8d1f32f4] -- built on [2018-09-06T2000]
+Py:ConfigurableDb    INFO Read module info for 5528 configurables from 12 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
+Py:Athena            INFO ESD item list: ['CaloCellContainer#Boo', 'CaloClusterContainer#BooBoo', 'JetCollection#HLT_AutoKey*', 'VxContainer#Conversions']
+Py:Athena            INFO ESD item list: ['CaloCellContainer#Boo', 'CaloClusterContainer#BooBoo', 'JetCollection#HLT_AutoKey*', 'VxContainer#Conversions']
+Py:Athena            INFO removing TrigEsd item list
+Py:Athena            INFO ESD item list: ['CaloCellContainer#Boo', 'CaloClusterContainer#BooBoo', 'VxContainer#Conversions']
+Py:Athena            INFO '<AthenaOutputStream/FooFoo at 0x1b88850>' is not a CfgItemList
+Py:Athena            INFO Error has been caught, good
+Py:Athena            INFO ESD item list: ['CaloCellContainer#Boo', 'CaloClusterContainer#BooBoo', 'VxContainer#Conversions']
+Py:Athena            INFO InDet list: ['AnotherVxContainer#Conversions', 'VxContainer#Conversions']
+Py:Athena            INFO ESD item list: ['AnotherVxContainer#Conversions', 'CaloCellContainer#Boo', 'CaloClusterContainer#BooBoo', 'VxContainer#Conversions']
+Py:Athena            INFO [CfgItemList] test SUCCESSFULL
diff --git a/AtlasTest/ControlTest/share/test_keyStore.ref b/AtlasTest/ControlTest/share/test_keyStore.ref
new file mode 100644
index 0000000000000000000000000000000000000000..e0268a534112147b0e0a43d4b8df400fa43db7f4
--- /dev/null
+++ b/AtlasTest/ControlTest/share/test_keyStore.ref
@@ -0,0 +1,46 @@
+Py:Athena            INFO [KeyStore] test running...
+/***** CfgKeyStore/KeyStore ************************************************************************
+|=/***** CfgItemList/KeyStoreItemList ****************************************************************
+| | 
+| |=/***** CfgItemList/KeyStore_transient **************************************************************
+| | | 
+| | |=/***** CfgItemList/KeyStore_streamRDO **************************************************************
+| | | | 
+| | | \----- (End of CfgItemList/KeyStore_streamRDO) -----------------------------------------------------
+| | |=/***** CfgItemList/KeyStore_streamESD **************************************************************
+| | | | 
+| | | \----- (End of CfgItemList/KeyStore_streamESD) -----------------------------------------------------
+| | |=/***** CfgItemList/KeyStore_streamAOD **************************************************************
+| | | | 
+| | | \----- (End of CfgItemList/KeyStore_streamAOD) -----------------------------------------------------
+| | |=/***** CfgItemList/KeyStore_streamTAG **************************************************************
+| | | | 
+| | | \----- (End of CfgItemList/KeyStore_streamTAG) -----------------------------------------------------
+| | \----- (End of CfgItemList/KeyStore_transient) -----------------------------------------------------
+| |=/***** CfgItemList/KeyStore_streamRDO **************************************************************
+| | | 
+| | \----- (End of CfgItemList/KeyStore_streamRDO) -----------------------------------------------------
+| |=/***** CfgItemList/KeyStore_streamESD **************************************************************
+| | | 
+| | \----- (End of CfgItemList/KeyStore_streamESD) -----------------------------------------------------
+| |=/***** CfgItemList/KeyStore_streamAOD **************************************************************
+| | | 
+| | \----- (End of CfgItemList/KeyStore_streamAOD) -----------------------------------------------------
+| |=/***** CfgItemList/KeyStore_streamTAG **************************************************************
+| | | 
+| | \----- (End of CfgItemList/KeyStore_streamTAG) -----------------------------------------------------
+| |=/***** CfgItemList/KeyStore_inputBackNav ***********************************************************
+| | | 
+| | \----- (End of CfgItemList/KeyStore_inputBackNav) --------------------------------------------------
+| |=/***** CfgItemList/KeyStore_inputFile **************************************************************
+| | | 
+| | \----- (End of CfgItemList/KeyStore_inputFile) -----------------------------------------------------
+| |=/***** CfgItemList/KeyStore_metaData ***************************************************************
+| | | 
+| | \----- (End of CfgItemList/KeyStore_metaData) ------------------------------------------------------
+| |=/***** CfgItemList/KeyStore_detector ***************************************************************
+| | | 
+| | \----- (End of CfgItemList/KeyStore_detector) ------------------------------------------------------
+| \----- (End of CfgItemList/KeyStoreItemList) -------------------------------------------------------
+\----- (End of CfgKeyStore/KeyStore) ---------------------------------------------------------------
+Py:Athena            INFO [KeyStore] test SUCCESSFULL
diff --git a/AtlasTest/ControlTest/test/TestControl.xml b/AtlasTest/ControlTest/test/TestControl.xml
index eee92af1f8917e676cef23258389be79672cb3e2..0651b997f60a9b5d893793654a997e194dc3509b 100644
--- a/AtlasTest/ControlTest/test/TestControl.xml
+++ b/AtlasTest/ControlTest/test/TestControl.xml
@@ -13,44 +13,4 @@
          <returnValue>0</returnValue>
       </expectations>
    </TEST>
-
-   <TEST name="test_cfgItemList" type="script" suite="Core">
-      <package>AtlasTest/ControlTest</package>
-      <options_atn>python -c'import ControlTest.test_cfgItemList'</options_atn>
-      <timelimit>10</timelimit>
-      <author> Sebastien Binet </author>
-      <mailto> binet@cern.ch </mailto>
-      <expectations>
-         <successMessage>test SUCCESSFULL</successMessage>
-         <errorMessage>ERROR</errorMessage>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-
-   <TEST name="test_keyStore" type="script" suite="Core">
-      <package>AtlasTest/ControlTest</package>
-      <options_atn>python -c'import ControlTest.test_keyStore'</options_atn>
-      <timelimit>10</timelimit>
-      <author> Sebastien Binet </author>
-      <mailto> binet@cern.ch </mailto>
-      <expectations>
-         <successMessage>test SUCCESSFULL</successMessage>
-         <errorMessage>ERROR</errorMessage>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-
-   <TEST name="test_interactive_athena" type="script" suite="Core">
-      <package>AtlasTest/ControlTest</package>
-      <options_atn>athena.py -i ControlTest/test_interactive_athena.py</options_atn>
-      <timelimit>10</timelimit>
-      <author> Sebastien Binet </author>
-      <mailto> binet@cern.ch </mailto>
-      <expectations>
-         <successMessage>test [OK]</successMessage>
-         <errorMessage>ERROR</errorMessage>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-
 </atn>
diff --git a/AtlasTest/ControlTest/test/test_cfgItemList.sh b/AtlasTest/ControlTest/test/test_cfgItemList.sh
new file mode 100755
index 0000000000000000000000000000000000000000..8865b02f35f8fff00affacd75f18fb901b5c08fc
--- /dev/null
+++ b/AtlasTest/ControlTest/test/test_cfgItemList.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+#
+# Script for test_cfgItemList.
+#
+
+# Return the correct code:
+set -e
+
+# Run the test:
+python -c'import ControlTest.test_cfgItemList'
diff --git a/AtlasTest/ControlTest/test/test_keyStore.sh b/AtlasTest/ControlTest/test/test_keyStore.sh
new file mode 100755
index 0000000000000000000000000000000000000000..79fb7f837af65c4622bb375076448d937e5847de
--- /dev/null
+++ b/AtlasTest/ControlTest/test/test_keyStore.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+#
+# Script for test_keyStore.
+#
+
+# Return the correct code:
+set -e
+
+# Run the test:
+python -c'import ControlTest.test_keyStore'
diff --git a/Control/AthenaCommon/python/AppMgr.py b/Control/AthenaCommon/python/AppMgr.py
index 35389b0641f9f3a1e9fe049c59c938fcb3ca03bf..73977078a5291f988c4ed8b9098ce9f303a975c4 100755
--- a/Control/AthenaCommon/python/AppMgr.py
+++ b/Control/AthenaCommon/python/AppMgr.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 
 # File: AthenaCommon/share/AppMgr.py
 # Author: Wim Lavrijsen (WLavrijsen@lbl.gov)
@@ -68,14 +68,19 @@ def release_metadata():
 
 ### associator for public tools ----------------------------------------------
 def iadd( self, tool ):
- # only add once (allow silently)
-   if tool in self.getChildren():
-      return self
 
- # this is only allowed for new-style AlgTools
-   if not not isinstance( tool, Configurable.ConfigurableService ):
-      raise TypeError( '"%s" is not an AlgTool' %\
-         (hasattr(tool,'name') and tool.name() or str(value) ) )
+   if not type(tool) in (list,tuple):
+      tool = (tool,)
+
+ # only add once (allow silently)
+   tool = [t for t in tool if t not in self.getChildren()]
+   if len(tool)==0: return self
+
+ # this is only allowed for new-style AlgTool
+   for t in tool:
+      if not isinstance( t, Configurable.ConfigurableAlgTool ):
+         raise TypeError( '"%s" is not an AlgTool' %
+                          (hasattr(t,'name') and t.name() or "This configurable" ) )
 
    super( GaudiSvcConf.ToolSvc, self ).__iadd__( tool )
 
diff --git a/Control/AthenaCommon/share/AthAppMgrUnitTests.ref b/Control/AthenaCommon/share/AthAppMgrUnitTests.ref
index 2a669070d6a9389494ff59571bdf738284bc10bc..decc61df1b3868e674cfc013112006bcca12c174 100644
--- a/Control/AthenaCommon/share/AthAppMgrUnitTests.ref
+++ b/Control/AthenaCommon/share/AthAppMgrUnitTests.ref
@@ -1,19 +1,21 @@
-Mon Mar  5 12:38:02 EST 2018
-WARNING: TCMALLOCDIR not defined, will use libc malloc
+Wed Sep 12 13:56:37 CEST 2018
+Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
+Py:Athena            INFO using release [AthenaExternals-22.0.1] [x86_64-slc6-gcc62-opt] [2.0.10/22f26cd] -- built on [2018-08-27T2029]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "AthenaCommon/AthAppMgrUnitTests.py"
 test1NamedSingleton (__main__.BasicAthAppMgrTestCase)
-Test that instances w/ same name are the same ... Py:Athena            INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
+Test that instances w/ same name are the same ... Py:Athena            INFO using release [AthenaExternals-22.0.1] [x86_64-slc6-gcc62-opt] [2.0.10/22f26cd] -- built on [2018-08-27T2029]
 ok
 test2CppAppMgr (__main__.BasicAthAppMgrTestCase)
-Test communication b/w Py-proxy and C++ app mgr ... Py:Athena            INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
+Test communication b/w Py-proxy and C++ app mgr ... Py:Athena            INFO using release [AthenaExternals-22.0.1] [x86_64-slc6-gcc62-opt] [2.0.10/22f26cd] -- built on [2018-08-27T2029]
 ok
+test3ToolSvc (__main__.BasicAthAppMgrTestCase)
+Test ToolSvc __iadd__ ... ok
 
 ----------------------------------------------------------------------
-Ran 2 tests in 5.315s
+Ran 3 tests in 7.230s
 
 OK
diff --git a/Control/AthenaCommon/test/AthAppMgrUnitTests.py b/Control/AthenaCommon/test/AthAppMgrUnitTests.py
index c5ead827e3ceb51908eb910e54879429e91c0725..89724590c60d9968924ecd1286fa91359639ed54 100755
--- a/Control/AthenaCommon/test/AthAppMgrUnitTests.py
+++ b/Control/AthenaCommon/test/AthAppMgrUnitTests.py
@@ -1,14 +1,13 @@
 #!/usr/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 # Author: Sebastien Binet (binet@cern.ch)
 
 """Unit tests for verifying basic features of AthAppMgr."""
 
-import unittest, sys
+import unittest
 
 from AthenaCommon.AppMgr import AthAppMgr
-from AthenaCommon.Logging import log as msg
 
 ### data ---------------------------------------------------------------------
 __version__ = '$Revision: 1.1 $'
@@ -22,7 +21,6 @@ import sys
 import os
 
 ### helper class to sanitize output-------------------------------------------
-import re
 from tempfile import NamedTemporaryFile
 class ShutUp(object):
     """
@@ -54,8 +52,8 @@ class BasicAthAppMgrTestCase( unittest.TestCase ):
 
         app1 = AthAppMgr( "MyApp" )
         app2 = AthAppMgr( "MyApp" )
-        self.failUnless( app1 == app2, "instances are not equal !" )
-        self.failUnless( app1 is app2, "instances are not identical !" )
+        self.assertTrue( app1 == app2, "instances are not equal !" )
+        self.assertTrue( app1 is app2, "instances are not identical !" )
 
     def test2CppAppMgr( self ):
         """Test communication b/w Py-proxy and C++ app mgr"""
@@ -63,49 +61,49 @@ class BasicAthAppMgrTestCase( unittest.TestCase ):
         createSvc = app.CreateSvc[:]
         dlls = app.Dlls[:]
         app.CreateSvc += [ "StoreGateSvc/abcde" ]
-        self.failUnless( app.CreateSvc == createSvc + [ "StoreGateSvc/abcde" ] )
+        self.assertTrue( app.CreateSvc == createSvc + [ "StoreGateSvc/abcde" ] )
 
         app.Dlls += [ "NothingThereLikeSuch" ]
-        self.failUnless( app.Dlls    == []   )
-        self.failUnless( app._cppApp == None )
+        self.assertTrue( app.Dlls    == []   )
+        self.assertTrue( app._cppApp is None )
         
         Cout.instance.mute()
         ## instantiates the C++ application mgr (un-configured)
         cppApp = app.getHandle()
         Cout.instance.unMute()
 
-        self.failUnless( app.Dlls    == ["AthenaServices"]   )
-        self.failUnless( app._cppApp != None )
+        self.assertTrue( app.Dlls    == ["AthenaServices"]   )
+        self.assertTrue( app._cppApp is not None )
 
         ## now Dlls calls should be re-directed to C++ app
         Cout.instance.mute()
         app.Dlls += [ "AthenaKernel" ]
         Cout.instance.unMute()
-        self.failUnless( set(app.Dlls[:]) ==
+        self.assertTrue( set(app.Dlls[:]) ==
                          set(["AthenaServices","AthenaKernel"]) )
         
-        self.failUnless( cppApp.CreateSvc == [] )
+        self.assertTrue( cppApp.CreateSvc == [] )
 
         app.CreateSvc += [ "StoreGateSvc/svcA" ]
-        self.failUnless( cppApp.CreateSvc == [ "StoreGateSvc/svcA" ] )
+        self.assertTrue( cppApp.CreateSvc == [ "StoreGateSvc/svcA" ] )
 
         ## configure the application (not just the app mgr)
         app.setup()
-        self.failUnless( cppApp.CreateSvc == app.CreateSvc )
+        self.assertTrue( cppApp.CreateSvc == app.CreateSvc )
 
         # really want to test that ?
-        self.failUnless( cppApp.CreateSvc[0] == "ToolSvc/ToolSvc" )
+        self.assertTrue( cppApp.CreateSvc[0] == "ToolSvc/ToolSvc" )
 
         app.CreateSvc += [ "StoreGateSvc/svcB" ]
-        self.failUnless( cppApp.CreateSvc == app.CreateSvc )
+        self.assertTrue( cppApp.CreateSvc == app.CreateSvc )
 
         app.CreateSvc = [ "StoreGateSvc/svcC" ]
-        self.failUnless( app.CreateSvc    == [ "StoreGateSvc/svcC" ] )
-        self.failUnless( cppApp.CreateSvc == [ "StoreGateSvc/svcC" ] )
+        self.assertTrue( app.CreateSvc    == [ "StoreGateSvc/svcC" ] )
+        self.assertTrue( cppApp.CreateSvc == [ "StoreGateSvc/svcC" ] )
         
         ## test all properties are synchronized b/w py-proxy & C++
         for p in AthAppMgr.__slots__:
-            self.failUnless( getattr(cppApp,p) == getattr(app,p),
+            self.assertTrue( getattr(cppApp,p) == getattr(app,p),
                              "Property [%s] DIFFERS !!" % str(p) )
 
         ## test that multiple calls to setup() are stable
@@ -117,10 +115,37 @@ class BasicAthAppMgrTestCase( unittest.TestCase ):
             Cout.instance.mute()
             app.setup()
             Cout.instance.unMute()
-            self.failUnless( createSvc == app.CreateSvc[:] )
+            self.assertTrue( createSvc == app.CreateSvc[:] )
             pass
         return
-        
+
+    def test3ToolSvc( self ):
+        """Test ToolSvc __iadd__"""
+        from AthenaCommon.AppMgr import ToolSvc
+        from AthenaCommon.Configurable import ConfigurableAlgTool, ConfigurableService
+
+        t1 = ConfigurableAlgTool('tool1')
+        t2 = ConfigurableAlgTool('tool2')
+        s1 = ConfigurableService('svc1')
+
+        ## Check silent adding of duplicate
+        ToolSvc += t1
+        self.assertEqual( ToolSvc.getChildren(), [t1] )
+        ToolSvc += t1
+        self.assertEqual( ToolSvc.getChildren(), [t1] )
+        ToolSvc += [t1,t2]
+        self.assertEqual( ToolSvc.getChildren(), [t1,t2] )
+
+        ## Check type checking
+        with self.assertRaises(TypeError):
+            ToolSvc += s1
+
+        with self.assertRaises(TypeError):
+            ToolSvc += [s1]
+
+        return
+
+
 ## actual test run
 if __name__ == '__main__':
    loader = unittest.TestLoader()
diff --git a/Control/AthenaMP/python/PyComps.py b/Control/AthenaMP/python/PyComps.py
index 0fa82b65e82827588b7fa55a64b62ae7aca1e4e6..3335fe8cc13a0bc7867de6e9043a29813e1ca34c 100644
--- a/Control/AthenaMP/python/PyComps.py
+++ b/Control/AthenaMP/python/PyComps.py
@@ -75,7 +75,7 @@ class MpEvtLoopMgr(AthMpEvtLoopMgr):
                 if sys.modules.has_key('AthenaPoolCnvSvc.WriteAthenaPool'):
                     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
                     from AthenaIPCTools.AthenaIPCToolsConf import AthenaSharedMemoryTool
-                    svcMgr.AthenaPoolCnvSvc.OutputStreamingTool = [ AthenaSharedMemoryTool("OutputStreamingTool_0") ]
+                    svcMgr.AthenaPoolCnvSvc.OutputStreamingTool += [ AthenaSharedMemoryTool("OutputStreamingTool_0") ]
 
             from AthenaMPTools.AthenaMPToolsConf import SharedEvtQueueProvider
             self.Tools += [ SharedEvtQueueProvider(UseSharedReader=use_shared_reader,
diff --git a/Control/AthenaServices/CMakeLists.txt b/Control/AthenaServices/CMakeLists.txt
index cab445c986d8be002c90677109143a0b1e7380b6..ecc96584b7ec59e6cd3e259b14eef4025b0d79ae 100644
--- a/Control/AthenaServices/CMakeLists.txt
+++ b/Control/AthenaServices/CMakeLists.txt
@@ -96,6 +96,18 @@ atlas_add_test( AthTPCnvSvc
    PROPERTIES TIMEOUT 300
    EXTRA_PATTERNS "SGAudSvc +INFO Finalizing|SGAudSvc +INFO Initializing|^Py:Athena +INFO executing ROOT6Setup|No duplicates have been found|duplicate entry.*ignored|^Py:ConfigurableDb WARNING|Read module info for|^ToolSvc.* INFO( finalize:)? Removing all tools|^CoreDumpSvc *INFO Handling signals|types added|including file|^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)|local .* libGaudiKernelDict.so|^Number of My|^Py:Athena +INFO using release|^StoreGateSvc +INFO Start|^Py:AthenaDsoDb +INFO could not install alias|Bindings.py:660newobj = object.__new__|Updating ROOT::Reflex::PluginService::SetDebug|^ApplicationMgr +INFO|^StoreGateSvc +INFO" )
 
+
+atlas_add_test( SimplePOSIXTimeKeeperSvc
+   SCRIPT test/SimplePOSIXTimeKeeperSvc.sh
+   PROPERTIES TIMEOUT 300
+   EXTRA_PATTERNS "allocated job time|average time" )
+
+
+atlas_add_test( AthDictLoaderSvc
+   SCRIPT test/AthDictLoaderSvc.sh
+   PROPERTIES TIMEOUT 300 )
+
+
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/AthTPCnvSvc_test.py
diff --git a/Control/AthenaServices/share/AthDictLoaderSvc.ref b/Control/AthenaServices/share/AthDictLoaderSvc.ref
new file mode 100644
index 0000000000000000000000000000000000000000..6f6e712bc0ad86226fe3b41d3df7fd19490adf6e
--- /dev/null
+++ b/Control/AthenaServices/share/AthDictLoaderSvc.ref
@@ -0,0 +1,115 @@
+Thu Sep  6 16:10:28 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] [atlas-work3e/78123ca2f8a] -- built on [2018-09-06T1402]
+Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
+Py:Athena            INFO executing ROOT6Setup
+Py:Athena            INFO including file "AthenaCommon/Execution.py"
+Py:Athena            INFO including file "AthenaServices/AthDictLoaderSvc_test.py"
+Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+Py:ConfigurableDb    INFO Read module info for 5528 configurables from 10 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
+[?1034hApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr    SUCCESS 
+====================================================================================================================================
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r3)
+                                          running on lxplus051.cern.ch on Thu Sep  6 16:11:57 2018
+====================================================================================================================================
+ApplicationMgr       INFO Successfully loaded modules : AthenaServices
+ApplicationMgr       INFO Application Manager Configured successfully
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+StatusCodeSvc        INFO initialize
+AthDictLoaderSvc     INFO in initialize...
+AthDictLoaderSvc     INFO acquired Dso-registry
+ClassIDSvc           INFO  getRegistryEntries: read 2918 CLIDRegistry entries for module ALL
+CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
+CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
+PyComponentMgr       INFO Initializing PyComponentMgr...
+AthDictLoaderTe...   INFO Initializing AthDictLoaderTestAlg...
+Py:AthDictLoaderTestAlg    INFO retrieving the dictionary loader svc...
+HistogramPersis...WARNING Histograms saving not required.
+ApplicationMgr       INFO Application Manager Initialized successfully
+ApplicationMgr       INFO Application Manager Started successfully
+AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #1 0 events processed so far  <<<===
+Py:AthDictLoaderTestAlg    INFO testing loading of dictionaries...
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::string]
+Py:AthDictLoaderTestAlg    INFO <-- [string]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::basic_string<char>]
+Py:AthDictLoaderTestAlg    INFO <-- [string]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::vector<std::string>]
+Py:AthDictLoaderTestAlg    INFO <-- [vector<string>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::vector<std::basic_string<char> >]
+Py:AthDictLoaderTestAlg    INFO <-- [vector<string>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::vector<double>]
+Py:AthDictLoaderTestAlg    INFO <-- [vector<double>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::vector<std::string,std::allocator<std::string> >]
+Py:AthDictLoaderTestAlg    INFO <-- [vector<string>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::map<int,int>]
+Py:AthDictLoaderTestAlg    INFO <-- [map<int,int>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::map<std::string,std::string>]
+Py:AthDictLoaderTestAlg    INFO <-- [map<string,string>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::map<std::string, std::string>]
+Py:AthDictLoaderTestAlg    INFO <-- [map<string,string>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::map<std::basic_string<char>,std::basic_string<char> >]
+Py:AthDictLoaderTestAlg    INFO <-- [map<string,string>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::pair<int,int>]
+Py:AthDictLoaderTestAlg    INFO <-- [pair<int,int>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::pair<std::string,std::string>]
+Py:AthDictLoaderTestAlg    INFO <-- [pair<string,string>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::pair<std::string, std::string>]
+Py:AthDictLoaderTestAlg    INFO <-- [pair<string,string>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::pair<std::basic_string<char>,std::basic_string<char> >]
+Py:AthDictLoaderTestAlg    INFO <-- [pair<string,string>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::pair<std::basic_string<char>, std::basic_string<char> >]
+Py:AthDictLoaderTestAlg    INFO <-- [pair<string,string>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::set<std::string>]
+Py:AthDictLoaderTestAlg    INFO <-- [set<string>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::set<std::basic_string<char> >]
+Py:AthDictLoaderTestAlg    INFO <-- [set<string>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [std::set<unsigned int>]
+Py:AthDictLoaderTestAlg    INFO <-- [set<unsigned int>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [ElementLinkInt_p1]
+Py:AthDictLoaderTestAlg    INFO <-- [ElementLink_p1<unsigned int>]
+Py:AthDictLoaderTestAlg    INFO ----------------------------------------
+Py:AthDictLoaderTestAlg    INFO --> [ElementLink_p1<unsigned int>]
+Py:AthDictLoaderTestAlg    INFO <-- [ElementLink_p1<unsigned int>]
+Py:AthDictLoaderTestAlg    INFO test of dictionary loading SUCCEEDED
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 1 events processed so far  <<<===
+ApplicationMgr       INFO Application Manager Stopped successfully
+IncidentProcAlg1     INFO Finalize
+AthDictLoaderTe...   INFO Finalizing AthDictLoaderTestAlg...
+IncidentProcAlg2     INFO Finalize
+PyComponentMgr       INFO Finalizing PyComponentMgr...
+AthDictLoaderSvc     INFO in finalize...
+ToolSvc              INFO Removing all tools created by ToolSvc
+*****Chrono*****     INFO ****************************************************************************************************
+*****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
+*****Chrono*****     INFO ****************************************************************************************************
+ChronoStatSvc        INFO Time User   : Tot= 2.56  [s]                                             #=  1
+*****Chrono*****     INFO ****************************************************************************************************
+ChronoStatSvc.f...   INFO  Service finalized successfully 
+ApplicationMgr       INFO Application Manager Finalized successfully
+ApplicationMgr       INFO Application Manager Terminated successfully
+Py:Athena            INFO leaving with code 0: "successful run"
diff --git a/Control/AthenaServices/share/SimplePOSIXTimeKeeperSvc.ref b/Control/AthenaServices/share/SimplePOSIXTimeKeeperSvc.ref
new file mode 100644
index 0000000000000000000000000000000000000000..abc27f01dc15abc5b9367d564cd30de4137dfe91
--- /dev/null
+++ b/Control/AthenaServices/share/SimplePOSIXTimeKeeperSvc.ref
@@ -0,0 +1,57 @@
+Thu Sep  6 15:46:12 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] [atlas-work3e/78123ca2f8a] -- built on [2018-09-06T1340]
+Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
+Py:Athena            INFO executing ROOT6Setup
+Py:Athena            INFO including file "AthenaCommon/Execution.py"
+Py:Athena            INFO including file "AthenaServices/SimplePOSIXTimeKeeperSvc_test.py"
+[?1034hPy:Athena            INFO including file "AthenaServices/SimplePOSIXTimeKeeperOptions.py"
+Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+Py:ConfigurableDb    INFO Read module info for 5528 configurables from 10 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr    SUCCESS 
+====================================================================================================================================
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r3)
+                                          running on lxplus051.cern.ch on Thu Sep  6 15:47:45 2018
+====================================================================================================================================
+ApplicationMgr       INFO Successfully loaded modules : AthenaServices
+ApplicationMgr       INFO Application Manager Configured successfully
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+AthenaEventLoopMgr   INFO No TimeKeeper selected. No time limit control on event loop.
+StatusCodeSvc        INFO initialize
+SimplePOSIXTime...  DEBUG Property update for OutputLevel : new value = 1
+SimplePOSIXTime...   INFO Initializing SimplePOSIXTimeKeeperSvc - package version AthenaServices-00-00-00
+AthDictLoaderSvc     INFO in initialize...
+AthDictLoaderSvc     INFO acquired Dso-registry
+ClassIDSvc           INFO  getRegistryEntries: read 3630 CLIDRegistry entries for module ALL
+CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
+CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
+HistogramPersis...WARNING Histograms saving not required.
+ApplicationMgr       INFO Application Manager Initialized successfully
+ApplicationMgr       INFO Application Manager Started successfully
+SimplePOSIXTime...VERBOSE TimeKeeper status: (all times in 1/100 CPU secs)
+    allocated job time 600 - job time used so far 1761
+    average time per iteration 0 - time left -1161
+    Not enough time for another iteration
+ApplicationMgr       INFO Application Manager Stopped successfully
+IncidentProcAlg1     INFO Finalize
+IncidentProcAlg2     INFO Finalize
+AthDictLoaderSvc     INFO in finalize...
+ToolSvc              INFO Removing all tools created by ToolSvc
+SimplePOSIXTime...   INFO TimeKeeper status: (all times in 1/100 CPU secs)
+    allocated job time 600 - job time used so far 1761
+    average time per iteration 0 - time left -1161
+    Not enough time for another iteration
+*****Chrono*****     INFO ****************************************************************************************************
+*****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
+*****Chrono*****     INFO ****************************************************************************************************
+ChronoStatSvc        INFO Time User   : Tot=   90 [ms]                                             #=  1
+*****Chrono*****     INFO ****************************************************************************************************
+ChronoStatSvc.f...   INFO  Service finalized successfully 
+ApplicationMgr       INFO Application Manager Finalized successfully
+ApplicationMgr       INFO Application Manager Terminated successfully
+Py:Athena            INFO leaving with code 65: "failure in an algorithm execute"
diff --git a/Control/AthenaServices/share/SimplePOSIXTimeKeeperSvc_test.py b/Control/AthenaServices/share/SimplePOSIXTimeKeeperSvc_test.py
index 7b17950ef6de834853c57334443a519a51d28ac2..aa604b7aeacfd777eff7265eec6e7e7883cc7486 100644
--- a/Control/AthenaServices/share/SimplePOSIXTimeKeeperSvc_test.py
+++ b/Control/AthenaServices/share/SimplePOSIXTimeKeeperSvc_test.py
@@ -32,5 +32,5 @@ ServiceMgr.SimplePOSIXTimeKeeperSvc.AllocTime = 6
 
 ServiceMgr += AthenaEventLoopMgr(TimeKeeper="SimplePOSIXTimeKeeperSvc")
 
-from GaudiSvc.GaudiSvcConf import MessageSvc
-ServiceMgr.MessageSvc.OutputLevel = 2
+#from GaudiSvc.GaudiSvcConf import MessageSvc
+#ServiceMgr.MessageSvc.OutputLevel = 2
diff --git a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
index e882a5a06244d577d0ad74cfc82a52566127fbf5..8e1470482a73073e0bebcf3f9df204bb84246a86 100644
--- a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
+++ b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
@@ -20,7 +20,6 @@
 #include "GaudiKernel/IAlgorithm.h"
 #include "GaudiKernel/SmartIF.h"
 #include "GaudiKernel/Incident.h"
-#include "GaudiKernel/DataSelectionAgent.h"
 #include "GaudiKernel/DataObject.h"
 #include "GaudiKernel/IIncidentSvc.h"
 #include "GaudiKernel/IEvtSelector.h"
@@ -447,68 +446,52 @@ StatusCode AthenaEventLoopMgr::finalize()
 //=========================================================================
 StatusCode AthenaEventLoopMgr::writeHistograms(bool force) {
 
-
   StatusCode sc (StatusCode::SUCCESS);
   
   if ( 0 != m_histoPersSvc && m_writeHists ) {
-    DataSelectionAgent agent;
-    StatusCode iret = m_histoDataMgrSvc->traverseTree( &agent );
-    if( iret.isFailure() ) {
-      sc = iret;
-      error() 
-	    << "Error while traversing Histogram data store" 
-	    << endmsg;
+    std::vector<DataObject*> objects;
+    sc = m_histoDataMgrSvc->traverseTree( [&objects]( IRegistry* reg, int ) {
+        DataObject* obj = reg->object();
+        if ( !obj || obj->clID() == CLID_StatisticsFile ) return false;
+        objects.push_back( obj );
+        return true;
+      } );
+
+    if ( !sc.isSuccess() ) {
+      error() << "Error while traversing Histogram data store" << endmsg;
+      return sc;
     }
-    
-    IDataSelector* objects = agent.selectedObjects();
-    // skip /stat entry!
-    if ( objects->size() > 0 ) {
+
+    if ( objects.size() > 0) {
       int writeInterval(m_writeInterval.value());
-      IDataSelector::iterator i;
-      for ( i = objects->begin(); i != objects->end(); i++ ) {
-	StatusCode iret(StatusCode::SUCCESS);
-	
-	if ( m_nevt == 1 || force || 
-	     (writeInterval != 0 && m_nevt%writeInterval == 0) ) {
-	  
-	  bool crt(false);
-	  
-	  IOpaqueAddress* pAddr = (*i)->registry()->address();
-	  if (pAddr == nullptr) {
-	    iret = m_histoPersSvc->createRep(*i, pAddr);
-	    if ( iret.isSuccess() ) {
-	      (*i)->registry()->setAddress(pAddr);
-	      crt = true;
-	    } else {
-	      error() << "calling createRep for " 
-		    << (*i)->registry()->identifier() << endmsg;
-	    }	       
-	  }
-	  
-	  if (iret.isSuccess()) {
-	    assert(pAddr != nullptr);
-	    iret = m_histoPersSvc->updateRep(pAddr, *i);
-	    
-	    if (iret.isSuccess() && crt == true) {
-	      iret = m_histoPersSvc->fillRepRefs(pAddr,*i);
-	    }
-	  }
-	  
-	}
-	
-	if ( iret.isFailure() ) {
-	  sc = iret;
-	}
-	
-      }    // end of loop over Objects
-      
+
+      if ( m_nevt == 1 || force || 
+           (writeInterval != 0 && m_nevt%writeInterval == 0) ) {
+
+        // skip /stat entry!
+        sc = std::accumulate( begin( objects ), end( objects ), sc, [&]( StatusCode isc, auto& i ) {
+            IOpaqueAddress* pAddr = nullptr;
+            StatusCode      iret  = m_histoPersSvc->createRep( i, pAddr );
+            if ( iret.isFailure() ) return iret;
+            i->registry()->setAddress( pAddr );
+            return isc;
+          } );
+        sc = std::accumulate( begin( objects ), end( objects ), sc, [&]( StatusCode isc, auto& i ) {
+            IRegistry* reg  = i->registry();
+            StatusCode iret = m_histoPersSvc->fillRepRefs( reg->address(), i );
+            return iret.isFailure() ? iret : isc;
+          } );
+        if ( ! sc.isSuccess() ) {
+          error() << "Error while saving Histograms." << endmsg;
+        }
+      }
+
       if (force || (writeInterval != 0 && m_nevt%writeInterval == 0) ) {
-	if (msgLevel(MSG::DEBUG)) { debug() << "committing Histograms" << endmsg; }
-	m_histoPersSvc->conversionSvc()->commitOutput("",true).ignore();
+        if (msgLevel(MSG::DEBUG)) { debug() << "committing Histograms" << endmsg; }
+        m_histoPersSvc->conversionSvc()->commitOutput("",true).ignore();
       }
-      
-    }       // end of objects->size() > 0
-    
+    }
+          
   }
   
   return sc;
diff --git a/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx b/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx
index 9b64867752ab15774a77c78dfa818e255478143e..5faba8ad759109d75292264e1d18f61cba2709e6 100644
--- a/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx
+++ b/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx
@@ -22,7 +22,6 @@
 #include "GaudiKernel/IAlgorithm.h"
 #include "GaudiKernel/SmartIF.h"
 #include "GaudiKernel/Incident.h"
-#include "GaudiKernel/DataSelectionAgent.h"
 #include "GaudiKernel/DataObject.h"
 #include "GaudiKernel/IIncidentSvc.h"
 #include "GaudiKernel/IEvtSelector.h"
@@ -502,67 +501,52 @@ StatusCode AthenaHiveEventLoopMgr::finalize()
 //=========================================================================
 StatusCode AthenaHiveEventLoopMgr::writeHistograms(bool force) {
 
-
   StatusCode sc (StatusCode::SUCCESS);
   
   if ( 0 != m_histoPersSvc && m_writeHists ) {
-    DataSelectionAgent agent;
-    StatusCode iret = m_histoDataMgrSvc->traverseTree( &agent );
-    if( iret.isFailure() ) {
-      sc = iret;
-      error() << "Error while traversing Histogram data store" 
-              << endmsg;
+    std::vector<DataObject*> objects;
+    sc = m_histoDataMgrSvc->traverseTree( [&objects]( IRegistry* reg, int ) {
+        DataObject* obj = reg->object();
+        if ( !obj || obj->clID() == CLID_StatisticsFile ) return false;
+        objects.push_back( obj );
+        return true;
+      } );
+
+    if ( !sc.isSuccess() ) {
+      error() << "Error while traversing Histogram data store" << endmsg;
+      return sc;
     }
-    
-    IDataSelector* objects = agent.selectedObjects();
-    // skip /stat entry!
-    if ( objects->size() > 0 ) {
-      unsigned int writeInterval(m_writeInterval.value());
-      IDataSelector::iterator i;
-      for ( i = objects->begin(); i != objects->end(); i++ ) {
-	StatusCode iret(StatusCode::SUCCESS);
-	
-	if ( m_nevt == 1 || force || 
-	     (writeInterval != 0 && m_nevt%writeInterval == 0) ) {
-	  
-	  bool crt(false);
-	  
-	  IOpaqueAddress* pAddr = (*i)->registry()->address();
-	  if (pAddr == 0) {
-	    iret = m_histoPersSvc->createRep(*i, pAddr);
-	    if ( iret.isSuccess() ) {
-	      (*i)->registry()->setAddress(pAddr);
-	      crt = true;
-	    } else {
-	      error() << "calling createRep for " 
-                      << (*i)->registry()->identifier() << endmsg;
-	    }	       
-	  }
-	  
-	  if (iret.isSuccess()) {
-	    assert(pAddr != 0);
-	    iret = m_histoPersSvc->updateRep(pAddr, *i);
-	    
-	    if (iret.isSuccess() && crt == true) {
-	      iret = m_histoPersSvc->fillRepRefs(pAddr,*i);
-	    }
-	  }
-	  
-	}
-	
-	if ( iret.isFailure() ) {
-	  sc = iret;
-	}
-	
-      }    // end of loop over Objects
-      
+
+    if ( objects.size() > 0) {
+      int writeInterval(m_writeInterval.value());
+
+      if ( m_nevt == 1 || force || 
+           (writeInterval != 0 && m_nevt%writeInterval == 0) ) {
+
+        // skip /stat entry!
+        sc = std::accumulate( begin( objects ), end( objects ), sc, [&]( StatusCode isc, auto& i ) {
+            IOpaqueAddress* pAddr = nullptr;
+            StatusCode      iret  = m_histoPersSvc->createRep( i, pAddr );
+            if ( iret.isFailure() ) return iret;
+            i->registry()->setAddress( pAddr );
+            return isc;
+          } );
+        sc = std::accumulate( begin( objects ), end( objects ), sc, [&]( StatusCode isc, auto& i ) {
+            IRegistry* reg  = i->registry();
+            StatusCode iret = m_histoPersSvc->fillRepRefs( reg->address(), i );
+            return iret.isFailure() ? iret : isc;
+          } );
+        if ( ! sc.isSuccess() ) {
+          error() << "Error while saving Histograms." << endmsg;
+        }
+      }
+
       if (force || (writeInterval != 0 && m_nevt%writeInterval == 0) ) {
-	if (msgLevel(MSG::DEBUG)) { debug() << "committing Histograms" << endmsg; }
-	m_histoPersSvc->conversionSvc()->commitOutput("",true).ignore();
+        if (msgLevel(MSG::DEBUG)) { debug() << "committing Histograms" << endmsg; }
+        m_histoPersSvc->conversionSvc()->commitOutput("",true).ignore();
       }
-      
-    }       // end of objects->size() > 0
-    
+    }
+          
   }
   
   return sc;
@@ -1243,7 +1227,6 @@ AthenaHiveEventLoopMgr::drainScheduler(int& finishedEvts){
       continue;
     }
     
-
     EventID::number_type n_run(0);
     EventID::number_type n_evt(0);
 
@@ -1268,7 +1251,7 @@ AthenaHiveEventLoopMgr::drainScheduler(int& finishedEvts){
 
     // m_incidentSvc->fireIncident(Incident(name(), IncidentType::EndEvent,
     // 					 *thisFinishedEvtContext ));
-
+    m_incidentSvc->fireIncident(Incident(name(), IncidentType::EndProcessing, *thisFinishedEvtContext ));
 
     debug() << "Clearing slot " << thisFinishedEvtContext->slot() 
             << " (event " << thisFinishedEvtContext->evt()
@@ -1313,14 +1296,8 @@ AthenaHiveEventLoopMgr::drainScheduler(int& finishedEvts){
 
     debug() << "drainScheduler thisFinishedEvtContext: " << thisFinishedEvtContext
 	    << endmsg;
-    
-    
-    m_incidentSvc->fireIncident(Incident(name(), IncidentType::EndProcessing, 
-					 *thisFinishedEvtContext ));    
 
     delete thisFinishedEvtContext;
-
-    
   }
 
   return (  fail ? -1 : 1 );
diff --git a/Control/AthenaServices/test/AthDictLoaderSvc.sh b/Control/AthenaServices/test/AthDictLoaderSvc.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c574a539bb64e31ca121f4ca955ab28e135284ab
--- /dev/null
+++ b/Control/AthenaServices/test/AthDictLoaderSvc.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+#
+# Script running the AthDictLoaderSvc_test.py test jobOptions for CTest.
+#
+
+# Return the correct code:
+set -e
+
+# Run the test:
+athena.py AthenaServices/AthDictLoaderSvc_test.py
diff --git a/Control/AthenaServices/test/AthenaServices.xml b/Control/AthenaServices/test/AthenaServices.xml
index f20393d515349d0c6dc70555d482a776ff0a7552..f80305ecd8f3c71bdd854dc4b1b0ce0622e000dc 100644
--- a/Control/AthenaServices/test/AthenaServices.xml
+++ b/Control/AthenaServices/test/AthenaServices.xml
@@ -12,23 +12,4 @@
           <returnValue>0</returnValue>
        </expectations>
     </TEST>
-    <TEST name="SimplePOSIXTimeKeeper" type="athena">
-       <options>AthenaServices/SimplePOSIXTimeKeeperSvc_test.py </options>
-       <author> Paolo Calafiura </author>
-       <mailto> pcalafiura@lbl.gov </mailto>
-       <expectations>
-          <errorMessage>differ</errorMessage>
-          <successMessage>Not enough time for another iteration</successMessage>          <returnValue>65</returnValue>
-       </expectations>
-    </TEST>
-    <TEST name="AthDictLoaderSvc" type="athena" suite="core">
-       <options>AthenaServices/AthDictLoaderSvc_test.py </options>
-       <author> Sebastien Binet </author>
-       <mailto> binet@cern.ch </mailto>
-       <expectations>
-          <errorMessage>differ</errorMessage>
-          <successMessage>test of dictionary loading SUCCEEDED</successMessage>
-          <returnValue>0</returnValue>
-       </expectations>
-    </TEST>
 </atn>
diff --git a/Control/AthenaServices/test/SimplePOSIXTimeKeeperSvc.sh b/Control/AthenaServices/test/SimplePOSIXTimeKeeperSvc.sh
new file mode 100755
index 0000000000000000000000000000000000000000..560fe79cfab6b35b743bcbab3f603d8ec3ab5139
--- /dev/null
+++ b/Control/AthenaServices/test/SimplePOSIXTimeKeeperSvc.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+#
+# Script running the SimplePOSIXTimeKeeperSvc_test.py test jobOptions for CTest.
+#
+
+# Run the test:
+athena.py AthenaServices/SimplePOSIXTimeKeeperSvc_test.py
+
+# We expect this test to return an error.
+
+if [ "$?" -eq 65 ]; then
+  exit 0 
+fi
+exit 1
diff --git a/Control/CLIDComps/CMakeLists.txt b/Control/CLIDComps/CMakeLists.txt
index a02f4bbfaba5984b614b04af6b3321d9619a21ab..bac701c5ed1b6d593e2cb74932977c7ca11510f8 100644
--- a/Control/CLIDComps/CMakeLists.txt
+++ b/Control/CLIDComps/CMakeLists.txt
@@ -40,6 +40,10 @@ atlas_add_test( ClassIDSvc_test
    EXTRA_PATTERNS "WARNING Could not resolve clid DB|^JobOptionsSvc +INFO|DEBUG Property update for OutputLevel"
    ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
+atlas_add_test( clid
+                SCRIPT test/_clid_unittest.py
+                EXTRA_PATTERNS "Ran 2 tests in" )
+
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_runtime( share/Gaudi_clid.db )
diff --git a/Control/CLIDComps/share/clid.ref b/Control/CLIDComps/share/clid.ref
new file mode 100644
index 0000000000000000000000000000000000000000..2242aaf0601f0768a6f63ccff92038fea0dda663
--- /dev/null
+++ b/Control/CLIDComps/share/clid.ref
@@ -0,0 +1,5 @@
+..
+----------------------------------------------------------------------
+Ran 2 tests in 0.027s
+
+OK
diff --git a/Control/CLIDComps/test/CLIDComps.xml b/Control/CLIDComps/test/CLIDComps.xml
index ff3f8921f76cab0f0cb129a1ae0e86623cdc63b0..18f28c1dc7cc7ec77c97dcc8874804afeadcbfc4 100644
--- a/Control/CLIDComps/test/CLIDComps.xml
+++ b/Control/CLIDComps/test/CLIDComps.xml
@@ -12,14 +12,4 @@
           <returnValue>0</returnValue>
        </expectations>
     </TEST>
-    <TEST name="clid" type="script">
-       <options>_clid_unittest.py</options>
-       <author> Paolo Calafiura </author>
-       <mailto> pcalafiura@lbl.gov </mailto>
-       <expectations>
-          <errorMessage>AssertionError</errorMessage>
-          <successMessage>OK</successMessage>
-          <returnValue>0</returnValue>
-       </expectations>
-    </TEST>
 </atn>
diff --git a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite.ref b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite.ref
index 78c658c4a46d6714f80bdfa48874f17941b27824..cbe0947c892e08ba15a416e8d59fc7240a212a03 100644
--- a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite.ref
@@ -1,19 +1,20 @@
-Fri Mar 17 21:59:44 CET 2017
+Wed Sep  5 17:21:10 CEST 2018
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [AthenaExternals-22.0.0] [x86_64-slc6-gcc49-opt] [private/private] -- built on [2017-03-16 21:31]
+Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc62-opt] [atlas-work3g/e9dd4592c50] -- built on [2018-09-05T1517]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
-[?1034hPy:Athena            INFO including file "AthenaCommon/Execution.py"
+Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/ByteStreamTestWrite_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5282 configurables from 2 genConfDb files
+[?1034hPy:ConfigurableDb    INFO Read module info for 5518 configurables from 8 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r1)
-                                          running on p05614910w96644.cern.ch on Fri Mar 17 21:59:58 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r3)
+                                          running on lxplus065.cern.ch on Wed Sep  5 17:21:29 2018
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -21,14 +22,15 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ClassIDSvc           INFO  getRegistryEntries: read 8426 CLIDRegistry entries for module ALL
-ChronoStatSvc        INFO  Number of skipped events for MemStat-1
+ClassIDSvc           INFO  getRegistryEntries: read 11216 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 363 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 382 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 65 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 423 CLIDRegistry entries for module ALL
 TrigSerializeCn...   INFO initialize()
-ClassIDSvc           INFO  getRegistryEntries: read 461 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
 TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available
 TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_tlp1 is available
 TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available
@@ -36,24 +38,24 @@ TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is availab
 TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p1 is available
 TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p1 is available
 TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p2 is available
-ToolSvc.TrigTSe...WARNING Could not re-load  class listOfRules
 ToolSvc.TrigSer...   INFO Initializing - Package version: TrigSerializeTP-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 10984 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 14215 CLIDRegistry entries for module ALL
 DecisionSvc          INFO Inserting stream: StreamBSFileOutput with no Algs
 OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
-PoolSvc              INFO Initializing PoolSvc - package version PoolSvc-00-00-00
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccfrontier05.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca20.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/multithreading/2017-03-16T2130/Athena/22.0.0/InstallArea/x86_64-slc6-gcc49-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host p05614910w96644.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://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-09-03T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus065.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
-PoolSvc              INFO Re-initializing PoolSvc
+DbSession            INFO     Open     DbSession    
+Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
+StreamBSFileOut...   INFO Initializing StreamBSFileOutput.DefaultNameTool - package version AthenaServices-00-00-00
 ByteStreamEvent...   INFO Initializing ByteStreamEventStorageOutputSvc - package version ByteStreamCnvSvc-00-00-00
 ByteStreamEvent...   INFO eformat version to use: "current"
 ByteStreamEvent...   INFO event storage (BS) version to use: "current"
@@ -69,20 +71,20 @@ ApplicationMgr       INFO Application Manager Started successfully
 EventPersistenc...   INFO Added successfully Conversion service:McCnvSvc
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 1354 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1470 CLIDRegistry entries for module ALL
 ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc   INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
 ROBDataProviderSvc   INFO  ---> Filter out specific ROBs by Status Code: # ROBs = 0
 ROBDataProviderSvc   INFO  ---> Filter out Sub Detector ROBs by Status Code: # Sub Detectors = 0
-InputMetaDataSt...WARNING retrieve(default): No valid proxy for default object 
+InputMetaDataStoreWARNING retrieve(default): No valid proxy for default object 
  of type ByteStreamMetadata(CLID 170625359)
 ByteStreamEvent...   INFO No ByteStreamMetadata in InputMetaDataStore
-DetectorStore_ImplWARNING retrieve(default): No valid proxy for default object 
+DetectorStore     WARNING retrieve(default): No valid proxy for default object 
  of type TagInfo(CLID 61780915)
+ClassIDSvc           INFO  getRegistryEntries: read 218 CLIDRegistry entries for module ALL
 ByteStreamEvent...WARNING Did not find /ByteStream/Output/FreeMetadataStrings in detstore. Skipping.
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #0 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #0 1 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 210 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #0 2 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #0 2 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #0 3 events processed so far  <<<===
@@ -120,6 +122,7 @@ AthenaEventLoopMgr   INFO   ===>>>  start processing event #18, run #0 18 events
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #0 19 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #19, run #0 19 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #0 20 events processed so far  <<<===
+Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
 IncidentProcAlg2     INFO Finalize
@@ -133,4 +136,3 @@ ChronoStatSvc.f...   INFO  Service finalized successfully
 ApplicationMgr       INFO Application Manager Finalized successfully
 ApplicationMgr       INFO Application Manager Terminated successfully
 Py:Athena            INFO leaving with code 0: "successful run"
-CORAL/Services/ConnectionService Info Deleting the ConnectionPool
diff --git a/Control/PileUpTools/src/PileUpMergeSvc.cxx b/Control/PileUpTools/src/PileUpMergeSvc.cxx
index d1186bcb9883e88663ff1aad75ab39a217fcd63c..a712d56ecaf8a33552b8571072d0658f560e6caf 100755
--- a/Control/PileUpTools/src/PileUpMergeSvc.cxx
+++ b/Control/PileUpTools/src/PileUpMergeSvc.cxx
@@ -109,7 +109,11 @@ PileUpMergeSvc::initialize()    {
 
 const PileUpEventInfo* PileUpMergeSvc::getPileUpEvent() const {
   const PileUpEventInfo* p(0);
-  if (p_overStore->contains<PileUpEventInfo>("OverlayEvent")) p_overStore->retrieve(p);
+  if (p_overStore->contains<PileUpEventInfo>("OverlayEvent")) {
+    if (p_overStore->retrieve(p).isFailure()) {
+      ATH_MSG_FATAL("Cannot retrieve OverlayEvent from " << p_overStore->name());
+    }
+  }
   return p;
 }
 
diff --git a/Control/StoreGate/CMakeLists.txt b/Control/StoreGate/CMakeLists.txt
index 3178d246b37ec339c1a718b42b5ec0d7ecc943d7..d8dd609d3d30de03bd363448bc560234b6821b29 100644
--- a/Control/StoreGate/CMakeLists.txt
+++ b/Control/StoreGate/CMakeLists.txt
@@ -29,7 +29,7 @@ find_package( TBB )
 atlas_add_library( StoreGateLib src/*.cxx
    PUBLIC_HEADERS StoreGate
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-   LINK_LIBRARIES ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${CORAL_LIBRARIES} AthAllocators AthenaKernel
+   LINK_LIBRARIES ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${CORAL_LIBRARIES} AthAllocators AthenaKernel AthContainers
    SGTools GaudiKernel PersistentDataModel
    PRIVATE_LINK_LIBRARIES CxxUtils TestTools )
 
diff --git a/Control/StoreGate/StoreGate/SGIterator.h b/Control/StoreGate/StoreGate/SGIterator.h
index 6359c086deb3ff0a134d07d0ee26f5094f25797f..d6b35304a3c8c4d8e01e9cde8b7d50f8c7082e2c 100644
--- a/Control/StoreGate/StoreGate/SGIterator.h
+++ b/Control/StoreGate/StoreGate/SGIterator.h
@@ -17,6 +17,7 @@
 #include "SGTools/ProxyMap.h"
 #include "AthenaKernel/IProxyDict.h"
 #include <boost/iterator/iterator_facade.hpp>
+class SGImplSvc;
 
 
 namespace SG {
@@ -35,6 +36,9 @@ protected:
   // Required for boost iterator adapter.
   friend class boost::iterator_core_access;
 
+  // To access setState.
+  friend class ::SGImplSvc;
+
 
   /**
    * @brief Default constructor.
diff --git a/Control/StoreGate/StoreGate/StoreGateSvc.h b/Control/StoreGate/StoreGate/StoreGateSvc.h
index 3d7782155a6ac22f110a360465a2e6c5214ed2cd..dddb9177f89e37d73a12c7b23ce5ec4aace46fda 100644
--- a/Control/StoreGate/StoreGate/StoreGateSvc.h
+++ b/Control/StoreGate/StoreGate/StoreGateSvc.h
@@ -191,7 +191,6 @@ public:
   StatusCode record(T* p2BRegistered, const TKEY& key, 
                     bool allowMods, bool resetOnly=true, bool noHist=false);
 
-#if __cplusplus > 201100
   /// Record an object with a key, take ownership of the unique_ptr obj
   template <typename T, typename TKEY> 
   StatusCode record(std::unique_ptr<T> pUnique, const TKEY& key);
@@ -205,7 +204,6 @@ public:
   template <typename T, typename TKEY> 
   StatusCode record(std::unique_ptr<T> pUnique, const TKEY& key, 
                     bool allowMods, bool resetOnly=true, bool noHist=false);
-#endif
 
   //@}
 
@@ -302,7 +300,6 @@ public:
   template <typename T, typename TKEY> 
   StatusCode overwrite(std::auto_ptr<T> p2BRegistered, const TKEY& key);
 
-#if __cplusplus > 201100
   /// Record an object with a key, overwriting any existing object with same key
   template <typename T, typename TKEY> 
   StatusCode overwrite(std::unique_ptr<T> pUnique, const TKEY& key, 
@@ -311,7 +308,6 @@ public:
   /// Record an object with a key, overwriting any existing object with same key, take ownership of the unique_ptr obj
   template <typename T, typename TKEY> 
   StatusCode overwrite(std::unique_ptr<T> pUnique, const TKEY& key);
-#endif
 
   /// Create a proxy object using an IOpaqueAddress and a transient key
   StatusCode recordAddress(const std::string& skey,
@@ -329,7 +325,7 @@ public:
 
   /// make a soft link to the object pointed by id/key
   template <typename TKEY> 
-  StatusCode symLink (const CLID& id, const TKEY& key, const CLID& linkid);
+  StatusCode symLink (const CLID id, const TKEY& key, const CLID linkid);
 
   /// make an alias to a DataObject (provide data type and old key)
   template <typename T, typename TKEY, typename AKEY>
@@ -915,6 +911,16 @@ private:
                                  bool noHist=false,
                                  const std::type_info* tinfo=0);
 
+  // Helper for record.
+  template <typename T, typename TKEY> 
+  StatusCode record1(DataObject* obj, T* pObject, const TKEY& key, 
+                     bool allowMods, bool resetOnly=true, bool noHist=false);
+
+  // Helper for overwrite.
+  template <typename T, typename TKEY> 
+  StatusCode overwrite1(DataObject* obj, T* pObject, const TKEY& key, 
+                        bool allowMods, bool noHist=false);
+
   bool isSymLinked(const CLID& linkID, SG::DataProxy* dp);
 
   StatusCode addSymLink(const CLID& linkid, SG::DataProxy* dp);
@@ -1030,6 +1036,29 @@ private:
                      const std::string& what) const;
 
 
+  /**
+   * @brief try to associate a data object to its auxiliary store
+   *        if ignoreMissing=false @returns false if the aux store is not found.
+   * @param key The key to use for the lookup.
+   **/
+  template <class DOBJ>
+  bool associateAux (DOBJ*,
+                     const std::string& key,
+                     bool ignoreMissing=true) const;
+  template <class DOBJ>
+  bool associateAux (const DOBJ*,
+                     const std::string& key,
+                     bool ignoreMissing=true) const;
+
+  template <class DOBJ, class AUXSTORE>
+  bool associateAux_impl(DOBJ* ptr,
+                         const std::string& key,
+                         const AUXSTORE*) const;
+  template <class DOBJ>
+  bool associateAux_impl(DOBJ* /*ptr*/,
+                         const std::string& /*key*/,
+                         const SG::NoAuxStore*) const;
+  
 
 public:
   ///////////////////////////////////////////////////////////////////////
diff --git a/Control/StoreGate/StoreGate/StoreGateSvc.icc b/Control/StoreGate/StoreGate/StoreGateSvc.icc
index 43bea056d68c4145ebcdf65d73f785df6757e130..d54b3bf394d0acfb3b290458154de26e82716a62 100644
--- a/Control/StoreGate/StoreGate/StoreGateSvc.icc
+++ b/Control/StoreGate/StoreGate/StoreGateSvc.icc
@@ -9,7 +9,11 @@
 
 #ifndef STOREGATE_STOREGATESVC_ICC
 #define STOREGATE_STOREGATESVC_ICC
+#include "StoreGate/constraints/KeyConcept.h"
+#include "SGTools/CallBackID.h"
+#include "AthContainersInterfaces/AuxStore_traits.h"
 #include "AthenaKernel/ClassName.h"
+#include "boost/bind.hpp"
 #include <vector>
 
 /// macro to help writing the function calls.
@@ -134,8 +138,13 @@ StatusCode
 StoreGateSvc::regFcn(StatusCode (T1::*fcn1)(IOVSVC_CALLBACK_ARGS), 
                      const T1* obj1,
                      StatusCode (T2::*fcn2)(IOVSVC_CALLBACK_ARGS), 
-                     const T2* obj2, bool trigger) {
-  _SGXCALL( regFcn, (fcn1, obj1, fcn2, obj2, trigger), StatusCode::FAILURE );
+                     const T2* obj2, bool trigger)
+{
+  const CallBackID c1(fcn1, obj1);
+  const CallBackID c2(fcn2, obj2);
+  IOVSvcCallBackFcn fcn( boost::bind(fcn2,const_cast<T2*>(obj2),_1,_2));
+
+  _SGXCALL( regFcn, (c1, c2, fcn, trigger), StatusCode::FAILURE );
 }
 
 
@@ -144,12 +153,13 @@ template <typename T2>
 StatusCode 
 StoreGateSvc::regFcn(const std::string& toolName,
                      StatusCode (T2::*fcn2)(IOVSVC_CALLBACK_ARGS), 
-                     const T2* obj2, bool trigger) {
-  _SGXCALL( regFcn, (toolName, fcn2, obj2, trigger), StatusCode::FAILURE );
+                     const T2* obj2, bool trigger)
+{
+  const CallBackID c2(fcn2, obj2);
+  IOVSvcCallBackFcn fcn( boost::bind(fcn2,const_cast<T2*>(obj2),_1,_2));
+  _SGXCALL( regFcn, (toolName, c2, fcn, trigger), StatusCode::FAILURE );
 }
 
-#ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES
-#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
 ///////////////////////////////////////////////////////////////////
 // create an object and record it with key
 //////////////////////////////////////////////////////////////////
@@ -164,62 +174,133 @@ StoreGateSvc::create(const TKEY& key, ARGS... constructorArgs) {
   }
   return pT;
 }
-#endif
-#endif
 ///////////////////////////////////////////////////////////////////
 // record an object with key
 //////////////////////////////////////////////////////////////////
 template <typename T, typename TKEY> 
 StatusCode StoreGateSvc::record(std::auto_ptr<T> pAuto, const TKEY& key)
 {
-  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
-    rememberBadRecord (ClassID_traits<T>::ID(), key);
-  }
   const bool ALLOWMODS(true);
-  _SGXCALL(record, (pAuto.release(), key, ALLOWMODS), StatusCode::FAILURE); //SG takes ownership
+  return record (pAuto.release(), key, ALLOWMODS); //SG takes ownership
 }
 
 template <typename T, typename TKEY> 
 StatusCode 
-StoreGateSvc::overwrite(std::auto_ptr<T> p2BRegistered, const TKEY& key) 
+StoreGateSvc::overwrite(std::auto_ptr<T> pAuto, const TKEY& key) 
 {
-  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
-    rememberBadRecord (ClassID_traits<T>::ID(), key);
-  }
-  _SGXCALL(overwrite, (p2BRegistered, key), StatusCode::FAILURE);
+  const bool ALLOWMODS(true);
+  return overwrite(pAuto.release(), key, ALLOWMODS); //SG takes ownership
 }
 
 //-------------------------------------------------------------------
 template <typename T, typename TKEY> 
 StatusCode StoreGateSvc::record(T* pObject, const TKEY& key)
 {
-  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
-    rememberBadRecord (ClassID_traits<T>::ID(), key);
-  }
   const bool ALLOWMODS(true);
-  _SGXCALL(record, (pObject, key, ALLOWMODS), StatusCode::FAILURE);
+  return record(pObject, key, ALLOWMODS); //allow mods by default
 }
 //-------------------------------------------------------------------
 template <typename T, typename TKEY>
 StatusCode StoreGateSvc::record(const T* pObject, const TKEY& key)
 {
-  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
-    rememberBadRecord (ClassID_traits<T>::ID(), key);
-  }
   const bool NOMODS(false);
-  _SGXCALL(record, (const_cast<T*>(pObject), key, NOMODS), StatusCode::FAILURE);
+  return record(const_cast<T*>(pObject), key, NOMODS);   // do not allow mods
 }
 
 //-------------------------------------------------------------------
 template <typename T, typename TKEY> 
 StatusCode StoreGateSvc::record(T* pObject, const TKEY& key, 
                                 bool allowMods, bool resetOnly, bool noHist)
+{
+  return record1 (SG::asStorable<T>(pObject), pObject, key,
+                  allowMods, resetOnly, noHist);
+}
+
+
+//-------------------------------------------------------------------
+
+
+template <typename T, typename TKEY> 
+StatusCode StoreGateSvc::record1(DataObject* obj,
+                                 T* pObject, const TKEY& key, 
+                                 bool allowMods, bool resetOnly, bool noHist)
 {
   if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
     rememberBadRecord (ClassID_traits<T>::ID(), key);
   }
-  _SGXCALL(record, (pObject, key, allowMods, resetOnly, noHist ), StatusCode::FAILURE);
+
+#ifndef __clang__
+  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
+#endif
+  // make sure the BaseInfo(Base) structure is initialized
+  SG::BaseInfo<T>::baseinfo();
+
+  // If s_isConst is set for this type, then we want to automatically
+  // make it const when recorded.
+  if (ClassID_traits<T>::s_isConst)
+    allowMods = false;
+
+  StatusCode sc = this->currentStore()->typeless_record( obj, key, pObject,
+                                                         allowMods, resetOnly, noHist,
+                                                         &typeid(T));
+#ifndef NDEBUG
+  if (sc.isSuccess()) {
+    SG_MSG_DEBUG( 
+                 "Recorded object @" << pObject 
+                 << " with key " << (std::string)key 
+                 << " of type "  << ClassID_traits<T>::typeName()
+                 << "(CLID " << ClassID_traits<T>::ID() 
+                 << ")\n in DataObject @" << obj 
+                 << "\n object " << (allowMods ? "" : "not ")
+                 << "modifiable when retrieved");
+  }
+#endif
+
+  return sc;
+}
+
+
+//-------------------------------------------------------------------
+
+
+template <typename T, typename TKEY> 
+StatusCode StoreGateSvc::overwrite1(DataObject* obj, T* pObject,
+                                    const TKEY& key, 
+                                    bool allowMods, bool noHist)
+{
+  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
+    rememberBadRecord (ClassID_traits<T>::ID(), key);
+  }
+
+#ifndef __clang__
+  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
+#endif
+  // make sure the BaseInfo(Base) structure is initialized
+  SG::BaseInfo<T>::baseinfo();
+
+  // If s_isConst is set for this type, then we want to automatically
+  // make it const when recorded.
+  if (ClassID_traits<T>::s_isConst) allowMods = false;
+
+  StatusCode sc = this->currentStore()->typeless_overwrite(ClassID_traits<T>::ID(),
+                                                           obj, key, 
+                                                           pObject, allowMods,  noHist,
+                                                           &typeid(T));
+#ifndef NDEBUG
+  if (sc.isSuccess()) {
+    SG_MSG_DEBUG( 
+                 "overwrite: Recorded object @" << pObject 
+                 << " with key " << (std::string)key 
+                 << " of type "  << ClassID_traits<T>::typeName()
+                 << "(CLID " << ClassID_traits<T>::ID() 
+                 << ")\n in DataObject @" << obj 
+                 << "\n object " << (allowMods ? "" : "not ")
+                 << "modifiable when retrieved");
+  }
+#endif
+  return sc;
 }
+
 //////////////////////////////////////////////////////////////////
 // Retrieve the default object (with no key) as a const pointer
 //////////////////////////////////////////////////////////////////
@@ -229,7 +310,29 @@ StatusCode StoreGateSvc::retrieve(const T*& ptr) const
   if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
     rememberBadRetrieve (ClassID_traits<T>::ID(), "");
   }
-  _SGXCALL(retrieve, (ptr), StatusCode::FAILURE);
+
+  SG::DataProxy* dp =proxy(ClassID_traits<T>::ID());
+  if (!dp || !dp->isValid()) {
+    warning() 
+          << "retrieve(default): No valid proxy for default object \n" 
+          << " of type "  << ClassID_traits<T>::typeName() << "(CLID " 
+          << ClassID_traits<T>::ID() << ')' << endmsg;
+    return StatusCode::FAILURE;
+  }
+  ptr = SG::DataProxy_cast<T> (dp);
+  if (!ptr) {
+    return StatusCode::FAILURE;
+  }
+
+  //for types with an associated store, try to retrieve it and associate it
+  this->associateAux (ptr, SG::DEFAULTKEY);
+#ifndef NDEBUG
+  SG_MSG_DEBUG("retrieve(default): Retrieved const pointer to default object \n" 
+               << " of type "  << ClassID_traits<T>::typeName() 
+               << "(CLID " << ClassID_traits<T>::ID() << ')');
+#endif
+
+  return StatusCode::SUCCESS;
 }
 
 //////////////////////////////////////////////////////////////////
@@ -241,7 +344,30 @@ StatusCode StoreGateSvc::retrieve(T*& ptr) const
   if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
     rememberBadRetrieve (ClassID_traits<T>::ID(), "");
   }
-  _SGXCALL(retrieve, (ptr), StatusCode::FAILURE);
+
+  SG::DataProxy* dp =proxy(ClassID_traits<T>::ID());
+  if (!dp || !dp->isValid() || dp->isConst()) {
+    warning() 
+          << "retrieve(default): No valid proxy for default object " 
+          << " of type "  << ClassID_traits<T>::typeName() << "(CLID "
+          << ClassID_traits<T>::ID() << ")\n Try to use a const retrieve " 
+          << endmsg;
+    return StatusCode::FAILURE;
+  }
+  ptr = SG::DataProxy_cast<T> (dp);
+  if (!ptr) {
+    return StatusCode::FAILURE;
+  }
+
+  //for types with an associated store, try to retrieve it and associate it
+  this->associateAux (ptr, SG::DEFAULTKEY);
+#ifndef NDEBUG
+  SG_MSG_DEBUG("retrieve(default): Retrieved non-const pointer to default object \n" 
+               << " of type "  << ClassID_traits<T>::typeName() 
+               << "(CLID " << ClassID_traits<T>::ID() << ')');
+#endif
+
+  return StatusCode::SUCCESS;
 }
 
 //////////////////////////////////////////////////////////////////
@@ -253,7 +379,34 @@ StatusCode StoreGateSvc::retrieve(const T*& ptr, const TKEY& key) const
   if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
     rememberBadRetrieve (ClassID_traits<T>::ID(), key);
   }
-  _SGXCALL(retrieve, (ptr, key), StatusCode::FAILURE);
+
+#ifndef __clang__
+  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
+#endif
+  SG::DataProxy* dp =proxy (ClassID_traits<T>::ID(),
+                            static_cast<std::string> (key),
+                            false);
+  if (!dp || !dp->isValid()) {
+    warning() 
+          << "retrieve(const): No valid proxy for object " << key  << ' ' 
+          << " of type "  << ClassID_traits<T>::typeName() << "(CLID "
+          << ClassID_traits<T>::ID() << ')' << endmsg;
+    return StatusCode::FAILURE;
+  }
+  ptr = SG::DataProxy_cast<T> (dp);
+  if (!ptr) {
+    return StatusCode::FAILURE;
+  }
+
+  //for types with an associated store, try to retrieve it and associate it
+  this->associateAux (ptr, key);
+#ifndef NDEBUG
+  SG_MSG_DEBUG( "Retrieved const pointer to object " << key  << ' '
+                << " of type "  << ClassID_traits<T>::typeName() 
+                << "(CLID " << ClassID_traits<T>::ID() << ')');
+#endif
+
+  return StatusCode::SUCCESS;
 }
 
 //////////////////////////////////////////////////////////////////
@@ -265,7 +418,35 @@ StatusCode StoreGateSvc::retrieve(T*& ptr, const TKEY& key) const
   if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
     rememberBadRetrieve (ClassID_traits<T>::ID(), key);
   }
-  _SGXCALL(retrieve, (ptr, key), StatusCode::FAILURE);
+
+#ifndef __clang__
+  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
+#endif
+  SG::DataProxy* dp =proxy (ClassID_traits<T>::ID(),
+                            static_cast<std::string> (key),
+                            false);
+  if (!dp || !dp->isValid() || dp->isConst()) {
+    SG_MSG_WARNING("retrieve(non-const): No valid proxy for object "
+                   << (std::string)key  << ' ' 
+                   << " of type "  << ClassID_traits<T>::typeName() << "(CLID "
+                   << ClassID_traits<T>::ID() 
+                   << ") \n Try to use a const retrieve" );
+    return StatusCode::FAILURE;
+  }
+  ptr = SG::DataProxy_cast<T> (dp);
+  if (!ptr) {
+    return StatusCode::FAILURE;
+  }
+
+  //for types with an associated store, try to retrieve it and associate it
+  this->associateAux (ptr, key);
+#ifndef NDEBUG
+  SG_MSG_DEBUG("Retrieved non-const pointer to object " << (std::string)key  
+               << ' ' << " of type "  << ClassID_traits<T>::typeName() 
+               << "(CLID " << ClassID_traits<T>::ID() << ')');
+#endif
+
+  return StatusCode::SUCCESS;
 }
 
 /// Retrieve all objects of type T: returns an SG::ConstIterator range
@@ -276,7 +457,7 @@ StoreGateSvc::retrieve(SG::ConstIterator<T>& begin,
   if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
     rememberBadRetrieve (ClassID_traits<T>::ID(), "(iterator)");
   }
-  _SGXCALL(retrieve, (begin, end), StatusCode::FAILURE);
+  _SGXCALL(retrieve, (ClassID_traits<T>::ID(), begin, end), StatusCode::FAILURE);
 }
 
 
@@ -288,14 +469,12 @@ StoreGateSvc::retrieve(SG::ConstIterator<T>& begin,
 template <typename T>
 T* StoreGateSvc::retrieve () const
 {
-  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
-    typedef typename std::remove_cv<T>::type base_type;
-    rememberBadRetrieve (ClassID_traits<base_type>::ID(), "");
-  }
-  _SGXCALL(retrieve<T>, (), 0);
+  T* p = 0;
+  retrieve (p).ignore();
+  return p;
 }
 
-/**
+/**`<
  * @brief Retrieve an object of type @c T from StoreGate.
  *        Return 0 if not found.
  * @param key The key to use for the lookup.
@@ -303,11 +482,9 @@ T* StoreGateSvc::retrieve () const
 template <typename T, class TKEY>
 T* StoreGateSvc::retrieve (const TKEY& key) const
 {
-  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
-    typedef typename std::remove_cv<T>::type base_type;
-    rememberBadRetrieve (ClassID_traits<base_type>::ID(), key);
-  }
-  _SGXCALL(retrieve<T>, (key), 0);
+  T* p = 0;
+  retrieve (p, key).ignore();
+  return p;
 }
 
 /**
@@ -320,13 +497,34 @@ T* StoreGateSvc::tryRetrieve () const
   if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
     rememberBadRetrieve (ClassID_traits<T>::ID(), "");
   }
-  _SGXCALL(tryRetrieve<T>, (), 0);
+
+  SG::DataProxy* dp = proxy (ClassID_traits<T>::ID());
+  if (dp && dp->isValid() && !dp->isConst()) {
+    T* ptr = SG::DataProxy_cast<T> (dp);
+    if (ptr) {
+      this->associateAux (ptr, SG::DEFAULTKEY);
+      return ptr;
+    }
+  }
+  return nullptr;
 }
 
 template <typename T>
 const T* StoreGateSvc::tryConstRetrieve() const
 {
-  _SGXCALL(tryConstRetrieve<T>, (), 0);
+  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
+    rememberBadRetrieve (ClassID_traits<T>::ID(), "");
+  }
+
+  SG::DataProxy* dp = proxy (ClassID_traits<T>::ID());
+  if (dp && dp->isValid()) {
+    const T* ptr = SG::DataProxy_cast<T> (dp);
+    if (ptr) {
+      this->associateAux (ptr, SG::DEFAULTKEY);
+      return ptr;
+    }
+  }
+  return nullptr;
 }
 
 /**
@@ -340,13 +538,43 @@ T* StoreGateSvc::tryRetrieve (const TKEY& key) const
   if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
     rememberBadRetrieve (ClassID_traits<T>::ID(), key);
   }
-  _SGXCALL(tryRetrieve<T>, (key), 0);
+#ifndef __clang__
+  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
+#endif
+  SG::DataProxy* dp = proxy (ClassID_traits<T>::ID(),
+                             static_cast<std::string> (key),
+                             false);
+  if (dp && dp->isValid() && !dp->isConst()) {
+    T* ptr = SG::DataProxy_cast<T> (dp);
+    if (ptr) {
+      this->associateAux (ptr, key);
+      return ptr;
+    }
+  }
+  return nullptr;
 }
 
 template <typename T, class TKEY>
 const T* StoreGateSvc::tryConstRetrieve (const TKEY& key) const
 {
-  _SGXCALL(tryConstRetrieve<T>, (key), 0);
+  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
+    rememberBadRetrieve (ClassID_traits<T>::ID(), key);
+  }
+
+#ifndef __clang__
+  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
+#endif
+  SG::DataProxy* dp = proxy (ClassID_traits<T>::ID(),
+                             static_cast<std::string> (key),
+                             false);
+  if (dp && dp->isValid()) {
+    const T* ptr = SG::DataProxy_cast<T> (dp);
+    if (ptr) {
+      this->associateAux (ptr, key);
+      return ptr;
+    }
+  }
+  return nullptr;
 }
 
 template <typename T>
@@ -409,25 +637,22 @@ StoreGateSvc::bind(const DataHandle<T>& handle, const TKEY& key) {
   return handle.setState(dp); // FIXME - should be retrieve?
 }
 
-#if __cplusplus > 201100
 //-------------------------------------------------------------------
 template <typename T, typename TKEY> 
 StatusCode StoreGateSvc::record(std::unique_ptr<T> pUnique, const TKEY& key)
 {
-  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
-    rememberBadRecord (ClassID_traits<T>::ID(), key);
-  }
-  _SGXCALL(record, (std::move(pUnique), key), StatusCode::FAILURE);
+  const bool ALLOWMODS(true);
+  return record(std::move(pUnique), key, ALLOWMODS); //allow mods by default
 }
 //-------------------------------------------------------------------
 template <typename T, typename TKEY>
 StatusCode StoreGateSvc::record(std::unique_ptr<const T> pUnique,
                                 const TKEY& key)
 {
-  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
-    rememberBadRecord (ClassID_traits<T>::ID(), key);
-  }
-  _SGXCALL(record, (std::move(pUnique), key), StatusCode::FAILURE);
+  const bool NOMODS(false);
+  T* ptr = const_cast<T*> (pUnique.release());
+  return record1(SG::asStorable (ptr), ptr,
+                 key, NOMODS);   // do not allow mods
 }
 
 //-------------------------------------------------------------------
@@ -435,19 +660,14 @@ template <typename T, typename TKEY>
 StatusCode StoreGateSvc::record(std::unique_ptr<T> pUnique, const TKEY& key, 
                                 bool allowMods, bool resetOnly, bool noHist)
 {
-  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
-    rememberBadRecord (ClassID_traits<T>::ID(), key);
-  }
-  _SGXCALL(record, (std::move(pUnique), key, allowMods, resetOnly, noHist), StatusCode::FAILURE);
+  T* ptr = pUnique.get();
+  return record1 (SG::asStorable<T>(std::move(pUnique)), ptr, key,
+                  allowMods, resetOnly, noHist);
 }
-#endif
 
 template <typename T, typename TKEY> 
 StatusCode StoreGateSvc::overwrite(T* p2BRegistered, const TKEY& key)
 {
-  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
-    rememberBadRecord (ClassID_traits<T>::ID(), key);
-  }
   const bool ALLOWMODS(true);
   return overwrite(p2BRegistered, key, ALLOWMODS); //SG takes ownership
 }
@@ -457,45 +677,43 @@ StatusCode
 StoreGateSvc::overwrite(T* pObject, const TKEY& key, 
                         bool allowMods, bool noHist) 
 {
-  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
-    rememberBadRecord (ClassID_traits<T>::ID(), key);
-  }
-  _SGXCALL(overwrite, (pObject, key, allowMods, noHist), StatusCode::FAILURE);
+  return overwrite1 (SG::asStorable<T>(pObject), pObject, key,
+                     allowMods, noHist);
 }
 
-#if __cplusplus > 201100
 template <typename T, typename TKEY> 
 StatusCode StoreGateSvc::overwrite(std::unique_ptr<T> pUnique, const TKEY& key)
 {
-  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
-    rememberBadRecord (ClassID_traits<T>::ID(), key);
-  }
-  _SGXCALL(overwrite, (std::move(pUnique), key), StatusCode::FAILURE);
+  const bool ALLOWMODS(true);
+  return overwrite(std::move(pUnique), key, ALLOWMODS); //allow mods by default
 }
 
 template <typename T, typename TKEY> 
 StatusCode StoreGateSvc::overwrite(std::unique_ptr<T> pUnique, const TKEY& key, 
                                    bool allowMods, bool noHist)
 {
-  if (m_storeID == StoreID::EVENT_STORE && s_pSlot != nullptr) {
-    rememberBadRecord (ClassID_traits<T>::ID(), key);
-  }
-  _SGXCALL(overwrite, (std::move(pUnique), key, allowMods, noHist), StatusCode::FAILURE);
+  T* ptr = pUnique.get();
+  return overwrite1 (SG::asStorable<T>(std::move(pUnique)), ptr, key,
+                     allowMods, noHist);
 }
-#endif
 
 template <typename T, typename AKEY>
 StatusCode StoreGateSvc::setAlias(const T* pObject, const AKEY& aKey)
 {
+  boost::function_requires< KeyConcept<AKEY> > ();
   _SGXCALL(setAlias, (pObject, aKey), StatusCode::FAILURE);
 }
 //-------------------------------------------------------------------
 template <typename T, typename TKEY, typename AKEY>
 StatusCode 
-StoreGateSvc::setAlias(const T* dummy,
+StoreGateSvc::setAlias(const T* /*dummy*/,
                        const TKEY& key, const AKEY& aKey)
 {
-  _SGXCALL(setAlias, (dummy, key, aKey), StatusCode::FAILURE);
+#ifndef __clang__
+  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
+  BOOST_CONCEPT_ASSERT( (KeyConcept<AKEY>) );
+#endif
+  _SGXCALL(setAlias, (ClassID_traits<T>::ID(), key, aKey), StatusCode::FAILURE);
 }
 
 //////////////////////////////////////////////////////////////////
@@ -503,9 +721,9 @@ StoreGateSvc::setAlias(const T* dummy,
 //////////////////////////////////////////////////////////////////
 template <typename T, typename TLINK> 
 StatusCode 
-StoreGateSvc::symLink(const T* pObject, TLINK* dummy)
+StoreGateSvc::symLink(const T* pObject, TLINK* /*dummy*/)
 {
-  _SGXCALL(symLink, (pObject, dummy), StatusCode::FAILURE);
+  _SGXCALL(symLink, (pObject, ClassID_traits<TLINK>::ID()), StatusCode::FAILURE);
 }
 
 //////////////////////////////////////////////////////////////////
@@ -513,15 +731,20 @@ StoreGateSvc::symLink(const T* pObject, TLINK* dummy)
 //////////////////////////////////////////////////////////////////
 template <typename T, typename TLINK> 
 StatusCode 
-StoreGateSvc::symLink(const T* pObject, const TLINK* dummy)
+StoreGateSvc::symLink(const T* pObject, const TLINK* /*dummy*/)
 {
-  _SGXCALL(symLink, (pObject, dummy), StatusCode::FAILURE);
+  _SGXCALL(symLink, (pObject, ClassID_traits<TLINK>::ID()), StatusCode::FAILURE);
 }
 
 template <typename TKEY> 
 StatusCode 
-StoreGateSvc::symLink(const CLID& id, const TKEY& key, const CLID& linkid)
+StoreGateSvc::symLink(const CLID id, const TKEY& key, const CLID linkid)
 {
+#ifndef __clang__
+  //FIXME we have no way to check that the type represented by ID (the primary)
+  //FIXME is convertible into the linkid type. VERY BAD. Need introspection???
+  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
+#endif
   _SGXCALL(symLink, (id, key, linkid), StatusCode::FAILURE);
 }
 
@@ -543,52 +766,83 @@ StoreGateSvc::removeDataAndProxy(const T* pObject)  {
 template <typename T, class TKEY>
 StatusCode 
 StoreGateSvc::retrieveHighestVersion(SG::ObjectWithVersion<T>& dobjWithVersion, 
-                                     const TKEY& requestedKey) const {
-  _SGXCALL(retrieveHighestVersion, (dobjWithVersion, requestedKey), StatusCode::FAILURE);
+                                     const TKEY& requestedKey) const
+{
+  std::list< SG::ObjectWithVersion<T> > allVersions;
+  StatusCode sc(this->retrieveAllVersions(allVersions,requestedKey));
+  if (sc.isSuccess()) {
+    allVersions.sort(); // on highest version number
+    dobjWithVersion.versionedKey.copyVK(allVersions.back().versionedKey.rawVersionKey());
+  }
+  return sc;
 }
 
 template <typename T, class TKEY>
 StatusCode
 StoreGateSvc::retrieveAllVersions(std::list< SG::ObjectWithVersion<T> >& allVersions,
-                                  const TKEY& requestedKey) const {
-  _SGXCALL(retrieveAllVersions, (allVersions, requestedKey), StatusCode::FAILURE);
+                                  const TKEY& requestedKey) const
+{
+  StatusCode sc(StatusCode::FAILURE);
+  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.proxy());
+        allVersions.push_back(okOWV);
+      }
+      ++i;
+    }
+  }
+  return sc;
 }
 
 
 template <typename T>
 std::auto_ptr<T> 
 StoreGateSvc::readPrivateCopy (const std::string& key) {
-  std::auto_ptr<T> nullT;
-  _SGXCALL(readPrivateCopy<T>, (key), nullT);
+  return std::auto_ptr<T>(SG::Storable_cast<T>(
+                                               this->typeless_readPrivateCopy(ClassID_traits<T>::ID(), key)));
 }
 
 
 template <typename T>
 std::auto_ptr<T> 
 StoreGateSvc::retrievePrivateCopy (const std::string& key) {
-  std::auto_ptr<T> nullT;
-  _SGXCALL(retrievePrivateCopy<T>, (key), nullT);
+  CLID clid = ClassID_traits<T>::ID();
+  DataObject* obj = this->currentStore()->typeless_retrievePrivateCopy(clid, key);
+  std::auto_ptr<T> ret (SG::Storable_cast<T>(obj));
+  if (DataBucketBase* dbb = dynamic_cast<DataBucketBase*> (obj)) 
+  {
+    dbb->relinquish();
+  }
+  obj->release();
+  return ret;
 }
 
 template <typename T>
 std::unique_ptr<T> 
 StoreGateSvc::readUniquePrivateCopy (const std::string& key) {
-  SGImplSvc* impl = this->currentStore();
-  if (impl) {
-    return impl->readUniquePrivateCopy<T>(key);
-  }
-  return std::unique_ptr<T>();
+  return std::unique_ptr<T>(SG::Storable_cast<T>(
+                                                 this->typeless_readPrivateCopy(ClassID_traits<T>::ID(), key)));
 }
 
 
 template <typename T>
 std::unique_ptr<T> 
-StoreGateSvc::retrieveUniquePrivateCopy (const std::string& key) {
-  SGImplSvc* impl = this->currentStore();
-  if (impl) {
-    return impl->retrieveUniquePrivateCopy<T>(key);
+StoreGateSvc::retrieveUniquePrivateCopy (const std::string& key)
+{
+  CLID clid = ClassID_traits<T>::ID();
+  DataObject* obj = this->currentStore()->typeless_retrievePrivateCopy(clid, key);
+  std::unique_ptr<T> ret (SG::Storable_cast<T>(obj));
+  if (DataBucketBase* dbb = dynamic_cast<DataBucketBase*> (obj)) 
+  {
+    dbb->relinquish();
   }
-  return std::unique_ptr<T>();
+  obj->release();
+  return ret;
 }
 
 //////////////////////////////////////////////////////////////////
@@ -649,7 +903,9 @@ StoreGateSvc::remap (CLID clid,
                      const TKEY& source,
                      const TKEY& target,
                      off_t index_offset) {
-  _SGVOIDCALL(remap, (clid, source, target, index_offset));
+  _SGVOIDCALL(remap_impl, (this->stringToKey (source, clid),
+                           this->stringToKey (target, clid),
+                           index_offset));
 }
 
 
@@ -831,8 +1087,7 @@ StoreGateSvc::fromStorable(DataObject* pObject, T*& pData) {
 template <typename T>
 std::vector<std::string> //FIXME inefficient. Should take ref to vector
 StoreGateSvc::keys(bool allKeys) {
-  std::vector<std::string> nullV;
-  _SGXCALL( keys<T>, (allKeys), nullV );
+  return this->keys(ClassID_traits<T>::ID(), allKeys);
 }
 
 
@@ -860,4 +1115,59 @@ void StoreGateSvc::rememberBadRecord (CLID clid, const std::string& key) const
 }
 
 
+template <class DOBJ, class AUXSTORE>
+bool StoreGateSvc::associateAux_impl (DOBJ* ptr,
+                                      const std::string& key,
+                                      const AUXSTORE*) const
+{
+  CLID auxclid = ClassID_traits<AUXSTORE>::ID();
+  _SGXCALL( associateAux_impl, (ptr, key, auxclid), false);
+}
+
+
+template <class DOBJ>
+bool StoreGateSvc::associateAux_impl (DOBJ* /*ptr*/,
+                                      const std::string& /*key*/,
+                                      const SG::NoAuxStore*) const
+{
+  return true;
+}
+
+
+/**
+ * @brief associate a data object to its auxiliary store
+ *        Return false if the aux store is not found.
+ * @param key The key to use for the lookup.
+ **/
+template <class DOBJ>
+bool StoreGateSvc::associateAux (DOBJ* ptr,
+                                 const std::string& key,
+                                 bool ignoreMissing) const
+{
+  typename SG::AuxStore_traits<DOBJ>::type* pDummy(0); //used to pass down auxstore type
+  bool hasAux=associateAux_impl(ptr, key, pDummy) || ignoreMissing;
+  if (!hasAux) SG_MSG_WARNING("associateAux const: Could not associate AuxStore of type "  
+                              << SG::AuxStore_traits<DOBJ>::const_typeName()
+                              << "\n to object of type "  << ClassID_traits<DOBJ>::typeName() << "(CLID " 
+                              << ClassID_traits<DOBJ>::ID() << ") with key " << key << endmsg);
+  return hasAux;
+}
+
+
+template <class DOBJ>
+bool StoreGateSvc::associateAux (const DOBJ* ptr,
+                                 const std::string& key,
+                                 bool ignoreMissing) const
+{
+  typename SG::AuxStore_traits<DOBJ>::const_type* pDummy(0); //used to pass down auxstore type
+  DOBJ* ptr_nc = const_cast<DOBJ*> (ptr);
+  bool hasAux=associateAux_impl(ptr_nc, key, pDummy) || ignoreMissing;
+  if (!hasAux) SG_MSG_WARNING("associateAux const: Could not associate AuxStore of type "  
+                              << SG::AuxStore_traits<DOBJ>::const_typeName()
+                              << "\n to object of type "  << ClassID_traits<DOBJ>::typeName() << "(CLID " 
+                              << ClassID_traits<DOBJ>::ID() << ") with key " << key << endmsg);
+  return hasAux;
+}
+
+
 #endif //STOREGATE_STOREGATESVC_ICC
diff --git a/Control/StoreGate/StoreGate/tools/SGImplSvc.h b/Control/StoreGate/StoreGate/tools/SGImplSvc.h
index 437f3dd4008fb2de26c06f72aca18a8976ceef9d..9e4d6896715d27f1b9d366c0fbac07951112d9b5 100644
--- a/Control/StoreGate/StoreGate/tools/SGImplSvc.h
+++ b/Control/StoreGate/StoreGate/tools/SGImplSvc.h
@@ -65,6 +65,8 @@ namespace SG {
   class DataProxy;
   class TransientAddress;
   struct RemapImpl;
+  class AuxVectorBase;
+  class AuxElement;
 }
 
 class DataObject;
@@ -116,140 +118,18 @@ class SGImplSvc :
 {
 
 public:
-#ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES
-#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
-  /////////////////////////////////////////////////////////////////////////
-  /// \name Basic Client Interface: data object creation
-  //@{
-
-  /** Create an object with one of its constructors and record it with a key.
-   * @param key              a string (or an object convertible to a string) 
-   *  identifying the object within the event
-   * @param constructorArgs  a variable list of args passed to the constructor
-   * @returns a "pointer" to the created object (set to 0 if creation failed)
-   * Example: 
-   *   struct Foo {
-   *     int m_i;
-   *     int i() const { return m_i; }
-   *     Foo(int i) : m_i(i) {}
-   *  };
-   *  CLASS_DEF(Foo, 123456, 1);
-   *    ....
-   *  auto pFoo = pSG.create<Foo>("aFoo", 23);
-   *  assert(pFoo->i()==23);
-   *  assert(pSG.transientContains<Foo>("aFoo")); 
-   */  
-
-  template <typename T, typename TKEY, typename... ARGS>
-  SG::WPtr<T> create(const TKEY& key, ARGS... constructorArgs);
-  //@}
-#endif   /* needs C++11 variadic templates to call arbitrary constructors */
-#endif   /* needs "templated typedef" to define SG::WPtr (for now) */
-
-  /////////////////////////////////////////////////////////////////////////
-  /// \name Basic Client Interface: data object registration
-  //@{
-
-  /// Record an object with a key.
-  template <typename T, typename TKEY> 
-  StatusCode record(T* p2BRegistered, const TKEY& key);
-
-  /// Record a const object with a key
-  template <typename T, typename TKEY> 
-  StatusCode record(const T* p2BRegistered, const TKEY& key);
-
-  /// Record an object with a key, take ownership of the auto_pointed obj
-  template <typename T, typename TKEY> 
-  StatusCode record(std::auto_ptr<T> p2BRegistered, const TKEY& key);
-
-  /// Record an object with a key, allow possibility of specifying 
-  /// const-access. 
-  template <typename T, typename TKEY> 
-  StatusCode record(T* p2BRegistered, const TKEY& key, 
-                    bool allowMods, bool resetOnly=true, bool noHist=false);
-
-#if __cplusplus > 201100
-  /// Record an object with a key, take ownership of the unique_ptr obj
-  template <typename T, typename TKEY> 
-  StatusCode record(std::unique_ptr<T> pUnique, const TKEY& key);
-
-  /// Record a const object with a key
-  template <typename T, typename TKEY> 
-  StatusCode record(std::unique_ptr<const T> pUnique, const TKEY& key);
-
-  /// Record an object with a key, allow possibility of specifying 
-  /// const-access. 
-  template <typename T, typename TKEY> 
-  StatusCode record(std::unique_ptr<T> pUnique, const TKEY& key, 
-                    bool allowMods, bool resetOnly=true, bool noHist=false);
-#endif
+  SGImplSvc (const SGImplSvc&) = delete;
+  SGImplSvc& operator= (const SGImplSvc&) = delete;
 
-  //@}
 
   /////////////////////////////////////////////////////////////////////////
   /// \name Basic Client Interface: data object access
   //@{
 
-  /// Retrieve the default object into a const T*
-  template <typename T> 
-  StatusCode retrieve(const T*& ptr) const;
-
-  /// Retrieve the default object into a T*
-  template <typename T>
-  StatusCode retrieve(T*& ptr) const;
-
-  /// Variant of the above which doesn't return a status code.
-  /// Just returns null if the object isn't found.
-  template <typename T>
-  T* retrieve () const;
-
-  /// Variant of the above which doesn't print a warning message.
-  /// Just returns null if the object isn't found. Compare to contains
-  template <typename T>
-  T* tryRetrieve () const;
-  template <typename T>
-  const T* tryConstRetrieve() const;
-
-  /// Retrieve an object with "key", into a const T*
-  template <typename T, typename TKEY> 
-  StatusCode retrieve(const T*& ptr, const TKEY& key) const;
-
-  /// Retrieve an object with "key", into a T*
-  template <typename T, typename TKEY>
-  StatusCode retrieve(T*& ptr, const TKEY& key) const;
-
-  /// Variant of the above which doesn't return a status code.
-  /// Just returns null if the object isn't found.
-  template <typename T, class TKEY>
-  T* retrieve (const TKEY& key) const;
-
-  /// Variant of the above which doesn't print a warning message.
-  /// Just returns null if the object isn't found. Compare to contains
-  template <typename T, class TKEY>
-  T* tryRetrieve (const TKEY& key) const;
-  template <typename T, class TKEY>
-  const T* tryConstRetrieve(const TKEY& key) const;
-
-  /**
-   * @brief try to associate a data object to its auxiliary store
-   *        if ignoreMissing=false @returns false if the aux store is not found.
-   * @param key The key to use for the lookup.
-   **/
-  template <class DOBJ>
-  bool associateAux (DOBJ*,
-                     const std::string& key,
-                     bool ignoreMissing=true) const;
-  template <class DOBJ>
-  bool associateAux (const DOBJ*,
-                     const std::string& key,
-                     bool ignoreMissing=true) const;
-
-
-
   /// Retrieve all objects of type T: returns an SG::ConstIterator range
-  template <typename T> 
-  StatusCode retrieve(SG::ConstIterator<T>& begin, 
-                      SG::ConstIterator<T>& end) const;
+  StatusCode retrieve (CLID clid,
+                       SG::detail::IteratorBase& cibegin, 
+                       SG::detail::IteratorBase& ciend) const;
 
   /** Look up a keyed object in TDS (compare also tryRetrieve)
    *  returns false if object not available in TDS or persistent stores 
@@ -264,66 +144,32 @@ public:
   /// \name Advanced Client Interface: data object registration
   //@{
 
-  /// Record an object with a key, overwriting any existing object with same key
-  template <typename T, typename TKEY> 
-  StatusCode overwrite(T* p2BRegistered, const TKEY& key);
-
-  /// Record an object with a key, overwriting any existing object with same key
-  template <typename T, typename TKEY> 
-  StatusCode overwrite(T* p2BRegistered, const TKEY& key, 
-                       bool allowMods, bool noHist=false);
-
-  /// Record an object with a key, overwriting any existing object with same key, take ownership of the auto_pointed obj
-  template <typename T, typename TKEY> 
-  StatusCode overwrite(std::auto_ptr<T> p2BRegistered, const TKEY& key);
-
-#if __cplusplus > 201100
-  /// Record an object with a key, overwriting any existing object with same key
-  template <typename T, typename TKEY> 
-  StatusCode overwrite(std::unique_ptr<T> pUnique, const TKEY& key, 
-                       bool allowMods, bool noHist=false);
-
-  /// Record an object with a key, overwriting any existing object with same key, take ownership of the unique_ptr obj
-  template <typename T, typename TKEY> 
-  StatusCode overwrite(std::unique_ptr<T> pUnique, const TKEY& key);
-#endif
-
   /// Create a proxy object using an IOpaqueAddress and a transient key
   StatusCode recordAddress(const std::string& skey,
                            IOpaqueAddress* pAddress, bool clearAddressFlag=true);
   /// Create a proxy object using an IOpaqueAddress
   StatusCode recordAddress(IOpaqueAddress* pAddress, bool clearAddressFlag=true);
 
-  /// make a soft link to the object T* already registered (non-const)
-  template <typename T, typename TLINK> 
-  StatusCode symLink (const T* p2BRegistered, TLINK* p2BLinked );
-
-  /// make a soft link to the object T* already registered (const link)
-  template <typename T, typename TLINK> 
-  StatusCode symLink (const T* p2BRegistered, const TLINK* p2BLinked );
+  /// make a soft link to the object T* already registered
+  StatusCode symLink (const void* p2BRegistered, CLID linkID );
 
   /// make a soft link to the object pointed by id/key
-  template <typename TKEY> 
-  StatusCode symLink (const CLID& id, const TKEY& key, const CLID& linkid);
+  StatusCode symLink (const CLID id, const std::string& key, const CLID linkid);
 
   /// make an alias to a DataObject (provide data type and old key)
-  template <typename T, typename TKEY, typename AKEY>
-  StatusCode setAlias(const T* p2BAliased, const TKEY& key, const AKEY& aliasKey);
+  StatusCode setAlias(CLID clid, const std::string& key, const std::string& aliasKey);
 
   /// make an alias to a DataObject (provide only valid pointer)
-  template <typename T, typename AKEY>
-  StatusCode setAlias(const T* p2BAliased, const AKEY& aliasKey);
+  StatusCode setAlias(const void* p2BAliased, const std::string& aliasKey);
 
   /// prevent downstream clients from modifying the pointed-at dobj
   StatusCode setConst(const void* pointer);
 
   /// Remove pObject,  will remove its proxy if not reset only.
-  template <typename T>
-  StatusCode remove(const T* pObject);
+  StatusCode remove(const void* pObject);
 
   /// Remove pObject and its proxy no matter what.       
-  template <typename T>          
-  StatusCode removeDataAndProxy(const T* pObject);
+  StatusCode removeDataAndProxy(const void* pObject);
 
   /// @brief swap the content of 2 keys
   ///  payload A indexed by keyA will now be accessed via keyB and vice versa
@@ -339,108 +185,24 @@ public:
   /// \name Advanced Client Interface: data object access
   //@{
 
-  /// Retrieve version with highest cycle number for a given T,KEY combination
-  /// If there is only one available version of this data object
-  /// the returned ObjectWithVersion<T>.versionedKey is set to requestedKey
-  /// NOTICE that this method is significantly slower than 
-  ///     retrieve(const T*, const TKEY&)
-  /// which returns the last recorded version rather than the one with the
-  /// highest cycle number.
-  /// @returns StatusCode::FAILURE if no dataObject found
-  template <typename T, class TKEY>
-  StatusCode retrieveHighestVersion(SG::ObjectWithVersion<T>& dobjWithVersion, 
-                                    const TKEY& requestedKey) const;
-
-  /// Retrieve all versions of a given T,KEY combination
-  /// sets allVersions, a ref to a vector of ObjectWithVersion<T>
-  /// If there is only one available version of this dataObject
-  /// allVersions[0].versionedKey is set to requestedKey.
-  /// @returns StatusCode::FAILURE if no dataObject found
-  //FIXME using a vector exposes ObjectWithVersion definition and hence
-  //FIXME VersionedKey.h. Should try an iface like
-  //FIXME  retrieveAllVersions(const TKEY& requestedKey,
-  //FIXME                      ObjectWithVersion<T>& begin,
-  //FIXME                      ObjectWithVersion<T>& end)
-  template <typename T, class TKEY>
-  StatusCode
-  retrieveAllVersions(std::list< SG::ObjectWithVersion<T> >& allVersions,
-                      const TKEY& requestedKey) const;
-
-  
-
-  /// EXPERTS ONLY: reads from disk your very own private copy of a StoreGate 
-  /// object of type T and given key, if available and locked.
-  /// readPrivateCopy does not look up the object in SG transient memory
-  /// so it will fail to return a newly recorded object.
-  /// You are responsible for managing the returned object and for keeping it
-  /// in sync with the "main" copy in transient memory, if any.
-  /// DEPRECATED Use readUniquePrivateCopy
-  /// @param key The key to use for the lookup.
-  /// @return null auto_ptr if the object isn't found or if it is unlocked.
-  template <typename T>
-  std::auto_ptr<T> readPrivateCopy (const std::string& key);
-
-  /// EXPERTS ONLY: reads from disk your very own private copy of a StoreGate 
-  /// object of type T and given key, if available and locked.
-  /// readPrivateCopy does not look up the object in SG transient memory
-  /// so it will fail to return a newly recorded object.
-  /// You are responsible for managing the returned object and for keeping it
-  /// in sync with the "main" copy in transient memory, if any.
-  /// @param key The key to use for the lookup.
-  /// @return null auto_ptr if the object isn't found or if it is unlocked.
-  template <typename T>
-  std::unique_ptr<T> readUniquePrivateCopy (const std::string& key);
-
   /// readPrivateCopy implementation (possibly useful from python hence public)
   DataObject*
   typeless_readPrivateCopy(const CLID& clid, const std::string& key);
 
 
-  /// EXPERTS ONLY: like readPrivateCopy this method returns your own private
-  /// copy of a data object of type T and given key, if available and locked.
-  /// The difference is that it will return you also an object in SG transient 
-  /// memory. Since we are taking ownership of it, the object in SG
-  /// will be released after retrievePrivateCopy returns, making
-  /// all cached references to the object potentially invalid and
-  /// obviously preventing it from being written out.
-  /// Sequencing becomes critical. Caveat emptor!
-  /// DEPRECATED Use retrieveUniquePrivateCopy
-  /// @param key The key to use for the lookup.
-  /// @return null auto_ptr if the object isn't found or if it is unlocked.
-  template <typename T>
-  std::auto_ptr<T> retrievePrivateCopy (const std::string& key);
-
-  /// EXPERTS ONLY: like readPrivateCopy this method returns your own private
-  /// copy of a data object of type T and given key, if available and locked.
-  /// The difference is that it will return you also an object in SG transient 
-  /// memory. Since we are taking ownership of it, the object in SG
-  /// will be released after retrievePrivateCopy returns, making
-  /// all cached references to the object potentially invalid and
-  /// obviously preventing it from being written out.
-  /// Sequencing becomes critical. Caveat emptor!
-  /// @param key The key to use for the lookup.
-  /// @return null auto_ptr if the object isn't found or if it is unlocked.
-  template <typename T>
-  std::unique_ptr<T> retrieveUniquePrivateCopy (const std::string& key);
+  DataObject*
+  typeless_retrievePrivateCopy (const CLID clid, const std::string& key);
+
 
   /// Retrieve the main @c CLID of the object recorded in @c StoreGate
   /// with the given "key" 
   /// WARNING: slow!
-  template<typename TKEY>
-  CLID clid( const TKEY& key ) const;
+  CLID clid( const std::string& key ) const;
 
   /// Retrieve all the @c CLID s (including symlinks) of the object recorded in @c StoreGate
   /// with the given "key" 
   /// WARNING: slow!
-  template<typename TKEY>
-  std::vector<CLID> clids( const TKEY& key ) const;  
-
-  /** Return the number of instances of an object of type T 
-   * int i = p_store->typeCount<T>();     
-   * Note that this will return the number of proxies in transient memory
-   * only, will not check with proxy providers. */
-  template <typename T>
-  int typeCount() const;
+  std::vector<CLID> clids( const std::string& key ) const;  
 
   /** Return the number of instances of type T (input CLID) */
   int typeCount(const CLID& id) const;
@@ -448,21 +210,12 @@ public:
   /** Look up a keyed object in TDS by CLID.
    *  returns false if object not available in TDS or persistent stores 
    *  Usage: if (!p_store->contains(FooID, "fooKey")) { ... } */
-  template <typename TKEY>
-  bool contains(const CLID& id, const TKEY& key) const;
+  bool contains(const CLID id, const std::string& key) const;
 
 
-  /** Look up a transient data object in TDS only (no Proxy lookup)
-   *  returns false if object not available in TDS 
-   *  Usage: if (!p_store->contains<Foo>("fooKey")) { ... } */
-  ///
-  template <typename T, typename TKEY> 
-  bool transientContains(const TKEY& key) const;
-
   /** Look up a transient data object in TDS only by CLID.
    *  returns false if object not available in TDS */
-  template <typename TKEY>
-  bool transientContains(const CLID& id, const TKEY& key) const;
+  bool transientContains(const CLID id, const std::string& key) const;
 
   /** dump objects in store. request forwarded to DataStore
    * this is triggered at EndEvent setting the Dump property to true */
@@ -474,17 +227,6 @@ public:
   StoreID::type storeID() const;
 
 
-  /** provide list of all StoreGate keys associated with an object.
-   *  usage: p_store->keys<T>(vkeys, optional flags);
-   *  @param vkeys will be filled with the (possibly empty) list of keys
-   *  @param includeAlias (default false) add alias keys as well
-   *  @param onlyValid (default true) add only keys of valid dobjs
-   */
-  template <typename T>
-  void
-  keys(std::vector<std::string>& vkeys, 
-       bool includeAlias = false, bool onlyValid = true); 
- 
   /** provide list of all StoreGate keys associated with an object.
    *  usage: p_store->keys(CLID, vkeys, optionalFlags);
    *  @param id CLID for which we are requesting list of keys
@@ -508,18 +250,17 @@ public:
   //@{
 
   /// register a callback function(2) with an already registered function(1)
-  template <typename T1, typename T2>
-  StatusCode regFcn(StatusCode (T1::*fcn1)(IOVSVC_CALLBACK_ARGS), 
-                    const T1* obj1,
-                    StatusCode (T2::*fcn2)(IOVSVC_CALLBACK_ARGS), 
-                    const T2* obj2, bool trigger=false);
+  StatusCode regFcn (const CallBackID c1,
+                     const CallBackID c2,
+                     const IOVSvcCallBackFcn& fcn,
+                     bool trigger = false);
 
   /// register a callback function(2) with an already registered AlgTool
-  template <typename T2>
-  StatusCode regFcn(const std::string& toolName,
-                    StatusCode (T2::*fcn2)(IOVSVC_CALLBACK_ARGS), 
-                    const T2* obj2, bool trigger=false);
-
+  StatusCode regFcn (const std::string& toolName,
+                     const CallBackID c2,
+                     const IOVSvcCallBackFcn& fcn,
+                     bool trigger = false);
+  
   //@}
   /////////////////////////////////////////////////////////////////////////
 
@@ -685,35 +426,6 @@ public:
   //@{
 
 
-  /**
-   * @brief Declare a remapping.
-   * @brief clid Class ID of the container being remapped.
-   * @brief source Key of the container being remapped.
-   * @brief target Key of the container being remapped to.
-   * @brief index_offset Amount by which the index should be adjusted
-   *        between the two containers.
-   *
-   * This can be used to change the container to which @c ElementLink's
-   * (and @c DataLink's) point on output.
-   *
-   * For example, suppose you have two containers of type T, A and B.
-   * There possibly are @c ElementLink's pointing at elements contained
-   * in them.  You want to change to a single container C, containing
-   * the contents of A and B concatenated.  To get @c ElementLink's
-   * updated on output, you can do:
-   *
-   *@code
-   *   m_sg->remap (ClassID_traits<T>::ID(), "A", "C", 0);
-   *   m_sg->remap (ClassID_traits<T>::ID(), "B", "C", a.size());
-   @endcode
-  */
-  template <class TKEY>
-  void remap (CLID clid,
-              const TKEY& source,
-              const TKEY& target,
-              off_t index_offset);
-
-
   /**
    * @brief Declare a remapping.
    * @brief source Key hash of the container being remapped.
@@ -831,16 +543,6 @@ public:
   ///////////////////////////////////////////////////////////////////////
 private:
 
-  // Helper for record.
-  template <typename T, typename TKEY> 
-  StatusCode record1(DataObject* obj, T* pObject, const TKEY& key, 
-                     bool allowMods, bool resetOnly=true, bool noHist=false);
-
-  // Helper for overwrite.
-  template <typename T, typename TKEY> 
-  StatusCode overwrite1(DataObject* obj, T* pObject, const TKEY& key, 
-                        bool allowMods, bool noHist=false);
-
   StatusCode record_HistObj(const CLID& id, const std::string& key,
                             const std::string& store, bool allowMods, 
                             bool resetOnly=true);
@@ -970,26 +672,15 @@ private:
   /// callback for output level property 
   void msg_update_handler(Property& outputLevel);
 
-  template <class DOBJ, class AUXSTORE>
-  bool associateAux_impl(DOBJ* ptr,
-                         const std::string& key,
-                         const AUXSTORE*) const;
-  template <class DOBJ, class AUXSTORE>
-  bool associateAux_impl(const DOBJ* ptr,
-                         const std::string& key,
-                         const AUXSTORE*) const;
-  template <class DOBJ>
-  bool associateAux_impl(DOBJ* /*ptr*/,
-                         const std::string& /*key*/,
-                         const SG::NoAuxStore*) const
-  { return true; }
-  template <class DOBJ>
-  bool associateAux_impl(const DOBJ* /*ptr*/,
-                         const std::string& /*key*/,
-                         const SG::NoAuxStore*) const
-  { return true; }
-
-  /// Add automatically-made symlinks for DP.
+  bool associateAux_impl (SG::AuxVectorBase* ptr,
+                          const std::string& key,
+                          CLID auxclid) const;
+
+  bool associateAux_impl (SG::AuxElement* ptr,
+                          const std::string& key,
+                          CLID auxclid) const;
+
+/// Add automatically-made symlinks for DP.
   void addAutoSymLinks (const std::string& key, CLID clid, SG::DataProxy* dp,
                         const std::type_info* tinfo,
                         bool warn_nobib = true);
@@ -1057,45 +748,10 @@ public:
   /// \name Obsolete and Deprecated methods 
   //@{
 
-  /// DEPRECATED, use version taking ref to vector
-  template <typename T>
-  std::vector<std::string> //FIXME inefficient. Should take ref to vector
-  keys(bool allKeys = false); 
- 
   /// DEPRECATED, use version taking ref to vector
   std::vector<std::string> //FIXME inefficient. Should take ref to vector 
-  keys(const CLID& id, bool allKeys = false);
-
-  /// DEPRECATED:  use recordAddress instead
-  inline 
-  StatusCode createProxy(IOpaqueAddress* pAddress, bool clearAddressFlag=true);
-
-  /// OBSOLETE try to locate a proxy or create it if needed
-  /// use new signature with two bool flags
-  SG::DataProxy* setupProxy(const CLID& dataID, 
-                            const std::string& gK, 
-                            DataObject* pDObj);
+  keys(const CLID id, bool allKeys = false);
   //@}
-
-  /// \name Obsolete and Deprecated methods 
-  //@{
-  /// DEPRECATED put a dobj pointer in a bucket as appropriate
-  /// see tools/StorableConversion.h for replacement
-  template <typename T>
-  static 
-  DataObject* asStorable(T* pDObj);
-  /// DEPRECATED gets a dobj pointer from a bucket as appropriate
-  /// see tools/StorableConversion.h for replacement
-  template <typename T>
-  static 
-  bool fromStorable(DataObject* pObject, T*& pData);
-  //@}
-
-
-private:
-  SGImplSvc (const SGImplSvc&);
-  SGImplSvc& operator= (const SGImplSvc&);
-
 };
 
 
diff --git a/Control/StoreGate/StoreGate/tools/SGImplSvc.icc b/Control/StoreGate/StoreGate/tools/SGImplSvc.icc
index c46200284d536a9430e637b16fa41c080c4dc864..e8db777832642d50dad749c032fb97dee92f227e 100644
--- a/Control/StoreGate/StoreGate/tools/SGImplSvc.icc
+++ b/Control/StoreGate/StoreGate/tools/SGImplSvc.icc
@@ -5,25 +5,12 @@
 */
 
 /** @file SGImplSvc.icc
- *  inlined implementation of SGImplSvc templated methods
  */
 
 #ifndef STOREGATE_SGIMPLSVC_ICC
 #define STOREGATE_SGIMPLSVC_ICC
 
-#include "StoreGate/constraints/KeyConcept.h"
-#include "AthContainersInterfaces/AuxStore_traits.h"
-#include "SGTools/DataBucket.h"
-#include "SGTools/ClassID_traits.h"
-#include "SGTools/StorableConversions.h"
-#include "SGTools/CallBackID.h"
-#include "SGTools/BaseInfo.h"
 #include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/ClassID.h"
-#include "boost/type_traits/remove_const.hpp"
-#include "boost/concept/assert.hpp"
-#include "boost/bind.hpp"
-#include <iostream>
 
 
 
@@ -41,824 +28,6 @@
 #define SG_MSG_WARNING(x) SG_MSG_LVL(MSG::WARNING, x)
 
 
-//////////////////////////////////////////////////////////////////
-// record an object without key
-//////////////////////////////////////////////////////////////////
-/************OBSOLETE METHODS***********************
-template <typename T> 
-StatusCode SGImplSvc::record(T* pObject)
-{
-  return record(pObject, true);
-}
-
-template <typename T>
-StatusCode SGImplSvc::record(const T* pObject)
-{
-  return record(const_cast<T*>(pObject), false);
-}
-//////////////////////////////////////////////////////////////////
-// Record an Object in the Transient Data Store without key
-// Can specify its const-ness in store
-//////////////////////////////////////////////////////////////////
-template <typename T> 
-StatusCode SGImplSvc::record(T* pObject, const bool& allowMods)
-{
-  //always delete the proxy of a keyless object 
-  static const bool RESETONLY(false); 
-  // generate a default unique key
-  return record(pObject, createKey(ClassID_traits<T>::ID()), allowMods, RESETONLY);
-
-}
-***********OBSOLETE METHODS********************/
-
-#ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES
-#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
-///////////////////////////////////////////////////////////////////
-// create an object and record it with key
-//////////////////////////////////////////////////////////////////
-template <typename T, typename TKEY, typename... ARGS>
-SG::WPtr<T> 
-SGImplSvc::create(const TKEY& key, ARGS... constructorArgs) {
-  T* pT = new T(constructorArgs...);
-  if(!(this->record(pT, key).isSuccess())) {
-    error() << "create: problem recording created object @" 
-          << pT << " using key " << key << endmsg;
-    pT=0; //record will take care of deleting pT even if it fails
-  }
-  return pT;
-}
-#endif
-#endif
-///////////////////////////////////////////////////////////////////
-// record an object with key
-//////////////////////////////////////////////////////////////////
-template <typename T, typename TKEY> 
-StatusCode SGImplSvc::record(std::auto_ptr<T> pAuto, const TKEY& key)
-{
-  const bool ALLOWMODS(true);
-  return record(pAuto.release(), key, ALLOWMODS); //SG takes ownership
-}
-
-template <typename T, typename TKEY> 
-StatusCode SGImplSvc::overwrite(std::auto_ptr<T> pAuto, const TKEY& key)
-{
-  const bool ALLOWMODS(true);
-  return overwrite(pAuto.release(), key, ALLOWMODS); //SG takes ownership
-}
-
-//-------------------------------------------------------------------
-template <typename T, typename TKEY> 
-StatusCode SGImplSvc::record(T* pObject, const TKEY& key)
-{
-  const bool ALLOWMODS(true);
-  return record(pObject, key, ALLOWMODS); //allow mods by default
-}
-//-------------------------------------------------------------------
-template <typename T, typename TKEY>
-StatusCode SGImplSvc::record(const T* pObject, const TKEY& key)
-{
-  const bool NOMODS(false);
-  return record(const_cast<T*>(pObject), key, NOMODS);   // do not allow mods
-}
-
-//-------------------------------------------------------------------
-template <typename T, typename TKEY> 
-StatusCode SGImplSvc::record(T* pObject, const TKEY& key, 
-                             bool allowMods, bool resetOnly, bool noHist)
-{
-  return record1 (SG::asStorable<T>(pObject), pObject, key,
-                  allowMods, resetOnly, noHist);
-}
-
-//-------------------------------------------------------------------
-template <typename T, typename TKEY> 
-StatusCode SGImplSvc::record1(DataObject* obj,
-                              T* pObject, const TKEY& key, 
-                              bool allowMods, bool resetOnly, bool noHist)
-{
-  lock_t lock (m_mutex);
-#ifndef __clang__
-  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
-#endif
-  // make sure the BaseInfo(Base) structure is initialized
-  SG::BaseInfo<T>::baseinfo();
-
-  // If s_isConst is set for this type, then we want to automatically
-  // make it const when recorded.
-  if (ClassID_traits<T>::s_isConst)
-    allowMods = false;
-
-  StatusCode sc = typeless_record( obj, key, pObject, allowMods, resetOnly, noHist,
-                                   &typeid(T));
-#ifndef NDEBUG
-  if (sc.isSuccess()) {
-    SG_MSG_DEBUG( 
-                 "Recorded object @" << pObject 
-                 << " with key " << (std::string)key 
-                 << " of type "  << ClassID_traits<T>::typeName()
-                 << "(CLID " << ClassID_traits<T>::ID() 
-                 << ")\n in DataObject @" << obj 
-                 << "\n object " << (allowMods ? "" : "not ")
-                 << "modifiable when retrieved");
-  }
-#endif
-
-  return sc;
-}
-
-#if __cplusplus > 201100
-//-------------------------------------------------------------------
-template <typename T, typename TKEY> 
-StatusCode SGImplSvc::record(std::unique_ptr<T> pUnique, const TKEY& key)
-{
-  const bool ALLOWMODS(true);
-  return record(std::move(pUnique), key, ALLOWMODS); //allow mods by default
-}
-//-------------------------------------------------------------------
-template <typename T, typename TKEY>
-StatusCode SGImplSvc::record(std::unique_ptr<const T> pUnique,
-                             const TKEY& key)
-{
-  const bool NOMODS(false);
-  T* ptr = const_cast<T*> (pUnique.release());
-  return record1(SG::asStorable (ptr), ptr,
-                 key, NOMODS);   // do not allow mods
-}
-
-//-------------------------------------------------------------------
-template <typename T, typename TKEY> 
-StatusCode SGImplSvc::record(std::unique_ptr<T> pUnique, const TKEY& key, 
-                             bool allowMods, bool resetOnly, bool noHist)
-{
-  T* ptr = pUnique.get();
-  return record1 (SG::asStorable<T>(std::move(pUnique)), ptr, key,
-                  allowMods, resetOnly, noHist);
-}
-#endif
-
-template <typename T, typename TKEY> 
-StatusCode SGImplSvc::overwrite1(DataObject* obj, T* pObject,
-                                 const TKEY& key, 
-                                 bool allowMods, bool noHist)
-{
-  lock_t lock (m_mutex);
-#ifndef __clang__
-  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
-#endif
-  // make sure the BaseInfo(Base) structure is initialized
-  SG::BaseInfo<T>::baseinfo();
-
-  // If s_isConst is set for this type, then we want to automatically
-  // make it const when recorded.
-  if (ClassID_traits<T>::s_isConst) allowMods = false;
-
-  StatusCode sc = typeless_overwrite(ClassID_traits<T>::ID(), obj, key, 
-                                     pObject, allowMods,  noHist,
-                                     &typeid(T));
-#ifndef NDEBUG
-  if (sc.isSuccess()) {
-    SG_MSG_DEBUG( 
-                 "overwrite: Recorded object @" << pObject 
-                 << " with key " << (std::string)key 
-                 << " of type "  << ClassID_traits<T>::typeName()
-                 << "(CLID " << ClassID_traits<T>::ID() 
-                 << ")\n in DataObject @" << obj 
-                 << "\n object " << (allowMods ? "" : "not ")
-                 << "modifiable when retrieved");
-  }
-#endif
-  return sc;
-}
-
-template <typename T, typename TKEY> 
-StatusCode SGImplSvc::overwrite(T* p2BRegistered, const TKEY& key)
-{
-  const bool ALLOWMODS(true);
-  return overwrite(p2BRegistered, key, ALLOWMODS); //SG takes ownership
-}
-
-
-template <typename T, typename TKEY> 
-StatusCode SGImplSvc::overwrite(T* pObject, const TKEY& key, 
-                                bool allowMods, bool noHist)
-{
-  return overwrite1 (SG::asStorable<T>(pObject), pObject, key,
-                     allowMods, noHist);
-}
-
-#if __cplusplus > 201100
-template <typename T, typename TKEY> 
-StatusCode SGImplSvc::overwrite(std::unique_ptr<T> pUnique, const TKEY& key)
-{
-  const bool ALLOWMODS(true);
-  return overwrite(std::move(pUnique), key, ALLOWMODS); //allow mods by default
-}
-
-template <typename T, typename TKEY> 
-StatusCode SGImplSvc::overwrite(std::unique_ptr<T> pUnique, const TKEY& key, 
-                                bool allowMods, bool noHist)
-{
-  T* ptr = pUnique.get();
-  return overwrite1 (SG::asStorable<T>(std::move(pUnique)), ptr, key,
-                     allowMods, noHist);
-}
-#endif
-
-//-------------------------------------------------------------------
-template <typename T, typename AKEY>
-StatusCode SGImplSvc::setAlias(const T* pObject, const AKEY& aKey)
-{
-  lock_t lock (m_mutex);
-  boost::function_requires< KeyConcept<AKEY> > ();
-  std::string aliasKey(aKey);
-
-  SG::DataProxy* dp(0);
-  dp = proxy(pObject);
-  if (0 == dp) {
-    error() << "setAlias: problem setting alias "
-          << aliasKey << '\n'
-          << "DataObject does not exist, record before setting alias."
-          << endmsg;
-    return StatusCode::FAILURE;
-  }
-
-  StatusCode sc = addAlias(aliasKey, dp);
-  if (sc.isFailure()) {
-    error() << "setAlias: problem setting alias " 
-          << aliasKey << '\n'
-          << "DataObject does not exist, record before setting alias."
-          << endmsg;
-    return StatusCode::FAILURE;
-  }
-
-  return StatusCode::SUCCESS;
-}
-//-------------------------------------------------------------------
-template <typename T, typename TKEY, typename AKEY>
-StatusCode SGImplSvc::setAlias(const T* /*pObject*/,
-                               const TKEY& key, const AKEY& aKey)
-{
-  lock_t lock (m_mutex);
-#ifndef __clang__
-  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
-  BOOST_CONCEPT_ASSERT( (KeyConcept<AKEY>) );
-#endif
-
-  SG::DataProxy* dp(0); 
-  dp = proxy(ClassID_traits<T>::ID(), key);
-  if (0 == dp) {
-    error() << "setAlias: problem setting alias " 
-          << std::string(aKey) << '\n'
-          << "DataObject does not exist, record before setting alias."
-          << endmsg;
-    return StatusCode::FAILURE;
-  }
-
-  StatusCode sc = addAlias(aKey, dp);
-  if (sc.isFailure()) {
-    error() << "setAlias: problem setting alias " 
-          << (std::string)aKey << '\n'
-          << "DataObject does not exist, record before setting alias."
-          << endmsg;
-    return StatusCode::FAILURE;
-  }
-
-  return StatusCode::SUCCESS;
-
-}
-//-------------------------------------------------------------------
-
-
-//////////////////////////////////////////////////////////////////
-// Make a soft link to the object with key: return non_const link
-//////////////////////////////////////////////////////////////////
-template <typename T, typename TLINK> 
-StatusCode SGImplSvc::symLink(const T* pObject, TLINK*)
-{
-  lock_t lock (m_mutex);
-  SG::DataProxy* dp(proxy(pObject));
-  CLID linkID = ClassID_traits<TLINK>::ID();
-
-  // if symLink already exists, just return success      
-  return isSymLinked(linkID,dp) ?
-    StatusCode::SUCCESS :
-    addSymLink(linkID,dp);
-}
-
-//////////////////////////////////////////////////////////////////
-// Make a soft link to the object with key: set const link
-//////////////////////////////////////////////////////////////////
-template <typename T, typename TLINK> 
-StatusCode SGImplSvc::symLink(const T* pObject, const TLINK*)
-{
-  lock_t lock (m_mutex);
-  SG::DataProxy* dp(proxy(pObject));
-  CLID linkID = ClassID_traits<TLINK>::ID();
-  // if symLink already exists, just return success      
-  return isSymLinked(linkID,dp) ?
-    StatusCode::SUCCESS :
-    addSymLink(linkID,dp);
-}
-
-template <typename TKEY> 
-StatusCode SGImplSvc::symLink(const CLID& id, const TKEY& key, const CLID& linkID)
-{
-  lock_t lock (m_mutex);
-#ifndef __clang__
-  //FIXME we have no way to check that the type represented by ID (the primary)
-  //FIXME is convertible into the linkid type. VERY BAD. Need introspection???
-  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
-#endif
-  SG::DataProxy* dp(proxy(id, key, false));
-  // if symLink already exists, just return success      
-  return isSymLinked(linkID,dp) ?
-    StatusCode::SUCCESS :
-    addSymLink(linkID,dp);
-}
-
-
-//////////////////////////////////////////////////////////////////
-// Retrieve the default object (with no key) as a const pointer
-//////////////////////////////////////////////////////////////////
-template <typename T> 
-StatusCode SGImplSvc::retrieve(const T*& ptr) const
-{
-  lock_t lock (m_mutex);
-  SG::DataProxy* dp =proxy(ClassID_traits<T>::ID());
-  if (!dp || !dp->isValid()) {
-    warning() 
-          << "retrieve(default): No valid proxy for default object \n" 
-          << " of type "  << ClassID_traits<T>::typeName() << "(CLID " 
-          << ClassID_traits<T>::ID() << ')' << endmsg;
-    return StatusCode::FAILURE;
-  }
-  ptr = SG::DataProxy_cast<T> (dp);
-  if (!ptr) {
-    return StatusCode::FAILURE;
-  }
-
-  //for types with an associated store, try to retrieve it and associate it
-  this->associateAux (ptr, SG::DEFAULTKEY);
-#ifndef NDEBUG
-  SG_MSG_DEBUG("retrieve(default): Retrieved const pointer to default object \n" 
-               << " of type "  << ClassID_traits<T>::typeName() 
-               << "(CLID " << ClassID_traits<T>::ID() << ')');
-#endif
-
-  return StatusCode::SUCCESS;
-}
-
-
-//////////////////////////////////////////////////////////////////
-// Retrieve the default object (with no key) as a pointer (non-const)
-//////////////////////////////////////////////////////////////////
-template <typename T> 
-StatusCode SGImplSvc::retrieve(T*& ptr) const
-{
-  lock_t lock (m_mutex);
-  SG::DataProxy* dp =proxy(ClassID_traits<T>::ID());
-  if (!dp || !dp->isValid() || dp->isConst()) {
-    warning() 
-          << "retrieve(default): No valid proxy for default object " 
-          << " of type "  << ClassID_traits<T>::typeName() << "(CLID "
-          << ClassID_traits<T>::ID() << ")\n Try to use a const retrieve " 
-          << endmsg;
-    return StatusCode::FAILURE;
-  }
-  ptr = SG::DataProxy_cast<T> (dp);
-  if (!ptr) {
-    return StatusCode::FAILURE;
-  }
-
-  //for types with an associated store, try to retrieve it and associate it
-  this->associateAux (ptr, SG::DEFAULTKEY);
-#ifndef NDEBUG
-  SG_MSG_DEBUG("retrieve(default): Retrieved non-const pointer to default object \n" 
-               << " of type "  << ClassID_traits<T>::typeName() 
-               << "(CLID " << ClassID_traits<T>::ID() << ')');
-#endif
-
-  return StatusCode::SUCCESS;
-}
-
-//////////////////////////////////////////////////////////////////
-// Retrieve the keyed object as a const pointer
-//////////////////////////////////////////////////////////////////
-template <typename T, typename TKEY>
-StatusCode SGImplSvc::retrieve(const T*& ptr, const TKEY& key) const
-{
-#ifndef __clang__
-  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
-#endif
-  lock_t lock (m_mutex);
-  SG::DataProxy* dp =proxy (ClassID_traits<T>::ID(),
-                            static_cast<std::string> (key),
-                            false);
-  if (!dp || !dp->isValid()) {
-    warning() 
-          << "retrieve(const): No valid proxy for object " << key  << ' ' 
-          << " of type "  << ClassID_traits<T>::typeName() << "(CLID "
-          << ClassID_traits<T>::ID() << ')' << endmsg;
-    return StatusCode::FAILURE;
-  }
-  ptr = SG::DataProxy_cast<T> (dp);
-  if (!ptr) {
-    return StatusCode::FAILURE;
-  }
-
-  //for types with an associated store, try to retrieve it and associate it
-  this->associateAux (ptr, key);
-#ifndef NDEBUG
-  SG_MSG_DEBUG( "Retrieved const pointer to object " << key  << ' '
-                << " of type "  << ClassID_traits<T>::typeName() 
-                << "(CLID " << ClassID_traits<T>::ID() << ')');
-#endif
-
-  return StatusCode::SUCCESS;
-}
-
-//////////////////////////////////////////////////////////////////
-// Retrieve the keyed object as a non-const pointer
-//////////////////////////////////////////////////////////////////
-template <typename T, typename TKEY>
-StatusCode SGImplSvc::retrieve(T*& ptr, const TKEY& key) const
-{
-#ifndef __clang__
-  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
-#endif
-  lock_t lock (m_mutex);
-  SG::DataProxy* dp =proxy (ClassID_traits<T>::ID(),
-                            static_cast<std::string> (key),
-                            false);
-  if (!dp || !dp->isValid() || dp->isConst()) {
-    SG_MSG_WARNING("retrieve(non-const): No valid proxy for object "
-                   << (std::string)key  << ' ' 
-                   << " of type "  << ClassID_traits<T>::typeName() << "(CLID "
-                   << ClassID_traits<T>::ID() 
-                   << ") \n Try to use a const retrieve" );
-    return StatusCode::FAILURE;
-  }
-  ptr = SG::DataProxy_cast<T> (dp);
-  if (!ptr) {
-    return StatusCode::FAILURE;
-  }
-
-  //for types with an associated store, try to retrieve it and associate it
-  this->associateAux (ptr, key);
-#ifndef NDEBUG
-  SG_MSG_DEBUG("Retrieved non-const pointer to object " << (std::string)key  
-               << ' ' << " of type "  << ClassID_traits<T>::typeName() 
-               << "(CLID " << ClassID_traits<T>::ID() << ')');
-#endif
-
-  return StatusCode::SUCCESS;
-}
-
-
-//////////////////////////////////////////////////////////////////
-// Retrieve a list of collections from Transient Store with no Key.
-// const version
-//////////////////////////////////////////////////////////////////
-template <typename T> 
-StatusCode SGImplSvc::retrieve(SG::ConstIterator<T>& cibegin,
-                               SG::ConstIterator<T>& ciend ) const
-{
-  lock_t lock (m_mutex);
-  SG::ConstProxyIterator first;
-  SG::ConstProxyIterator end = first;
-
-  if (!(proxyRange(ClassID_traits<T>::ID(),first,end)).isSuccess()) {
-#ifndef NDEBUG
-    SG_MSG_DEBUG("retrieve(range): no object found " 
-                 << " of type "  << ClassID_traits<T>::typeName() 
-                 << "(CLID " << ClassID_traits<T>::ID() << ')');
-#endif
-  }
-
-  (ciend.setState(end, end)).ignore();
-  
-  if (!(cibegin.setState(first, end)).isSuccess()) {
-#ifndef NDEBUG
-    SG_MSG_DEBUG("retrieve(range): Can't initialize iterator for object range " 
-                 << " of type "  << ClassID_traits<T>::typeName() 
-                 << "(CLID " << ClassID_traits<T>::ID() << ')');
-#endif
-    return StatusCode::FAILURE;
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-/**
- * @brief Retrieve an object of type @c T from StoreGate.
- *        Return 0 if not found.
- * @param key The key to use for the lookup.
- **/
-template <typename T>
-T* SGImplSvc::retrieve () const
-{
-  T* p = 0;
-  retrieve (p).ignore();
-  return p;
-}
-
-/**
- * @brief Retrieve an object of type @c T from StoreGate.
- *        Return 0 if not found.
- * @param key The key to use for the lookup.
- **/
-template <typename T, class TKEY>
-T* SGImplSvc::retrieve (const TKEY& key) const
-{
-  T* p = 0;
-  retrieve (p, key).ignore();
-  return p;
-}
-
-/**
- * @brief Retrieve an object of type @c T from StoreGate.
- *        Return 0 if not found.
- * @param key The key to use for the lookup.
- **/
-template <typename T>
-T* SGImplSvc::tryRetrieve () const
-{
-  lock_t lock (m_mutex);
-  SG::DataProxy* dp = proxy (ClassID_traits<T>::ID());
-  if (dp && dp->isValid() && !dp->isConst()) {
-    T* ptr = SG::DataProxy_cast<T> (dp);
-    if (ptr) {
-      this->associateAux (ptr, SG::DEFAULTKEY);
-      return ptr;
-    }
-  }
-  return nullptr;
-}
-
-template <typename T>
-const T* SGImplSvc::tryConstRetrieve() const
-{
-  lock_t lock (m_mutex);
-  SG::DataProxy* dp = proxy (ClassID_traits<T>::ID());
-  if (dp && dp->isValid()) {
-    const T* ptr = SG::DataProxy_cast<T> (dp);
-    if (ptr) {
-      this->associateAux (ptr, SG::DEFAULTKEY);
-      return ptr;
-    }
-  }
-  return nullptr;
-}
-
-/**
- * @brief Retrieve an object of type @c T from StoreGate.
- *        Return 0 if not found. Don't print any WARNINGs
- * @param key The key to use for the lookup.
- **/
-template <typename T, class TKEY>
-T* SGImplSvc::tryRetrieve (const TKEY& key) const
-{
-#ifndef __clang__
-  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
-#endif
-  lock_t lock (m_mutex);
-  SG::DataProxy* dp = proxy (ClassID_traits<T>::ID(),
-                             static_cast<std::string> (key),
-                             false);
-  if (dp && dp->isValid() && !dp->isConst()) {
-    T* ptr = SG::DataProxy_cast<T> (dp);
-    if (ptr) {
-      this->associateAux (ptr, key);
-      return ptr;
-    }
-  }
-  return nullptr;
-}
-
-template <typename T, class TKEY>
-const T* SGImplSvc::tryConstRetrieve (const TKEY& key) const
-{
-#ifndef __clang__
-  BOOST_CONCEPT_ASSERT( (KeyConcept<TKEY>) );
-#endif
-  lock_t lock (m_mutex);
-  SG::DataProxy* dp = proxy (ClassID_traits<T>::ID(),
-                             static_cast<std::string> (key),
-                             false);
-  if (dp && dp->isValid()) {
-    const T* ptr = SG::DataProxy_cast<T> (dp);
-    if (ptr) {
-      this->associateAux (ptr, key);
-      return ptr;
-    }
-  }
-  return nullptr;
-}
-
-template <typename T>
-std::auto_ptr<T> 
-SGImplSvc::readPrivateCopy (const std::string& key)
-{
-  return std::auto_ptr<T>(SG::Storable_cast<T>(
-                                               this->typeless_readPrivateCopy(ClassID_traits<T>::ID(), key)));
-}
-
-
-template <typename T>
-std::unique_ptr<T> 
-SGImplSvc::readUniquePrivateCopy (const std::string& key)
-{
-  return std::unique_ptr<T>(SG::Storable_cast<T>(
-                                                 this->typeless_readPrivateCopy(ClassID_traits<T>::ID(), key)));
-}
-
-
-template <typename T>
-std::auto_ptr<T> 
-SGImplSvc::retrievePrivateCopy (const std::string& key)
-{
-  lock_t lock (m_mutex);
-  const T* p = 0;
-  //we do not want anyone to mess up with our copy hence we release it
-  //immediately
-  if(this->retrieve (p, key).isSuccess()) {
-    this->releaseObject(ClassID_traits<T>::ID(), key);
-  }
-  return std::auto_ptr<T>(const_cast<T*>(p));
-}
-
-
-template <typename T>
-std::unique_ptr<T> 
-SGImplSvc::retrieveUniquePrivateCopy (const std::string& key)
-{
-  const T* p = 0;
-  //we do not want anyone to mess up with our copy hence we release it
-  //immediately
-  if(this->retrieve (p, key).isSuccess()) {
-    this->releaseObject(ClassID_traits<T>::ID(), key);
-  }
-  return std::unique_ptr<T>(const_cast<T*>(p));
-}
-
-
-//////////////////////////////////////////////////////////////////
-// Retrieve the @c CLID of a given "key" 
-// WARNING: slow!
-//////////////////////////////////////////////////////////////////
-template<typename TKEY>
-CLID SGImplSvc::clid( const TKEY& key ) const
-{
-  lock_t lock (m_mutex);
-  SG::DataStore::ConstStoreIterator s_iter, s_end;
-  store()->tRange(s_iter, s_end).ignore();
-  
-  for ( ; s_iter != s_end; ++s_iter ) {
-    if ( s_iter->second.find( key ) != s_iter->second.end() ) {
-      return s_iter->first;
-    }
-  }
-
-  return CLID_NULL;
-}
-//////////////////////////////////////////////////////////////////
-// Retrieve the @c CLID s of a given "key" 
-// WARNING: slow!
-//////////////////////////////////////////////////////////////////
-template<typename TKEY>
-std::vector<CLID> SGImplSvc::clids( const TKEY& key ) const
-{
-  lock_t lock (m_mutex);
-  std::list<CLID> clids;
-  SG::DataStore::ConstStoreIterator s_iter, s_end;
-  store()->tRange(s_iter, s_end).ignore();
-  
-  for ( ; s_iter != s_end; ++s_iter ) {
-    if ( s_iter->second.find( key ) != s_iter->second.end() ) {
-      clids.push_back(s_iter->first);
-    }
-  }
-  
-  return std::vector<CLID>(clids.begin(), clids.end());
-}
-
-//-------------------------end of retrieve methods--------------------
-template <typename T>
-int SGImplSvc::typeCount() const
-{
-  return typeCount(ClassID_traits<T>::ID());
-}
-
-template <typename T, typename TKEY> 
-bool 
-SGImplSvc::contains(const TKEY& key) const 
-{
-  return contains(ClassID_traits<T>::ID(), key);
-}
-
-
-template <typename TKEY>
-bool 
-SGImplSvc::contains(const CLID& id, const TKEY& key) const
-{
-  try {
-    return (0 != proxy(id, key, true));
-  } catch(...) { return false; }
-}
-
-
-template <typename T, typename TKEY> 
-bool 
-SGImplSvc::transientContains(const TKEY& key) const 
-{
-  return transientContains(ClassID_traits<T>::ID(), key);
-}
-
-
-template <typename TKEY>
-bool 
-SGImplSvc::transientContains(const CLID& id, const TKEY& key) const
-{
-  try {
-    return (0 != transientProxy(id, key));
-  } catch(...) { return false; }
-}
-
-//-------------------------end of contains methods--------------------
-template <typename T>
-void
-SGImplSvc::keys(std::vector<std::string>& vkeys, 
-                bool includeAlias, bool onlyValid) {
-  return this->keys(ClassID_traits<T>::ID(), vkeys, includeAlias, onlyValid);
-} 
-
-// DEPRECATED
-template <typename T> 
-std::vector<std::string> SGImplSvc::keys(bool allKeys)
-{
-  return this->keys(ClassID_traits<T>::ID(), allKeys);
-} 
-// DEPRECATED
-inline
-std::vector<std::string> 
-SGImplSvc::keys(const CLID& id, bool allKeys) {
-  std::vector<std::string> vkeys;
-  this->keys(id, vkeys, allKeys);
-  return vkeys;
-}
-
-// remove an object from Store, will remove its proxy if not reset only
-template <typename T>
-StatusCode 
-SGImplSvc::remove(const T* pObject)
-{
-  lock_t lock (m_mutex);
-  return removeProxy(proxy(pObject), pObject);
-}
-
-// remove an object and its proxy from Store     
-template <typename T>    
-StatusCode       
-SGImplSvc::removeDataAndProxy(const T* pObject)          
-{        
-  lock_t lock (m_mutex);
-  const bool FORCEREMOVE(true);          
-  return removeProxy(proxy(pObject), pObject, FORCEREMOVE);      
-}
-
-// utility method put a dobj pointer in a bucket as appropriate
-template <typename T>
-DataObject*
-SGImplSvc::asStorable(T* pDObj) {
-  return SG::asStorable(pDObj);
-}
-
-// utility method gets a dobj pointer from a bucket as appropriate
-template <typename T>
-bool 
-SGImplSvc::fromStorable(DataObject* pObject, T*& pData) {
-  return SG::fromStorable(pObject, pData);
-}
-
-// deprecated method temporary forwarding to the new one
-inline
-StatusCode 
-SGImplSvc::createProxy(IOpaqueAddress* pAddress, bool clearAddressFlag)
-{
-  return recordAddress(pAddress, clearAddressFlag);
-}
-
-//obsolete temporary forwarding to new one
-inline
-SG::DataProxy* 
-SGImplSvc::setupProxy(const CLID& dataID, 
-                      const std::string& gK, 
-                      DataObject* pDObj) {
-  return setupProxy(dataID, gK, pDObj, true, true);
-}
-
-///////////////////////////////////////////////////////////////////////////
-
 inline
 void 
 SGImplSvc::setProxyProviderSvc(IProxyProviderSvc* pPPSvc) {
@@ -874,216 +43,4 @@ SGImplSvc::proxyProviderSvc() {
 }
 
 
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-template <typename T1, typename T2>
-StatusCode 
-SGImplSvc::regFcn( StatusCode (T1::*updFcn1)(IOVSVC_CALLBACK_ARGS), 
-                   const T1* obj1, 
-                   StatusCode (T2::*updFcn2)(IOVSVC_CALLBACK_ARGS), 
-                   const T2* obj2, 
-                   bool trigger) {
-
-
-  lock_t lock (m_mutex);
-  const CallBackID c1(updFcn1, obj1);
-  const CallBackID c2(updFcn2, obj2);
-
-  IOVSvcCallBackFcn fcn2( boost::bind(updFcn2,const_cast<T2*>(obj2),_1,_2));
-
-  return ( getIIOVSvc()->regFcn(c1,c2,fcn2,trigger) );
-
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-template <typename T2>
-StatusCode 
-SGImplSvc::regFcn( const std::string& toolName,
-                   StatusCode (T2::*updFcn2)(IOVSVC_CALLBACK_ARGS), 
-                   const T2* obj2, 
-                   bool trigger) {
-
-
-  lock_t lock (m_mutex);
-  const CallBackID c2(updFcn2, obj2);
-
-  IOVSvcCallBackFcn fcn2( boost::bind(updFcn2,const_cast<T2*>(obj2),_1,_2));
-
-  return ( getIIOVSvc()->regFcn(toolName,c2,fcn2,trigger) );
-
-}
-
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/// Retrieve version with highest cycle number for a given T,KEY combination
-/// If there is only one available version of this data object
-/// the returned ObjectWithVersion<T>.versionedKey is set to requestedKey
-/// NOTICE that this method is significantly slower than 
-///     retrieve(const T*, const TKEY&)
-/// which returns the last recorded version rather than the one with the
-/// highest cycle number.
-/// @returns StatusCode::FAILURE if no dataObject found
-template <typename T, class TKEY>
-StatusCode 
-SGImplSvc::retrieveHighestVersion(SG::ObjectWithVersion<T>& dobjWithVersion, 
-                                  const TKEY& requestedKey) const {
-  std::list< SG::ObjectWithVersion<T> > allVersions;
-  StatusCode sc(this->retrieveAllVersions(allVersions,requestedKey));
-  if (sc.isSuccess()) {
-    allVersions.sort(); // on highest version number
-    dobjWithVersion.versionedKey.copyVK(allVersions.back().versionedKey.rawVersionKey());
-  }
-  return sc;
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/// Retrieve all versions of a given T,KEY combination
-/// sets allVersions, a ref to a vector of ObjectWithVersion<T>
-/// If there is only one available version of this dataObject
-/// allVersions[0].versionedKey is set to requestedKey.
-/// @returns StatusCode::FAILURE if no dataObject found
-template <typename T, class TKEY>
-StatusCode
-SGImplSvc::retrieveAllVersions(std::list< SG::ObjectWithVersion<T> >& allVersions,
-                               const TKEY& requestedKey) const {
-  lock_t lock (m_mutex);
-  StatusCode sc(StatusCode::FAILURE);
-  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.proxy());
-        allVersions.push_back(okOWV);
-      }
-      ++i;
-    }
-  }
-  return sc;
-}
-  
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/**
- * @brief Declare a remapping.
- * @brief clid Class ID of the container being remapped.
- * @brief source Key of the container being remapped.
- * @brief target Key of the container being remapped to.
- * @brief index_offset Amount by which the index should be adjusted
- *        between the two containers.
- *
- * This can be used to change the container to which @c ElementLink's
- * (and @c DataLink's) point on output.
- *
- * For example, suppose you have two containers of type T, A and B.
- * There possibly are @c ElementLink's pointing at elements contained
- * in them.  You want to change to a single container C, containing
- * the contents of A and B concatenated.  To get @c ElementLink's
- * updated on output, you can do:
- *
- *@code
- *   m_sg->remap (ClassID_traits<T>::ID(), "A", "C", 0);
- *   m_sg->remap (ClassID_traits<T>::ID(), "B", "C", a.size());;
- @endcode
-*/
-template <class TKEY>
-void SGImplSvc::remap (CLID clid,
-                       const TKEY& source,
-                       const TKEY& target,
-                       off_t index_offset)
-{
-  lock_t lock (m_mutex);
-  this->remap_impl (this->stringToKey (source, clid),
-                    this->stringToKey (target, clid),
-                    index_offset);
-}
-
-
-
-/**
- * @brief associate a data object to its auxiliary store
- *        Return false if the aux store is not found.
- * @param key The key to use for the lookup.
- **/
-template <class DOBJ, class AUXSTORE>
-bool SGImplSvc::associateAux_impl(DOBJ* ptr,
-                                  const std::string& key,
-                                  const AUXSTORE*) const
-{
-  SG_MSG_VERBOSE("called associateAux_impl non const for key " + key);
-  bool hasAux(0 != ptr->hasStore());
-  // no Aux store set yet
-  if (!hasAux) {
-    AUXSTORE* pAux = tryRetrieve<AUXSTORE>(key + "Aux." );
-    hasAux = (0 != pAux);
-    if (hasAux) ptr->setStore( pAux );
-  }
-  return hasAux;
-}
-
-
-/**
- * @brief associate a data object to its auxiliary store
- *        Return false if the aux store is not found.
- * @param key The key to use for the lookup.
- **/
-template <class DOBJ, class AUXSTORE>
-bool SGImplSvc::associateAux_impl(const DOBJ* ptr,
-                                  const std::string& key,
-                                  const AUXSTORE*) const
-{
-  SG_MSG_VERBOSE("called associateAux_impl const for key " + key);
-  bool hasAux(0 != ptr->hasStore());
-  // no Aux store set yet
-  if (!hasAux) {
-    const AUXSTORE* pAux = tryConstRetrieve<AUXSTORE>(key + "Aux." );
-    hasAux = (0 != pAux);
-    if (hasAux) const_cast< DOBJ* >(ptr)->setStore( const_cast< AUXSTORE* >(pAux) );
-  }
-  return hasAux;
-}
-
-
-/**
- * @brief associate a data object to its auxiliary store
- *        Return false if the aux store is not found.
- * @param key The key to use for the lookup.
- **/
-template <class DOBJ>
-bool SGImplSvc::associateAux (DOBJ* ptr,
-                              const std::string& key,
-                              bool ignoreMissing) const
-{
-  lock_t lock (m_mutex);
-  typename SG::AuxStore_traits<DOBJ>::type* pDummy(0); //used to pass down auxstore type
-  bool hasAux=associateAux_impl(ptr, key, pDummy) || ignoreMissing;
-  if (!hasAux) SG_MSG_WARNING("associateAux const: Could not associate AuxStore of type "  
-                              << SG::AuxStore_traits<DOBJ>::const_typeName()
-                              << "\n to object of type "  << ClassID_traits<DOBJ>::typeName() << "(CLID " 
-                              << ClassID_traits<DOBJ>::ID() << ") with key " << key << endmsg);
-  return hasAux;
-}
-
-
-template <class DOBJ>
-bool SGImplSvc::associateAux (const DOBJ* ptr,
-                              const std::string& key,
-                              bool ignoreMissing) const
-{
-  lock_t lock (m_mutex);
-  typename SG::AuxStore_traits<DOBJ>::const_type* pDummy(0); //used to pass down auxstore type
-  bool hasAux=associateAux_impl(ptr, key, pDummy) || ignoreMissing;
-  if (!hasAux) SG_MSG_WARNING("associateAux const: Could not associate AuxStore of type "  
-                              << SG::AuxStore_traits<DOBJ>::const_typeName()
-                              << "\n to object of type "  << ClassID_traits<DOBJ>::typeName() << "(CLID " 
-                              << ClassID_traits<DOBJ>::ID() << ") with key " << key << endmsg);
-  return hasAux;
-}
-
-
 #endif   // STOREGATE_SGIMPLSVC_ICC
diff --git a/Control/StoreGate/src/SGImplSvc.cxx b/Control/StoreGate/src/SGImplSvc.cxx
index a7939794b006a7a2d46da938d91ccb35c059792f..2043e3b17a18c892a4c648f8878f3d0edaca84ab 100644
--- a/Control/StoreGate/src/SGImplSvc.cxx
+++ b/Control/StoreGate/src/SGImplSvc.cxx
@@ -13,6 +13,9 @@
 #include <fstream>
 #include <iomanip>
 
+#include "AthContainers/AuxVectorBase.h"
+#include "AthContainersInterfaces/IAuxStore.h"
+#include "AthContainersInterfaces/IConstAuxStore.h"
 #include "AthenaKernel/IClassIDSvc.h"
 #include "AthenaKernel/IProxyProviderSvc.h"
 #include "AthenaKernel/IIOVSvc.h"
@@ -531,6 +534,7 @@ StoreID::type SGImplSvc::storeID() const
   return store()->storeID();
 }
 
+
 void
 SGImplSvc::keys(const CLID& id, std::vector<std::string>& vkeys, 
                 bool includeAlias, bool onlyValid) 
@@ -540,11 +544,44 @@ SGImplSvc::keys(const CLID& id, std::vector<std::string>& vkeys,
   return store()->keys(id, vkeys, includeAlias, onlyValid);
 } 
 
+
+// DEPRECATED
+std::vector<std::string> 
+SGImplSvc::keys(const CLID id, bool allKeys) {
+  std::vector<std::string> vkeys;
+  this->keys(id, vkeys, allKeys);
+  return vkeys;
+}
+
+
 bool SGImplSvc::isSymLinked(const CLID& linkID, DataProxy* dp)   
 {        
   return (0 != dp) ? dp->transientID(linkID) : false;        
 }
 
+
+StatusCode 
+SGImplSvc::regFcn( const CallBackID c1,
+                   const CallBackID c2,
+                   const IOVSvcCallBackFcn& fcn,
+                   bool trigger)
+{
+  lock_t lock (m_mutex);
+  return ( getIIOVSvc()->regFcn(c1,c2,fcn,trigger) );
+}
+
+
+StatusCode 
+SGImplSvc::regFcn( const std::string& toolName,
+                   const CallBackID c2,
+                   const IOVSvcCallBackFcn& fcn,
+                   bool trigger)
+{
+  lock_t lock (m_mutex);
+  return ( getIIOVSvc()->regFcn(toolName,c2,fcn,trigger) );
+}
+
+
 //////////////////////////////////////////////////////////////////
 // Dump Contents in store:
 string SGImplSvc::dump() const
@@ -602,6 +639,31 @@ SGImplSvc::store() const
 }
 
  
+//////////////////////////////////////////////////////////////////
+// Make a soft link to the object with key
+//////////////////////////////////////////////////////////////////
+StatusCode SGImplSvc::symLink(const void* pObject, CLID linkID)
+{
+  lock_t lock (m_mutex);
+  SG::DataProxy* dp(proxy(pObject));
+
+  // if symLink already exists, just return success      
+  return isSymLinked(linkID,dp) ?
+    StatusCode::SUCCESS :
+    addSymLink(linkID,dp);
+}
+
+StatusCode SGImplSvc::symLink(const CLID id, const std::string& key, const CLID linkID)
+{
+  lock_t lock (m_mutex);
+  SG::DataProxy* dp(proxy(id, key, false));
+  // if symLink already exists, just return success      
+  return isSymLinked(linkID,dp) ?
+    StatusCode::SUCCESS :
+    addSymLink(linkID,dp);
+}
+
+
 StatusCode
 SGImplSvc::addSymLink(const CLID& linkid, DataProxy* dp)
 { 
@@ -623,6 +685,61 @@ SGImplSvc::addSymLink(const CLID& linkid, DataProxy* dp)
 }
 
  
+StatusCode SGImplSvc::setAlias(const void* pObject, const std::string& aliasKey)
+{
+  lock_t lock (m_mutex);
+
+  SG::DataProxy* dp(0);
+  dp = proxy(pObject);
+  if (0 == dp) {
+    error() << "setAlias: problem setting alias "
+          << aliasKey << '\n'
+          << "DataObject does not exist, record before setting alias."
+          << endmsg;
+    return StatusCode::FAILURE;
+  }
+
+  StatusCode sc = addAlias(aliasKey, dp);
+  if (sc.isFailure()) {
+    error() << "setAlias: problem setting alias " 
+          << aliasKey << '\n'
+          << "DataObject does not exist, record before setting alias."
+          << endmsg;
+    return StatusCode::FAILURE;
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode SGImplSvc::setAlias(CLID clid,
+                               const std::string& key, const std::string& aKey)
+{
+  lock_t lock (m_mutex);
+
+  SG::DataProxy* dp(0); 
+  dp = proxy(clid, key);
+  if (0 == dp) {
+    error() << "setAlias: problem setting alias " 
+          << std::string(aKey) << '\n'
+          << "DataObject does not exist, record before setting alias."
+          << endmsg;
+    return StatusCode::FAILURE;
+  }
+
+  StatusCode sc = addAlias(aKey, dp);
+  if (sc.isFailure()) {
+    error() << "setAlias: problem setting alias " 
+          << (std::string)aKey << '\n'
+          << "DataObject does not exist, record before setting alias."
+          << endmsg;
+    return StatusCode::FAILURE;
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+
 StatusCode
 SGImplSvc::addAlias(const std::string& aliasKey, DataProxy* proxy)
 {
@@ -642,6 +759,25 @@ int SGImplSvc::typeCount(const CLID& id) const
   return m_pStore->typeCount(id);
 }  
 
+
+bool 
+SGImplSvc::contains(const CLID id, const std::string& key) const
+{
+  try {
+    return (0 != proxy(id, key, true));
+  } catch(...) { return false; }
+}
+
+
+bool 
+SGImplSvc::transientContains(const CLID id, const std::string& key) const
+{
+  try {
+    return (0 != transientProxy(id, key));
+  } catch(...) { return false; }
+}
+
+
 DataProxy* 
 SGImplSvc::proxy(const void* const pTransient) const
 { 
@@ -1225,6 +1361,25 @@ StatusCode SGImplSvc::setConst(const void* pObject)
   return StatusCode::SUCCESS;
 }
 
+
+// remove an object from Store, will remove its proxy if not reset only
+StatusCode 
+SGImplSvc::remove(const void* pObject)
+{
+  lock_t lock (m_mutex);
+  return removeProxy(proxy(pObject), pObject);
+}
+
+
+// remove an object and its proxy from Store     
+StatusCode       
+SGImplSvc::removeDataAndProxy(const void* pObject)          
+{        
+  lock_t lock (m_mutex);
+  const bool FORCEREMOVE(true);          
+  return removeProxy(proxy(pObject), pObject, FORCEREMOVE);      
+}
+
 //put a bad (unrecordable) dobj away
 void SGImplSvc::recycle(DataObject* pBadDObj) {
   assert(pBadDObj);
@@ -1328,7 +1483,7 @@ SGImplSvc::record_HistObj(const CLID& id, const std::string& key,
   }
   idname = idname + "/" + key;
 
-  DataObject* obj = asStorable<DataHistory>(dho);
+  DataObject* obj = SG::asStorable(dho);
   
   const bool ALLOWOVERWRITE(false);
   if (record_impl(obj, idname, dho, allowMods, resetOnly, ALLOWOVERWRITE,
@@ -1482,6 +1637,7 @@ bool SGImplSvc::tryELRemap (sgkey_t sgkey_in, size_t index_in,
   return true;
 }
 
+
 DataObject* SGImplSvc::typeless_readPrivateCopy(const CLID& clid,
                                                 const std::string& key) {
   lock_t lock (m_mutex);
@@ -1528,6 +1684,56 @@ DataObject* SGImplSvc::typeless_readPrivateCopy(const CLID& clid,
   return pObj;
 }
 
+
+DataObject* SGImplSvc::typeless_retrievePrivateCopy (const CLID clid,
+                                                     const std::string& key)
+{
+  lock_t lock (m_mutex);
+  DataObject* obj = nullptr;
+  SG::DataProxy* dp = proxy (clid, key);
+  //we do not want anyone to mess up with our copy hence we release it immediately.
+  if (dp && dp->isValid()) {
+    obj = dp->object();
+    obj->addRef();
+    clearProxyPayload (dp);
+  }
+  return obj;
+}
+
+
+CLID SGImplSvc::clid( const std::string& key ) const
+{
+  lock_t lock (m_mutex);
+  SG::DataStore::ConstStoreIterator s_iter, s_end;
+  store()->tRange(s_iter, s_end).ignore();
+  
+  for ( ; s_iter != s_end; ++s_iter ) {
+    if ( s_iter->second.find( key ) != s_iter->second.end() ) {
+      return s_iter->first;
+    }
+  }
+
+  return CLID_NULL;
+}
+
+
+std::vector<CLID> SGImplSvc::clids( const std::string& key ) const
+{
+  lock_t lock (m_mutex);
+  std::list<CLID> clids;
+  SG::DataStore::ConstStoreIterator s_iter, s_end;
+  store()->tRange(s_iter, s_end).ignore();
+  
+  for ( ; s_iter != s_end; ++s_iter ) {
+    if ( s_iter->second.find( key ) != s_iter->second.end() ) {
+      clids.push_back(s_iter->first);
+    }
+  }
+  
+  return std::vector<CLID>(clids.begin(), clids.end());
+}
+
+
 /// Add automatically-made symlinks for DP.
 void SGImplSvc::addAutoSymLinks (const std::string& key,
                                  CLID clid,
@@ -1684,9 +1890,106 @@ void SG_dump (SGImplSvc* sg, const char* fname)
  */
 SG::SourceID SGImplSvc::sourceID() const
 {
-  const DataHeader* dh = nullptr;
-  if (this->retrieve (dh, "EventSelector").isFailure()) {
-    return "";
+  lock_t lock (m_mutex);
+  SG::DataProxy* dp =proxy (ClassID_traits<DataHeader>::ID(), "EventSelector", true);
+  if (dp) {
+    const DataHeader* dh = SG::DataProxy_cast<DataHeader> (dp);
+    if (dh) {
+      return dh->begin()->getToken()->dbID().toString();
+    }
+  }
+  return "";
+}
+
+
+//////////////////////////////////////////////////////////////////
+// Retrieve a list of collections from Transient Store with no Key.
+// const version
+//////////////////////////////////////////////////////////////////
+StatusCode SGImplSvc::retrieve (CLID clid,
+                                SG::detail::IteratorBase& cibegin,
+                                SG::detail::IteratorBase& ciend) const
+{
+  lock_t lock (m_mutex);
+  SG::ConstProxyIterator first;
+  SG::ConstProxyIterator end = first;
+
+  if (!(proxyRange(clid,first,end)).isSuccess()) {
+    std::string typnam;
+    m_pCLIDSvc->getTypeNameOfID(clid, typnam).ignore();
+    SG_MSG_DEBUG("retrieve(range): no object found " 
+                 << " of type "  << typnam
+                 << "(CLID " << clid << ')');
+  }
+
+  (ciend.setState(end, end, true)).ignore();
+  
+  if (!(cibegin.setState(first, end, true)).isSuccess()) {
+    std::string typnam;
+    m_pCLIDSvc->getTypeNameOfID(clid, typnam).ignore();
+    SG_MSG_DEBUG("retrieve(range): Can't initialize iterator for object range " 
+                 << " of type "  << typnam
+                 << "(CLID " << clid << ')');
+    return StatusCode::FAILURE;
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+
+bool SGImplSvc::associateAux_impl (SG::AuxVectorBase* ptr,
+                                   const std::string& key,
+                                   CLID auxclid) const
+{
+  lock_t lock (m_mutex);
+  SG_MSG_VERBOSE("called associateAux_impl for key " + key);
+  // no Aux store set yet
+  if (!ptr->hasStore()) {
+    SG::DataProxy* dp = proxy (auxclid, key + "Aux.", true);
+    if (dp) {
+      if (!dp->isConst()) {
+        SG::IAuxStore* pAux = SG::DataProxy_cast<SG::IAuxStore> (dp);
+        if (pAux) {
+          ptr->setStore (pAux);
+          return true;
+        }
+      }
+
+      const SG::IConstAuxStore* pAux = SG::DataProxy_cast<SG::IConstAuxStore> (dp);
+      if (pAux) {
+        ptr->setStore (pAux);
+        return true;
+      }
+    }
+  }
+  return false;
+}
+
+
+bool SGImplSvc::associateAux_impl (SG::AuxElement* ptr,
+                                   const std::string& key,
+                                   CLID auxclid) const
+{
+  lock_t lock (m_mutex);
+  SG_MSG_VERBOSE("called associateAux_impl for key " + key);
+  // no Aux store set yet
+  if (!ptr->hasStore()) {
+    SG::DataProxy* dp = proxy (auxclid, key + "Aux.", true);
+    if (dp) {
+      if (!dp->isConst()) {
+        SG::IAuxStore* pAux = SG::DataProxy_cast<SG::IAuxStore> (dp);
+        if (pAux) {
+          ptr->setStore (pAux);
+          return true;
+        }
+      }
+
+      const SG::IConstAuxStore* pAux = SG::DataProxy_cast<SG::IConstAuxStore> (dp);
+      if (pAux) {
+        ptr->setStore (pAux);
+        return true;
+      }
+    }
   }
-  return dh->begin()->getToken()->dbID().toString();
+  return false;
 }
diff --git a/Control/StoreGate/test/SGtests.cxx b/Control/StoreGate/test/SGtests.cxx
index 8be47bdf54eeeb1b794c9922033e5585c87162ec..cef2295430f0ceb112ddcd8dec2ce475e525f6bb 100644
--- a/Control/StoreGate/test/SGtests.cxx
+++ b/Control/StoreGate/test/SGtests.cxx
@@ -26,6 +26,8 @@
 
 #ifndef NOGAUDI
 
+#include "AthContainers/AuxVectorBase.h"
+#include "AthContainers/AuxElement.h"
 #include "SGTools/DataHandleBase.h"
 #include "StoreGate/DataHandle.h"
 #include "StoreGate/SGWPtr.h"
@@ -96,19 +98,10 @@ CLASS_DEF(NotThere, 8103, 1)
 
 #include "AthContainersInterfaces/IAuxElement.h"
 struct BX
-  : public IAuxElement
+  : public SG::AuxElement
 {
   int x;
-  BX(int the_x=0) : x(the_x), m_store(0), m_constStore(nullptr) {}
-
-  bool hasStore() const { return m_store != 0; }
-  void setStore (SG::IAuxStore* store) { m_store = store; }
-  void setStore (SG::IConstAuxStore* store) { m_constStore = store; }
-  bool usingStandaloneStore() const { return hasStore(); }
-  SG::IAuxStore* getStore() { return m_store; }
-
-  SG::IAuxStore* m_store;
-  SG::IConstAuxStore* m_constStore;
+  BX(int the_x=0) : x(the_x) {}
 };
 struct BBX
   : public IAuxElement
@@ -118,16 +111,14 @@ struct BBX
 };
 template <class T>
 class  TestVector
-  : public std::vector<T*>
+  : public std::vector<T*>, public SG::AuxVectorBase
 {
 public:
   typedef T base_value_type;
-  TestVector() : m_constStore(0) {}
-  void setStore (SG::IAuxStore* s) { m_constStore = s; }
-  void setStore (const SG::IConstAuxStore* s) { m_constStore = s; }
-  bool hasStore() const { return m_constStore != 0; }
-private:
-  const SG::IConstAuxStore* m_constStore;
+  TestVector() {}
+  virtual size_t size_v() const override { return 0; }
+  virtual size_t capacity_v() const override { return 0; }
+
 };
 CLASS_DEF( BX , 82835621, 1 )
 CLASS_DEF( TestVector<BX> , 82735621, 1 )
diff --git a/Control/StoreGateTests/CMakeLists.txt b/Control/StoreGateTests/CMakeLists.txt
index 7d2dc7d6717775f8f4d5bade87b96f3a4a7f1b0e..3c654844ad365e369301bbd9d6656c2eafb745f9 100644
--- a/Control/StoreGateTests/CMakeLists.txt
+++ b/Control/StoreGateTests/CMakeLists.txt
@@ -38,3 +38,17 @@ atlas_install_headers( StoreGateTests )
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py share/tests/*.py )
 
+atlas_add_test( PyClidsTestWriter
+                SCRIPT test/PyClidsTestWriter.sh
+                PROPERTIES TIMEOUT 300
+                EXTRA_PATTERNS "running|XMLCatalog" )
+
+atlas_add_test( SgProducerConsumer
+                SCRIPT test/SgProducerConsumer.sh
+                PROPERTIES TIMEOUT 300
+                EXTRA_PATTERNS "running|XMLCatalog" )
+
+atlas_add_test( SgProducerConsumerDataPool
+                SCRIPT test/SgProducerConsumerDataPool.sh
+                PROPERTIES TIMEOUT 300
+                EXTRA_PATTERNS "running|XMLCatalog" )
diff --git a/Control/StoreGateTests/share/PyClidsTestWriter.ref b/Control/StoreGateTests/share/PyClidsTestWriter.ref
new file mode 100644
index 0000000000000000000000000000000000000000..7196ae50b737ab8179981ecd7b01b46ace477728
--- /dev/null
+++ b/Control/StoreGateTests/share/PyClidsTestWriter.ref
@@ -0,0 +1,206 @@
+Thu Sep  6 18:32:16 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] [atlas-work3e/3410b0a5584] -- built on [2018-09-06T1513]
+Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
+Py:Athena            INFO executing ROOT6Setup
+Py:Athena            INFO including file "AthenaCommon/Execution.py"
+Py:Athena            INFO including file "StoreGateTests/test_recordStlClids_jobOptions.py"
+Py:ConfigurableDb    INFO Read module info for 5528 configurables from 11 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
+Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+[?1034hApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr    SUCCESS 
+====================================================================================================================================
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r3)
+                                          running on lxplus051.cern.ch on Thu Sep  6 18:32:35 2018
+====================================================================================================================================
+ApplicationMgr       INFO Successfully loaded modules : AthenaServices
+ApplicationMgr       INFO Application Manager Configured successfully
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+StatusCodeSvc        INFO initialize
+ApplicationMgr       INFO Application Manager Initialized successfully
+ApplicationMgr       INFO Application Manager Started successfully
+<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
+SGImplSvc(StoreGateSvc_Impl)::dump():
+Found 1 proxy for ClassID 2101 (EventInfo): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21224dc0 --- key: 
+Found 1 proxy for ClassID 22592129 (std::vector<int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21e3bf00 --- key: TestInts
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21224c80 --- key: EventContext
+Found 1 proxy for ClassID 177480351 (std::vector<unsigned int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x23154c00 --- key: TestUInts
+Found 1 proxy for ClassID 202242136 (std::vector<float>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x217a6300 --- key: TestFloats
+Found 1 proxy for ClassID 219400222 (std::vector<double>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2258ff00 --- key: TestDoubles
+<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
+
+<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
+SGImplSvc(StoreGateSvc_Impl)::dump():
+Found 1 proxy for ClassID 2101 (EventInfo): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x234ee690 --- key: 
+Found 1 proxy for ClassID 22592129 (std::vector<int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x217a6300 --- key: TestInts
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2359e030 --- key: EventContext
+Found 1 proxy for ClassID 177480351 (std::vector<unsigned int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x23545880 --- key: TestUInts
+Found 1 proxy for ClassID 202242136 (std::vector<float>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2122c9c0 --- key: TestFloats
+Found 1 proxy for ClassID 219400222 (std::vector<double>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21e3bf00 --- key: TestDoubles
+Found 1 proxy for ClassID 222376821 (DataHeader): 
+ flags: (INVALID, UNLOCKED,  reset) --- data:          0 --- key: stream_stl
+<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
+
+<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
+SGImplSvc(StoreGateSvc_Impl)::dump():
+Found 1 proxy for ClassID 2101 (EventInfo): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21224c80 --- key: 
+Found 1 proxy for ClassID 22592129 (std::vector<int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2124a100 --- key: TestInts
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2359e350 --- key: EventContext
+Found 1 proxy for ClassID 177480351 (std::vector<unsigned int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2122c9c0 --- key: TestUInts
+Found 1 proxy for ClassID 202242136 (std::vector<float>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21e3bf00 --- key: TestFloats
+Found 1 proxy for ClassID 219400222 (std::vector<double>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x217a6300 --- key: TestDoubles
+Found 1 proxy for ClassID 222376821 (DataHeader): 
+ flags: (INVALID, UNLOCKED,  reset) --- data:          0 --- key: stream_stl
+<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
+
+<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
+SGImplSvc(StoreGateSvc_Impl)::dump():
+Found 1 proxy for ClassID 2101 (EventInfo): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21225d60 --- key: 
+Found 1 proxy for ClassID 22592129 (std::vector<int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x235f41c0 --- key: TestInts
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2354c440 --- key: EventContext
+Found 1 proxy for ClassID 177480351 (std::vector<unsigned int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21e3bf00 --- key: TestUInts
+Found 1 proxy for ClassID 202242136 (std::vector<float>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x217a6300 --- key: TestFloats
+Found 1 proxy for ClassID 219400222 (std::vector<double>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2124a100 --- key: TestDoubles
+Found 1 proxy for ClassID 222376821 (DataHeader): 
+ flags: (INVALID, UNLOCKED,  reset) --- data:          0 --- key: stream_stl
+<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
+
+<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
+SGImplSvc(StoreGateSvc_Impl)::dump():
+Found 1 proxy for ClassID 2101 (EventInfo): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x234ee690 --- key: 
+Found 1 proxy for ClassID 22592129 (std::vector<int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2122cc80 --- key: TestInts
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21224b40 --- key: EventContext
+Found 1 proxy for ClassID 177480351 (std::vector<unsigned int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x217a6300 --- key: TestUInts
+Found 1 proxy for ClassID 202242136 (std::vector<float>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2124a100 --- key: TestFloats
+Found 1 proxy for ClassID 219400222 (std::vector<double>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x235f41c0 --- key: TestDoubles
+Found 1 proxy for ClassID 222376821 (DataHeader): 
+ flags: (INVALID, UNLOCKED,  reset) --- data:          0 --- key: stream_stl
+<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
+
+<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
+SGImplSvc(StoreGateSvc_Impl)::dump():
+Found 1 proxy for ClassID 2101 (EventInfo): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21224c80 --- key: 
+Found 1 proxy for ClassID 22592129 (std::vector<int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x23588b80 --- key: TestInts
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2359e080 --- key: EventContext
+Found 1 proxy for ClassID 177480351 (std::vector<unsigned int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2124a100 --- key: TestUInts
+Found 1 proxy for ClassID 202242136 (std::vector<float>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x235f41c0 --- key: TestFloats
+Found 1 proxy for ClassID 219400222 (std::vector<double>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2122cc80 --- key: TestDoubles
+Found 1 proxy for ClassID 222376821 (DataHeader): 
+ flags: (INVALID, UNLOCKED,  reset) --- data:          0 --- key: stream_stl
+<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
+
+<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
+SGImplSvc(StoreGateSvc_Impl)::dump():
+Found 1 proxy for ClassID 2101 (EventInfo): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21225d60 --- key: 
+Found 1 proxy for ClassID 22592129 (std::vector<int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x1b583e00 --- key: TestInts
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21224730 --- key: EventContext
+Found 1 proxy for ClassID 177480351 (std::vector<unsigned int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x235f41c0 --- key: TestUInts
+Found 1 proxy for ClassID 202242136 (std::vector<float>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2122cc80 --- key: TestFloats
+Found 1 proxy for ClassID 219400222 (std::vector<double>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x23588b80 --- key: TestDoubles
+Found 1 proxy for ClassID 222376821 (DataHeader): 
+ flags: (INVALID, UNLOCKED,  reset) --- data:          0 --- key: stream_stl
+<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
+
+<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
+SGImplSvc(StoreGateSvc_Impl)::dump():
+Found 1 proxy for ClassID 2101 (EventInfo): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x234ee690 --- key: 
+Found 1 proxy for ClassID 22592129 (std::vector<int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2258ff00 --- key: TestInts
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2359e300 --- key: EventContext
+Found 1 proxy for ClassID 177480351 (std::vector<unsigned int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2122cc80 --- key: TestUInts
+Found 1 proxy for ClassID 202242136 (std::vector<float>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x23588b80 --- key: TestFloats
+Found 1 proxy for ClassID 219400222 (std::vector<double>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x1b583e00 --- key: TestDoubles
+Found 1 proxy for ClassID 222376821 (DataHeader): 
+ flags: (INVALID, UNLOCKED,  reset) --- data:          0 --- key: stream_stl
+<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
+
+<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
+SGImplSvc(StoreGateSvc_Impl)::dump():
+Found 1 proxy for ClassID 2101 (EventInfo): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21224c80 --- key: 
+Found 1 proxy for ClassID 22592129 (std::vector<int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x23154c00 --- key: TestInts
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2359e030 --- key: EventContext
+Found 1 proxy for ClassID 177480351 (std::vector<unsigned int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x23588b80 --- key: TestUInts
+Found 1 proxy for ClassID 202242136 (std::vector<float>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x1b583e00 --- key: TestFloats
+Found 1 proxy for ClassID 219400222 (std::vector<double>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2258ff00 --- key: TestDoubles
+Found 1 proxy for ClassID 222376821 (DataHeader): 
+ flags: (INVALID, UNLOCKED,  reset) --- data:          0 --- key: stream_stl
+<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
+
+<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
+SGImplSvc(StoreGateSvc_Impl)::dump():
+Found 1 proxy for ClassID 2101 (EventInfo): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x21225d60 --- key: 
+Found 1 proxy for ClassID 22592129 (std::vector<int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x23545880 --- key: TestInts
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2359e350 --- key: EventContext
+Found 1 proxy for ClassID 177480351 (std::vector<unsigned int>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x1b583e00 --- key: TestUInts
+Found 1 proxy for ClassID 202242136 (std::vector<float>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x2258ff00 --- key: TestFloats
+Found 1 proxy for ClassID 219400222 (std::vector<double>): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x23154c00 --- key: TestDoubles
+Found 1 proxy for ClassID 222376821 (DataHeader): 
+ flags: (INVALID, UNLOCKED,  reset) --- data:          0 --- key: stream_stl
+<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
+
+ApplicationMgr       INFO Application Manager Stopped successfully
+ApplicationMgr       INFO Application Manager Finalized successfully
+ApplicationMgr       INFO Application Manager Terminated successfully
+Py:Athena            INFO leaving with code 0: "successful run"
diff --git a/Control/StoreGateTests/share/SgProducerConsumer.ref b/Control/StoreGateTests/share/SgProducerConsumer.ref
new file mode 100644
index 0000000000000000000000000000000000000000..15eeabbab8e731b1b9895fba27d32a18b6049b79
--- /dev/null
+++ b/Control/StoreGateTests/share/SgProducerConsumer.ref
@@ -0,0 +1,13 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::: ChapPy is launching script [StoreGateTests/atn_test_sgProducerConsumer_jobOptions.py] :::
+Py:Athena            INFO including file "StoreGateTests/atn_test_sgProducerConsumer_jobOptions.py"
+################################################################################
+## StoreGate test... [producer/consumer-bench]
+################################################################################
+ :::running [.......] ==> [OK]
+All tests SUCCESSFULLY completed
+
+################################################################################
+## Bye.
+################################################################################
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
diff --git a/Control/StoreGateTests/share/SgProducerConsumerDataPool.ref b/Control/StoreGateTests/share/SgProducerConsumerDataPool.ref
new file mode 100644
index 0000000000000000000000000000000000000000..7fc1384201a7897fd4dce87da7f1ffe72ccaec48
--- /dev/null
+++ b/Control/StoreGateTests/share/SgProducerConsumerDataPool.ref
@@ -0,0 +1,14 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::: ChapPy is launching script [StoreGateTests/atn_test_sgProducerConsumerDataPool_jobOptions.py] :::
+Py:Athena            INFO including file "StoreGateTests/atn_test_sgProducerConsumerDataPool_jobOptions.py"
+################################################################################
+## StoreGate test... [producer/consumer-DataPool-bench]
+################################################################################
+:::   No DataPool  :::running [......] ==> [OK]
+::: With DataPool  :::running [.....] ==> [OK]
+All tests SUCCESSFULLY completed
+
+################################################################################
+## Bye.
+################################################################################
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
diff --git a/Control/StoreGateTests/share/test_recordStlClids_jobOptions.py b/Control/StoreGateTests/share/test_recordStlClids_jobOptions.py
index bbaa647fe6cdf248533dca34ac59944a09835e2d..757849f5437c9d7d155f8abf6d24169a1105daa6 100644
--- a/Control/StoreGateTests/share/test_recordStlClids_jobOptions.py
+++ b/Control/StoreGateTests/share/test_recordStlClids_jobOptions.py
@@ -9,12 +9,12 @@ from AthenaCommon.AppMgr import theApp
 ###############################
 # Load perf service
 ###############################
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-if not 'doMonitoring' in dir():
-    doMonitoring = True
-    pass
-from PerfMonComps.PerfMonFlags import jobproperties as jp
-jp.PerfMonFlags.doMonitoring = doMonitoring
+# from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+# if not 'doMonitoring' in dir():
+#     doMonitoring = True
+#     pass
+# from PerfMonComps.PerfMonFlags import jobproperties as jp
+# jp.PerfMonFlags.doMonitoring = doMonitoring
 
 #--------------------------------------------------------------
 # General Application Configuration options
diff --git a/Control/StoreGateTests/test/PyClidsTestWriter.sh b/Control/StoreGateTests/test/PyClidsTestWriter.sh
new file mode 100755
index 0000000000000000000000000000000000000000..67690245fb31884d2ba4bb21e185598dec5176f8
--- /dev/null
+++ b/Control/StoreGateTests/test/PyClidsTestWriter.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+#
+# Script running the test_recordStlClids_jobOptions.py test jobOptions for CTest.
+#
+
+# Return the correct code:
+set -e
+
+# Run the test:
+athena.py StoreGateTests/test_recordStlClids_jobOptions.py
diff --git a/Control/StoreGateTests/test/SgProducerConsumer.sh b/Control/StoreGateTests/test/SgProducerConsumer.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c6e774d4847ea676b4aed546ebc28cd35a8b7ac8
--- /dev/null
+++ b/Control/StoreGateTests/test/SgProducerConsumer.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+#
+# Test script.
+#
+
+# Return the correct code:
+set -e
+
+# Run the test:
+chappy.py StoreGateTests/atn_test_sgProducerConsumer_jobOptions.py
diff --git a/Control/StoreGateTests/test/SgProducerConsumerDataPool.sh b/Control/StoreGateTests/test/SgProducerConsumerDataPool.sh
new file mode 100755
index 0000000000000000000000000000000000000000..7936be54ba0332288ef018882a18052c9d01e8dc
--- /dev/null
+++ b/Control/StoreGateTests/test/SgProducerConsumerDataPool.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+#
+# Test script.
+#
+
+# Return the correct code:
+set -e
+
+# Run the test:
+chappy.py StoreGateTests/atn_test_sgProducerConsumerDataPool_jobOptions.py
diff --git a/Control/StoreGateTests/test/StoreGateTests.xml b/Control/StoreGateTests/test/StoreGateTests.xml
index 3f60de058934ddf5e409e3db0667e820c45cfc75..7e92e58a5dbd612a84e2e8ccd62c6cd3ec7b47f3 100755
--- a/Control/StoreGateTests/test/StoreGateTests.xml
+++ b/Control/StoreGateTests/test/StoreGateTests.xml
@@ -1,43 +1,15 @@
 <?xml version="1.0"?>
 <atn>
-
-   <TEST name="SgProducerConsumer" type="script" suite="StoreGateTests">
-      <package_atn>Control/StoreGateTests</package_atn>
-      <options_atn>chappy.py StoreGateTests/atn_test_sgProducerConsumer_jobOptions.py</options_atn>
-      <timelimit>15</timelimit>
-      <author> Sebastien Binet </author>
-      <mailto> binet@cern.ch </mailto>
-      <expectations>
-         <successMessage>All tests SUCCESSFULLY completed</successMessage>
-         <errorMessage>ERROR</errorMessage>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-
-   <TEST name="SgProducerConsumerDataPool" type="script" suite="StoreGateTests">
-      <package_atn>Control/StoreGateTests</package_atn>
-      <options_atn>chappy.py StoreGateTests/atn_test_sgProducerConsumerDataPool_jobOptions.py</options_atn>
-      <timelimit>15</timelimit>
-      <author> Sebastien Binet </author>
-      <mailto> binet@cern.ch </mailto>
-      <expectations>
-         <successMessage>All tests SUCCESSFULLY completed</successMessage>
-         <errorMessage>ERROR</errorMessage>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-
-   <TEST name="PyClidsTestWriter" type="script" suite="StoreGateTests">
-      <package_atn>Control/StoreGateTests</package_atn>
-      <options_atn>athena.py StoreGateTests/test_recordStlClids_jobOptions.py</options_atn>
-      <timelimit>15</timelimit>
-      <author> Sebastien Binet </author>
-      <mailto> binet@cern.ch </mailto>
-      <expectations>
-         <successMessage>code 0: "successful run"</successMessage>
-         <errorMessage>ERROR</errorMessage>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-
+    <TEST name="StoreGateTests" type="makecheck" suite="StoreGateTests">
+       <package>Control/StoreGateTests</package>
+       <author> scott snyder </author>
+       <mailto> snyder@bnl.gov </mailto>
+       <expectations>
+          <errorMessage>Athena exited abnormally</errorMessage>
+          <errorMessage>differ</errorMessage>
+          <warningMessage> # WARNING_MESSAGE : post.sh> ERROR</warningMessage>
+          <successMessage>check ok</successMessage>
+          <returnValue>0</returnValue>
+       </expectations>
+    </TEST>
 </atn>
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
index 82a19920725f3002f4096039390f661698a0b06f..c9f250dc44f29ec4815e94844af221cc779c1e50 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
@@ -317,10 +317,18 @@ StatusCode AthenaPoolCnvSvc::connectOutput(const std::string& outputConnectionSp
       return(StatusCode::SUCCESS);
    }
    if (!m_outputStreamingTool.empty()
-		   && (m_streamServer == m_outputStreamingTool.size() || !m_outputStreamingTool[0]->isServer())) {
+		   && (m_streamServer == m_outputStreamingTool.size() || !m_outputStreamingTool[m_streamServer < m_outputStreamingTool.size() ? m_streamServer : 0]->isServer())) {
       ATH_MSG_DEBUG("connectOutput SKIPPED for expired server.");
       return(StatusCode::SUCCESS);
    }
+   std::size_t streamClient = 0;
+   for (std::vector<std::string>::const_iterator iter = m_streamClientFiles.begin(), last = m_streamClientFiles.end(); iter != last; iter++) {
+      if (*iter == outputConnectionSpec) break;
+      streamClient++;
+   }
+   if (streamClient == m_streamClientFiles.size()) {
+      m_streamClientFiles.push_back(outputConnectionSpec);
+   }
    try {
       if (!m_poolSvc->connect(pool::ITransaction::UPDATE).isSuccess()) {
          ATH_MSG_ERROR("connectOutput FAILED to open an UPDATE transaction.");
@@ -370,10 +378,21 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& outputConnectionSpe
       ATH_MSG_DEBUG("commitOutput SKIPPED for expired server.");
       return(StatusCode::SUCCESS);
    }
-   if (!m_outputStreamingTool.empty() && !m_outputStreamingTool[0]->isServer()) {
-      ATH_MSG_DEBUG("commitOutput SKIPPED for uninitialized server.");
+   if (!m_outputStreamingTool.empty() && !m_outputStreamingTool[m_streamServer < m_outputStreamingTool.size() ? m_streamServer : 0]->isServer()) {
+      ATH_MSG_DEBUG("commitOutput SKIPPED for uninitialized server: " << m_streamServer << ".");
       return(StatusCode::SUCCESS);
    }
+   if (!m_outputStreamingTool.empty() && m_streamServer == m_outputStreamingTool.size()) {
+      std::size_t streamClient = 0;
+      for (std::vector<std::string>::const_iterator iter = m_streamClientFiles.begin(), last = m_streamClientFiles.end(); iter != last; iter++) {
+         if (*iter == outputConnectionSpec) break;
+         streamClient++;
+      }
+      if (streamClient == m_streamClientFiles.size()) {
+         ATH_MSG_DEBUG("commitOutput SKIPPED for unconnected file: " << outputConnectionSpec << ".");
+         return(StatusCode::SUCCESS);
+      }
+   }
    std::map<void*, RootType> commitCache;
    if (!m_outputStreamingTool.empty() && m_streamServer < m_outputStreamingTool.size()
 		   && m_outputStreamingTool[m_streamServer]->isServer()) {
@@ -715,16 +734,32 @@ const Token* AthenaPoolCnvSvc::registerForWrite(const Placement* placement,
       token = tempToken; tempToken = nullptr;
    } else {
       if (!m_outputStreamingTool.empty() && m_metadataContainerProp.value().empty()
-		      && (m_streamServer == m_outputStreamingTool.size() || !m_outputStreamingTool[0]->isServer())) {
+		      && (m_streamServer == m_outputStreamingTool.size() || !m_outputStreamingTool[m_streamServer < m_outputStreamingTool.size() ? m_streamServer : 0]->isServer())) {
          ATH_MSG_DEBUG("registerForWrite SKIPPED for expired server, Placement = " << placement->toString());
          Token* tempToken = new Token();
          tempToken->setClassID(pool::DbReflex::guid(classDesc));
          token = tempToken; tempToken = nullptr;
-      } else if (!m_outputStreamingTool.empty() && !m_outputStreamingTool[0]->isServer()) {
+      } else if (!m_outputStreamingTool.empty() && m_streamServer != m_outputStreamingTool.size() && !m_outputStreamingTool[m_streamServer < m_outputStreamingTool.size() ? m_streamServer : 0]->isServer()) {
          ATH_MSG_DEBUG("registerForWrite SKIPPED for uninitialized server, Placement = " << placement->toString());
          Token* tempToken = new Token();
          tempToken->setClassID(pool::DbReflex::guid(classDesc));
          token = tempToken; tempToken = nullptr;
+      } else if (!m_outputStreamingTool.empty() && m_streamServer == m_outputStreamingTool.size()) {
+         std::size_t streamClient = 0;
+         std::string fileName = placement->fileName();
+         for (std::vector<std::string>::const_iterator iter = m_streamClientFiles.begin(), last = m_streamClientFiles.end(); iter != last; iter++) {
+            if (*iter == fileName) break;
+            streamClient++;
+         }
+         if (streamClient == m_streamClientFiles.size()) {
+            ATH_MSG_DEBUG("registerForWrite SKIPPED for unconnected file: " << fileName << ".");
+            Token* tempToken = new Token();
+            tempToken->setClassID(pool::DbReflex::guid(classDesc));
+            token = tempToken; tempToken = nullptr;
+         } else {
+            ATH_MSG_VERBOSE("Requested write object for: " << placement->toString());
+            token = m_poolSvc->registerForWrite(placement, obj, classDesc);
+         }
       } else {
          token = m_poolSvc->registerForWrite(placement, obj, classDesc);
       }
@@ -808,6 +843,7 @@ void AthenaPoolCnvSvc::setObjPtr(void*& obj, const Token* token) const {
          }
       }
    } else if (token->dbID() != Guid::null()) {
+      ATH_MSG_VERBOSE("Requesting object for: " << token->toString());
       m_poolSvc->setObjPtr(obj, token);
    }
    if (m_doChronoStat) {
@@ -938,6 +974,7 @@ StatusCode AthenaPoolCnvSvc::makeServer(int num) {
             ATH_MSG_ERROR("makeServer: " << m_outputStreamingTool << " failed");
             return(StatusCode::FAILURE);
          }
+         m_streamClientFiles.clear();
          return(StatusCode::SUCCESS);
       }
       return(StatusCode::RECOVERABLE);
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref
index baaed5e335c73ef360706633ea531889377a29bc..6fb1f58a55c5b224125ba2133b96caf7959d9120 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref
@@ -1,19 +1,19 @@
-Wed Jul 18 18:29:06 CEST 2018
+Tue Sep  4 17:20:15 CEST 2018
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5511 configurables from 52 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5519 configurables from 43 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Athena               INFO including file "AthenaCommon/runbatch.py"
 [?1034hApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r2)
-                                          running on lxplus052.cern.ch on Wed Jul 18 18:29:15 2018
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r3)
+                                          running on lxplus069.cern.ch on Tue Sep  4 17:20:30 2018
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -21,7 +21,7 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ClassIDSvc           INFO  getRegistryEntries: read 2428 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2918 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 916 CLIDRegistry entries for module ALL
@@ -36,8 +36,8 @@ PoolSvc             DEBUG Service base class initialized successfully
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-17T2058/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus052.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-09-03T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus069.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             DEBUG OutputLevel is 
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -161,6 +161,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
+ClassIDSvc           INFO  getRegistryEntries: read 1964 CLIDRegistry entries for module ALL
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
@@ -225,6 +226,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
+ClassIDSvc           INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
@@ -259,7 +261,6 @@ EventSelector        INFO skipping event 9
 EventSelector        INFO skipping event 10
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-ClassIDSvc           INFO  getRegistryEntries: read 1717 CLIDRegistry entries for module ALL
 EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-0000000A].
 EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-0000000A].
 EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-0000000A]
@@ -318,8 +319,8 @@ ReadData             INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = Dum
 ReadData             INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector
 ClassIDSvc           INFO  getRegistryEntries: read 10 CLIDRegistry entries for module ALL
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -351,8 +352,8 @@ ReadData             INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du
 ReadData             INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -384,8 +385,8 @@ ReadData             INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du
 ReadData             INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -417,8 +418,8 @@ ReadData             INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du
 ReadData             INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -450,8 +451,8 @@ ReadData             INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du
 ReadData             INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -483,8 +484,8 @@ ReadData             INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du
 ReadData             INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -516,8 +517,8 @@ ReadData             INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du
 ReadData             INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -549,8 +550,8 @@ ReadData             INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du
 ReadData             INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -582,8 +583,8 @@ ReadData             INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du
 ReadData             INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -615,8 +616,8 @@ ReadData             INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du
 ReadData             INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 10 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
@@ -812,8 +813,8 @@ ReadData             INFO EventInfo event: 0 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -840,8 +841,8 @@ ReadData             INFO EventInfo event: 1 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -868,8 +869,8 @@ ReadData             INFO EventInfo event: 2 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -896,8 +897,8 @@ ReadData             INFO EventInfo event: 3 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -924,8 +925,8 @@ ReadData             INFO EventInfo event: 4 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -952,8 +953,8 @@ ReadData             INFO EventInfo event: 5 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -980,8 +981,8 @@ ReadData             INFO EventInfo event: 6 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1008,8 +1009,8 @@ ReadData             INFO EventInfo event: 7 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1036,8 +1037,8 @@ ReadData             INFO EventInfo event: 8 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1064,8 +1065,8 @@ ReadData             INFO EventInfo event: 9 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 20 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1092,8 +1093,8 @@ ReadData             INFO EventInfo event: 10 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 21 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1120,8 +1121,8 @@ ReadData             INFO EventInfo event: 11 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 22 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1148,8 +1149,8 @@ ReadData             INFO EventInfo event: 12 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 23 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1176,8 +1177,8 @@ ReadData             INFO EventInfo event: 13 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 24 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1204,8 +1205,8 @@ ReadData             INFO EventInfo event: 14 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 25 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1232,8 +1233,8 @@ ReadData             INFO EventInfo event: 15 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 26 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1260,8 +1261,8 @@ ReadData             INFO EventInfo event: 16 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 27 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1288,8 +1289,8 @@ ReadData             INFO EventInfo event: 17 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 28 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1316,8 +1317,8 @@ ReadData             INFO EventInfo event: 18 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 29 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1344,8 +1345,8 @@ ReadData             INFO EventInfo event: 19 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 30 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1373,8 +1374,8 @@ ReadData             INFO EventInfo event: 20 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #20, run #2 31 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1401,8 +1402,8 @@ ReadData             INFO EventInfo event: 21 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #21, run #2 32 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1429,8 +1430,8 @@ ReadData             INFO EventInfo event: 22 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #22, run #2 33 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1457,8 +1458,8 @@ ReadData             INFO EventInfo event: 23 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #23, run #2 34 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1485,8 +1486,8 @@ ReadData             INFO EventInfo event: 24 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #24, run #2 35 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1513,8 +1514,8 @@ ReadData             INFO EventInfo event: 25 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #25, run #2 36 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1541,8 +1542,8 @@ ReadData             INFO EventInfo event: 26 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #26, run #2 37 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1569,8 +1570,8 @@ ReadData             INFO EventInfo event: 27 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #27, run #2 38 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1597,8 +1598,8 @@ ReadData             INFO EventInfo event: 28 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #28, run #2 39 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1625,8 +1626,8 @@ ReadData             INFO EventInfo event: 29 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #29, run #2 40 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1653,8 +1654,8 @@ ReadData             INFO EventInfo event: 30 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #30, run #2 41 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1681,8 +1682,8 @@ ReadData             INFO EventInfo event: 31 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #31, run #2 42 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1709,8 +1710,8 @@ ReadData             INFO EventInfo event: 32 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #32, run #2 43 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1737,8 +1738,8 @@ ReadData             INFO EventInfo event: 33 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #33, run #2 44 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1765,8 +1766,8 @@ ReadData             INFO EventInfo event: 34 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #34, run #2 45 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1793,8 +1794,8 @@ ReadData             INFO EventInfo event: 35 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #35, run #2 46 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1821,8 +1822,8 @@ ReadData             INFO EventInfo event: 36 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #36, run #2 47 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1849,8 +1850,8 @@ ReadData             INFO EventInfo event: 37 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #37, run #2 48 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1877,8 +1878,8 @@ ReadData             INFO EventInfo event: 38 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #38, run #2 49 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1905,8 +1906,8 @@ ReadData             INFO EventInfo event: 39 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #39, run #2 50 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
@@ -2139,8 +2140,8 @@ ReadData             INFO Hit x = 20.4945 y = 63.5816 z = 48.1358 detector = Dum
 ReadData             INFO Hit x = 23.7045 y = 57.9027 z = 46.3159 detector = DummyHitDetector
 ReadData             INFO Hit x = 26.9145 y = 52.2238 z = 44.9265 detector = DummyHitDetector
 ReadData             INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 51 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2186,8 +2187,8 @@ ReadData             INFO Hit x = 120.494 y = 63.5816 z = -51.8642 detector = Du
 ReadData             INFO Hit x = 123.704 y = 57.9027 z = -53.6841 detector = DummyHitDetector
 ReadData             INFO Hit x = 126.915 y = 52.2238 z = -55.0735 detector = DummyHitDetector
 ReadData             INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 52 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2233,8 +2234,8 @@ ReadData             INFO Hit x = 220.494 y = 63.5816 z = -151.864 detector = Du
 ReadData             INFO Hit x = 223.704 y = 57.9027 z = -153.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 226.915 y = 52.2238 z = -155.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 53 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2280,8 +2281,8 @@ ReadData             INFO Hit x = 320.495 y = 63.5816 z = -251.864 detector = Du
 ReadData             INFO Hit x = 323.705 y = 57.9027 z = -253.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 326.915 y = 52.2238 z = -255.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 54 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2327,8 +2328,8 @@ ReadData             INFO Hit x = 420.495 y = 63.5816 z = -351.864 detector = Du
 ReadData             INFO Hit x = 423.705 y = 57.9027 z = -353.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 426.915 y = 52.2238 z = -355.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 55 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2374,8 +2375,8 @@ ReadData             INFO Hit x = 520.495 y = 63.5816 z = -451.864 detector = Du
 ReadData             INFO Hit x = 523.705 y = 57.9027 z = -453.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 526.914 y = 52.2238 z = -455.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 56 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2421,8 +2422,8 @@ ReadData             INFO Hit x = 620.495 y = 63.5816 z = -551.864 detector = Du
 ReadData             INFO Hit x = 623.705 y = 57.9027 z = -553.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 626.914 y = 52.2238 z = -555.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 57 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2468,8 +2469,8 @@ ReadData             INFO Hit x = 720.495 y = 63.5816 z = -651.864 detector = Du
 ReadData             INFO Hit x = 723.705 y = 57.9027 z = -653.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 726.914 y = 52.2238 z = -655.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 58 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2515,8 +2516,8 @@ ReadData             INFO Hit x = 820.495 y = 63.5816 z = -751.864 detector = Du
 ReadData             INFO Hit x = 823.705 y = 57.9027 z = -753.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 826.914 y = 52.2238 z = -755.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 59 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2562,8 +2563,8 @@ ReadData             INFO Hit x = 920.495 y = 63.5816 z = -851.864 detector = Du
 ReadData             INFO Hit x = 923.705 y = 57.9027 z = -853.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 926.914 y = 52.2238 z = -855.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 60 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2609,8 +2610,8 @@ ReadData             INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du
 ReadData             INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 61 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2656,8 +2657,8 @@ ReadData             INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du
 ReadData             INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 62 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2703,8 +2704,8 @@ ReadData             INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du
 ReadData             INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 63 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2750,8 +2751,8 @@ ReadData             INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du
 ReadData             INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 64 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2797,8 +2798,8 @@ ReadData             INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du
 ReadData             INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 65 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2844,8 +2845,8 @@ ReadData             INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du
 ReadData             INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 66 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2891,8 +2892,8 @@ ReadData             INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du
 ReadData             INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 67 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2938,8 +2939,8 @@ ReadData             INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du
 ReadData             INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 68 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2985,8 +2986,8 @@ ReadData             INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du
 ReadData             INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 69 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -3032,8 +3033,8 @@ ReadData             INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du
 ReadData             INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 70 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
@@ -3051,9 +3052,9 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=    0 [us] Ave/Min/Max=    0(+-    0)/    0/    0 [us] #=272
-cObj_ALL             INFO Time User   : Tot=   40 [ms] Ave/Min/Max=0.181(+- 1.64)/    0/   20 [ms] #=221
-ChronoStatSvc        INFO Time User   : Tot= 0.89  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=   30 [ms] Ave/Min/Max= 0.11(+- 1.35)/    0/   20 [ms] #=272
+cObj_ALL             INFO Time User   : Tot=   80 [ms] Ave/Min/Max=0.362(+- 2.49)/    0/   30 [ms] #=221
+ChronoStatSvc        INFO Time User   : Tot= 1.25  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref
index dfbb976caf96ccd90736e9424271b6554e1ecf7b..fbf7cca53288da16f36376f110fd03bfe9bd3dd9 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref
@@ -1,19 +1,19 @@
-Wed Jul 18 20:11:19 CEST 2018
+Tue Sep  4 17:28:49 CEST 2018
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadAgainJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5511 configurables from 52 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5519 configurables from 43 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Athena               INFO including file "AthenaCommon/runbatch.py"
 [?1034hApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r2)
-                                          running on lxplus052.cern.ch on Wed Jul 18 20:11:27 2018
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r3)
+                                          running on lxplus069.cern.ch on Tue Sep  4 17:29:01 2018
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -21,7 +21,7 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ClassIDSvc           INFO  getRegistryEntries: read 2428 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2918 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 916 CLIDRegistry entries for module ALL
@@ -36,8 +36,8 @@ PoolSvc             DEBUG Service base class initialized successfully
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-17T2058/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus052.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-09-03T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus069.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             DEBUG OutputLevel is 
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -155,6 +155,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
+ClassIDSvc           INFO  getRegistryEntries: read 1961 CLIDRegistry entries for module ALL
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 SimplePoolRepli...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
@@ -223,6 +224,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
+ClassIDSvc           INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
@@ -323,7 +325,6 @@ EventSelector        INFO skipping event 9
 EventSelector        INFO skipping event 10
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-ClassIDSvc           INFO  getRegistryEntries: read 1714 CLIDRegistry entries for module ALL
 EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-0000000A].
 EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-0000000A].
 EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-0000000A]
@@ -377,8 +378,8 @@ ReadData             INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = Dum
 ReadData             INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector
 ClassIDSvc           INFO  getRegistryEntries: read 10 CLIDRegistry entries for module ALL
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19645
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -410,8 +411,8 @@ ReadData             INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du
 ReadData             INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19645
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -443,8 +444,8 @@ ReadData             INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du
 ReadData             INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19645
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -476,8 +477,8 @@ ReadData             INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du
 ReadData             INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19645
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -509,8 +510,8 @@ ReadData             INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du
 ReadData             INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19645
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -542,8 +543,8 @@ ReadData             INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du
 ReadData             INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19645
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -575,8 +576,8 @@ ReadData             INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du
 ReadData             INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19645
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -608,8 +609,8 @@ ReadData             INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du
 ReadData             INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19645
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -641,8 +642,8 @@ ReadData             INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du
 ReadData             INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19645
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -674,8 +675,8 @@ ReadData             INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du
 ReadData             INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500
-PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19645
+PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 10 events processed so far  <<<===
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -814,6 +815,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
+ClassIDSvc           INFO  getRegistryEntries: read 3 CLIDRegistry entries for module ALL
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
@@ -823,7 +825,6 @@ MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-ClassIDSvc           INFO  getRegistryEntries: read 3 CLIDRegistry entries for module ALL
 EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000005-00000000].
 EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000005-00000000].
 EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000005-00000000]
@@ -872,8 +873,8 @@ ReadData             INFO EventInfo event: 0 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -900,8 +901,8 @@ ReadData             INFO EventInfo event: 1 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -928,8 +929,8 @@ ReadData             INFO EventInfo event: 2 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -956,8 +957,8 @@ ReadData             INFO EventInfo event: 3 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -984,8 +985,8 @@ ReadData             INFO EventInfo event: 4 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1012,8 +1013,8 @@ ReadData             INFO EventInfo event: 5 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1040,8 +1041,8 @@ ReadData             INFO EventInfo event: 6 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1068,8 +1069,8 @@ ReadData             INFO EventInfo event: 7 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1096,8 +1097,8 @@ ReadData             INFO EventInfo event: 8 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1124,8 +1125,8 @@ ReadData             INFO EventInfo event: 9 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 20 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1152,8 +1153,8 @@ ReadData             INFO EventInfo event: 10 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 21 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1180,8 +1181,8 @@ ReadData             INFO EventInfo event: 11 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 22 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1208,8 +1209,8 @@ ReadData             INFO EventInfo event: 12 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 23 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1236,8 +1237,8 @@ ReadData             INFO EventInfo event: 13 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 24 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1264,8 +1265,8 @@ ReadData             INFO EventInfo event: 14 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 25 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1292,8 +1293,8 @@ ReadData             INFO EventInfo event: 15 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 26 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1320,8 +1321,8 @@ ReadData             INFO EventInfo event: 16 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 27 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1348,8 +1349,8 @@ ReadData             INFO EventInfo event: 17 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 28 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1376,8 +1377,8 @@ ReadData             INFO EventInfo event: 18 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 29 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1404,8 +1405,8 @@ ReadData             INFO EventInfo event: 19 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26615
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 30 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1433,8 +1434,8 @@ ReadData             INFO EventInfo event: 20 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #20, run #2 31 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1461,8 +1462,8 @@ ReadData             INFO EventInfo event: 21 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #21, run #2 32 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1489,8 +1490,8 @@ ReadData             INFO EventInfo event: 22 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #22, run #2 33 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1517,8 +1518,8 @@ ReadData             INFO EventInfo event: 23 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #23, run #2 34 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1545,8 +1546,8 @@ ReadData             INFO EventInfo event: 24 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #24, run #2 35 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1573,8 +1574,8 @@ ReadData             INFO EventInfo event: 25 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #25, run #2 36 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1601,8 +1602,8 @@ ReadData             INFO EventInfo event: 26 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #26, run #2 37 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1629,8 +1630,8 @@ ReadData             INFO EventInfo event: 27 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #27, run #2 38 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1657,8 +1658,8 @@ ReadData             INFO EventInfo event: 28 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #28, run #2 39 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1685,8 +1686,8 @@ ReadData             INFO EventInfo event: 29 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #29, run #2 40 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1713,8 +1714,8 @@ ReadData             INFO EventInfo event: 30 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #30, run #2 41 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1741,8 +1742,8 @@ ReadData             INFO EventInfo event: 31 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #31, run #2 42 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1769,8 +1770,8 @@ ReadData             INFO EventInfo event: 32 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #32, run #2 43 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1797,8 +1798,8 @@ ReadData             INFO EventInfo event: 33 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #33, run #2 44 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1825,8 +1826,8 @@ ReadData             INFO EventInfo event: 34 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #34, run #2 45 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1853,8 +1854,8 @@ ReadData             INFO EventInfo event: 35 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #35, run #2 46 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1881,8 +1882,8 @@ ReadData             INFO EventInfo event: 36 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #36, run #2 47 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1909,8 +1910,8 @@ ReadData             INFO EventInfo event: 37 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #37, run #2 48 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1937,8 +1938,8 @@ ReadData             INFO EventInfo event: 38 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #38, run #2 49 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1965,8 +1966,8 @@ ReadData             INFO EventInfo event: 39 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28228
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #39, run #2 50 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
@@ -2256,8 +2257,8 @@ ReadData             INFO Hit x = 20.4945 y = 63.5816 z = 48.1358 detector = Dum
 ReadData             INFO Hit x = 23.7045 y = 57.9027 z = 46.3159 detector = DummyHitDetector
 ReadData             INFO Hit x = 26.9145 y = 52.2238 z = 44.9265 detector = DummyHitDetector
 ReadData             INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 51 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2303,8 +2304,8 @@ ReadData             INFO Hit x = 120.494 y = 63.5816 z = -51.8642 detector = Du
 ReadData             INFO Hit x = 123.704 y = 57.9027 z = -53.6841 detector = DummyHitDetector
 ReadData             INFO Hit x = 126.915 y = 52.2238 z = -55.0735 detector = DummyHitDetector
 ReadData             INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 52 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2350,8 +2351,8 @@ ReadData             INFO Hit x = 220.494 y = 63.5816 z = -151.864 detector = Du
 ReadData             INFO Hit x = 223.704 y = 57.9027 z = -153.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 226.915 y = 52.2238 z = -155.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 53 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2397,8 +2398,8 @@ ReadData             INFO Hit x = 320.495 y = 63.5816 z = -251.864 detector = Du
 ReadData             INFO Hit x = 323.705 y = 57.9027 z = -253.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 326.915 y = 52.2238 z = -255.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 54 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2444,8 +2445,8 @@ ReadData             INFO Hit x = 420.495 y = 63.5816 z = -351.864 detector = Du
 ReadData             INFO Hit x = 423.705 y = 57.9027 z = -353.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 426.915 y = 52.2238 z = -355.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 55 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2491,8 +2492,8 @@ ReadData             INFO Hit x = 520.495 y = 63.5816 z = -451.864 detector = Du
 ReadData             INFO Hit x = 523.705 y = 57.9027 z = -453.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 526.914 y = 52.2238 z = -455.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 56 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2538,8 +2539,8 @@ ReadData             INFO Hit x = 620.495 y = 63.5816 z = -551.864 detector = Du
 ReadData             INFO Hit x = 623.705 y = 57.9027 z = -553.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 626.914 y = 52.2238 z = -555.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 57 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2585,8 +2586,8 @@ ReadData             INFO Hit x = 720.495 y = 63.5816 z = -651.864 detector = Du
 ReadData             INFO Hit x = 723.705 y = 57.9027 z = -653.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 726.914 y = 52.2238 z = -655.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 58 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2632,8 +2633,8 @@ ReadData             INFO Hit x = 820.495 y = 63.5816 z = -751.864 detector = Du
 ReadData             INFO Hit x = 823.705 y = 57.9027 z = -753.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 826.914 y = 52.2238 z = -755.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 59 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2679,8 +2680,8 @@ ReadData             INFO Hit x = 920.495 y = 63.5816 z = -851.864 detector = Du
 ReadData             INFO Hit x = 923.705 y = 57.9027 z = -853.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 926.914 y = 52.2238 z = -855.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 60 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2726,8 +2727,8 @@ ReadData             INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du
 ReadData             INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 61 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2773,8 +2774,8 @@ ReadData             INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du
 ReadData             INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 62 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2820,8 +2821,8 @@ ReadData             INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du
 ReadData             INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 63 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2867,8 +2868,8 @@ ReadData             INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du
 ReadData             INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 64 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2914,8 +2915,8 @@ ReadData             INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du
 ReadData             INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 65 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2961,8 +2962,8 @@ ReadData             INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du
 ReadData             INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 66 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -3008,8 +3009,8 @@ ReadData             INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du
 ReadData             INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 67 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -3055,8 +3056,8 @@ ReadData             INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du
 ReadData             INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 68 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -3102,8 +3103,8 @@ ReadData             INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du
 ReadData             INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 69 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -3149,8 +3150,8 @@ ReadData             INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du
 ReadData             INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27338
-PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19014
+PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 70 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
@@ -3169,9 +3170,9 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=   30 [ms] Ave/Min/Max=0.0965(+-0.977)/    0/   10 [ms] #=311
-cObj_ALL             INFO Time User   : Tot=   50 [ms] Ave/Min/Max=0.207(+- 1.43)/    0/   10 [ms] #=241
-ChronoStatSvc        INFO Time User   : Tot= 0.86  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=   30 [ms] Ave/Min/Max=0.0965(+- 1.26)/    0/   20 [ms] #=311
+cObj_ALL             INFO Time User   : Tot=   70 [ms] Ave/Min/Max= 0.29(+- 2.48)/    0/   30 [ms] #=241
+ChronoStatSvc        INFO Time User   : Tot= 1.21  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref
index b85bbf3976735313bc6cb1bb10b372c3895a05db..ae50043be7bfd3fa9e77dec21cdf12a1db78da7a 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref
@@ -1,19 +1,19 @@
-Wed Jul 18 18:29:06 CEST 2018
+Tue Sep  4 17:20:15 CEST 2018
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadBNJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5511 configurables from 52 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5519 configurables from 43 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Athena               INFO including file "AthenaCommon/runbatch.py"
 [?1034hApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r2)
-                                          running on lxplus052.cern.ch on Wed Jul 18 18:29:15 2018
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r3)
+                                          running on lxplus069.cern.ch on Tue Sep  4 17:20:30 2018
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -21,7 +21,7 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ClassIDSvc           INFO  getRegistryEntries: read 2428 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2918 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 916 CLIDRegistry entries for module ALL
@@ -36,8 +36,8 @@ PoolSvc             DEBUG Service base class initialized successfully
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-17T2058/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus052.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-09-03T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus069.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             DEBUG OutputLevel is 
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -161,6 +161,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
+ClassIDSvc           INFO  getRegistryEntries: read 1964 CLIDRegistry entries for module ALL
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
@@ -226,6 +227,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
+ClassIDSvc           INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
@@ -260,7 +262,6 @@ EventSelector        INFO skipping event 9
 EventSelector        INFO skipping event 10
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-ClassIDSvc           INFO  getRegistryEntries: read 1717 CLIDRegistry entries for module ALL
 EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-0000000A].
 EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-0000000A].
 EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-0000000A]
@@ -319,8 +320,8 @@ ReadData             INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = Dum
 ReadData             INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector
 ClassIDSvc           INFO  getRegistryEntries: read 10 CLIDRegistry entries for module ALL
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -352,8 +353,8 @@ ReadData             INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du
 ReadData             INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -385,8 +386,8 @@ ReadData             INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du
 ReadData             INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -418,8 +419,8 @@ ReadData             INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du
 ReadData             INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -451,8 +452,8 @@ ReadData             INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du
 ReadData             INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -484,8 +485,8 @@ ReadData             INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du
 ReadData             INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -517,8 +518,8 @@ ReadData             INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du
 ReadData             INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -550,8 +551,8 @@ ReadData             INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du
 ReadData             INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -583,8 +584,8 @@ ReadData             INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du
 ReadData             INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -616,8 +617,8 @@ ReadData             INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du
 ReadData             INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27932
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20093
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 10 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
@@ -813,8 +814,8 @@ ReadData             INFO EventInfo event: 0 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -841,8 +842,8 @@ ReadData             INFO EventInfo event: 1 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -869,8 +870,8 @@ ReadData             INFO EventInfo event: 2 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -897,8 +898,8 @@ ReadData             INFO EventInfo event: 3 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -925,8 +926,8 @@ ReadData             INFO EventInfo event: 4 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -953,8 +954,8 @@ ReadData             INFO EventInfo event: 5 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -981,8 +982,8 @@ ReadData             INFO EventInfo event: 6 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1009,8 +1010,8 @@ ReadData             INFO EventInfo event: 7 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1037,8 +1038,8 @@ ReadData             INFO EventInfo event: 8 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1065,8 +1066,8 @@ ReadData             INFO EventInfo event: 9 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 20 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1093,8 +1094,8 @@ ReadData             INFO EventInfo event: 10 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 21 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1121,8 +1122,8 @@ ReadData             INFO EventInfo event: 11 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 22 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1149,8 +1150,8 @@ ReadData             INFO EventInfo event: 12 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 23 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1177,8 +1178,8 @@ ReadData             INFO EventInfo event: 13 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 24 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1205,8 +1206,8 @@ ReadData             INFO EventInfo event: 14 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 25 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1233,8 +1234,8 @@ ReadData             INFO EventInfo event: 15 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 26 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1261,8 +1262,8 @@ ReadData             INFO EventInfo event: 16 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 27 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1289,8 +1290,8 @@ ReadData             INFO EventInfo event: 17 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 28 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1317,8 +1318,8 @@ ReadData             INFO EventInfo event: 18 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 29 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1345,8 +1346,8 @@ ReadData             INFO EventInfo event: 19 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26628
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18817
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 30 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1374,8 +1375,8 @@ ReadData             INFO EventInfo event: 20 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #20, run #2 31 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1402,8 +1403,8 @@ ReadData             INFO EventInfo event: 21 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #21, run #2 32 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1430,8 +1431,8 @@ ReadData             INFO EventInfo event: 22 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #22, run #2 33 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1458,8 +1459,8 @@ ReadData             INFO EventInfo event: 23 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #23, run #2 34 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1486,8 +1487,8 @@ ReadData             INFO EventInfo event: 24 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #24, run #2 35 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1514,8 +1515,8 @@ ReadData             INFO EventInfo event: 25 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #25, run #2 36 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1542,8 +1543,8 @@ ReadData             INFO EventInfo event: 26 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #26, run #2 37 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1570,8 +1571,8 @@ ReadData             INFO EventInfo event: 27 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #27, run #2 38 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1598,8 +1599,8 @@ ReadData             INFO EventInfo event: 28 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #28, run #2 39 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1626,8 +1627,8 @@ ReadData             INFO EventInfo event: 29 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #29, run #2 40 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1654,8 +1655,8 @@ ReadData             INFO EventInfo event: 30 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #30, run #2 41 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1682,8 +1683,8 @@ ReadData             INFO EventInfo event: 31 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #31, run #2 42 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1710,8 +1711,8 @@ ReadData             INFO EventInfo event: 32 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #32, run #2 43 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1738,8 +1739,8 @@ ReadData             INFO EventInfo event: 33 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #33, run #2 44 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1766,8 +1767,8 @@ ReadData             INFO EventInfo event: 34 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #34, run #2 45 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1794,8 +1795,8 @@ ReadData             INFO EventInfo event: 35 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #35, run #2 46 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1822,8 +1823,8 @@ ReadData             INFO EventInfo event: 36 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #36, run #2 47 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1850,8 +1851,8 @@ ReadData             INFO EventInfo event: 37 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #37, run #2 48 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1878,8 +1879,8 @@ ReadData             INFO EventInfo event: 38 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #38, run #2 49 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1906,8 +1907,8 @@ ReadData             INFO EventInfo event: 39 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20440
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #39, run #2 50 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
@@ -2140,8 +2141,8 @@ ReadData             INFO Hit x = 20.4945 y = 63.5816 z = 48.1358 detector = Dum
 ReadData             INFO Hit x = 23.7045 y = 57.9027 z = 46.3159 detector = DummyHitDetector
 ReadData             INFO Hit x = 26.9145 y = 52.2238 z = 44.9265 detector = DummyHitDetector
 ReadData             INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 51 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2187,8 +2188,8 @@ ReadData             INFO Hit x = 120.494 y = 63.5816 z = -51.8642 detector = Du
 ReadData             INFO Hit x = 123.704 y = 57.9027 z = -53.6841 detector = DummyHitDetector
 ReadData             INFO Hit x = 126.915 y = 52.2238 z = -55.0735 detector = DummyHitDetector
 ReadData             INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 52 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2234,8 +2235,8 @@ ReadData             INFO Hit x = 220.494 y = 63.5816 z = -151.864 detector = Du
 ReadData             INFO Hit x = 223.704 y = 57.9027 z = -153.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 226.915 y = 52.2238 z = -155.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 53 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2281,8 +2282,8 @@ ReadData             INFO Hit x = 320.495 y = 63.5816 z = -251.864 detector = Du
 ReadData             INFO Hit x = 323.705 y = 57.9027 z = -253.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 326.915 y = 52.2238 z = -255.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 54 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2328,8 +2329,8 @@ ReadData             INFO Hit x = 420.495 y = 63.5816 z = -351.864 detector = Du
 ReadData             INFO Hit x = 423.705 y = 57.9027 z = -353.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 426.915 y = 52.2238 z = -355.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 55 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2375,8 +2376,8 @@ ReadData             INFO Hit x = 520.495 y = 63.5816 z = -451.864 detector = Du
 ReadData             INFO Hit x = 523.705 y = 57.9027 z = -453.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 526.914 y = 52.2238 z = -455.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 56 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2422,8 +2423,8 @@ ReadData             INFO Hit x = 620.495 y = 63.5816 z = -551.864 detector = Du
 ReadData             INFO Hit x = 623.705 y = 57.9027 z = -553.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 626.914 y = 52.2238 z = -555.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 57 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2469,8 +2470,8 @@ ReadData             INFO Hit x = 720.495 y = 63.5816 z = -651.864 detector = Du
 ReadData             INFO Hit x = 723.705 y = 57.9027 z = -653.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 726.914 y = 52.2238 z = -655.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 58 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2516,8 +2517,8 @@ ReadData             INFO Hit x = 820.495 y = 63.5816 z = -751.864 detector = Du
 ReadData             INFO Hit x = 823.705 y = 57.9027 z = -753.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 826.914 y = 52.2238 z = -755.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 59 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2563,8 +2564,8 @@ ReadData             INFO Hit x = 920.495 y = 63.5816 z = -851.864 detector = Du
 ReadData             INFO Hit x = 923.705 y = 57.9027 z = -853.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 926.914 y = 52.2238 z = -855.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 60 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2610,8 +2611,8 @@ ReadData             INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du
 ReadData             INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 61 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2657,8 +2658,8 @@ ReadData             INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du
 ReadData             INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 62 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2704,8 +2705,8 @@ ReadData             INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du
 ReadData             INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 63 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2751,8 +2752,8 @@ ReadData             INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du
 ReadData             INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 64 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2798,8 +2799,8 @@ ReadData             INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du
 ReadData             INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 65 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2845,8 +2846,8 @@ ReadData             INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du
 ReadData             INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 66 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2892,8 +2893,8 @@ ReadData             INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du
 ReadData             INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 67 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2939,8 +2940,8 @@ ReadData             INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du
 ReadData             INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 68 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -2986,8 +2987,8 @@ ReadData             INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du
 ReadData             INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 69 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -3033,8 +3034,8 @@ ReadData             INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du
 ReadData             INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27294
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 70 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
@@ -3052,9 +3053,9 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=   20 [ms] Ave/Min/Max=0.0735(+-0.854)/    0/   10 [ms] #=272
-cObj_ALL             INFO Time User   : Tot=   40 [ms] Ave/Min/Max=0.181(+- 1.64)/    0/   20 [ms] #=221
-ChronoStatSvc        INFO Time User   : Tot= 0.87  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=   40 [ms] Ave/Min/Max=0.147(+- 1.48)/    0/   20 [ms] #=272
+cObj_ALL             INFO Time User   : Tot=   50 [ms] Ave/Min/Max=0.226(+- 1.77)/    0/   20 [ms] #=221
+ChronoStatSvc        INFO Time User   : Tot= 1.25  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref
index 6e9bead523b8d91cf5da68c2e3844bd8a537f0ca..5b894c9d0d57472dbdba24b45d9e2b4f35fd4c59 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref
@@ -1,19 +1,19 @@
-Wed Jul 18 20:05:14 CEST 2018
+Tue Sep  4 17:29:23 CEST 2018
 Preloading tcmalloc_minimal.so
 Athena               INFO including file "AthenaCommon/Preparation.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "AthenaCommon/Execution.py"
 Athena               INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadJobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5511 configurables from 52 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5519 configurables from 43 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Athena               INFO including file "AthenaCommon/runbatch.py"
 [?1034hApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r2)
-                                          running on lxplus052.cern.ch on Wed Jul 18 20:05:22 2018
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r3)
+                                          running on lxplus069.cern.ch on Tue Sep  4 17:29:37 2018
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -21,7 +21,7 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ClassIDSvc           INFO  getRegistryEntries: read 2428 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2918 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 916 CLIDRegistry entries for module ALL
@@ -36,8 +36,8 @@ PoolSvc             DEBUG Service base class initialized successfully
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-17T2058/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus052.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-09-03T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus069.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             DEBUG OutputLevel is 
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -155,6 +155,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
+ClassIDSvc           INFO  getRegistryEntries: read 1961 CLIDRegistry entries for module ALL
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
@@ -223,6 +224,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
+ClassIDSvc           INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
@@ -323,7 +325,6 @@ EventSelector        INFO skipping event 9
 EventSelector        INFO skipping event 10
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-ClassIDSvc           INFO  getRegistryEntries: read 1714 CLIDRegistry entries for module ALL
 EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-0000000A].
 EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-0000000A].
 EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-0000000A]
@@ -377,8 +378,8 @@ ReadData             INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = Dum
 ReadData             INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector
 ClassIDSvc           INFO  getRegistryEntries: read 10 CLIDRegistry entries for module ALL
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27510
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19687
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -410,8 +411,8 @@ ReadData             INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du
 ReadData             INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27510
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19687
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -443,8 +444,8 @@ ReadData             INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du
 ReadData             INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27510
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19687
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -476,8 +477,8 @@ ReadData             INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du
 ReadData             INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27510
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19687
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -509,8 +510,8 @@ ReadData             INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du
 ReadData             INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27510
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19687
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -542,8 +543,8 @@ ReadData             INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du
 ReadData             INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27510
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19687
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -575,8 +576,8 @@ ReadData             INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du
 ReadData             INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27510
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19687
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -608,8 +609,8 @@ ReadData             INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du
 ReadData             INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27510
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19687
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -641,8 +642,8 @@ ReadData             INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du
 ReadData             INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27510
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19687
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -674,8 +675,8 @@ ReadData             INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du
 ReadData             INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27510
-PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19687
+PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 10 events processed so far  <<<===
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -814,6 +815,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
+ClassIDSvc           INFO  getRegistryEntries: read 3 CLIDRegistry entries for module ALL
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
@@ -823,7 +825,6 @@ MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-ClassIDSvc           INFO  getRegistryEntries: read 3 CLIDRegistry entries for module ALL
 EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000005-00000000].
 EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000005-00000000].
 EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000005-00000000]
@@ -872,8 +873,8 @@ ReadData             INFO EventInfo event: 0 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -900,8 +901,8 @@ ReadData             INFO EventInfo event: 1 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -928,8 +929,8 @@ ReadData             INFO EventInfo event: 2 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -956,8 +957,8 @@ ReadData             INFO EventInfo event: 3 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -984,8 +985,8 @@ ReadData             INFO EventInfo event: 4 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1012,8 +1013,8 @@ ReadData             INFO EventInfo event: 5 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1040,8 +1041,8 @@ ReadData             INFO EventInfo event: 6 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1068,8 +1069,8 @@ ReadData             INFO EventInfo event: 7 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1096,8 +1097,8 @@ ReadData             INFO EventInfo event: 8 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1124,8 +1125,8 @@ ReadData             INFO EventInfo event: 9 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 20 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1152,8 +1153,8 @@ ReadData             INFO EventInfo event: 10 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 21 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1180,8 +1181,8 @@ ReadData             INFO EventInfo event: 11 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 22 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1208,8 +1209,8 @@ ReadData             INFO EventInfo event: 12 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 23 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1236,8 +1237,8 @@ ReadData             INFO EventInfo event: 13 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 24 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1264,8 +1265,8 @@ ReadData             INFO EventInfo event: 14 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 25 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1292,8 +1293,8 @@ ReadData             INFO EventInfo event: 15 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 26 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1320,8 +1321,8 @@ ReadData             INFO EventInfo event: 16 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 27 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1348,8 +1349,8 @@ ReadData             INFO EventInfo event: 17 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 28 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1376,8 +1377,8 @@ ReadData             INFO EventInfo event: 18 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 29 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1404,8 +1405,8 @@ ReadData             INFO EventInfo event: 19 run: 1
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26620
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 18814
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 26
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 30 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1433,8 +1434,8 @@ ReadData             INFO EventInfo event: 20 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #20, run #2 31 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1461,8 +1462,8 @@ ReadData             INFO EventInfo event: 21 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #21, run #2 32 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1489,8 +1490,8 @@ ReadData             INFO EventInfo event: 22 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #22, run #2 33 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1517,8 +1518,8 @@ ReadData             INFO EventInfo event: 23 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #23, run #2 34 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1545,8 +1546,8 @@ ReadData             INFO EventInfo event: 24 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #24, run #2 35 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1573,8 +1574,8 @@ ReadData             INFO EventInfo event: 25 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #25, run #2 36 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1601,8 +1602,8 @@ ReadData             INFO EventInfo event: 26 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #26, run #2 37 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1629,8 +1630,8 @@ ReadData             INFO EventInfo event: 27 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #27, run #2 38 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1657,8 +1658,8 @@ ReadData             INFO EventInfo event: 28 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #28, run #2 39 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1685,8 +1686,8 @@ ReadData             INFO EventInfo event: 29 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #29, run #2 40 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1713,8 +1714,8 @@ ReadData             INFO EventInfo event: 30 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #30, run #2 41 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1741,8 +1742,8 @@ ReadData             INFO EventInfo event: 31 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #31, run #2 42 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1769,8 +1770,8 @@ ReadData             INFO EventInfo event: 32 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #32, run #2 43 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1797,8 +1798,8 @@ ReadData             INFO EventInfo event: 33 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #33, run #2 44 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1825,8 +1826,8 @@ ReadData             INFO EventInfo event: 34 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #34, run #2 45 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1853,8 +1854,8 @@ ReadData             INFO EventInfo event: 35 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #35, run #2 46 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1881,8 +1882,8 @@ ReadData             INFO EventInfo event: 36 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #36, run #2 47 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1909,8 +1910,8 @@ ReadData             INFO EventInfo event: 37 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #37, run #2 48 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1937,8 +1938,8 @@ ReadData             INFO EventInfo event: 38 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #38, run #2 49 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
@@ -1965,8 +1966,8 @@ ReadData             INFO EventInfo event: 39 run: 2
 ReadData             INFO Get Smart data ptr 1
 ReadData             INFO Could not find ExampleTrackContainer/MyTracks
 ReadData             INFO Could not find ExampleHitContainer/MyHits
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28230
-PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 20437
+PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 30
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #39, run #2 50 events processed so far  <<<===
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
@@ -2175,8 +2176,8 @@ ReadData             INFO Hit x = 20.4945 y = 63.5816 z = 48.1358 detector = Dum
 ReadData             INFO Hit x = 23.7045 y = 57.9027 z = 46.3159 detector = DummyHitDetector
 ReadData             INFO Hit x = 26.9145 y = 52.2238 z = 44.9265 detector = DummyHitDetector
 ReadData             INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 51 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2222,8 +2223,8 @@ ReadData             INFO Hit x = 120.494 y = 63.5816 z = -51.8642 detector = Du
 ReadData             INFO Hit x = 123.704 y = 57.9027 z = -53.6841 detector = DummyHitDetector
 ReadData             INFO Hit x = 126.915 y = 52.2238 z = -55.0735 detector = DummyHitDetector
 ReadData             INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 52 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2269,8 +2270,8 @@ ReadData             INFO Hit x = 220.494 y = 63.5816 z = -151.864 detector = Du
 ReadData             INFO Hit x = 223.704 y = 57.9027 z = -153.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 226.915 y = 52.2238 z = -155.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 53 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2316,8 +2317,8 @@ ReadData             INFO Hit x = 320.495 y = 63.5816 z = -251.864 detector = Du
 ReadData             INFO Hit x = 323.705 y = 57.9027 z = -253.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 326.915 y = 52.2238 z = -255.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 54 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2363,8 +2364,8 @@ ReadData             INFO Hit x = 420.495 y = 63.5816 z = -351.864 detector = Du
 ReadData             INFO Hit x = 423.705 y = 57.9027 z = -353.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 426.915 y = 52.2238 z = -355.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 55 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2410,8 +2411,8 @@ ReadData             INFO Hit x = 520.495 y = 63.5816 z = -451.864 detector = Du
 ReadData             INFO Hit x = 523.705 y = 57.9027 z = -453.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 526.914 y = 52.2238 z = -455.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 56 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2457,8 +2458,8 @@ ReadData             INFO Hit x = 620.495 y = 63.5816 z = -551.864 detector = Du
 ReadData             INFO Hit x = 623.705 y = 57.9027 z = -553.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 626.914 y = 52.2238 z = -555.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 57 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2504,8 +2505,8 @@ ReadData             INFO Hit x = 720.495 y = 63.5816 z = -651.864 detector = Du
 ReadData             INFO Hit x = 723.705 y = 57.9027 z = -653.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 726.914 y = 52.2238 z = -655.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 58 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2551,8 +2552,8 @@ ReadData             INFO Hit x = 820.495 y = 63.5816 z = -751.864 detector = Du
 ReadData             INFO Hit x = 823.705 y = 57.9027 z = -753.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 826.914 y = 52.2238 z = -755.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 59 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2598,8 +2599,8 @@ ReadData             INFO Hit x = 920.495 y = 63.5816 z = -851.864 detector = Du
 ReadData             INFO Hit x = 923.705 y = 57.9027 z = -853.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 926.914 y = 52.2238 z = -855.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 60 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2645,8 +2646,8 @@ ReadData             INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du
 ReadData             INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector
 ReadData             INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector
 ReadData             INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 61 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2692,8 +2693,8 @@ ReadData             INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du
 ReadData             INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 62 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2739,8 +2740,8 @@ ReadData             INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du
 ReadData             INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 63 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2786,8 +2787,8 @@ ReadData             INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du
 ReadData             INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 64 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2833,8 +2834,8 @@ ReadData             INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du
 ReadData             INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 65 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2880,8 +2881,8 @@ ReadData             INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du
 ReadData             INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 66 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2927,8 +2928,8 @@ ReadData             INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du
 ReadData             INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 67 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -2974,8 +2975,8 @@ ReadData             INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du
 ReadData             INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 68 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -3021,8 +3022,8 @@ ReadData             INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du
 ReadData             INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 69 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
@@ -3068,8 +3069,8 @@ ReadData             INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du
 ReadData             INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector
 ReadData             INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector
 ReadData             INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26892
-PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18602
+PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 22
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #1 70 events processed so far  <<<===
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] ????
 MetaDataSvc         DEBUG handle() EndInputFile for FID:????
@@ -3087,9 +3088,9 @@ ToolSvc              INFO Removing all tools created by ToolSvc
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=   10 [ms] Ave/Min/Max=0.0368(+-0.605)/    0/   10 [ms] #=272
-cObj_ALL             INFO Time User   : Tot=   30 [ms] Ave/Min/Max=0.136(+- 1.16)/    0/   10 [ms] #=221
-ChronoStatSvc        INFO Time User   : Tot= 0.85  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=   40 [ms] Ave/Min/Max=0.147(+- 1.91)/    0/   30 [ms] #=272
+cObj_ALL             INFO Time User   : Tot=   80 [ms] Ave/Min/Max=0.362(+- 3.13)/    0/   40 [ms] #=221
+ChronoStatSvc        INFO Time User   : Tot= 1.23  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx
index e1a60aca68543fa672b3ebea2319186bbb018eaf..1456c02b3c72a0387a19d8b565421ca7ebcd7c0a 100755
--- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx
@@ -151,6 +151,10 @@ StatusCode EventSelectorAthenaPool::initialize() {
       ATH_MSG_FATAL("Cannot get " << m_incidentSvc.typeAndName() << ".");
       return(StatusCode::FAILURE);
    }
+   // Listen to the Event Processing incidents
+   m_incidentSvc->addListener(this,IncidentType::BeginProcessing,0);
+   m_incidentSvc->addListener(this,IncidentType::EndProcessing,0);
+
    // Get AthenaPoolCnvSvc
    if (!m_athenaPoolCnvSvc.retrieve().isSuccess()) {
       ATH_MSG_FATAL("Cannot get " << m_athenaPoolCnvSvc.typeAndName() << ".");
@@ -570,13 +574,10 @@ StatusCode EventSelectorAthenaPool::next(IEvtSelector::Context& ctxt) const {
          delete m_poolCollectionConverter; m_poolCollectionConverter = 0;
          // Assume that the end of collection file indicates the end of payload file.
 	 fireEndFileIncidents(false,true);
-         if (m_guid != Guid::null()) {
-            // Explicitly disconnect file corresponding to old m_guid to avoid holding on to large blocks of memory
-            if (!m_keepInputFilesOpen.value()) {
-               m_athenaPoolCnvSvc->getPoolSvc()->disconnectDb("FID:" + m_guid.toString(), IPoolSvc::kInputStream).ignore();
-            }
-            m_guid = Guid::null();
-         }
+         // zero the current DB ID (m_guid) before disconnect() to indicate it is no longer in use
+         auto old_guid = m_guid;
+         m_guid = Guid::null();
+         disconnectIfFinished( old_guid.toString() );
          // Open next file from inputCollections list.
          m_inputCollectionsIterator++;
          // Create PoolCollectionConverter for input file
@@ -612,10 +613,10 @@ StatusCode EventSelectorAthenaPool::next(IEvtSelector::Context& ctxt) const {
          //NOTE: to self (wb): we should only get here if we are processing a collection file (files containing dataheaders which reference other files!)
          if (m_guid != Guid::null()) {
 	   fireEndFileIncidents(false,false/*does not fire EndTagFile when switching files within a collection file*/);
-            // Explicitly disconnect file corresponding to old m_guid to avoid holding on to large blocks of memory
-            if (!m_keepInputFilesOpen.value()) {
-               m_athenaPoolCnvSvc->getPoolSvc()->disconnectDb("FID:" + m_guid.toString(), IPoolSvc::kInputStream).ignore();
-            }
+           // zero the current DB ID (m_guid) before disconnect() to indicate it is no longer in use
+           auto old_guid = m_guid;
+           m_guid = Guid::null();
+           disconnectIfFinished( old_guid.toString() );
          }
          m_guid = guid;
          // Fire BeginInputFile incident if current InputCollection is a payload file;
@@ -1132,3 +1133,54 @@ StatusCode EventSelectorAthenaPool::io_finalize() {
    }
    return(StatusCode::SUCCESS);
 }
+
+//__________________________________________________________________________
+/* Listen to IncidentType::BeginProcessing and EndProcessing
+   Maintain counters of how many events from a given file are being processed.
+   Files are identified by SG::SourceID (string GUID).
+   When there are no more events from a file, see if it can be closed.
+*/
+void EventSelectorAthenaPool::handle(const Incident& inc)
+{
+   SG::SourceID fid;
+   Atlas::ExtendedEventContext *eec = inc.context().getExtension<Atlas::ExtendedEventContext>();
+   if( eec ) {
+      fid = eec->proxy()->sourceID();
+   }
+   if( fid.empty() ) {
+      ATH_MSG_WARNING("could not read event source ID from incident event context");
+      return;
+   }
+
+   ATH_MSG_DEBUG("**  MN Incident handler " << inc.type() << " Event source ID=" << fid );
+   if( inc.type() == IncidentType::BeginProcessing ) {
+      // increment the events-per-file counter for FID
+      m_activeEventsPerSource[fid]++;
+   } else if( inc.type() == IncidentType::EndProcessing ) {
+      m_activeEventsPerSource[fid]--;
+      disconnectIfFinished( fid );
+   }
+   if( msgLvl(MSG::DEBUG) ) {
+      for( auto& source: m_activeEventsPerSource )
+         msg(MSG::DEBUG) << "SourceID: " << source.first << " active events: " << source.second << endmsg;
+   }
+}
+
+//__________________________________________________________________________
+/* Disconnect APR Database identifieed by a SG::SourceID when it is no longer in use:
+   m_guid is not pointing to it and there are no events from it being processed
+   (if the EventLoopMgr was not firing Begin/End incidents, this will just close the DB)
+*/
+bool EventSelectorAthenaPool::disconnectIfFinished( SG::SourceID fid ) const
+{
+   if( m_activeEventsPerSource[fid] <= 0 && m_guid != fid ) {
+      // Explicitly disconnect file corresponding to old FID to release memory
+      if( !m_keepInputFilesOpen.value() ) {
+         ATH_MSG_INFO("Disconnecting input sourceID: " << fid );
+         m_athenaPoolCnvSvc->getPoolSvc()->disconnectDb("FID:" + fid, IPoolSvc::kInputStream).ignore();
+         m_activeEventsPerSource.erase( fid );
+         return true;
+      }
+   }
+   return false;
+}
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h
index e3801bbb53b9c55f5d2de646d0811fa969a3770d..65897586e5b3e13f922e890e0ca41f7ae0aabe43 100755
--- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h
@@ -12,6 +12,7 @@
 
 #include "GaudiKernel/IEvtSelector.h"
 #include "GaudiKernel/IIoComponent.h"
+#include "GaudiKernel/IIncidentListener.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "PersistentDataModel/Guid.h"
@@ -45,7 +46,9 @@ class EventSelectorAthenaPool :
 	virtual public IEvtSelector,
 	virtual public IEvtSelectorSeek,
 	virtual public IEventShare,
-	virtual public IIoComponent {
+        virtual public IIoComponent,
+        virtual public IIncidentListener
+{
 
 public: // Constructor and Destructor
    /// Standard Service Constructor
@@ -125,6 +128,9 @@ public: // Constructor and Destructor
    /// Callback method to finalize the internal state of the component for I/O purposes (e.g. before @c fork(2))
    virtual StatusCode io_finalize() override;
 
+   /// Incident service handle listening for BeginProcessing and EndProcessing
+   void handle(const Incident& incident);
+
 private: // internal member functions
    /// Return pointer to active event SG
    StoreGateSvc* eventStore() const;
@@ -140,6 +146,9 @@ private: // internal member functions
    /// Fires the EndInputFile incident (if there is an open file), EndTagFile incident, and LastInputFile incidents at end of selector
    void fireEndFileIncidents(bool isLastFile, bool fireEndTagIncident) const;
 
+   // Disconnect DB if all events from the source FID were processed and the Selector moved to another file
+   bool disconnectIfFinished( SG::SourceID fid ) const;
+
 private: // data
    mutable EventContextAthenaPool*      m_beginIter;
    EventContextAthenaPool*      m_endIter;
@@ -150,6 +159,7 @@ private: // data
    mutable PoolCollectionConverter* m_poolCollectionConverter;
    mutable pool::ICollectionCursor* m_headerIterator;
    mutable Guid m_guid;
+   mutable std::map<SG::SourceID, int> m_activeEventsPerSource;
 
    ServiceHandle<IAthenaPoolCnvSvc> m_athenaPoolCnvSvc;
    ServiceHandle<IIncidentSvc> m_incidentSvc;
diff --git a/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoAlignmentStore.h b/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoAlignmentStore.h
index f8835485ec0c61a059f15d75c4da8ba63f1761ca..8e58ffb8e09dad96bfd6fbb9d635368c58d3e014 100755
--- a/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoAlignmentStore.h
+++ b/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoAlignmentStore.h
@@ -6,12 +6,11 @@
 #define GEOMODELUTILITIES_GEOALIGNMENTSTORE_H
 
 #include "GeoModelKernel/GeoVAlignmentStore.h"
+#include "GeoModelUtilities/TransformMap.h"
 #include "CLIDSvc/CLASS_DEF.h"
 #include "AthenaKernel/CondCont.h"
 #include "CLHEP/Geometry/Transform3D.h"
-#include <unordered_map>
 #include <stdexcept>
-#include <mutex>
 
 class GeoAlignmentStore final : public GeoVAlignmentStore
 {
@@ -30,11 +29,9 @@ class GeoAlignmentStore final : public GeoVAlignmentStore
 
 
  private:
-  std::unordered_map<const GeoAlignableTransform*, HepGeom::Transform3D> m_deltas;
-  std::unordered_map<const GeoVFullPhysVol*, HepGeom::Transform3D> m_absPositions;
-  std::unordered_map<const GeoVFullPhysVol*, HepGeom::Transform3D> m_defAbsPositions;
-
-  std::mutex m_mutex; // Protect insertions into position cache maps
+  TransformMap<GeoAlignableTransform,HepGeom::Transform3D> m_deltas;
+  TransformMap<GeoVFullPhysVol,HepGeom::Transform3D> m_absPositions;
+  TransformMap<GeoVFullPhysVol,HepGeom::Transform3D> m_defAbsPositions;
 };
 
 CLASS_DEF(GeoAlignmentStore, 135648236, 1)
diff --git a/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/TransformMap.h b/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/TransformMap.h
new file mode 100755
index 0000000000000000000000000000000000000000..b6b74a29140a0d1bf946f42fe1808389ce7abc0e
--- /dev/null
+++ b/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/TransformMap.h
@@ -0,0 +1,45 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef GEOMODELUTILITIES_TRANSFORMMAP_H
+#define GEOMODELUTILITIES_TRANSFORMMAP_H
+
+#include <unordered_map>
+
+template<typename T, typename X> 
+class TransformMap {
+ public:
+  TransformMap() {};
+  ~TransformMap() {};
+
+  bool setTransform(const T* obj, const X& xf);
+  const X* getTransform(const T* obj) const;
+
+ private:
+  std::unordered_map<const T*, X> m_container;
+};
+
+template<typename T, typename X> 
+bool TransformMap<T,X>::setTransform(const T* obj, const X& xf)
+{
+  auto result = m_container.emplace(obj, xf);
+  return result.second;
+}
+
+template<typename T, typename X> 
+const X* TransformMap<T,X>::getTransform(const T* obj) const
+{
+  auto it = m_container.find(obj);
+  if(it!=m_container.end()) {
+    return &it->second;
+  }
+  else {
+    return nullptr;
+  }
+}
+
+#endif 
+
+
+
diff --git a/DetectorDescription/GeoModel/GeoModelUtilities/src/GeoAlignmentStore.cxx b/DetectorDescription/GeoModel/GeoModelUtilities/src/GeoAlignmentStore.cxx
index fa3cc8488e4131ab6fc3422ccd3a019fc1c04e57..adb7ad825861469c6a30c2069ad5cf3e9efc9f95 100644
--- a/DetectorDescription/GeoModel/GeoModelUtilities/src/GeoAlignmentStore.cxx
+++ b/DetectorDescription/GeoModel/GeoModelUtilities/src/GeoAlignmentStore.cxx
@@ -3,61 +3,34 @@
 */
 
 #include "GeoModelUtilities/GeoAlignmentStore.h"
-#include <thread>
 
 void GeoAlignmentStore::setDelta(const GeoAlignableTransform* axf, const HepGeom::Transform3D& xf)
 {
-  auto result = m_deltas.emplace(axf,xf);
-  if(!result.second) {
-    // Instertion did not take place! The alignment store already contains Delta corresponding to given GeoAlignableTransform
+  if(!m_deltas.setTransform(axf,xf))
     throw ExcAlignmentStore("Attempted to overwrite Delta in the Alignment Store");    
-  }
-
-  m_absPositions.clear();
-  m_defAbsPositions.clear();
 }
 
 const HepGeom::Transform3D* GeoAlignmentStore::getDelta(const GeoAlignableTransform* axf) const
 {
-  auto it = m_deltas.find(axf);
-  if(it!=m_deltas.end()) {
-    return &it->second;
-  }
-  else {
-    return nullptr;
-  }
+  return m_deltas.getTransform(axf);
 }
 
 void GeoAlignmentStore::setAbsPosition(const GeoVFullPhysVol* fpv, const HepGeom::Transform3D& xf) 
 {
-  std::lock_guard<std::mutex> guard(m_mutex);
-  m_absPositions.emplace(fpv,xf);
+  m_absPositions.setTransform(fpv,xf);
 }
  
 const HepGeom::Transform3D* GeoAlignmentStore::getAbsPosition(const GeoVFullPhysVol* fpv) const 
 {
-  auto it = m_absPositions.find(fpv);
-  if(it!=m_absPositions.end()) {
-    return &it->second;
-  }
-  else {
-    return nullptr;
-  }
+  return m_absPositions.getTransform(fpv);
 }
 
 void GeoAlignmentStore::setDefAbsPosition(const GeoVFullPhysVol* fpv, const HepGeom::Transform3D& xf) 
 {
-  std::lock_guard<std::mutex> guard(m_mutex);
-  m_defAbsPositions.emplace(fpv,xf);
+  m_defAbsPositions.setTransform(fpv,xf);
 }
 
 const HepGeom::Transform3D* GeoAlignmentStore::getDefAbsPosition(const GeoVFullPhysVol* fpv) const 
 {
-  auto it = m_defAbsPositions.find(fpv);
-  if(it!=m_defAbsPositions.end()) {
-    return &it->second;
-  }
-  else {
-    return nullptr;
-  }
+  return m_defAbsPositions.getTransform(fpv);
 }
diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
index 47ea5cd93e4bd01bfc6d3e1ed83a564c6521512b..b17442b9dcd7131c2e1237be3b1dc6269e9c9456 100755
--- a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
+++ b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
@@ -14,7 +14,6 @@
 #include "RegionSelector/StoreGateRS_ClassDEF.h"
 
 #include "GeoModelInterfaces/IGeoModelSvc.h"
-#include "SCT_Cabling/ISCT_CablingSvc.h"
 
 // #include "RegSelLUT/RegSelTimer.h"
 #include "RegSelLUT/RegSelRoI.h"
@@ -66,8 +65,8 @@ RegSelSvc::RegSelSvc(const std::string& name, ISvcLocator* sl)
     m_lutCreatorToolTRT  ("TRT_RegionSelectorTable/TRT_RegionSelectorTable"),
     m_lutCreatorToolLAR  ("LArRegionSelectorTable"),
     m_lutCreatorToolTile ("TileRegionSelectorTable"),
+    m_SCTCablingToolCB("SCT_CablingToolCB"),
     m_geoModelSvc("GeoModelSvc",name),
-    m_SCTCablingSvc("SCT_CablingSvc",name),
     m_DeltaZ(168),
     m_initRPC(true),
     m_initMDT(true),
@@ -174,8 +173,8 @@ StatusCode RegSelSvc::initialize() {
 
   if ( m_initOnlyID.value() ) { 
     if ( !m_initSCT.value() )   sctflag   = "disabled"; 
-    else ATH_CHECK(m_SCTCablingSvc.retrieve()); // SCT_CablingSvc has to be retrieved now.
-    // Otherwise, SCT_RegionSelectorTable cannot use ready SCT_CablingSvc.
+    else ATH_CHECK(m_SCTCablingToolCB.retrieve()); // SCT_CablingToolCB has to be retrieved now.
+    // Otherwise, SCT_RegionSelectorTable cannot use ready SCT_CablingToolCB.
 
     if ( !m_initPixel.value() ) pixelflag = "disabled"; 
     if ( !m_initTRT.value() )   trtflag   = "disabled"; 
diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.h b/DetectorDescription/RegionSelector/src/RegSelSvc.h
index 8a1bbfe3558f545b7fca7aec7b44813b6d308088..94d6442bb95c52ca0529137be6a34230d28acc9c 100755
--- a/DetectorDescription/RegionSelector/src/RegSelSvc.h
+++ b/DetectorDescription/RegionSelector/src/RegSelSvc.h
@@ -23,6 +23,7 @@
 
 #include "RegionSelector/IRegionLUT_Creator.h"
 #include "RegSelLUT/IRegionIDLUT_Creator.h"
+#include "SCT_Cabling/ISCT_CablingTool.h"
 
 #include "GeoModelInterfaces/IGeoModelSvc.h"
 #include "GaudiKernel/MsgStream.h"
@@ -31,8 +32,6 @@
 
 #include "IRegionSelector/IRoiDescriptor.h"
 
-
-class ISCT_CablingSvc;
 class StoreGateSvc;
 
 /** @class RegSelSvc RegSelSvc.h
@@ -455,8 +454,8 @@ private:
   ToolHandle<IRegionIDLUT_Creator> m_lutCreatorToolTRT;
   ToolHandle<IRegionLUT_Creator> m_lutCreatorToolLAR;
   ToolHandle<IRegionLUT_Creator> m_lutCreatorToolTile;
+  ToolHandle< ISCT_CablingTool > m_SCTCablingToolCB; // Retrieve SCT_CablingToolCB in initialize of RegSelSvc so that SCT_RegionSelectorTable can use ready SCT_CablingToolCB in BeginRun incident.
   ServiceHandle< IGeoModelSvc > m_geoModelSvc;
-  ServiceHandle< ISCT_CablingSvc > m_SCTCablingSvc; // Retrieve SCT_CablingSvc in initialize of RegSelSvc so that SCT_RegionSelectorTable can use ready SCT_CablingSvc in BeginRun incident.
   std::vector<std::string> m_enabledDetectors;
   bool m_errorFlag;
   
diff --git a/Event/ByteStreamCnvSvc/CMakeLists.txt b/Event/ByteStreamCnvSvc/CMakeLists.txt
index 40d8e1a8e2d391679e0833fc1410647a9733f889..8071b3dab5e7d72684f914597128c7fc2b281122 100644
--- a/Event/ByteStreamCnvSvc/CMakeLists.txt
+++ b/Event/ByteStreamCnvSvc/CMakeLists.txt
@@ -102,20 +102,20 @@ _add_test( BSEventSelector
    PROPERTIES TIMEOUT 300 )
 
 _add_test( AtlCopyBSEvent1_test
-   "AtlCopyBSEvent -e 14350,14356,14382 -o test.data /afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data"
+   "AtlCopyBSEvent -e 186882810,187403142,187404922,187419528 -o test.data /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1"
    DEPENDS ByteStreamCnvSvc_BSEventSelector_ctest )
 _add_test( AtlFindBSEvent2_test
-   "AtlFindBSEvent -e 14356 /afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data"
+   "AtlFindBSEvent -e 187403142 /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1"
    DEPENDS ByteStreamCnvSvc_AtlCopyBSEvent1_test_ctest )
 _add_test( AtlCopyBSEvent3_test
-   "AtlCopyBSEvent -d -e 14350,14356,14382 -o test_defl.data test.data"
+   "AtlCopyBSEvent -d -e 186882810,187403142,187419528 -o test_defl.data test.data"
    DEPENDS ByteStreamCnvSvc_AtlCopyBSEvent1_test_ctest )
 _add_test( AtlFindBSEvent4_test
-   "AtlFindBSEvent -e 14382 test_defl.data"
+   "AtlFindBSEvent -e 187403142 test_defl.data"
    EXTRA_PATTERNS "+Timestamp"
    DEPENDS ByteStreamCnvSvc_AtlCopyBSEvent3_test_ctest )
 _add_test( AtlCopyBSEvent5_test
-   "AtlCopyBSEvent -e 14350,14356,14382 -o test_infl.data test_defl.data"
+   "AtlCopyBSEvent -e 186882810,187403142,187419528 -o test_infl.data test_defl.data"
    DEPENDS ByteStreamCnvSvc_AtlFindBSEvent4_test_ctest )
 # Input file has vanished.
 #_add_test( AtlCopyBSEvent6_test
diff --git a/Event/ByteStreamCnvSvc/share/AtlCopyBSEvent1_test.ref b/Event/ByteStreamCnvSvc/share/AtlCopyBSEvent1_test.ref
index eda8997393abc826451f1666a16c61542eeefa0a..e83e5d9d028e598b7e610bdb2b2ef53893c2dc29 100644
--- a/Event/ByteStreamCnvSvc/share/AtlCopyBSEvent1_test.ref
+++ b/Event/ByteStreamCnvSvc/share/AtlCopyBSEvent1_test.ref
@@ -1,22 +1,28 @@
-Events to copy: 14350 14356 14382 
-Checking file /afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data
+Events to copy: 186882810 187403142 187404922 187419528 
+Checking file /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
 Created DataWriter for file test.data in directory .
 
-File:/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data
-Event index: 1
-Run:         20720
-Event ID:    14350
-LumiBlock:   18
+File:/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
+Event index: 209
+Run:         327265
+Event ID:    186882810
+LumiBlock:   100
 
-File:/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data
-Event index: 2
-Run:         20720
-Event ID:    14356
-LumiBlock:   19
+File:/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
+Event index: 473
+Run:         327265
+Event ID:    187403142
+LumiBlock:   100
 
-File:/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data
-Event index: 3
-Run:         20720
-Event ID:    14382
-LumiBlock:   19
-Wrote 3 events to file test.data
+File:/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
+Event index: 488
+Run:         327265
+Event ID:    187404922
+LumiBlock:   100
+
+File:/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
+Event index: 490
+Run:         327265
+Event ID:    187419528
+LumiBlock:   100
+Wrote 4 events to file test.data
diff --git a/Event/ByteStreamCnvSvc/share/AtlCopyBSEvent3_test.ref b/Event/ByteStreamCnvSvc/share/AtlCopyBSEvent3_test.ref
index 390d23f667d3e0b2c9e350a02d1a2c845ceeb81f..2ebe2aae40783c4cd35742db3f2617662f271935 100644
--- a/Event/ByteStreamCnvSvc/share/AtlCopyBSEvent3_test.ref
+++ b/Event/ByteStreamCnvSvc/share/AtlCopyBSEvent3_test.ref
@@ -1,22 +1,22 @@
-Events to copy: 14350 14356 14382 
+Events to copy: 186882810 187403142 187419528 
 Checking file test.data
 Created DataWriter for file test_defl.data in directory .
 
 File:test.data
 Event index: 1
-Run:         20720
-Event ID:    14350
-LumiBlock:   18
+Run:         327265
+Event ID:    186882810
+LumiBlock:   100
 
 File:test.data
 Event index: 2
-Run:         20720
-Event ID:    14356
-LumiBlock:   19
+Run:         327265
+Event ID:    187403142
+LumiBlock:   100
 
 File:test.data
-Event index: 3
-Run:         20720
-Event ID:    14382
-LumiBlock:   19
+Event index: 4
+Run:         327265
+Event ID:    187419528
+LumiBlock:   100
 Wrote 3 events to file test_defl.data
diff --git a/Event/ByteStreamCnvSvc/share/AtlCopyBSEvent5_test.ref b/Event/ByteStreamCnvSvc/share/AtlCopyBSEvent5_test.ref
index 0dbbdffa4fd06d4e8f9ba389a6c5a9845399381f..3b126287e1aa3d86076e4e5f30c9dea22f1c738e 100644
--- a/Event/ByteStreamCnvSvc/share/AtlCopyBSEvent5_test.ref
+++ b/Event/ByteStreamCnvSvc/share/AtlCopyBSEvent5_test.ref
@@ -1,22 +1,22 @@
-Events to copy: 14350 14356 14382 
+Events to copy: 186882810 187403142 187419528 
 Checking file test_defl.data
 Created DataWriter for file test_infl.data in directory .
 
 File:test_defl.data
 Event index: 1
-Run:         20720
-Event ID:    14350
-LumiBlock:   18
+Run:         327265
+Event ID:    186882810
+LumiBlock:   100
 
 File:test_defl.data
 Event index: 2
-Run:         20720
-Event ID:    14356
-LumiBlock:   19
+Run:         327265
+Event ID:    187403142
+LumiBlock:   100
 
 File:test_defl.data
 Event index: 3
-Run:         20720
-Event ID:    14382
-LumiBlock:   19
+Run:         327265
+Event ID:    187419528
+LumiBlock:   100
 Wrote 3 events to file test_infl.data
diff --git a/Event/ByteStreamCnvSvc/share/AtlFindBSEvent2_test.ref b/Event/ByteStreamCnvSvc/share/AtlFindBSEvent2_test.ref
index ae4e941140220a8e7e7eaa5bc567fc816bde752d..3be48f82ac6497d37b37e0885176686581a852d0 100644
--- a/Event/ByteStreamCnvSvc/share/AtlFindBSEvent2_test.ref
+++ b/Event/ByteStreamCnvSvc/share/AtlFindBSEvent2_test.ref
@@ -1,8 +1,8 @@
-Checking file /afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data
+Checking file /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
 
-File:/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data
-Event index: 2
-Run:         20720
-Event ID:    14356
-LumiBlock:   19
-Timestamp:   Sun Sep 28 19:23:30 1986
+File:/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
+Event index: 473
+Run:         327265
+Event ID:    187403142
+LumiBlock:   100
+Timestamp:   Mon Jun 19 18:16:20 2017
diff --git a/Event/ByteStreamCnvSvc/share/AtlFindBSEvent4_test.ref b/Event/ByteStreamCnvSvc/share/AtlFindBSEvent4_test.ref
index a568a8ab048023832e439b3bb4f01f276c209b59..3028b4593ce08e14acdf808e367cd3f9eff70c9c 100644
--- a/Event/ByteStreamCnvSvc/share/AtlFindBSEvent4_test.ref
+++ b/Event/ByteStreamCnvSvc/share/AtlFindBSEvent4_test.ref
@@ -1,8 +1,8 @@
 Checking file test_defl.data
 
 File:test_defl.data
-Event index: 3
-Run:         20720
-Event ID:    14382
-LumiBlock:   19
-Timestamp:   Sun Sep 28 20:23:30 1986
+Event index: 2
+Run:         327265
+Event ID:    187403142
+LumiBlock:   100
+Timestamp:   Mon Jun 19 18:16:20 2017
diff --git a/Event/ByteStreamCnvSvc/share/BSEventSelector.ref b/Event/ByteStreamCnvSvc/share/BSEventSelector.ref
index ce25c2e905406cb8931dc600f73aca932cf62091..19e13d1e1f02a75ce02275416965a0f80b640dd1 100644
--- a/Event/ByteStreamCnvSvc/share/BSEventSelector.ref
+++ b/Event/ByteStreamCnvSvc/share/BSEventSelector.ref
@@ -1,26 +1,27 @@
-Mon Feb  8 23:53:27 CET 2016
+Fri Sep  7 15:49:14 CDT 2018
 Athena               INFO including file "AthenaCommon/Preparation.py"
-Athena               INFO including file "AthenaCommon/Bootstrap.py"
 Athena               INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Athena               INFO executing ROOT6Setup
 Athena               INFO including file "ByteStreamCnvSvc/BSEventSelector_test_jobOptions.py"
 Athena               INFO including file "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py"
 Athena               INFO including file "AthenaCommon/runbatch.py"
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
-AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-59-49
-AthMasterSeq         INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq
-StoreGateSvc         INFO Initializing StoreGateSvc - package version StoreGate-03-06-19
-ByteStreamAddre...   INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-08-12
-ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-08-12
+AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
+ByteStreamAddre...  DEBUG Property update for OutputLevel : new value = 2
+ByteStreamAddre...   INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
+ByteStreamAddre...  DEBUG Service base class initialized successfully
+ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc   INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
 ROBDataProviderSvc   INFO  ---> Filter out specific ROBs by Status Code: # ROBs = 0
 ROBDataProviderSvc   INFO  ---> Filter out Sub Detector ROBs by Status Code: # Sub Detectors = 0
@@ -32,125 +33,101 @@ ByteStreamAddre...   INFO    Calorimeter Cluster Processor RoI    = 0xa8, 0xa9,
 ByteStreamAddre...   INFO    Calorimeter Jet/Energy Processor RoI = 0xac, 0xad
 ByteStreamAddre...   INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
-MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-01-59-49
-InputMetaDataStore   INFO Initializing InputMetaDataStore - package version StoreGate-03-06-19
-ByteStreamAddre...  DEBUG in preLoadAddress
-ByteStreamAddre...  DEBUG StoreID = 3 does not match required id (0) skip
-MetaDataStore        INFO Initializing MetaDataStore - package version StoreGate-03-06-19
-ByteStreamAddre...  DEBUG in preLoadAddress
-ByteStreamAddre...  DEBUG StoreID = 4 does not match required id (0) skip
-AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-12
-PoolSvc              INFO Initializing PoolSvc - package version PoolSvc-00-25-00
+MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
+AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 PoolSvc              INFO Successfully setup replica sorting algorithm
-PoolSvc              INFO Re-initializing PoolSvc
+PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
-XMLFileCatalog Info Connecting to the catalog
-PoolXMLFileCatalog Info Xerces-c initialization Number 0
-PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created
-ToolSvc.ByteStr...   INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-01-34-32
-ProxyProviderSvc     INFO Initializing ProxyProviderSvc - package version SGComps-00-02-04
+DbSession            INFO     Open     DbSession    
+Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
+ToolSvc.ByteStr...   INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
+ByteStreamAddre...  DEBUG in preLoadAddress
+ByteStreamAddre...  DEBUG StoreID = 3 does not match required id (0) skip
+ByteStreamAddre...  DEBUG in preLoadAddress
+ByteStreamAddre...  DEBUG StoreID = 4 does not match required id (0) skip
 ByteStreamAddre...  DEBUG in preLoadAddress
 HistogramPersis...WARNING Histograms saving not required.
-EventSelector        INFO Initializing EventSelector - package version ByteStreamCnvSvc-01-34-32
-EventSelector     WARNING InputCollections not properly set, checking EventStorageInputSvc properties
-EventSelector        INFO Retrieved StoreGateSvc name of  '':[  ]
-EventSelector        INFO Retrieved InputCollections from InputSvc
-ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-01-34-32
+EventSelector       DEBUG Property update for OutputLevel : new value = 2
+EventSelector        INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
+EventSelector       DEBUG Service base class initialized successfully
+ByteStreamInputSvc  DEBUG Property update for OutputLevel : new value = 2
+ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
+ByteStreamInputSvc  DEBUG Service base class initialized successfully
 EventSelector        INFO reinitialization...
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
-ActiveStoreSvc       INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-19
 ApplicationMgr       INFO Application Manager Initialized successfully
-InputMetaDataStore   INFO Start InputMetaDataStore
-MetaDataStore        INFO Start MetaDataStore
-StoreGateSvc         INFO Start StoreGateSvc
 EventSelector       DEBUG Calling EventSelectorByteStream::start()
-ToolSvc.ByteStr...   INFO handle() FirstInputFile, filename = BSF:/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data
 ByteStreamInputSvc  DEBUG Recorded ByteStreamMetadata in InputMetadataStore
 ByteStreamInputSvc  DEBUG  run parameters  =  
-  run number  20720
+  run number  327265
  max events  0
- rec enable  0
+ rec enable  1
  trigger_type 0
- detector mask  00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111011011101010111001100100000
- beam type 0
+ detector mask  00000000000000000000000000000000000000000000000000000000000000001100000100000000011010011111111111111111111111111111111111110111
+ beam type 1
  beam energy 0
 ByteStreamInputSvc  DEBUG Number of Free meta data strings: 0
-ByteStreamInputSvc   INFO Picked valid file: /afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data
-ToolSvc.ByteStr...   INFO handle() BeginInputFile, filename = BSF:/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data
-EventSelector       DEBUG Opened block/file /afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data
+ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
+EventSelector       DEBUG Opened block/file /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
 ApplicationMgr       INFO Application Manager Started successfully
 ByteStreamInputSvc  DEBUG nextEvent _above_ high water mark
-ByteStreamInputSvc  DEBUG Event Size 9529012
+ByteStreamInputSvc  DEBUG Event Size 1038508
 ByteStreamInputSvc  DEBUG First word of the fragment aa1234aa
-ByteStreamInputSvc  DEBUG Format version 301
+ByteStreamInputSvc  DEBUG Format version 500
 ByteStreamInputSvc  DEBUG Made an FullEventFragment from ES 0x????
+ByteStreamInputSvc  DEBUG switched to next event in slot INVALID
 ByteStreamInputSvc  DEBUG ByteStream File GUID:????
-ByteStreamInputSvc  DEBUG ByteStream Event Position in File: 200
-EventSelector     WARNING  bc_time nanosecond number larger than 1e9, it is 1188507005, reset it to 1 sec
+ByteStreamInputSvc  DEBUG ByteStream Event Position in File: 1324
+ByteStreamCnvSvc    DEBUG Property update for OutputLevel : new value = 2
 EventPersistenc...   INFO Added successfully Conversion service:ByteStreamCnvSvc
 EventInfoByteSt...   INFO UserType : RawEvent
 EventInfoByteSt...   INFO IsSimulation : 0
 EventInfoByteSt...   INFO IsTestbeam : 0
 EventInfoByteSt...   INFO IsCalibration : 0
-AthenaEventLoopMgr   INFO   ===>>>  start of run 20720    <<<===
-AthenaEventLoopMgr   INFO   ===>>>  start processing event #14350, run #20720 0 events processed so far  <<<===
-AthenaEventLoopMgr   INFO   ===>>>  done processing event #14350, run #20720 1 events processed so far  <<<===
+EventInfoByteSt...   INFO  EventContext not valid 
+AthenaEventLoopMgr   INFO   ===>>>  start of run 327265    <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186525031, run #327265 0 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186525031, run #327265 1 events processed so far  <<<===
 ByteStreamInputSvc  DEBUG nextEvent _above_ high water mark
-ByteStreamInputSvc  DEBUG Event Size 9528940
+ByteStreamInputSvc  DEBUG Event Size 1000648
 ByteStreamInputSvc  DEBUG First word of the fragment aa1234aa
-ByteStreamInputSvc  DEBUG Format version 301
+ByteStreamInputSvc  DEBUG Format version 500
 ByteStreamInputSvc  DEBUG Made an FullEventFragment from ES 0x????
+ByteStreamInputSvc  DEBUG switched to next event in slot s: 0  e: 0
 ByteStreamInputSvc  DEBUG ByteStream File GUID:????
-ByteStreamInputSvc  DEBUG ByteStream Event Position in File: 9529228
-EventSelector     WARNING  bc_time nanosecond number larger than 1e9, it is 1188507008, reset it to 1 sec
-AthenaEventLoopMgr   INFO   ===>>>  start processing event #14356, run #20720 1 events processed so far  <<<===
-AthenaEventLoopMgr   INFO   ===>>>  done processing event #14356, run #20720 2 events processed so far  <<<===
+ByteStreamInputSvc  DEBUG ByteStream Event Position in File: 1039848
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186524665, run #327265 1 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186524665, run #327265 2 events processed so far  <<<===
 ByteStreamInputSvc  DEBUG nextEvent _above_ high water mark
-ByteStreamInputSvc  DEBUG Event Size 9529044
+ByteStreamInputSvc  DEBUG Event Size 965292
 ByteStreamInputSvc  DEBUG First word of the fragment aa1234aa
-ByteStreamInputSvc  DEBUG Format version 301
+ByteStreamInputSvc  DEBUG Format version 500
 ByteStreamInputSvc  DEBUG Made an FullEventFragment from ES 0x????
+ByteStreamInputSvc  DEBUG switched to next event in slot s: 0  e: 1
 ByteStreamInputSvc  DEBUG ByteStream File GUID:????
-ByteStreamInputSvc  DEBUG ByteStream Event Position in File: 19058184
-EventSelector     WARNING  bc_time nanosecond number larger than 1e9, it is 1188507009, reset it to 1 sec
-AthenaEventLoopMgr   INFO   ===>>>  start processing event #14382, run #20720 2 events processed so far  <<<===
-AthenaEventLoopMgr   INFO   ===>>>  done processing event #14382, run #20720 3 events processed so far  <<<===
-ToolSvc.ByteStr...   INFO handle() EndInputFile, filename = BSF:/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data
-EventSelector        INFO End of input file list reached
-EventSelector       DEBUG Event source found no more valid files left in input list
-AthenaEventLoopMgr   INFO No more events in event selection 
+ByteStreamInputSvc  DEBUG ByteStream Event Position in File: 2040512
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186542447, run #327265 2 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186542447, run #327265 3 events processed so far  <<<===
 EventSelector       DEBUG Calling EventSelectorByteStream::stop()
-ToolSvc.ByteStr...   INFO handle() LastInputFile, filename = stop
 ByteStreamInputSvc  DEBUG Calling ByteStreamInputSvc::stop()
-StoreGateSvc         INFO Stop StoreGateSvc
-StoreGateSvc         INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores
-MetaDataStore        INFO Stop MetaDataStore
-InputMetaDataStore   INFO Stop InputMetaDataStore
+Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
-AthAlgSeq            INFO Finalizing AthAlgSeq...
-AthOutSeq            INFO Finalizing AthOutSeq...
-AthRegSeq            INFO Finalizing AthRegSeq...
-AthMasterSeq         INFO Finalizing AthMasterSeq...
-StoreGateSvc         INFO Finalizing StoreGateSvc - package version StoreGate-03-06-19
+IncidentProcAlg1     INFO Finalize
+IncidentProcAlg2     INFO Finalize
 ByteStreamCnvSvc    DEBUG releasing all workers
 EventInfoByteSt...   INFO finalize 
-PoolSvc              INFO I/O finalization...
-PoolXMLFileCatalog Info XercesC termination number 0
-MetaDataStore        INFO Finalizing MetaDataStore - package version StoreGate-03-06-19
-InputMetaDataStore   INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-19
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.ByteStr...   INFO in finalize()
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-ChronoStatSvc        INFO Time User   : Tot=0.838  [s]                                             #=  1
+ChronoStatSvc        INFO Time User   : Tot= 0.64  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
 ApplicationMgr       INFO Application Manager Terminated successfully
 Athena               INFO leaving with code 0: "successful run"
-CORAL/Services/ConnectionService Info Deleting the ConnectionPool
diff --git a/Event/ByteStreamCnvSvc/share/BSEventSelector_test_jobOptions.py b/Event/ByteStreamCnvSvc/share/BSEventSelector_test_jobOptions.py
index a02f2909b862101285610368a209a82c2f215e5c..a3ad161350e26306fa812cd008ba76ef15993973 100644
--- a/Event/ByteStreamCnvSvc/share/BSEventSelector_test_jobOptions.py
+++ b/Event/ByteStreamCnvSvc/share/BSEventSelector_test_jobOptions.py
@@ -6,14 +6,14 @@
 # Input 
 include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 
-svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data" ]
+#svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data" ]
 #svcMgr.ByteStreamInputSvc.FullFileName += [ "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data" ]
-#svcMgr.EventSelector.InputCollections = [ "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data" ]
+svcMgr.EventSelector.Input = [ "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" ]
 #svcMgr.ByteStreamInputSvc.MaxBadEvents = 1
 #svcMgr.ByteStreamInputSvc.ValidateEvent = False
 
-#from AthenaCommon.AppMgr import theApp
-#theApp.EvtMax = 3 
+from AthenaCommon.AppMgr import theApp
+theApp.EvtMax = 3 
 
 from AthenaCommon.AlgSequence import AthSequencer
 topSequence = AthSequencer("AthAlgSeq")
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
index 9347cc8c2608999a0532a0410388cb447ea75097..0102b4d0ac9d5d145d61627c25bab1e2067ac24f 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
@@ -21,6 +21,7 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
 
     if DetFlags.overlay.pixel_on():
         job += CfgGetter.getAlgorithm("PixelOverlayDigitization")
+        job += CfgGetter.getAlgorithm("PixelOverlay")
 
         if overlayFlags.isDataOverlay():
             job.InDetPixelRawDataProvider.RDOKey = overlayFlags.dataStore()+"+PixelRDOs"
@@ -47,6 +48,8 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
             #   conddb.addFolderSplitOnline("SCT","/SCT/DAQ/Calibration/ChipNoise","/SCT/DAQ/Calibration/ChipNoise",forceMC=True)
 
         job += CfgGetter.getAlgorithm("SCT_OverlayDigitization")
+        job += CfgGetter.getAlgorithm("SCTOverlay")
+
         if overlayFlags.isDataOverlay():
             job.InDetSCTRawDataProvider.RDOKey = overlayFlags.dataStore()+"+SCT_RDOs"
             job.InDetSCTRawDataProvider.LVL1IDKey = overlayFlags.dataStore()+"+SCT_LVL1ID"
@@ -65,6 +68,7 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
         ToolSvc += TRT_LocalOccupancy
 
         job += CfgGetter.getAlgorithm("TRT_OverlayDigitization")
+        job += CfgGetter.getAlgorithm("TRTOverlay")
 
         from InDetRecExample.InDetJobProperties import InDetFlags
         include("InDetRecExample/InDetRecConditionsAccess.py")
@@ -83,5 +87,4 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
     if overlayFlags.doSignal==True:
         include ("EventOverlayJobTransforms/InDetMcSignal_jobOptions.py")
 
-    job += CfgGetter.getAlgorithm("InDetOverlay")
     job += CfgGetter.getAlgorithm("InDetSDOOverlay")
diff --git a/Event/EventOverlay/OverlayAlgBase/OverlayAlgBase/OverlayAlgBase.h b/Event/EventOverlay/OverlayAlgBase/OverlayAlgBase/OverlayAlgBase.h
index c6d5935ff49f40a30d44eb148dfa3e57560065d3..be72a91791d1cdcaa0aa508dc5fee30ddbc23f70 100755
--- a/Event/EventOverlay/OverlayAlgBase/OverlayAlgBase/OverlayAlgBase.h
+++ b/Event/EventOverlay/OverlayAlgBase/OverlayAlgBase/OverlayAlgBase.h
@@ -42,9 +42,9 @@ public:
   virtual StatusCode finalize();
 
   //----------------
-  virtual StatusCode overlayInitialize() = 0;
-  virtual StatusCode overlayExecute() = 0;
-  virtual StatusCode overlayFinalize() = 0;
+  virtual StatusCode overlayInitialize();
+  virtual StatusCode overlayExecute();
+  virtual StatusCode overlayFinalize();
 
 protected:
   // ----------------------------------------------------------------
diff --git a/Event/EventOverlay/OverlayAlgBase/src/OverlayAlgBase.cxx b/Event/EventOverlay/OverlayAlgBase/src/OverlayAlgBase.cxx
index ca6dd84fe40fd17a39dc07e682fcf4c05a7ba16d..ffcbdea52f67e151d85cab72561af8ee64804428 100755
--- a/Event/EventOverlay/OverlayAlgBase/src/OverlayAlgBase.cxx
+++ b/Event/EventOverlay/OverlayAlgBase/src/OverlayAlgBase.cxx
@@ -57,5 +57,26 @@ StatusCode OverlayAlgBase::finalize() {
   return overlayFinalize();
 }
 
+//================================================================
+StatusCode OverlayAlgBase::overlayInitialize()
+{
+  ATH_MSG_WARNING("OverlayAlgBase::overlayInitialize() should not be called directly and will be removed in the future.");
+  return StatusCode::SUCCESS;
+}
+
+//================================================================
+StatusCode OverlayAlgBase::overlayExecute()
+{
+  ATH_MSG_WARNING("OverlayAlgBase::overlayExecute() should not be called directly and will be removed in the future.");
+  return StatusCode::SUCCESS;
+}
+
+//================================================================
+StatusCode OverlayAlgBase::overlayFinalize()
+{
+  ATH_MSG_WARNING("OverlayAlgBase::overlayFinalize() should not be called directly and will be removed in the future.");
+  return StatusCode::SUCCESS;
+}
+
 //================================================================
 //EOF
diff --git a/Event/PyDumper/python/Dumpers.py b/Event/PyDumper/python/Dumpers.py
index 3094fbbc28b810fa91ebdaef142255581d832252..d8d408fe6b45d84c7664d5aef47b428699ba3354 100644
--- a/Event/PyDumper/python/Dumpers.py
+++ b/Event/PyDumper/python/Dumpers.py
@@ -4238,6 +4238,61 @@ def dump_TileDigitsContainer (p, f):
     return
 
 
+def dump_TileRawChannel (data, f):
+    dump_TileRawData (data, f)
+    print >> f, [data.amplitude(i) for i in range(data.size())],
+    print >> f, [data.time(i) for i in range(data.sizeTime())],
+    print >> f, [data.quality(i) for i in range(data.sizeQuality())],
+    print >> f, data.pedestal(),
+    return
+
+
+
+def dump_TileRawDataCollection (data, f):
+    print >> f, '\n  ', data.identify(), \
+          data.getLvl1Id(), \
+          data.getLvl1Type(), \
+          data.getDetEvType(), \
+          data.getRODBCID(),
+    for x in data:
+        print >> f, '\n    ',
+        dump_TileRawChannel (x, f)
+    return
+          
+          
+def dump_TileRawChannelCollection (data, f):
+    print >> f, '\n  ', data.getFragGlobalCRC(), \
+          data.getFragDSPBCID(), \
+          data.getFragBCID(), \
+          data.getFragMemoryPar(), \
+          data.getFragSstrobe(), \
+          data.getFragDstrobe(), \
+          data.getFragHeaderBit(), \
+          data.getFragHeaderPar(), \
+          data.getFragSampleBit(), \
+          data.getFragSamplePar(), \
+          data.getFragFEChipMask(), \
+          data.getFragRODChipMask(),
+    dump_TileRawDataCollection (data, f)
+    return
+
+
+@nolist
+def dump_TileRawChannelContainer (data, f):
+    print >> f, data.get_unit(), data.get_type(), data.get_bsflags()
+    beg = data.begin()
+    end = data.end()
+    while beg != end:
+        coll = beg.cptr()
+        print >> f, 'Coll', beg.hashId().value(), coll.size(),
+        dump_TileRawChannelCollection (coll, f)
+        f.write ('\n')
+        beg.next()
+    f.write ('\n')
+  
+    return
+
+
 def dump_TileL2 (p, f):
     print >> f, p.identify(), p.phi(0), p.cosphi(), p.sinphi(),
     print >> f, [p.sumE(i) for i in range(p.NsumE())],
@@ -4813,6 +4868,7 @@ dumpspecs = [
     ['LArHitContainer',                      dump_LArHit],
     ['TileHitVector',                        dump_TileHit],
     ['AtlasHitsVector<TileHit>',             dump_TileHit],
+    ['TileRawChannelContainer',              dump_TileRawChannelContainer],
     ['SiHitCollection',                      dump_SiHit],
     ['AtlasHitsVector<SiHit>',               dump_SiHit],
     ['TRTUncompressedHitCollection',         dump_TRTUncompressedHit],
diff --git a/Event/xAOD/xAODEgammaAthenaPool/src/xAODElectronAuxContainerCnv_v1.cxx b/Event/xAOD/xAODEgammaAthenaPool/src/xAODElectronAuxContainerCnv_v1.cxx
index 49be4a3a154f869540e40baab04777f45af2c935..a1d39a559fe5c31377087810d4df8f6a4fb75536 100644
--- a/Event/xAOD/xAODEgammaAthenaPool/src/xAODElectronAuxContainerCnv_v1.cxx
+++ b/Event/xAOD/xAODEgammaAthenaPool/src/xAODElectronAuxContainerCnv_v1.cxx
@@ -86,21 +86,23 @@ persToTrans( const xAOD::ElectronAuxContainer_v1* oldObj,
      newInt[ i ]->setShowerShapeValue(DeltaE, xAOD::EgammaParameters::DeltaE);
      //
      const xAOD::CaloCluster* cluster  = oldInt[ i ]->caloCluster();
-     const float eta2   = fabsf(cluster->etaBE(2));
-     // transverse energy in calorimeter (using eta position in second sampling)
-     const double energy =  cluster->e();
-     double et = 0.;
-     if (eta2<999.) {
-       const double cosheta = cosh(eta2);
-       et = (cosheta != 0.) ? energy /cosheta : 0.;
+     if (cluster) {
+       const float eta2   = fabsf(cluster->etaBE(2));
+       // transverse energy in calorimeter (using eta position in second sampling)
+       const double energy =  cluster->e();
+       double et = 0.;
+       if (eta2<999.) {
+         const double cosheta = cosh(eta2);
+         et = (cosheta != 0.) ? energy /cosheta : 0.;
+       }
+       float ethad = oldInt[ i ]->showerShapeValue(xAOD::EgammaParameters::ethad);
+       float Rhad =  fabs(et) > 0. ? ethad/et : 0.;
+       newInt[ i ]->setShowerShapeValue(Rhad, xAOD::EgammaParameters::Rhad);
+       //
+       float ethad1 = oldInt[ i ]->showerShapeValue(xAOD::EgammaParameters::ethad1);
+       float Rhad1 = fabs(et) > 0. ? ethad1/et : 0.;
+       newInt[ i ]->setShowerShapeValue(Rhad1, xAOD::EgammaParameters::Rhad1); 
      }
-     float ethad = oldInt[ i ]->showerShapeValue(xAOD::EgammaParameters::ethad);
-     float Rhad =  fabs(et) > 0. ? ethad/et : 0.;
-     newInt[ i ]->setShowerShapeValue(Rhad, xAOD::EgammaParameters::Rhad);
-     //
-     float ethad1 = oldInt[ i ]->showerShapeValue(xAOD::EgammaParameters::ethad1);
-     float Rhad1 = fabs(et) > 0. ? ethad1/et : 0.;
-     newInt[ i ]->setShowerShapeValue(Rhad1, xAOD::EgammaParameters::Rhad1); 
    }
 
    // Print what happened:
diff --git a/Event/xAOD/xAODEgammaAthenaPool/src/xAODPhotonAuxContainerCnv_v1.cxx b/Event/xAOD/xAODEgammaAthenaPool/src/xAODPhotonAuxContainerCnv_v1.cxx
index 323c0db6c66a6477effca7246768f45711d0c226..294c066e7f6c5f19009f9c15304dae5ca0cacebb 100644
--- a/Event/xAOD/xAODEgammaAthenaPool/src/xAODPhotonAuxContainerCnv_v1.cxx
+++ b/Event/xAOD/xAODEgammaAthenaPool/src/xAODPhotonAuxContainerCnv_v1.cxx
@@ -85,21 +85,23 @@ persToTrans( const xAOD::PhotonAuxContainer_v1* oldObj,
      newInt[ i ]->setShowerShapeValue(DeltaE, xAOD::EgammaParameters::DeltaE);
      //
      const xAOD::CaloCluster* cluster  = oldInt[ i ]->caloCluster();
-     const float eta2   = fabsf(cluster->etaBE(2));
-     // transverse energy in calorimeter (using eta position in second sampling)
-     const double energy =  cluster->e();
-     double et = 0.;
-     if (eta2<999.) {
-       const double cosheta = cosh(eta2);
-       et = (cosheta != 0.) ? energy /cosheta : 0.;
+     if (cluster) {
+       const float eta2   = fabsf(cluster->etaBE(2));
+       // transverse energy in calorimeter (using eta position in second sampling)
+       const double energy =  cluster->e();
+       double et = 0.;
+       if (eta2<999.) {
+         const double cosheta = cosh(eta2);
+         et = (cosheta != 0.) ? energy /cosheta : 0.;
+       }
+       float ethad = oldInt[ i ]->showerShapeValue(xAOD::EgammaParameters::ethad);
+       float Rhad =  fabs(et) > 0. ? ethad/et : 0.;
+       newInt[ i ]->setShowerShapeValue(Rhad, xAOD::EgammaParameters::Rhad);
+       //
+       float ethad1 = oldInt[ i ]->showerShapeValue(xAOD::EgammaParameters::ethad1);
+       float Rhad1 = fabs(et) > 0. ? ethad1/et : 0.;
+       newInt[ i ]->setShowerShapeValue(Rhad1, xAOD::EgammaParameters::Rhad1); 
      }
-     float ethad = oldInt[ i ]->showerShapeValue(xAOD::EgammaParameters::ethad);
-     float Rhad =  fabs(et) > 0. ? ethad/et : 0.;
-     newInt[ i ]->setShowerShapeValue(Rhad, xAOD::EgammaParameters::Rhad);
-     //
-     float ethad1 = oldInt[ i ]->showerShapeValue(xAOD::EgammaParameters::ethad1);
-     float Rhad1 = fabs(et) > 0. ? ethad1/et : 0.;
-     newInt[ i ]->setShowerShapeValue(Rhad1, xAOD::EgammaParameters::Rhad1); 
    }
    // Print what happened:
    ATH_MSG( "Converting xAOD::PhotonAuxContainer_v1 to current version "
diff --git a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.cxx b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.cxx
index 385aeb8b5627c0be907a6de8ee525a5066370276..cdc4b67c9f961d0a824233e0ff42ba0484e4f5bf 100644
--- a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.cxx
+++ b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.cxx
@@ -33,6 +33,7 @@ namespace xAODMaker {
       declareProperty( "xAODKey", m_xaodKey = "EventInfo" );
       declareProperty( "PileupKey", m_pileupKey = "" );
       declareProperty( "CnvTool", m_cnvTool );
+      declareProperty( "DoBeginRun", m_doBeginRun = true );
    }
 
    StatusCode EventInfoCnvAlg::initialize() {
@@ -152,7 +153,7 @@ namespace xAODMaker {
 
    StatusCode EventInfoCnvAlg::beginRun() {
 
-     if(!Gaudi::Concurrency::ConcurrencyFlags::concurrent()) {
+     if(m_doBeginRun && !Gaudi::Concurrency::ConcurrencyFlags::concurrent()) {
        // Let the user know what's happening:
        ATH_MSG_DEBUG( "Preparing xAOD::EventInfo object in beginRun()" );
        
diff --git a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.h b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.h
index 22e491907b17e689cf5fd53c569cedb667cc6847..ba1887428768786d846e3f0bfde690e63c455289 100644
--- a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.h
+++ b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.h
@@ -61,6 +61,9 @@ namespace xAODMaker {
       /// Handle to the converter tool
       ToolHandle< IEventInfoCnvTool > m_cnvTool;
 
+      /// Do BeginRun processing?
+      bool m_doBeginRun;
+
    }; // class EventInfoCnvAlg
 
 } // namespace xAODMaker
diff --git a/Event/xAOD/xAODHIEvent/Root/dict/ContainerProxies.cxx b/Event/xAOD/xAODHIEvent/Root/dict/ContainerProxies.cxx
index c36fe265d572a739c25b83ecd711f95a88aa790a..96b12d7005decc3c397689c79e17e898856879aa 100644
--- a/Event/xAOD/xAODHIEvent/Root/dict/ContainerProxies.cxx
+++ b/Event/xAOD/xAODHIEvent/Root/dict/ContainerProxies.cxx
@@ -8,7 +8,9 @@
 #include "xAODCore/AddDVProxy.h"
 
 // Local include(s):
+#include "xAODHIEvent/versions/HIEventShapeContainer_v1.h"
 #include "xAODHIEvent/versions/HIEventShapeContainer_v2.h"
 
 // Set up the collection proxies:
+ADD_NS_DV_PROXY( xAOD, HIEventShapeContainer_v1 );
 ADD_NS_DV_PROXY( xAOD, HIEventShapeContainer_v2 );
diff --git a/Event/xAOD/xAODJet/Root/JetContainerInfo.cxx b/Event/xAOD/xAODJet/Root/JetContainerInfo.cxx
index 1a8895d64b030b1054c6235b6025a282655dac45..f5878bcb02bd77be1dfa85c9b86b952549c80b0b 100644
--- a/Event/xAOD/xAODJet/Root/JetContainerInfo.cxx
+++ b/Event/xAOD/xAODJet/Root/JetContainerInfo.cxx
@@ -105,11 +105,12 @@ namespace xAOD {
       nameToTypemap["EMPFlowSK"] =             EMPFlowSK;
       nameToTypemap["EMPFlowCS"] =             EMPFlowCS;
       nameToTypemap["EMPFlowCSSK"] =           EMPFlowCSSK;
-      nameToTypemap["EMPFlowVorSK"] =          EMPFlowVorSK;     
+      nameToTypemap["EMPFlowVorSK"] =          EMPFlowVorSK;
       nameToTypemap["EMPFlowTime"] =           EMPFlowTime;
       nameToTypemap["EMPFlowSKTime"] =         EMPFlowSKTime;
       nameToTypemap["EMPFlowCSSKTime"] =       EMPFlowCSSKTime;
       nameToTypemap["EMPFlowVorSKTime"] =      EMPFlowVorSKTime;
+      nameToTypemap["HI"] =                    HI;
       nameToTypemap[c_unCategorized] =         Uncategorized;
 
       std::map<std::string, Type>::iterator it = nameToTypemap.begin();
diff --git a/Event/xAOD/xAODJet/xAODJet/JetContainerInfo.h b/Event/xAOD/xAODJet/xAODJet/JetContainerInfo.h
index f9ab2af4f4bc666aeb5cf988121fa1b5838113b5..c477f4ba2d39e392a6742d25187b64cd399d8573 100644
--- a/Event/xAOD/xAODJet/xAODJet/JetContainerInfo.h
+++ b/Event/xAOD/xAODJet/xAODJet/JetContainerInfo.h
@@ -92,6 +92,7 @@ namespace xAOD {
       EMPFlowSKTime,
       EMPFlowCSSKTime,
       EMPFlowVorSKTime,
+      HI,
       Other = 100,
       Uncategorized= 1000
     };
diff --git a/Event/xAOD/xAODTrigMuon/Root/L2StandAloneMuonAuxContainer_v1.cxx b/Event/xAOD/xAODTrigMuon/Root/L2StandAloneMuonAuxContainer_v1.cxx
index f025fa318b8877aac4f8c0b70a38f3f68871e3b6..d82bb32735881ed6df9c08104250fda930c9b600 100644
--- a/Event/xAOD/xAODTrigMuon/Root/L2StandAloneMuonAuxContainer_v1.cxx
+++ b/Event/xAOD/xAODTrigMuon/Root/L2StandAloneMuonAuxContainer_v1.cxx
@@ -207,7 +207,7 @@ namespace xAOD {
 
       AUX_VARIABLE( mdtHitOnlineId );
       AUX_VARIABLE( mdtHitOfflineId );
-      AUX_VARIABLE( mdtHitChamber );
+      //AUX_VARIABLE( mdtHitChamber );
       AUX_VARIABLE( mdtHitR );
       AUX_VARIABLE( mdtHitZ );
       AUX_VARIABLE( mdtHitResidual );
diff --git a/Event/xAOD/xAODTrigMuon/Root/L2StandAloneMuon_v1.cxx b/Event/xAOD/xAODTrigMuon/Root/L2StandAloneMuon_v1.cxx
index e719f11cc235c442ca94beda05584f811a4afa86..06ec89e72424076d200b32304dca4da00635e7d1 100644
--- a/Event/xAOD/xAODTrigMuon/Root/L2StandAloneMuon_v1.cxx
+++ b/Event/xAOD/xAODTrigMuon/Root/L2StandAloneMuon_v1.cxx
@@ -1166,7 +1166,6 @@ namespace xAOD {
    /// Object for accessing the MDT tube variables
    static SG::AuxElement::Accessor< std::vector< uint32_t > > mdtonAcc( "mdtHitOnlineId" );
    static SG::AuxElement::Accessor< std::vector< uint32_t > > mdtoffAcc( "mdtHitOfflineId" );
-   static SG::AuxElement::Accessor< std::vector< uint32_t > > mdtcAcc( "mdtHitChamber" );
    static SG::AuxElement::Accessor< std::vector< float > >    mdtrAcc( "mdtHitR" );
    static SG::AuxElement::Accessor< std::vector< float > >    mdtzAcc( "mdtHitZ" );
    static SG::AuxElement::Accessor< std::vector< float > >    mdtresAcc( "mdtHitResidual" );
@@ -1710,6 +1709,7 @@ namespace xAOD {
    }
 
    uint32_t L2StandAloneMuon_v1::mdtHitChamber( unsigned int tube ) const {
+     static const SG::AuxElement::Accessor< std::vector< uint32_t > > mdtcAcc( "mdtHitChamber" );
      if( mdtcAcc( *this ).size() > tube ) {
        return mdtcAcc( *this ).at( tube );
      } else {
@@ -1772,6 +1772,7 @@ namespace xAOD {
      if ( mdtonAcc( *this ).size() >= (unsigned int)mdtHitsCapacity() ) return;
 
       // Set the variables:
+      static const SG::AuxElement::Accessor< std::vector< uint32_t > > mdtcAcc( "mdtHitChamber" );
       mdtonAcc( *this ).push_back( onlineId );
       mdtoffAcc( *this ).push_back( offlineId );
       mdtcAcc( *this ).push_back( chamber );
diff --git a/Event/xAOD/xAODTrigMuon/xAODTrigMuon/selection.xml b/Event/xAOD/xAODTrigMuon/xAODTrigMuon/selection.xml
index 8a7cde61451c1a9de914b75d064a55f28d77dcb3..0b8c9e2317debb53bf1ac6864bce3df4630caa2e 100644
--- a/Event/xAOD/xAODTrigMuon/xAODTrigMuon/selection.xml
+++ b/Event/xAOD/xAODTrigMuon/xAODTrigMuon/selection.xml
@@ -69,6 +69,7 @@
         source="std::vector<ElementLink<xAOD::L2StandAloneMuonContainer_v1> > muSATrackLink"
         target="muSATrackLink" >
     <![CDATA[
+       muSATrackLink.clear();
        muSATrackLink.reserve (onfile.muSATrackLink.size());
        for (const ElementLink<xAOD::L2StandAloneMuonContainer_v1>& el : 
             onfile.muSATrackLink)
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibEvtInfo.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibEvtInfo.h
index 5397ab8829ee87a2608d90acd64310bc9fc21ccd..4f324b555bbb4a518a5d8ccde038fce01bdaae41 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibEvtInfo.h
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibEvtInfo.h
@@ -17,14 +17,13 @@
 #include "GaudiKernel/IInterface.h"
 #include <vector>
 #include <string>
-#include "GaudiKernel/IIncidentListener.h"
 
 /**
 *  @class ISCTCalib_EvtInfo
 *  Interface to class to deal with run/event information for SCTCalib
 **/
 
-class ISCT_CalibEvtInfo: virtual public IInterface,public IIncidentListener{
+class ISCT_CalibEvtInfo: virtual public IInterface{
   public:
     /// no-op c/tor
     ISCT_CalibEvtInfo(){}
@@ -32,8 +31,6 @@ class ISCT_CalibEvtInfo: virtual public IInterface,public IIncidentListener{
     virtual ~ISCT_CalibEvtInfo(){}
     /// interfaceID re-implemented from IInterface
     static const InterfaceID & interfaceID();
-    /// incidentListener method
-    virtual void handle( const Incident & thisIncident)=0;
     /// specific methods for this class
     //virtual void setOptions(const bool useBytestream, const bool useTrkVal, const bool sortChain, const bool readHist)=0;
     virtual void setTimeStamp(const std::string & begin, const std::string & end)=0;
@@ -42,6 +39,7 @@ class ISCT_CalibEvtInfo: virtual public IInterface,public IIncidentListener{
     
     virtual void setSource(const std::string source)=0;
     
+    virtual void getLumiBlock(int & begin, int & end) const=0;
     virtual void setLumiBlock(const int begin, const int end)=0;
     virtual void setLumiBlock(const int lb)=0;
     
@@ -50,9 +48,9 @@ class ISCT_CalibEvtInfo: virtual public IInterface,public IIncidentListener{
     virtual void setCounter(const int counterVal)=0;
     virtual void incrementCounter()=0;
 
-	virtual void getTimeStamps(int & begin, int & end) const=0;
-	virtual void getTimeStamps(std::string & begin, std::string & end) const=0;
-	
+    virtual void getTimeStamps(int & begin, int & end) const=0;
+    virtual void getTimeStamps(std::string & begin, std::string & end) const=0;
+
     virtual int timeStamp()const=0;
     virtual int lumiBlock() const=0;
     virtual int runNumber() const=0;
@@ -68,15 +66,4 @@ inline const InterfaceID & ISCT_CalibEvtInfo::interfaceID(){
   return IID;
 }
 
-
-
-
-
-
-
-
-
-
-
-
 #endif
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h
index e466b02dc918b8382f26bf8a7a3a18b5f2945ae0..a5b34aafc8f5443509da20251f70224026efbccd 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h
@@ -28,11 +28,9 @@
 #include "AthenaBaseComps/AthAlgorithm.h"  //baseclass
 #include "AthenaKernel/IOVTime.h" //member
 #include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/ReadHandleKey.h"
 #include "StoreGate/StoreGateSvc.h"
 
-// Include Event Info
-#include "EventInfo/EventID.h"
-
 // RAW data access
 #include "InDetRawData/InDetRawDataCLASS_DEF.h"
 #include "InDetRawData/SCT3_RawData.h"
@@ -54,8 +52,6 @@
 // Gaudi
 #include "GaudiKernel/ServiceHandle.h" //member
 #include "GaudiKernel/ToolHandle.h" //member
-#include "GaudiKernel/IIncidentSvc.h" //template parameter, so not fwd declared
-#include "GaudiKernel/IIncidentListener.h" //baseclass
 
 #include "TH1.h"
 
@@ -85,7 +81,6 @@ class StatusCode;
 class EventInfo;
 class SCT_PlanePosition;
 class Identifier;
-class Incident;
 
 
 class SCTCalib : public AthAlgorithm {
@@ -98,13 +93,13 @@ class SCTCalib : public AthAlgorithm {
         StatusCode execute();
         StatusCode endRun();
         StatusCode finalize();
-        //void handle( const Incident& );
 
     private:
         ServiceHandle<StoreGateSvc>                     p_sgSvc;
         ITHistSvc *                                     m_thistSvc;
         const SCT_ID*                                   m_pSCTHelper;
         SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+        SG::ReadHandleKey<EventInfo> m_eventInfoKey;
 
         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/src/SCTCalib.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
index 2ac8887d19d0bb5000ea9984edabaa8841aa357e..430745471b180c47defbbbc9aaf6891b35521b72 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
@@ -35,6 +35,7 @@
 
 //infrastructure
 #include "EventInfo/EventInfo.h"
+#include "EventInfo/EventID.h"
 
 //coral/cool
 #include "CoralBase/TimeStamp.h"
@@ -157,10 +158,10 @@ normalizeList( const std::string& strList ) {
 
 SCTCalib::SCTCalib( const std::string& name, ISvcLocator* pSvcLocator ) :
     AthAlgorithm( name, pSvcLocator ),
-
     p_sgSvc                     ("StoreGateSvc",name),
     m_thistSvc(0),
     m_pSCTHelper(0),
+    m_eventInfoKey(std::string("ByteStreamEventInfo")),
     m_pCalibWriteSvc            ("SCTCalibWriteSvc",name),
     m_calibHitmapSvc            ("SCT_CalibHitmapSvc",name),
     m_calibBsErrSvc             ("SCT_CalibBsErrorSvc",name),
@@ -372,6 +373,7 @@ StatusCode SCTCalib::initialize() {
     if ( m_readBS ) {
         ATH_MSG_INFO( "------------> Reading from ByteStream <-------------");
         m_calibEvtInfoSvc->setSource("BS");
+        ATH_CHECK(m_eventInfoKey.initialize());
     }
 
 
@@ -476,6 +478,28 @@ StatusCode SCTCalib::beginRun() {
 //////////////////////////////////////////////////////////////////////////////////
 
 StatusCode SCTCalib::execute() {
+    if ( m_readBS ) {
+        SG::ReadHandle<EventInfo> evt(m_eventInfoKey);
+        if (not evt.isValid()) {
+            ATH_MSG_FATAL("Unable to get the EventInfo");
+            return StatusCode::FAILURE;
+        }
+        const EventInfo* evt_ptr = &(*evt);
+        ATH_MSG_VERBOSE(SCT_CalibAlgs::eventInfoAsString(evt_ptr));
+      //--- TimeStamp/LB range analyzed
+      const int timeStamp = evt->event_ID()->time_stamp();
+      const int lumiBlock = evt->event_ID()->lumi_block();
+      int timeStampBeginOld;
+      int timeStampEndOld;
+      m_calibEvtInfoSvc->getTimeStamps(timeStampBeginOld, timeStampEndOld);
+      m_calibEvtInfoSvc->setTimeStamp(std::min(timeStamp, timeStampBeginOld), std::max(timeStamp, timeStampEndOld));
+      int lbBeginOld;
+      int lbEndOld;
+      m_calibEvtInfoSvc->getLumiBlock(lbBeginOld, lbEndOld);
+      m_calibEvtInfoSvc->setLumiBlock(std::min(lumiBlock, lbBeginOld), std::max(lumiBlock, lbEndOld));
+      m_calibEvtInfoSvc->setLumiBlock(lumiBlock);
+      m_calibEvtInfoSvc->setTimeStamp(timeStamp);
+    }
 
     const bool majorityIsGoodOrUnused=( m_useMajority and m_MajorityConditionsTool->isGood() ) or !m_useMajority;
     //--- Fill histograms for (1) Number of events and (2) Hitmaps
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteSvc.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteSvc.cxx
index a9abb7a5944d7155ef547b208fcd8e2f434486aa..b8938c63a34981e345e6281b9c81ff12b04de5b2 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteSvc.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteSvc.cxx
@@ -27,7 +27,6 @@
 #include "InDetIdentifier/SCT_ID.h"
 
 // Event Info 
-#include "EventInfo/EventIncident.h"
 #include "EventInfo/EventInfo.h"
 #include "EventInfo/EventID.h"
 #include "EventInfo/EventType.h"
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.cxx
index 731fb4f559dff7f0b347fc4cb4122acdb58036a8..d9fc765c22b1660772d64f7209f174bf1a5544cc 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.cxx
@@ -24,8 +24,6 @@ const long long oneBillion(1000000000LL);
 }
 
 SCT_CalibEventInfo::SCT_CalibEventInfo(const std::string &name, ISvcLocator * svc):AthService(name,svc),
-   m_eventInfoKey(std::string("ByteStreamEventInfo")),
-   m_incidentSvc ( "IncidentSvc", name ),
    m_timeStampBegin(INTMAX),
    m_tsBeginString(""),
    m_tsEndString(""),
@@ -35,8 +33,6 @@ SCT_CalibEventInfo::SCT_CalibEventInfo(const std::string &name, ISvcLocator * sv
    m_LBBegin(INTMAX),
    m_LBEnd(INTMIN),
    m_numLB(0),
-   m_numUOFO(0),
-   m_numUOFOth(10),
    m_source("UNKNOWN"),
    m_runNumber(0),
    m_eventNumber(0),
@@ -50,12 +46,6 @@ SCT_CalibEventInfo::SCT_CalibEventInfo(const std::string &name, ISvcLocator * sv
 StatusCode
 SCT_CalibEventInfo::initialize() {
    msg( MSG::INFO)<<"Initialize of evtInfo in "<<PACKAGE_VERSION<<endmsg;
-   ATH_CHECK(m_eventInfoKey.initialize());
-   const int pri(500);
-   m_incidentSvc->addListener( this, "BeginRun",         pri, true, true );
-   m_incidentSvc->addListener( this, "UnknownOfflineId", pri, true );
-   m_incidentSvc->addListener( this, "BeginEvent",       pri, true );
-   m_incidentSvc->addListener( this, "EndEvent",         pri, true );
    return StatusCode::SUCCESS;
 }
 
@@ -79,61 +69,6 @@ int SCT_CalibEventInfo::lumiBlock() const {
    return m_lumiBlock;
 }
 
-void
-SCT_CalibEventInfo::handle(const Incident &inc) {
-
-   if ( m_source == "BS" ) {
-      SG::ReadHandle<EventInfo> evt(m_eventInfoKey);
-      if (not evt.isValid()) {
-         msg(MSG:: ERROR) << "Unable to get the EventInfo" << endmsg;
-         return;
-      }
-
-      //listening for the Unknown offlineId for OfflineId..." error.
-      //count number of instances/event
-      if (inc.type() == "UnknownOfflineId") {
-         incrementUOFO();
-      }
-
-      //at the beginning of each run do a print put
-      if (inc.type() == "BeginRun") {
-         msg(MSG:: INFO) << "BeginRun is HERE" << endmsg;
-      }
-
-      //at the beginning of each event set the counter to 0
-      if (inc.type() == "BeginEvent") {
-         resetUOFO();
-      }
-
-      //at the end end of each event, if there are more than m_numUOFOth instances
-      //(default is 10) of the error, skip the event
-      if (inc.type() == "EndEvent") {
-         int nUOFO = UOFO();
-         if (nUOFO > m_numUOFOth) {
-            msg ( MSG::DEBUG ) << " More than " << m_numUOFOth <<" Id ROD failures, skipping event" << endmsg;
-            m_incidentSvc->fireIncident(Incident(name(), "SkipEvent"));
-         }
-      }
-
-      const EventInfo* evt_ptr = &(*evt);
-      msg( MSG::VERBOSE ) << SCT_CalibAlgs::eventInfoAsString(evt_ptr) << endmsg;
-      //--- TimeStamp/LB range analyzed
-      const int timeStamp = evt->event_ID()->time_stamp();
-      const int lumiBlock = evt->event_ID()->lumi_block();
-      setTimeStamp(std::min(timeStamp, m_timeStampBegin), std::max(timeStamp, m_timeStampEnd));
-      setLumiBlock(std::min(lumiBlock, m_LBBegin), std::max(lumiBlock, m_LBEnd));
-      m_lumiBlock=lumiBlock;
-      m_timeStamp=timeStamp;
-
-   } else if ( m_source == "HIST" ) {
-
-      msg( MSG::INFO ) << "RunNumber, TimeStamp (Begin, End): " << m_runNumber << ", " << m_timeStampBegin << ", " << m_timeStampEnd<< endmsg;
-
-   } else msg( MSG::FATAL ) << "SCT_CalibEventInfo: Unknown source!" << endmsg;
-
-}
-
-
 void
 SCT_CalibEventInfo::setTimeStamp(const int begin, const int end) {
    m_timeStampBegin=begin;
@@ -158,6 +93,13 @@ void
 SCT_CalibEventInfo::setTimeStamp(const int ts) {
    m_timeStamp=ts;
 }
+
+void
+SCT_CalibEventInfo::getLumiBlock(int & begin, int & end) const {
+   begin=m_LBBegin;
+   end=m_LBEnd;
+}
+
 void
 SCT_CalibEventInfo::setLumiBlock(const int begin, const int end) {
    m_LBBegin=begin;
@@ -174,7 +116,7 @@ SCT_CalibEventInfo::setSource(const std::string source) {
 }
 void
 SCT_CalibEventInfo::setRunNumber(const int rn) {
-   m_runNumber=rn;
+  m_runNumber=rn;
 }
 void
 SCT_CalibEventInfo::setBunchCrossing(const int bc) {
@@ -213,22 +155,6 @@ SCT_CalibEventInfo::incrementCounter() {
    ++m_counter;
 }
 
-int
-SCT_CalibEventInfo::UOFO() const {
-   return m_numUOFO;
-}
-
-void
-SCT_CalibEventInfo::incrementUOFO() {
-   ++m_numUOFO;
-}
-
-void
-SCT_CalibEventInfo::resetUOFO() {
-   m_numUOFO=0;
-}
-
-
 void
 SCT_CalibEventInfo::setCounter(const int counterVal) {
    m_counter=counterVal;
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.h
index 89c7526aef6065798b68fd7e60743cfef27efa4b..56896443cc937f1b92e93759df51a9f6c64a3ed9 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.h
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.h
@@ -13,16 +13,12 @@
 #include "AthenaBaseComps/AthService.h"    //baseclass
 #include "GaudiKernel/ServiceHandle.h"     //member
 
-#include "StoreGate/ReadHandleKey.h"
-#include "GaudiKernel/IIncidentSvc.h"      //template parameter, so not fwd declared
 #include "SCT_CalibAlgs/ISCT_CalibEvtInfo.h"
 #include <string>
 
 class StatusCode;
 class ISvcLocator;
-class Incident;
 class InterfaceID;
-class EventInfo;
 
 class SCT_CalibEventInfo: virtual public ISCT_CalibEvtInfo,  public AthService {
       friend class SvcFactory<SCT_CalibEventInfo>;
@@ -36,14 +32,13 @@ class SCT_CalibEventInfo: virtual public ISCT_CalibEvtInfo,  public AthService {
       //static const InterfaceID & interfaceID() {return ISCT_CalibEvtInfo::interfaceID();}
       virtual StatusCode queryInterface(const InterfaceID & riid, void** ppvInterface );
       //@}
-      /// IncidentListener method, reimplemented
-      virtual void handle( const Incident& );
       //@name ISCT_CalibEvtinfo interface methods, implemented
       //@{
       virtual void setTimeStamp(const int begin, const int end);
       virtual void setTimeStamp(const std::string & begin, const std::string & end);
       virtual void setTimeStamp(const int ts);
 
+      virtual void getLumiBlock(int & begin, int & end) const;
       virtual void setLumiBlock(const int begin, const int end);
       virtual void setLumiBlock(const int lb);
 
@@ -53,8 +48,6 @@ class SCT_CalibEventInfo: virtual public ISCT_CalibEvtInfo,  public AthService {
       virtual void setBunchCrossing(const int bc);
       virtual void setCounter(const int counterVal);
       virtual void incrementCounter();
-      virtual void incrementUOFO();
-      virtual void resetUOFO();
 
       virtual void getTimeStamps(int & begin, int & end) const;
       virtual void getTimeStamps(std::string & begin, std::string & end) const;
@@ -63,15 +56,11 @@ class SCT_CalibEventInfo: virtual public ISCT_CalibEvtInfo,  public AthService {
       virtual int lumiBlock() const;
       virtual int runNumber() const;
       virtual int counter() const;
-      virtual int UOFO() const;
       virtual int numLumiBlocks() const;
       //@}
 
    private:
 
-      SG::ReadHandleKey<EventInfo> m_eventInfoKey;
-      ServiceHandle<IIncidentSvc> m_incidentSvc;
-
       int  m_timeStampBegin;
       std::string m_tsBeginString;
       std::string m_tsEndString;
@@ -81,8 +70,6 @@ class SCT_CalibEventInfo: virtual public ISCT_CalibEvtInfo,  public AthService {
       int  m_LBBegin;
       int  m_LBEnd;
       int  m_numLB;
-      int  m_numUOFO;
-      int  m_numUOFOth;
       std::string m_source;
 
       //
diff --git a/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py b/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py
index 909a2a6d1fab9446b61b1ff8d7dad1b9645bf279..43cbee3888c2a107a602dae1bfd2430d0e22cbd9 100644
--- a/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py
+++ b/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py
@@ -56,16 +56,8 @@ if DetFlags.SCT_on() and ((not DetFlags.simulate.SCT_on()) or DetFlags.overlay.S
     condSeq = AthSequencer("AthCondSeq")
     if not hasattr(condSeq, "SCT_AlignCondAlg"):
         from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_AlignCondAlg
-        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")
+        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/InDetCondServices/InDetCondServices/ISiLorentzAngleSvc.h b/InnerDetector/InDetConditions/InDetCondServices/InDetCondServices/ISiLorentzAngleSvc.h
deleted file mode 100644
index b73812f33a00a9b1cb26ebd4ab453756aa19da16..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetConditions/InDetCondServices/InDetCondServices/ISiLorentzAngleSvc.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @file ISiLorentzAngleSvc.h
- * @author Grant.Gorfine@cern.ch
-**/
-#ifndef ISiLorentzAngleSvc_h
-#define ISiLorentzAngleSvc_h
-
-//Gaudi Includes
-#include "GaudiKernel/IInterface.h"
-#include "AthenaKernel/IOVSvcDefs.h"
-// Amg
-#include "GeoPrimitives/GeoPrimitives.h"
-
-//forward declarations
-class Identifier;
-class IdentifierHash;
-
-/**
- * @class ISiLorentzAngleSvc
- * Interface class for service providing Lorentz angle (and the corresponding shift of the measurement) 
- * for each detector element.
-**/
-class ISiLorentzAngleSvc: virtual public IInterface
-{
-public:
-  virtual ~ISiLorentzAngleSvc(){}
-
-  static const InterfaceID & interfaceID(); //!< reimplemented from IInterface
-
-  /** Get the Lorentz angle shift in the local x (phiDist) direction
-      Assumes the center of the detector and is generally cached. */
-  virtual double getLorentzShift(const IdentifierHash & elementHash) = 0;
-
-  /** As above, but provide the local position. 
-      More accurate but slower */
-  virtual double getLorentzShift(const IdentifierHash & elementHash, const Amg::Vector2D & locPos) = 0;
-
-  /** Get the Lorentz angle shift in the local y (etaDist) direction
-      Assumes the center of the detector and is generally cached.*/
-  virtual double getLorentzShiftEta(const IdentifierHash & elementHash) = 0;
-
-  /** As above, but provide the local position. 
-      More accurate but slower. */
-  virtual double getLorentzShiftEta(const IdentifierHash & elementHash, const Amg::Vector2D & locPos) = 0;
-
-  /** Get tan af the Lorentz angle in the local x (phiDist) direction
-      Assumes the center of the detector and is generally cached. */
-  virtual double getTanLorentzAngle(const IdentifierHash & elementHash) = 0;
-
-  /** As above, but provide the local position. 
-      More accurate but slower. */
-  virtual double getTanLorentzAngle(const IdentifierHash & elementHash, const Amg::Vector2D & locPos) = 0;
-
-  /** Get tan af the Lorentz angle in the local y (etaDist) direction
-      Assumes the center of the detector and is generally cached */
-  virtual double getTanLorentzAngleEta(const IdentifierHash & elementHash) = 0;
-
-  /** As above, but provide the local position. 
-      More accurate but slower. */
-  virtual double getTanLorentzAngleEta(const IdentifierHash & elementHash, const Amg::Vector2D & locPos) = 0;
-
-  /** Get bias voltage */
-  virtual double getBiasVoltage(const IdentifierHash & elementHash) = 0;
-
-  /** Get temperature */
-  virtual double getTemperature(const IdentifierHash & elementHash) = 0;
-
-  /** Get depletion voltage */
-  virtual double getDepletionVoltage(const IdentifierHash & elementHash) = 0;
-
-
-  /// IOV CallBack
-  virtual StatusCode callBack(IOVSVC_CALLBACK_ARGS) = 0;
-
-};
-
-inline const InterfaceID & ISiLorentzAngleSvc::interfaceID(){
-  static const InterfaceID IID_ISiLorentzAngleSvc("ISiLorentzAngleSvc",1,0);
-  return IID_ISiLorentzAngleSvc;
-}
-#endif
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibChipRead.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibChipRead.py
index 755b8d61fba90257940c5b8cd55e3008fe4d66ef..29d561aa9ddf51abad28a5760e04b60869ae044c 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibChipRead.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibChipRead.py
@@ -108,7 +108,7 @@ sct_ReadCalibChipDataToolSetup.setup()
 SCT_ReadCalibChipDataTool=sct_ReadCalibChipDataToolSetup.getTool()
 
 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_ReadCalibChipDataTestAlg
-topSequence+= SCT_ReadCalibChipDataTestAlg()
+topSequence+= SCT_ReadCalibChipDataTestAlg(SCT_ReadCalibChipDataTool=SCT_ReadCalibChipDataTool)
 
 ##Modules to test:
 ##136523776, strips 0-255 BAD_OPE=good
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibRead.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibRead.py
index 179f04e6e8bb4198a58f0098dc460c462f7f84db..8fdc2bae41a9447f2a159c011dbb5a4ad792d6a9 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibRead.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibRead.py
@@ -80,10 +80,13 @@ DetFlags.readRIOBS.all_setOff()
 DetFlags.readRIOPool.all_setOff()
 DetFlags.writeRIOPool.all_setOff()
 
-
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
+# Set up SCT cabling
+from AthenaCommon.Include import include
+include('InDetRecExample/InDetRecCabling.py')
+
 #--------------------------------------------------------------
 # Load ReadCalibData Alg and Service
 #--------------------------------------------------------------
@@ -107,7 +110,7 @@ SCT_ReadCalibDataCondAlg = sct_ReadCalibDataToolSetup.getAlg()
 SCT_ReadCalibDataTool = sct_ReadCalibDataToolSetup.getTool()
 
 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_ReadCalibDataTestAlg
-topSequence+= SCT_ReadCalibDataTestAlg()
+topSequence+= SCT_ReadCalibDataTestAlg(SCT_ReadCalibDataTool=SCT_ReadCalibDataTool)
 
 # <-999 setting ignores the defect, otherwise it will be checked against the set value
 SCT_ReadCalibDataCondAlg.IgnoreDefects = ["NOISE_SLOPE","OFFSET_SLOPE","GAIN_SLOPE","BAD_OPE"]
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testConfig.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testConfig.py
index 11db021654b88033601edc7624bf8ecd30294023..d2095ea25eda9c5f3692510ef8b7d1b1337f281c 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testConfig.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testConfig.py
@@ -58,9 +58,9 @@ DetFlags.writeRIOPool.all_setOff()
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
-# Disable SiLorentzAngleSvc to remove
-# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service
-ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=""
+# Set up SCT cabling
+from AthenaCommon.Include import include
+include('InDetRecExample/InDetRecCabling.py')
 
 from AthenaCommon.AlgSequence import AlgSequence
 job = AlgSequence()
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testDCSConditions.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testDCSConditions.py
index fa51c726235fdade767e0df9d101b2dfc6397ffe..6a3bfb45f6ae122b7bfb9fbb770c1b086368b7fd 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testDCSConditions.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testDCSConditions.py
@@ -70,9 +70,10 @@ DetFlags.writeRIOPool.all_setOff()
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
-# Disable SiLorentzAngleSvc to remove
-# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service
-ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=""
+# Set up SCT_DCSConditionsTool and required conditions folders and conditions algorithms
+from SCT_ConditionsTools.SCT_DCSConditionsToolSetup import SCT_DCSConditionsToolSetup
+sct_DCSConditionsToolSetup = SCT_DCSConditionsToolSetup()
+sct_DCSConditionsToolSetup.setup()
 
 #--------------------------------------------------------------
 # Load DCSConditions Alg and Service
@@ -81,12 +82,7 @@ from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 
 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_DCSConditionsTestAlg
-topSequence+= SCT_DCSConditionsTestAlg()
-
-# Set up SCT_DCSConditionsTool and required conditions folders and conditions algorithms
-from SCT_ConditionsTools.SCT_DCSConditionsToolSetup import SCT_DCSConditionsToolSetup
-sct_DCSConditionsToolSetup = SCT_DCSConditionsToolSetup()
-sct_DCSConditionsToolSetup.setup()
+topSequence+= SCT_DCSConditionsTestAlg(SCT_DCSConditionsTool=sct_DCSConditionsToolSetup.getTool())
 
 #--------------------------------------------------------------
 # Event selector settings. Use McEventSelector
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMajority.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMajority.py
index 171fc883d164567a96e69c410c7c0fa0442d830a..3c0344e023b359e6a92f0a810d45fd5f836c7be5 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMajority.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMajority.py
@@ -58,10 +58,6 @@ DetFlags.writeRIOPool.all_setOff()
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
-# Disable SiLorentzAngleSvc to remove
-# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service
-ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=""
-
 #--------------------------------------------------------------
 # Load conditions services and alg
 #--------------------------------------------------------------
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testModuleVeto.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testModuleVeto.py
index 3468eb5dd1d94d4cb5a117197569759ae5bcdde8..9685f0a0974c17d355f411b488c31d37afb5ae6a 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testModuleVeto.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testModuleVeto.py
@@ -59,10 +59,6 @@ DetFlags.writeRIOPool.all_setOff()
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
-# Disable SiLorentzAngleSvc to remove
-# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service
-ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=""
-
 from AthenaCommon.AlgSequence import AlgSequence
 
 job = AlgSequence()
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMonRead.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMonRead.py
index 1afff782494b0aa9c37ffb0d3d3a319a0eb32875..c6f61410eac1002fe80eaa4cf94f579d0cddbfab 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMonRead.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMonRead.py
@@ -60,10 +60,6 @@ DetFlags.writeRIOPool.all_setOff()
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
-# Disable SiLorentzAngleSvc to remove
-# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service
-ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=""
-
 #------------------------------------------------------------
 
 from AthenaCommon.AlgSequence import AlgSequence
@@ -81,7 +77,7 @@ SCT_MonitorConditionsTool=sct_MonitorConditionsToolSetup.getTool()
 SCT_MonitorConditionsTool.OutputLevel = DEBUG
 
 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_MonitorConditionsTestAlg
-job+= SCT_MonitorConditionsTestAlg()
+job+= SCT_MonitorConditionsTestAlg(SCT_MonitorConditionsTool=SCT_MonitorConditionsTool)
 
 SCT_MonitorTest=job.SCT_MonitorConditionsTestAlg
 SCT_MonitorTest.OutputLevel  = 2
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testParameters.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testParameters.py
index 80f81f43279bed631e0545f5752acf3f679b5671..1f28de14c8b46b4b03473e7067497e9174772163 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testParameters.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testParameters.py
@@ -69,19 +69,20 @@ DetFlags.readRIOBS.all_setOff()
 DetFlags.readRIOPool.all_setOff()
 DetFlags.writeRIOPool.all_setOff()
 
-
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
-# Disable SiLorentzAngleSvc to remove
-# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service
-ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=""
+# Set up SCT cabling
+runNumber=215643
+rec.RunNumber.set_Value_and_Lock(runNumber)
+from AthenaCommon.Include import include
+include('InDetRecExample/InDetRecCabling.py')
 
 #--------------------------------------------------------------
 # Event selector settings. Use McEventSelector
 #--------------------------------------------------------------
 import AthenaCommon.AtlasUnixGeneratorJob
-ServiceMgr.EventSelector.RunNumber = 215643
+ServiceMgr.EventSelector.RunNumber = runNumber
 # initial time stamp - this is number of seconds since 1st Jan 1970 GMT
 ServiceMgr.EventSelector.InitialTimeStamp  = 1354748400 # LB 469 of run 215643, 2012-12-05 @ 11:00pm (UTC)
 ServiceMgr.EventSelector.TimeStampInterval = 180 # increment of 3 minutes
@@ -120,4 +121,4 @@ sct_ConditionsParameterToolSetup = SCT_ConditionsParameterToolSetup()
 sct_ConditionsParameterToolSetup.setup()
 
 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_ConditionsParameterTestAlg
-topSequence+= SCT_ConditionsParameterTestAlg()
+topSequence+= SCT_ConditionsParameterTestAlg(SCT_ConditionsParameterTool=sct_ConditionsParameterToolSetup.getTool())
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testReadout.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testReadout.py
index c241d578fc7ca949a517f409c3ba1ba05cd256d5..ab9ebe8e287b5988b459c47d2112e72c9c61ab41 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testReadout.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testReadout.py
@@ -58,10 +58,6 @@ DetFlags.writeRIOPool.all_setOff()
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
-# Disable SiLorentzAngleSvc to remove
-# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service
-ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=""
-
 from AthenaCommon.AlgSequence import AlgSequence
 
 job = AlgSequence()
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py
index 6f8f347ba68c5e1aaf6e1aae566886148d1936b1..de9028807cb7f1b3a5d2ceea5a0d590b08e0f296 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py
@@ -56,17 +56,14 @@ DetFlags.readRIOBS.all_setOff()
 DetFlags.readRIOPool.all_setOff()
 DetFlags.writeRIOPool.all_setOff()
 
-
-
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
-# Disable SiLorentzAngleSvc to remove
-# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service
-ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=""
+# Set up SCT cabling
+from AthenaCommon.Include import include
+include('InDetRecExample/InDetRecCabling.py')
 
 from AthenaCommon.AlgSequence import AlgSequence
-
 job = AlgSequence()
 
 #--------------------------------------------------------------
@@ -88,11 +85,11 @@ sct_RODVetoToolSetup.setup()
 sct_RODVetoToolSetup.getAlg().BadRODIds = [0x240100, 0x240030]
 
 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_RODVetoTestAlg
-job+= SCT_RODVetoTestAlg()
+job+= SCT_RODVetoTestAlg(SCT_RODVetoTool=sct_RODVetoToolSetup.getTool())
 
 
 import AthenaCommon.AtlasUnixGeneratorJob
-ToolSvc.SCT_RODVetoTool.OutputLevel=VERBOSE
+sct_RODVetoToolSetup.getTool().OutputLevel=VERBOSE
 ServiceMgr.EventSelector.InitialTimeStamp = 1500000000
 ServiceMgr.EventSelector.RunNumber = 300000 # MC16c 2017 run number
 theApp.EvtMax = 1
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSensors.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSensors.py
index a90691c1e67af9947c04b2a560431e22da69558a..7cf7f58073b9c3c5466745b6cd0d4d1c7fa6d612 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSensors.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSensors.py
@@ -75,10 +75,6 @@ DetFlags.writeRIOPool.all_setOff()
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
-# Disable SiLorentzAngleSvc to remove
-# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service
-ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=""
-
 from SCT_ConditionsTools.SCT_SensorsToolSetup import SCT_SensorsToolSetup
 sct_SensorsToolSetup = SCT_SensorsToolSetup()
 sct_SensorsToolSetup.setFolderTag("SctSensors-Sep03-14")
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSilicon.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSilicon.py
index bb19885d9cf55b1a1400683dc369b3a5c4e15a98..77781ae4602333f1be141a64ec3989d6c65b42e7 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSilicon.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSilicon.py
@@ -60,10 +60,6 @@ DetFlags.writeRIOPool.all_setOff()
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
-# Disable SiLorentzAngleSvc to remove
-# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service
-ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=""
-
 from AthenaCommon.AlgSequence import AlgSequence
 job = AlgSequence()
 
@@ -89,7 +85,7 @@ sct_SiliconConditionsToolSetup.setDcsTool(sct_DCSConditionsToolSetup.getTool())
 sct_SiliconConditionsToolSetup.setup()
 
 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_SiliconConditionsTestAlg
-job+= SCT_SiliconConditionsTestAlg()
+job+= SCT_SiliconConditionsTestAlg(SCT_SiliconConditionsTool=sct_SiliconConditionsToolSetup.getTool())
 
 import AthenaCommon.AtlasUnixGeneratorJob
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testStripVeto.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testStripVeto.py
index d1a6741a66850f9aefd11ed5b0dff7b3d5e9ca78..d591a108b248e8e32364c4f999b1022ed44a34ce 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testStripVeto.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testStripVeto.py
@@ -59,10 +59,6 @@ DetFlags.writeRIOPool.all_setOff()
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
-# Disable SiLorentzAngleSvc to remove
-# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service
-ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=""
-
 from AthenaCommon.AlgSequence import AlgSequence
 
 job = AlgSequence()
@@ -96,7 +92,7 @@ SCT_StripVetoTool.BadStripIdentifiers=[
 SCT_StripVetoTool.OutputLevel=DEBUG
 
 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_StripVetoTestAlg
-job+= SCT_StripVetoTestAlg()
+job+= SCT_StripVetoTestAlg(StripVetoTool=SCT_StripVetoTool)
 
 import AthenaCommon.AtlasUnixGeneratorJob
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSummary.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSummary.py
index 047c7d56bdcfcd00d1036f3f214ea6a5368addee..935e79df90ec6f878b5853b876bd3f0e1036eb1b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSummary.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSummary.py
@@ -48,9 +48,11 @@ DetFlags.writeRIOPool.all_setOff()
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
-# Disable SiLorentzAngleSvc to remove
-# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service
-ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=""
+# Set up SCT cabling
+runNumber=310809
+rec.RunNumber.set_Value_and_Lock(runNumber)
+from AthenaCommon.Include import include
+include('InDetRecExample/InDetRecCabling.py')
 
 from AthenaCommon.AlgSequence import AlgSequence
 
@@ -97,7 +99,7 @@ job+= SCT_ConditionsSummaryTestAlg(SCT_ConditionsSummaryTool=SCT_ConditionsSumma
 
 import AthenaCommon.AtlasUnixGeneratorJob
 
-ServiceMgr.EventSelector.RunNumber  = 310809
+ServiceMgr.EventSelector.RunNumber = runNumber
 import time, calendar
 # initial time stamp - this is number of seconds since 1st Jan 1970 GMT
 # run 310809 Recording start/end 2016-Oct-17 21:39:18 / 2016-Oct-18 16:45:23 UTC
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py
index ada81fd016c8e76f5263bd34f684dc8ec3649f34..5464bf2701f0611f807730110e38ed76229f7477 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py
@@ -72,10 +72,6 @@ DetFlags.writeRIOPool.all_setOff()
 import AtlasGeoModel.SetGeometryVersion
 import AtlasGeoModel.GeoModelInit
 
-# Disable SiLorentzAngleSvc to remove
-# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service
-ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=""
-
 from IOVSvc.IOVSvcConf import CondSvc 
 ServiceMgr += CondSvc()
 from AthenaCommon.AlgSequence import AthSequencer 
@@ -84,6 +80,10 @@ condSeq = AthSequencer("AthCondSeq")
 from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
 condSeq+=xAODMaker__EventInfoCnvAlg(OutputLevel=2)
 
+from SCT_ConditionsTools.SCT_TdaqEnabledToolSetup import SCT_TdaqEnabledToolSetup
+sct_TdaqEnabledToolSetup = SCT_TdaqEnabledToolSetup()
+sct_TdaqEnabledToolSetup.setup()
+
 #--------------------------------------------------------------
 # Load DCSConditions Alg and Service
 #--------------------------------------------------------------
@@ -91,7 +91,7 @@ from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 
 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_TdaqEnabledTestAlg
-topSequence+= SCT_TdaqEnabledTestAlg()
+topSequence+= SCT_TdaqEnabledTestAlg(SCT_TdaqEnabledTool=sct_TdaqEnabledToolSetup.getTool())
 
 #--------------------------------------------------------------
 # Event selector settings. Use McEventSelector
@@ -123,7 +123,3 @@ conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Config/ROD", "/SCT/DAQ/Config/ROD")
 conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Config/Geog", "/SCT/DAQ/Config/Geog")
 conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Config/RODMUR", "/SCT/DAQ/Config/RODMUR")
 conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Config/MUR", "/SCT/DAQ/Config/MUR")
-
-from SCT_ConditionsTools.SCT_TdaqEnabledToolSetup import SCT_TdaqEnabledToolSetup
-sct_TdaqEnabledToolSetup = SCT_TdaqEnabledToolSetup()
-sct_TdaqEnabledToolSetup.setup()
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx
index 4e8c88ae74fac7b01db85da120ad87617d40195e..3b8ef0edbd249f72dedbd3c4e9e054967fd524ad 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx
@@ -62,7 +62,7 @@ StatusCode SCT_AlignCondAlg::execute()
   // Get SiDetectorElements
   const InDetDD::SiDetectorElementCollection* oldColl{m_detManager->getDetectorElementCollection()};
   if (oldColl==nullptr) {
-    ATH_MSG_ERROR("Null pointer is returned by getDetectorElementCollection()");
+    ATH_MSG_FATAL("Null pointer is returned by getDetectorElementCollection()");
     return StatusCode::FAILURE;
   }
 
@@ -75,7 +75,7 @@ StatusCode SCT_AlignCondAlg::execute()
     SG::ReadCondHandle<AlignableTransformContainer> readHandleStatic{m_readKeyStatic};
     const AlignableTransformContainer* readCdoStatic{*readHandleStatic};
     if (readCdoStatic==nullptr) {
-      ATH_MSG_ERROR("Null pointer to the read conditions object of " << m_readKeyStatic.key());
+      ATH_MSG_FATAL("Null pointer to the read conditions object of " << m_readKeyStatic.key());
       return StatusCode::FAILURE;
     }
     // ____________ Apply alignments to SCT GeoModel ____________
@@ -86,7 +86,7 @@ StatusCode SCT_AlignCondAlg::execute()
 
     // Define validity of the output cond object and record it
     if (not readHandleStatic.range(rangeW)) {
-      ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandleStatic.key());
+      ATH_MSG_FATAL("Failed to retrieve validity range for " << readHandleStatic.key());
       return StatusCode::FAILURE;
     }
   } else { // Dynamic
@@ -94,19 +94,19 @@ StatusCode SCT_AlignCondAlg::execute()
     SG::ReadCondHandle<CondAttrListCollection> readHandleDynamicL1{m_readKeyDynamicL1};
     const CondAttrListCollection* readCdoDynamicL1{*readHandleDynamicL1};
     if (readCdoDynamicL1==nullptr) {
-      ATH_MSG_ERROR("Null pointer to the read conditions object of " << m_readKeyDynamicL1.key());
+      ATH_MSG_FATAL("Null pointer to the read conditions object of " << m_readKeyDynamicL1.key());
       return StatusCode::FAILURE;
     }
     SG::ReadCondHandle<CondAttrListCollection> readHandleDynamicL2{m_readKeyDynamicL2};
     const CondAttrListCollection* readCdoDynamicL2{*readHandleDynamicL2};
     if (readCdoDynamicL2==nullptr) {
-      ATH_MSG_ERROR("Null pointer to the read conditions object of " << readHandleDynamicL2.key());
+      ATH_MSG_FATAL("Null pointer to the read conditions object of " << readHandleDynamicL2.key());
       return StatusCode::FAILURE;
     }
     SG::ReadCondHandle<AlignableTransformContainer> readHandleDynamicL3{m_readKeyDynamicL3};
     const AlignableTransformContainer* readCdoDynamicL3{*readHandleDynamicL3};
     if (readCdoDynamicL3==nullptr) {
-      ATH_MSG_ERROR("Null pointer to the read conditions object of " << readHandleDynamicL3.key());
+      ATH_MSG_FATAL("Null pointer to the read conditions object of " << readHandleDynamicL3.key());
       return StatusCode::FAILURE;
     }
     // ____________ Apply alignments to SCT GeoModel ____________
@@ -124,17 +124,17 @@ StatusCode SCT_AlignCondAlg::execute()
     // Define validity of the output cond object and record it
     EventIDRange rangeWL1;
     if (not readHandleDynamicL1.range(rangeWL1)) {
-      ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandleDynamicL1.key());
+      ATH_MSG_FATAL("Failed to retrieve validity range for " << readHandleDynamicL1.key());
       return StatusCode::FAILURE;
     }
     EventIDRange rangeWL2;
     if (not readHandleDynamicL2.range(rangeWL2)) {
-      ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandleDynamicL2.key());
+      ATH_MSG_FATAL("Failed to retrieve validity range for " << readHandleDynamicL2.key());
       return StatusCode::FAILURE;
     }
     EventIDRange rangeWL3;
     if (not readHandleDynamicL3.range(rangeWL3)) {
-      ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandleDynamicL3.key());
+      ATH_MSG_FATAL("Failed to retrieve validity range for " << readHandleDynamicL3.key());
       return StatusCode::FAILURE;
     }
     rangeW = EventIDRange::intersect(rangeWL1, rangeWL2, rangeWL3);
@@ -147,7 +147,7 @@ StatusCode SCT_AlignCondAlg::execute()
   }
 
   if (writeHandle.record(rangeW, std::move(writeCdo)).isFailure()) {
-    ATH_MSG_ERROR("Could not record GeoAlignmentStore " << writeHandle.key() 
+    ATH_MSG_FATAL("Could not record GeoAlignmentStore " << writeHandle.key() 
                   << " with EventRange " << rangeW
                   << " into Conditions Store");
     return StatusCode::FAILURE;
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h
index 420b6ac8839e94b3dff2acb6bed245c250d22942..b10e5999fb046964519c9e2ab2777f93d6fcc81c 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h
@@ -13,7 +13,6 @@
 // Include Athena stuff
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "Identifier/Identifier.h"
 #include "SCT_ConditionsTools/ISCT_ConditionsParameterTool.h"
 
 // Read Handle Key
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.cxx
index 2e1ea0609cdd6c4006cc2ad50ee177989e4e58da..9330c7ba684138257989b69720f90f8d617162a6 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.cxx
@@ -4,16 +4,19 @@
 
 #include "SCT_ConfigurationCondAlg.h"
 
-// STL include
-#include <memory>
-
 // Athena include
 #include "Identifier/IdentifierHash.h"
 #include "InDetIdentifier/SCT_ID.h"
-#include "SCT_Cabling/SCT_SerialNumber.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "SCT_Cabling/SCT_SerialNumber.h"
 #include "SCT_ConditionsData/SCT_Chip.h"
 
+// Gaudi includes
+#include "GaudiKernel/EventIDRange.h"
+
+// STL include
+#include <memory>
+
 // Static folder names 
 const std::string SCT_ConfigurationCondAlg::s_coolChannelFolderName{"/SCT/DAQ/Configuration/Chip"};
 const std::string SCT_ConfigurationCondAlg::s_coolModuleFolderName{"/SCT/DAQ/Configuration/Module"};
@@ -93,20 +96,24 @@ StatusCode SCT_ConfigurationCondAlg::execute() {
   writeCdo->clear();
 
   // Fill module data
-  if (fillModuleData(writeCdo.get()).isFailure()) {
+  EventIDRange rangeModule;
+  if (fillModuleData(writeCdo.get(), rangeModule).isFailure()) {
     return StatusCode::FAILURE;
   }
 
   // Fill strip, chip and link info if Chip or MUR folders change
-  if (fillChannelData(writeCdo.get()).isFailure()) {
+  EventIDRange rangeChannel;
+  EventIDRange rangeMur;
+  EventIDRange rangeDetEle;
+  if (fillChannelData(writeCdo.get(), rangeChannel, rangeMur, rangeDetEle).isFailure()) {
     return StatusCode::FAILURE;
   }
 
   // Define validity of the output cond obbject and record it
-  // m_rangeDetEle is run-lumi. Others are time.
-  EventIDRange rangeW{EventIDRange::intersect(m_rangeChannel, m_rangeModule, m_rangeMur/*, m_rangeDetEle*/)};
+  // rangeDetEle is run-lumi. Others are time.
+  EventIDRange rangeW{EventIDRange::intersect(rangeChannel, rangeModule, rangeMur/*, rangeDetEle*/)};
   if(rangeW.start()>rangeW.stop()) {
-    ATH_MSG_FATAL("Invalid intersection range: " << rangeW << " " << m_rangeChannel << " " << m_rangeModule << " " << m_rangeMur/* << " " << m_rangeDetEle*/);
+    ATH_MSG_FATAL("Invalid intersection range: " << rangeW << " " << rangeChannel << " " << rangeModule << " " << rangeMur/* << " " << rangeDetEle*/);
     return StatusCode::FAILURE;
   }
   if (writeHandle.record(rangeW, std::move(writeCdo)).isFailure()) {
@@ -121,7 +128,7 @@ StatusCode SCT_ConfigurationCondAlg::execute() {
 }
 
 // Fill bad strip, chip and link info
-StatusCode SCT_ConfigurationCondAlg::fillChannelData(SCT_ConfigurationCondData* writeCdo) {
+StatusCode SCT_ConfigurationCondAlg::fillChannelData(SCT_ConfigurationCondData* writeCdo, EventIDRange& rangeChannel, EventIDRange& rangeMur, EventIDRange& rangeDetEle) {
   // Check if the pointer of derived conditions object is valid.
   if (writeCdo==nullptr) {
     ATH_MSG_FATAL("Pointer of derived conditions object is null");
@@ -158,7 +165,7 @@ StatusCode SCT_ConfigurationCondAlg::fillChannelData(SCT_ConfigurationCondData*
   writeCdo->clearBadStripIds();
   writeCdo->clearBadChips();
   // Fill link status
-  if (fillLinkStatus(writeCdo).isFailure()) return StatusCode::FAILURE;
+  if (fillLinkStatus(writeCdo, rangeMur).isFailure()) return StatusCode::FAILURE;
 
   // Get channel folder for link info 
   SG::ReadCondHandle<CondAttrListVec> readHandle{m_readKeyChannel};
@@ -170,7 +177,7 @@ StatusCode SCT_ConfigurationCondAlg::fillChannelData(SCT_ConfigurationCondData*
   ATH_MSG_INFO("Size of " << m_readKeyChannel.key() << " folder is " << readCdo->size());
 
   // Get EventIDRange
-  if (not readHandle.range(m_rangeChannel)) {
+  if (not readHandle.range(rangeChannel)) {
     ATH_MSG_FATAL("Failed to retrieve validity range for " << readHandle.key());
     return StatusCode::FAILURE;
   }
@@ -183,7 +190,7 @@ StatusCode SCT_ConfigurationCondAlg::fillChannelData(SCT_ConfigurationCondData*
     return StatusCode::FAILURE;
   }
   // Get EventIDRange
-  if (not sctDetEle.range(m_rangeDetEle)) {
+  if (not sctDetEle.range(rangeDetEle)) {
     ATH_MSG_FATAL("Failed to retrieve validity range for " << sctDetEle.key());
     return StatusCode::FAILURE;
   }
@@ -284,7 +291,7 @@ StatusCode SCT_ConfigurationCondAlg::fillChannelData(SCT_ConfigurationCondData*
 }
 
 // Fill bad module info
-StatusCode SCT_ConfigurationCondAlg::fillModuleData(SCT_ConfigurationCondData* writeCdo) {
+StatusCode SCT_ConfigurationCondAlg::fillModuleData(SCT_ConfigurationCondData* writeCdo, EventIDRange& rangeModule) {
   // Check if the pointer of derived conditions object is valid.
   if (writeCdo==nullptr) {
     ATH_MSG_FATAL("Pointer of derived conditions object is null");
@@ -310,7 +317,7 @@ StatusCode SCT_ConfigurationCondAlg::fillModuleData(SCT_ConfigurationCondData* w
   ATH_MSG_INFO("Size of " << m_readKeyModule.key() << " is " << readCdo->size());
 
   // Get EventIDRange
-  if (not readHandle.range(m_rangeModule)) {
+  if (not readHandle.range(rangeModule)) {
     ATH_MSG_FATAL("Failed to retrieve validity range for " << readHandle.key());
     return StatusCode::FAILURE;
   }
@@ -357,7 +364,7 @@ StatusCode SCT_ConfigurationCondAlg::fillModuleData(SCT_ConfigurationCondData* w
 }
 
 // Fill link info
-StatusCode SCT_ConfigurationCondAlg::fillLinkStatus(SCT_ConfigurationCondData* writeCdo) {
+StatusCode SCT_ConfigurationCondAlg::fillLinkStatus(SCT_ConfigurationCondData* writeCdo, EventIDRange& rangeMur) {
   // Check if the pointer of derived conditions object is valid.
   if (writeCdo==nullptr) {
     ATH_MSG_FATAL("Pointer of derived conditions object is null");
@@ -380,7 +387,7 @@ StatusCode SCT_ConfigurationCondAlg::fillLinkStatus(SCT_ConfigurationCondData* w
   ATH_MSG_INFO("Size of " << m_readKeyMur.key() << " is " << readCdo->size());
 
   // Get EventIDRange
-  if (not readHandle.range(m_rangeMur)) {
+  if (not readHandle.range(rangeMur)) {
     ATH_MSG_FATAL("Failed to retrieve validity range for " << readHandle.key());
     return StatusCode::FAILURE;
   }
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.h
index 3987892d65880b50175e72aef44a7fa00402f1bb..874f53ca46ae84b36e730015ef85b83420c2ce58 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationCondAlg.h
@@ -5,25 +5,24 @@
 #ifndef SCT_CONFIGURATIONCONDALG
 #define SCT_CONFIGURATIONCONDALG
 
-// Gaudi includes
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ICondSvc.h"
-#include "GaudiKernel/EventIDRange.h"
-
 #include "AthenaBaseComps/AthAlgorithm.h"
 
-#include "StoreGate/ReadCondHandleKey.h"
 #include "AthenaPoolUtilities/CondAttrListVec.h"
+#include "Identifier/Identifier.h"
 #include "InDetReadoutGeometry/SiDetectorElementCollection.h"
-
+#include "StoreGate/ReadCondHandleKey.h"
 #include "StoreGate/WriteCondHandleKey.h"
-#include "SCT_ConditionsData/SCT_ConfigurationCondData.h"
-
 #include "SCT_Cabling/ISCT_CablingTool.h"
+#include "SCT_ConditionsData/SCT_ConfigurationCondData.h"
 #include "SCT_ConditionsTools/ISCT_ReadoutTool.h"
 
+// Gaudi includes
+#include "GaudiKernel/ICondSvc.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
 // Forward declarations
+class EventIDRange;
 class SCT_ID;
 
 class SCT_ConfigurationCondAlg : public AthAlgorithm 
@@ -39,17 +38,12 @@ class SCT_ConfigurationCondAlg : public AthAlgorithm
   /** enum for constants*/
   enum {badLink=255, stripsPerChip=128, lastStrip=767};
 
-  StatusCode fillChannelData(SCT_ConfigurationCondData* writeCdo);
-  StatusCode fillModuleData(SCT_ConfigurationCondData* writeCdo);
-  StatusCode fillLinkStatus(SCT_ConfigurationCondData* writeCdo);
+  StatusCode fillChannelData(SCT_ConfigurationCondData* writeCdo, EventIDRange& rangeChannel, EventIDRange& rangeMur, EventIDRange& rangeDetEle);
+  StatusCode fillModuleData(SCT_ConfigurationCondData* writeCdo, EventIDRange& rangeModule);
+  StatusCode fillLinkStatus(SCT_ConfigurationCondData* writeCdo, EventIDRange& rangeMur);
   Identifier getStripId(const unsigned int truncatedSerialNumber, const unsigned int chipNumber, const unsigned int stripNumber,
                         const InDetDD::SiDetectorElementCollection* elements) const;
 
-  EventIDRange m_rangeChannel;
-  EventIDRange m_rangeModule;
-  EventIDRange m_rangeMur;
-  EventIDRange m_rangeDetEle;
-
   static const std::string s_coolChannelFolderName;
   static const std::string s_coolChannelFolderName2;
   static const std::string s_coolModuleFolderName;
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationConditionsTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationConditionsTestAlg.h
index 74e4678b03da6ffa5652979d0856a5ed7631c160..f2ce9fe6745c6ece0465e9d79f97be5b0accd4b6 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationConditionsTestAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationConditionsTestAlg.h
@@ -13,7 +13,6 @@
 // Athena includes
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "Identifier/Identifier.h"
 #include "SCT_ConditionsTools/ISCT_ConfigurationConditionsTool.h"
 
 // C++ includes
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DCSConditionsTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DCSConditionsTestAlg.h
index 8b46efb1acc25326a9e0b65e4ebfcf775ac0ee4f..8e91238bfb4374e2dcdeaacc0a1f2d6b8d09a02d 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DCSConditionsTestAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DCSConditionsTestAlg.h
@@ -13,7 +13,6 @@
 // Include Athena stuff
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "Identifier/Identifier.h"
 #include "SCT_ConditionsTools/ISCT_DCSConditionsTool.h"
 
 // Include STL stuff
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx
index 51bacc1dbe0d2a9cd6d28bbafe7187eedf4aaf28..ab61ec6c85de7255ae303024fc8665ec6c2fa450 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx
@@ -92,7 +92,6 @@ StatusCode SCT_DetectorElementCondAlg::execute()
       const InDetDD::SiCommonItems* oldCommonItems{oldEl->getCommonItems()};
       m_commonItems = new InDetDD::SiCommonItems(oldCommonItems->getIdHelper());
       m_commonItems->setSolenoidFrame(oldCommonItems->solenoidFrame());
-      // SiLorentzAngleSvc is not set.
     }
 
     *newEl = new InDetDD::SiDetectorElement(oldEl->identify(),
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_RODVetoCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_RODVetoCondAlg.h
index 600a2c5c2022ee348838d58c2354193f5a6d3c50..3ba316f81a88b62e7f8b0b0ace65b95650351fa4 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_RODVetoCondAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_RODVetoCondAlg.h
@@ -13,18 +13,17 @@
 
 #ifndef SCT_RODVetoCondAlg_H
 #define SCT_RODVetoCondAlg_H 
-// STL
-#include <string>
-#include <vector>
-#include <set>
 
 // Athena
 #include "AthenaBaseComps/AthAlgorithm.h"
-#include "Identifier/Identifier.h"
 #include "StoreGate/WriteHandle.h"
 #include "SCT_Cabling/ISCT_CablingTool.h"
 #include "SCT_ConditionsData/IdentifierSet.h"
 
+// STL
+#include <string>
+#include <vector>
+
 // Forward declarations
 class SCT_ID;
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.cxx
index f66c6fcfa72d08e6f47bac9ef9e7ae52f66e63d3..9f23f6bfd94e96316e830f357e489f45385a64ef 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.cxx
@@ -24,7 +24,6 @@
 //----------------------------------------------------------------------
 SCT_ReadCalibChipDataTestAlg::SCT_ReadCalibChipDataTestAlg(const std::string& name, ISvcLocator* pSvcLocator) :
   AthAlgorithm(name, pSvcLocator),
-  m_sc{0},
   m_id_sct{nullptr},
   m_currentEventKey{std::string("EventInfo")},
   m_moduleId{0},
@@ -44,31 +43,13 @@ StatusCode SCT_ReadCalibChipDataTestAlg::initialize() {
   ATH_MSG_DEBUG("in initialize()");
   
   // Get SCT ID helper
-  m_sc = detStore()->retrieve(m_id_sct, "SCT_ID");
-  if (m_sc.isFailure()) {
-    ATH_MSG_FATAL("Failed to get SCT ID helper");
-    return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_DEBUG("Found SCT detector manager");
-  }
+  ATH_CHECK( detStore()->retrieve(m_id_sct, "SCT_ID"));
   
   // Process jobOption properties
-  m_sc = processProperties();
-  if (m_sc.isFailure()) {
-    ATH_MSG_ERROR("Failed to process jobOpt properties");
-    return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_DEBUG("Processed jobOpt properties");
-  }
+  ATH_CHECK(processProperties());
 
   // Get the SCT_ReadCaliChipDataSvc
-  m_sc = m_ReadCalibChipDataTool.retrieve();
-  if (m_sc.isFailure()) {
-    ATH_MSG_FATAL("Cannot locate CalibChipData service");
-    return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_DEBUG("CalibChipData Service located ");
-  }
+  ATH_CHECK(m_ReadCalibChipDataTool.retrieve());
 
   // Read Handle
   ATH_CHECK(m_currentEventKey.initialize());
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.h
index c033bbfb64848b08ca1b08be5997f2a4e8fb279e..8544c56d12865dc7e453a8a468fe7c42ee81bb71 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.h
@@ -48,7 +48,6 @@ class SCT_ReadCalibChipDataTestAlg : public AthAlgorithm
   StatusCode processProperties();             //!< Process jobOpt properties
   
   //----------Private Attributes----------//
-  StatusCode                          m_sc;            //!< To check return codes
   const SCT_ID*                       m_id_sct;        //!< ID helper for SCT
   SG::ReadHandleKey<xAOD::EventInfo>  m_currentEventKey;  //!< Current event
   Identifier                          m_moduleId;      //!< Module identifier
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataTestAlg.cxx
index db90f6bbde3485423bf8da5fec6daf6bac813de7..4b1e09327d70dd8e12d2cf28000b3a675a5eacee 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataTestAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataTestAlg.cxx
@@ -23,7 +23,6 @@
 //----------------------------------------------------------------------
 SCT_ReadCalibDataTestAlg::SCT_ReadCalibDataTestAlg(const std::string& name, ISvcLocator* pSvcLocator) :
   AthAlgorithm(name, pSvcLocator),
-  m_sc{StatusCode::SUCCESS, true},
   m_id_sct{nullptr},
   m_moduleId{0},
   m_waferId{0},
@@ -50,38 +49,16 @@ StatusCode SCT_ReadCalibDataTestAlg::initialize()
   ATH_MSG_DEBUG("in initialize()");
   
   // Get SCT ID helper
-  m_sc = detStore()->retrieve(m_id_sct, "SCT_ID");
-  if (m_sc.isFailure()) {
-    ATH_MSG_FATAL("Failed to get SCT ID helper");
-    return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_DEBUG("Found SCT detector manager");
-  }
+  ATH_CHECK(detStore()->retrieve(m_id_sct, "SCT_ID"));
   
   // Process jobOption properties
-  m_sc = processProperties();
-  if (m_sc.isFailure()) {
-    ATH_MSG_ERROR("Failed to process jobOpt properties");
-    return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_DEBUG("Processed jobOpt properties");
-  }
+  ATH_CHECK(processProperties());
 
   // Get the SCT_ReadCaliDataTool
-  m_sc = m_ReadCalibDataTool.retrieve();
-  if (m_sc.isFailure()) {
-    ATH_MSG_FATAL("Cannot locate CalibData service");
-    return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_DEBUG( "CalibData Service located ");
-  }
+  ATH_CHECK(m_ReadCalibDataTool.retrieve());
 
   // Retrieve SCT Cabling service
-  m_sc = m_cabling.retrieve();
-  if (m_sc.isFailure()) {
-    ATH_MSG_ERROR("Failed to retrieve SCT cabling service");
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK(m_cabling.retrieve());
 
   return StatusCode::SUCCESS;
 } // SCT_ReadCalibDataTestAlg::initialize()
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataTestAlg.h
index 3827799faee2f62c7032d0b347721cc820dcaadb..4349e46144d035bbc360b3ed32171d431d06c8b1 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataTestAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataTestAlg.h
@@ -48,7 +48,6 @@ class SCT_ReadCalibDataTestAlg:public AthAlgorithm
   StatusCode processProperties();             //!< Process jobOpt properties
   
   //----------Private Attributes----------//
-  StatusCode                          m_sc;            //!< To check return codes
   const SCT_ID*                       m_id_sct;        //!< ID helper for SCT
   Identifier                          m_moduleId;      //!< Module identifier
   Identifier                          m_waferId;       //!< Wafer identifier
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_SensorsTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_SensorsTestAlg.h
index c6c56153f27f56d6f8b6934d36be5963e218101c..d016ff4030f8b7d512400599aa05192df4c60606 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_SensorsTestAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_SensorsTestAlg.h
@@ -13,7 +13,6 @@
 // Include Athena stuff
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "Identifier/Identifier.h"
 #include "SCT_ConditionsTools/ISCT_SensorsTool.h"
 
 // Include STL stuff
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/CMakeLists.txt b/InnerDetector/InDetConditions/SCT_ConditionsData/CMakeLists.txt
index 07f3b2deebb9e4c2850c55d975d7c88e7a554fbc..c61b47c5c3ce69d4f1acd8285ae2d6cd828e48a8 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/CMakeLists.txt
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/CMakeLists.txt
@@ -7,6 +7,7 @@ atlas_subdir( SCT_ConditionsData )
 
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
+                          Control/AthenaBaseComps
                           Control/AthenaKernel
                           Database/AthenaPOOL/AthenaPoolUtilities
                           DetectorDescription/Identifier )
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_PortMap.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_PortMap.h
new file mode 100644
index 0000000000000000000000000000000000000000..a4ce2772852031e19836204c8860fb1fc04e6f47
--- /dev/null
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_PortMap.h
@@ -0,0 +1,48 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file SCT_PortMap.h
+ * Header file for the SCT_PortMap class
+ * @author Susumu Oda <Susumu.Oda@cern.ch>
+ */
+
+#ifndef SCT_ConditionData_SCT_PortMap_h
+#define SCT_ConditionData_SCT_PortMap_h
+
+/** Enums for chip type*/
+namespace SCT_Parameters {
+  enum ChipType {Chip0=0, Chip1, Chip2, Chip3, Chip4, Chip5, Chip6, Chip7, Chip8, Chip9, Chip10, Chip11, NChips, None=-999};
+}
+
+/**
+ * @class SCT_PortMap
+ * Helper class to map the input/output ports of a chip
+ **/
+
+class SCT_PortMap {
+
+ public:
+
+  /** Constuctor from input and output chip types*/
+  SCT_PortMap(SCT_Parameters::ChipType in0, SCT_Parameters::ChipType in1, SCT_Parameters::ChipType out0, SCT_Parameters::ChipType out1) {
+    m_input[0]  = in0;
+    m_input[1]  = in1;
+    m_output[0] = out0;
+    m_output[1] = out1;
+  }
+
+  ~SCT_PortMap() = default;
+  
+  /** Functions to retrieve the chip mapped to the input and output ports*/
+  inline SCT_Parameters::ChipType input(int port) const  { return m_input[port]; }
+  inline SCT_Parameters::ChipType output(int port) const { return m_output[port]; }
+
+ private:
+
+  SCT_Parameters::ChipType m_input[2];   //!<  Port type for the chip's two inputs
+  SCT_Parameters::ChipType m_output[2];  //!<  Port type for the chip's two outputs
+};
+
+#endif // SCT_ConditionData_SCT_PortMap_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h
new file mode 100644
index 0000000000000000000000000000000000000000..85135873557818954a34f2f861708d154a63bb0a
--- /dev/null
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h
@@ -0,0 +1,125 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file SCT_ReadoutData.h
+ * Header file for the SCT_ReadoutData class
+ * @author Susumu Oda <Susumu.Oda@cern.ch>
+ */
+
+#ifndef SCT_ConditionData_SCT_ReadoutData_h
+#define SCT_ConditionData_SCT_ReadoutData_h
+
+// Athena
+#include "AthenaKernel/MsgStreamMember.h"
+#include "SCT_ConditionsData/SCT_Chip.h"
+#include "SCT_ConditionsData/SCT_PortMap.h"
+
+// C++ STL
+#include <bitset>
+#include <vector> 
+
+class Identifier;
+
+/** Enums for module and chip type*/
+namespace SCT_Parameters {
+  enum ModuleType {BARREL, MODIFIED_0, MODIFIED_1, ENDCAP};
+}
+
+/**
+ * @class SCT_ReadoutTool
+ * Class to represent the SCT module readout
+ **/
+
+class SCT_ReadoutData {
+
+ public:
+
+  SCT_ReadoutData(IMessageSvc* msgSvc=nullptr);
+  virtual ~SCT_ReadoutData();
+  
+  /** Find the ID of the input chip for chip*/ 
+  SCT_Parameters::ChipType inputChip(const SCT_Chip& chip) const {
+    return m_chipMap[chip.id()].input(chip.inPort());
+  }
+
+  /** Find the ID of the output chip for chip*/
+  SCT_Parameters::ChipType outputChip(const SCT_Chip& chip) const {
+    return m_chipMap[chip.id()].output(chip.outPort());
+  }
+
+  /** Set chip in readout and which link it is on*/
+  void setChipIn(const SCT_Chip& chip, int link) {
+    m_chipInReadout.set(chip.id());
+    if (link==0) m_chipsOnLink0.push_back(chip.id());
+    if (link==1) m_chipsOnLink1.push_back(chip.id());
+  }
+
+  /** Set chip out of readout and reset link*/
+  void setChipOut(const SCT_Chip& chip) {
+    m_chipInReadout.reset(chip.id());
+  }
+
+  /** Test if chip is in readout or not*/
+  bool isChipReadOut(const SCT_Chip& chip) const {
+    return m_chipInReadout.test(chip.id());
+  }
+
+  /** Log a message using the Athena controlled logging system */
+  MsgStream& msg(MSG::Level lvl) const { return *m_msg << lvl; }
+
+  /** Check whether the logging system is active at the provided verbosity level */
+  bool msgLvl(MSG::Level lvl) const { return m_msg->get().level() <= lvl; }
+
+  /** Set the module type */
+  void setModuleType(const Identifier& moduleId, int bec);
+
+  /** Fill the chip mapping*/
+  void setChipMap();
+
+  /** Check which chips are in the readout for a particular link and if the readout is sane*/
+  void checkLink(int link);
+
+  /** Chip has a correctly connected input*/
+  bool hasConnectedInput(const SCT_Chip& chip) const;
+
+  /** Chip is an end but is being talked to*/
+  bool isEndBeingTalkedTo(const SCT_Chip& chip) const;
+
+  /** Mask the chips that are not in the readout*/
+  void maskChipsNotInReadout();
+
+  /** Follow the readout to the input side*/
+  bool followReadoutUpstream(int link, const SCT_Chip& chip, int remainingDepth = 12);
+
+  /** is the readout for a particular link sane*/
+  bool isLinkStandard(int link) const;
+
+  /** Print readout status*/
+  void printStatus(const Identifier& moduleId) const;
+
+  /** Set SCT_Chip vectors */
+  void setChips(std::vector<SCT_Chip*>& chips);
+
+  /** Set link status */
+  void setLinkStatus(bool link0ok, bool link1ok);
+
+  /** Set all chips out of readout and clear both links to start */
+  void clearChipReadout();
+
+ private:
+
+  /** Private data*/
+  std::vector<SCT_Chip*>              m_chips;               //!< Vector of actual SCT Chips for that module
+  std::vector<SCT_PortMap>            m_chipMap;             //!< Vector of port mapping from the chips in an SCT module 
+  bool                                m_linkActive[2];       //!< Links status for link 0 and 1
+  std::bitset<SCT_Parameters::NChips> m_chipInReadout;       //!< Bitset indicating whether a chip is readout or not
+  SCT_Parameters::ModuleType          m_type;                //!< The type of this module (Barrel, Modified Barrel (0 or 1), Endcap)
+  std::vector<int>                    m_chipsOnLink0;        //!< The chips read out on link 0
+  std::vector<int>                    m_chipsOnLink1;        //! <The chips read out on link 1
+
+  mutable Athena::MsgStreamMember* m_msg;
+};
+
+#endif // SCT_ConditionData_SCT_ReadoutData_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ReadoutData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ReadoutData.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..a2efec715eed8f26d0c1f7fb0f511dffaf16736d
--- /dev/null
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ReadoutData.cxx
@@ -0,0 +1,334 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "SCT_ConditionsData/SCT_ReadoutData.h"
+
+#include "AthenaBaseComps/AthMsgStreamMacros.h"
+#include "Identifier/Identifier.h"
+
+#include <algorithm>
+
+// Helper functions to indicate whether a barrel module is modified.
+// The following modules have extra routing on one side or the other
+// 20220170200653 -> 169922560 has link0 modified
+// 20220170200113 -> 170801152 has link0 modified
+// 20220170200941 -> 170983424 has link1 modified
+// 20220330200701 -> 172556288 has link0 modified
+// 20220330200637 -> 172621824 has link0 modified
+// 20220170200183 -> 173268992 has link1 modified
+// 20220330200606 -> 174301184 has link1 modified
+// 20220330200209 -> 174342144 has link0 modified
+// 20220330200505 -> 174610432 has link0 modified
+// 20220330200117 -> 174962688 has link0 modified
+// 20220330200693 -> 175015936 has link1 modified
+
+static bool modified0(Identifier moduleId) {
+  return ((moduleId==169922560) or (moduleId==170801152) or (moduleId==172556288) or (moduleId==172621824) or 
+          (moduleId==174342144) or (moduleId==174610432) or (moduleId==174962688));
+}
+
+static bool modified1(Identifier moduleId) {
+  return ((moduleId==170983424) or (moduleId==173268992) or (moduleId==174301184) or (moduleId==175015936));
+}
+
+using namespace SCT_Parameters;
+
+// Constructor
+SCT_ReadoutData::SCT_ReadoutData(IMessageSvc* msgSvc):
+  m_chips{},
+  m_chipMap{},
+  m_linkActive{},
+  m_chipInReadout{},
+  m_type{SCT_Parameters::BARREL},
+  m_chipsOnLink0{},
+  m_chipsOnLink1{}
+{
+  if (msgSvc) m_msg = new Athena::MsgStreamMember{msgSvc, "SCT_ReadoutData"};
+}
+
+// Destructor
+SCT_ReadoutData::~SCT_ReadoutData() {
+  delete m_msg;
+}
+
+void SCT_ReadoutData::setModuleType(const Identifier& moduleId, int bec) {
+  // Set module type as per the ModuleType enum
+  if (std::abs(bec) == 2) {
+    m_type = SCT_Parameters::ENDCAP;
+  } else if (modified0(moduleId)) {
+    m_type = SCT_Parameters::MODIFIED_0;
+  } else if (modified1(moduleId)) {
+    m_type = SCT_Parameters::MODIFIED_1;
+  } else {
+    m_type = SCT_Parameters::BARREL;
+  }
+}
+
+void SCT_ReadoutData::setChipMap() {
+  // Set Chip mapping depending on module type
+ 
+  // Clear between calls and reserve space for the 12 chips
+  m_chipMap.clear();
+  m_chipMap.reserve(12);
+
+  if (m_type == BARREL) {
+    m_chipMap.emplace_back(Chip1,  Chip2,  None ,  None);
+    m_chipMap.emplace_back(Chip2,  Chip3,  Chip0,  Chip11);
+    m_chipMap.emplace_back(Chip3,  Chip4,  Chip1,  Chip0);
+    m_chipMap.emplace_back(Chip4,  Chip5,  Chip2,  Chip1);
+    m_chipMap.emplace_back(Chip5,  None ,  Chip3,  Chip2);
+    m_chipMap.emplace_back(None,   Chip7,  Chip4,  Chip3);
+    m_chipMap.emplace_back(Chip7,  Chip8,  None,   None);
+    m_chipMap.emplace_back(Chip8,  Chip9,  Chip6,  Chip5);
+    m_chipMap.emplace_back(Chip9,  Chip10, Chip7,  Chip6);
+    m_chipMap.emplace_back(Chip10, Chip11, Chip8,  Chip7);
+    m_chipMap.emplace_back(Chip11, None,   Chip9,  Chip8);
+    m_chipMap.emplace_back(None,   Chip1,  Chip10, Chip9);
+  } else if (m_type == MODIFIED_0) {
+    m_chipMap.emplace_back(Chip1,  Chip2,  Chip5,  None);
+    m_chipMap.emplace_back(Chip2,  Chip3,  Chip0,  Chip11);
+    m_chipMap.emplace_back(Chip3,  Chip4,  Chip1,  Chip0);
+    m_chipMap.emplace_back(Chip4,  Chip5,  Chip2,  Chip1);
+    m_chipMap.emplace_back(Chip5,  None,   Chip3,  Chip2);
+    m_chipMap.emplace_back(Chip0,  Chip7,  Chip4,  Chip3);
+    m_chipMap.emplace_back(Chip7,  Chip8,  None,   None);
+    m_chipMap.emplace_back(Chip8,  Chip9,  Chip6,  Chip5);
+    m_chipMap.emplace_back(Chip9,  Chip10, Chip7,  Chip6);
+    m_chipMap.emplace_back(Chip10, Chip11, Chip8,  Chip7);
+    m_chipMap.emplace_back(Chip11, None,   Chip9,  Chip8);
+    m_chipMap.emplace_back(None,   Chip1,  Chip10, Chip9);
+  } else if (m_type == MODIFIED_1) {
+    m_chipMap.emplace_back(Chip1,  Chip2,  None,   None);
+    m_chipMap.emplace_back(Chip2,  Chip3,  Chip0,  Chip11);
+    m_chipMap.emplace_back(Chip3,  Chip4,  Chip1,  Chip0);
+    m_chipMap.emplace_back(Chip4,  Chip5,  Chip2,  Chip1);
+    m_chipMap.emplace_back(Chip5,  None ,  Chip3,  Chip2);
+    m_chipMap.emplace_back(None,   Chip7,  Chip4,  Chip3);
+    m_chipMap.emplace_back(Chip7,  Chip8,  Chip11, None);
+    m_chipMap.emplace_back(Chip8,  Chip9,  Chip6,  Chip5);
+    m_chipMap.emplace_back(Chip9,  Chip10, Chip7,  Chip6);
+    m_chipMap.emplace_back(Chip10, Chip11, Chip8,  Chip7);
+    m_chipMap.emplace_back(Chip11, None,   Chip9,  Chip8);
+    m_chipMap.emplace_back(Chip6,  Chip1,  Chip10, Chip9);
+  } else if (m_type == ENDCAP) {
+    m_chipMap.emplace_back(Chip1,  Chip2,  Chip11, None);
+    m_chipMap.emplace_back(Chip2,  Chip3,  Chip0,  Chip11);
+    m_chipMap.emplace_back(Chip3,  Chip4,  Chip1,  Chip0);
+    m_chipMap.emplace_back(Chip4,  Chip5,  Chip2,  Chip1);
+    m_chipMap.emplace_back(Chip5,  None,   Chip3,  Chip2);
+    m_chipMap.emplace_back(Chip6,  Chip7,  Chip4,  Chip3);
+    m_chipMap.emplace_back(Chip7,  Chip8,  Chip5,  None);
+    m_chipMap.emplace_back(Chip8,  Chip9,  Chip6,  Chip5);
+    m_chipMap.emplace_back(Chip9,  Chip10, Chip7,  Chip6);
+    m_chipMap.emplace_back(Chip10, Chip11, Chip8,  Chip7);
+    m_chipMap.emplace_back(Chip11, None,   Chip9,  Chip8);
+    m_chipMap.emplace_back(Chip0,  Chip1,  Chip10, Chip9);
+  }
+}
+
+void SCT_ReadoutData::checkLink(int link) {
+  // Follow the chips for each link to determine which chips are in the readout 
+  // and if readout is sane. 
+
+  // Follow chip from the start chip for each side
+  SCT_Chip& startChip{*m_chips.at(link*6)};
+  bool linkSane{followReadoutUpstream(link, startChip)};
+
+  if (not linkSane) {
+    std::vector<int>& chipsOnThisLink{(link==0) ? m_chipsOnLink0 : m_chipsOnLink1};
+
+    // Remove chips in that link from the readout
+    for (const int linkItr: chipsOnThisLink) setChipOut(*m_chips.at(linkItr));
+
+    // We do not have ERROR/FAILURE if the readout is not sane as it possibly only affects one of the SCT modules
+    if (m_msg) ATH_MSG_WARNING("Readout for link " << link << " not sane");
+  }
+}
+
+bool SCT_ReadoutData::hasConnectedInput(const SCT_Chip& chip) const {
+  // Does the chip have a correctly connected input
+
+  // The chip must not be an end 
+  if (chip.isEnd()) return false;
+  
+  int inChipId{inputChip(chip)};
+
+  // The port the chip is listening on should be mapped to an input (if the chip is not an end)
+  // Otherwise it'll never get to an end giving a timeout
+  if (inChipId == None) {
+    if (m_msg) ATH_MSG_WARNING("Chip " << chip.id() << " is not an end but port " << chip.inPort() << " is not mapped to anything");
+    return false;
+  }
+  
+  // The mapped chip should be talking on the same port as this chip is listening (if the chip is not an end)
+  // Again, otherwise it'll never get to an end giving a timeout
+  if (m_chips.at(inChipId)->outPort()!=chip.inPort()) {
+    if (m_msg) ATH_MSG_WARNING("Chip" << chip.id() << " is not an end and is listening on Port " << chip.inPort() << " but nothing is talking to it");
+    return false;
+  }
+  return true;
+}
+
+bool SCT_ReadoutData::isEndBeingTalkedTo(const SCT_Chip& chip) const {
+  // Is something talking to a chip which is configured as an end
+  // (can possibly happen as chips must be talking to something)
+
+  // Is chip actually an end
+  if (not chip.isEnd()) return false;
+
+  // Is anything trying to talk to the end.
+  for (SCT_Chip* chipItr: m_chips) {
+    if (outputChip(*chipItr) == chip.id()) {
+      if (m_msg) ATH_MSG_WARNING("Chip " << chip.id() << " is configured as end but something is trying to talk to it");
+      return true;
+    }
+  }
+  return false;
+}
+
+void SCT_ReadoutData::maskChipsNotInReadout() {
+  // Mask chip (is set mask to 0 0 0 0) if not in readout
+  // If the readout of a particular link is not sane mask all chips on that link
+  for (SCT_Chip* thisChip: m_chips) {
+    if (not isChipReadOut(*thisChip)) {
+      if (m_msg) ATH_MSG_DEBUG("Masking chip " <<  thisChip->id());
+      uint32_t masked{0};
+      thisChip->initializeMaskFromInts(masked, masked, masked, masked);
+    }
+  }
+}
+
+bool SCT_ReadoutData::followReadoutUpstream(int link, const SCT_Chip& chip, int remainingDepth) {
+  // Follow the readout upstream (to input side).  Will return true if the readout is sane
+  // The "error" cases are only warnings since they possibly only affect one module of the SCT
+  // Have we gone though all 12 chips -> infinite loop
+  if (remainingDepth < 0) {
+    if (m_msg) ATH_MSG_WARNING("Infinite loop detected in readout");
+    return false;
+  }
+
+  // Can the chip be a master
+  if (chip.canBeMaster()) {
+
+    if (chip.id()==link*6) {
+      if (m_msg) ATH_MSG_DEBUG("Link " << link << " is " << (m_linkActive[link] ? "ENABLED" : "DISABLED"));
+    }
+
+    // Is the link enabled. If not the readout is still sane so return true
+    if (not m_linkActive[link]) return true;
+
+    // Is the chip actually configured as a master
+    if (chip.isMaster()) {
+      if (m_msg) ATH_MSG_DEBUG("MasterChip");
+      // Chip will be set in readout below
+    } else if (chip.id() == link*6) {
+      // Link is active but the master position for THAT link does not contain a master 
+      // This can happen if everything is readout via other link, therefore the readout is still sane.
+
+      if (m_msg) ATH_MSG_DEBUG("Link " << link << " is enabled but chip " << chip.id() << " is not a master");
+
+      return true;
+    }
+  }
+
+  if (m_msg) ATH_MSG_DEBUG("Looking at chip " << chip.id());
+
+  // Is a slave chip mistakenly configured as a master 
+  if (chip.slaveConfiguredAsMaster()) {
+    if (m_msg) ATH_MSG_WARNING("Found master chip in slave position " << chip.id());
+    return false;
+  }
+
+  // The chip is in the readout (this doesn't mean the readout necessarily is sane).
+  setChipIn(chip, link);
+
+  // Is the chip configured as an end (can be master and end)
+  if (chip.isEnd()) {
+    if (m_msg) ATH_MSG_DEBUG("End Chip");
+
+    // End chip is in readout and readout is sane
+    return true;
+  } 
+
+  // Find the next chip if there is one connected
+  if (not hasConnectedInput(chip)) return false;
+  SCT_Chip& nextChip{*m_chips.at(inputChip(chip))};
+  return followReadoutUpstream(link, nextChip, remainingDepth-1);
+}
+
+bool SCT_ReadoutData::isLinkStandard(int link) const {
+  // Is the readout for a particular link standard 
+  // (i.e link active and 0-5 through link 0 or 6-11 through link 1)
+  
+  // First, the link must be active
+  if (not m_linkActive[link]) return false;
+
+  const std::vector<int>& chipsOnThisLink{(link==0) ? m_chipsOnLink0 : m_chipsOnLink1};
+
+  // Then it must have six chips being readout ...
+  if (chipsOnThisLink.size()!=6) return false;
+
+  // ... in the correct order
+  int ichip{link*6};
+  for (int linkItr: chipsOnThisLink) {
+    if (linkItr!=ichip) return false;
+    ++ichip;
+  }
+
+  return true;
+}
+
+void SCT_ReadoutData::printStatus(const Identifier& moduleId) const {
+  // Print status for module (a la online) and whether it is standard or not
+  if (m_msg==nullptr) return;
+  if (not msgLvl(MSG::DEBUG)) return;
+
+  bool standard{isLinkStandard(0) and isLinkStandard(1)};
+
+  msg(MSG::DEBUG) << "Readout status " <<  moduleId << ": "
+                  << ((m_type == SCT_Parameters::ENDCAP) ? "ENDCAP" : "")
+                  << ((m_type == SCT_Parameters::BARREL) ? "BARREL" : "")
+                  << ((m_type == SCT_Parameters::MODIFIED_0) ? "MOD_0" : "")
+                  << ((m_type == SCT_Parameters::MODIFIED_1) ? "MOD_1" : "");
+  msg(MSG::DEBUG) << " Link0 = " << std::boolalpha << m_linkActive[0] << " (";
+  
+  if (m_chipsOnLink0.empty()) {
+    msg(MSG::DEBUG) << "X";
+  } else {
+    for (unsigned int ilink0{0}; ilink0 < m_chipsOnLink0.size(); ++ilink0)  {
+      msg(MSG::DEBUG) << m_chipsOnLink0.at(ilink0) << " ";
+    }
+  }
+  
+  msg(MSG::DEBUG) << ") Link1 = " << std::boolalpha << m_linkActive[1] << " (";
+  
+  if (m_chipsOnLink1.empty()) {
+    msg(MSG::DEBUG) << "X";
+  } else {
+    for (unsigned int ilink1{0}; ilink1 < m_chipsOnLink1.size(); ++ilink1) {
+      msg(MSG::DEBUG) << m_chipsOnLink1.at(ilink1) << " ";
+    }
+  }
+
+  msg(MSG::DEBUG) << ") " << (standard ? "Standard" : "Non-standard") << endmsg;
+}
+
+void SCT_ReadoutData::setChips(std::vector<SCT_Chip*>& chips) {
+  // Set the chips and sort in order of ID
+  m_chips = chips;
+  std::sort(m_chips.begin(), m_chips.end(), [](SCT_Chip* a, SCT_Chip* b) { return a->id() < b->id(); });
+}
+
+void SCT_ReadoutData::setLinkStatus(bool link0ok, bool link1ok) {
+  // Set link status
+  m_linkActive[0] = link0ok;
+  m_linkActive[1] = link1ok;
+}
+
+void SCT_ReadoutData::clearChipReadout() {
+  // Set all chips out of readout and clear both links to start
+  m_chipInReadout.reset();
+  m_chipsOnLink0.clear();
+  m_chipsOnLink1.clear();
+}
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ISCT_ReadoutTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ISCT_ReadoutTool.h
index c6fa8e416656d60fbd51ec3fac0ac5d644ad8421..e4cf0527d6d6d1771938155c8b1def5be92a81bd 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ISCT_ReadoutTool.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ISCT_ReadoutTool.h
@@ -38,9 +38,9 @@ class ISCT_ReadoutTool : virtual public IAlgTool {
   DeclareInterfaceID(ISCT_ReadoutTool, 1, 0);
   
   /** Determine which chips are in the readout for a module of a particular type by Identifier*/
-  virtual StatusCode determineReadout(const Identifier& moduleId, std::vector<SCT_Chip*>& chips, bool link0ok, bool link1ok)=0;
+  virtual StatusCode determineReadout(const Identifier& moduleId, std::vector<SCT_Chip*>& chips, bool link0ok, bool link1ok) const =0;
   /** Determine which chips are in the readout for a module of a particular type by truncated serial number*/
-  virtual StatusCode determineReadout(const int truncatedSerialNumber, std::vector<SCT_Chip*>& chips, bool link0ok, bool link1ok)=0;
+  virtual StatusCode determineReadout(const int truncatedSerialNumber, std::vector<SCT_Chip*>& chips, bool link0ok, bool link1ok) const =0;
 };
 
 #endif // SCT_ConditionTools_ISCT_ReadoutTool_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ByteStreamErrorsToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ByteStreamErrorsToolSetup.py
index f90f419a5373dd6f10993ab75104d943a96e1f22..f9130f2d2d2da9c8b492221a3e0ddf5148584ab4 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ByteStreamErrorsToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ByteStreamErrorsToolSetup.py
@@ -9,15 +9,13 @@ class SCT_ByteStreamErrorsToolSetup:
         self.tool = None
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ByteStreamErrorsTool
             if self.configTool is None:
-                ToolSvc += SCT_ByteStreamErrorsTool(name = self.toolName)
+                self.tool = SCT_ByteStreamErrorsTool(name = self.toolName)
             else:
-                ToolSvc += SCT_ByteStreamErrorsTool(name = self.toolName,
-                                                    ConfigTool = self.configTool)
-        self.tool = getattr(ToolSvc, self.toolName)
+                self.tool = SCT_ByteStreamErrorsTool(name = self.toolName,
+                                                     ConfigTool = self.configTool)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConditionsParameterToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConditionsParameterToolSetup.py
index cc946abc0dfee8a692f209e133f8c4cb2b0014fe..325ceec0d56148161568c52393503f84ce72f45f 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConditionsParameterToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConditionsParameterToolSetup.py
@@ -50,11 +50,9 @@ class SCT_ConditionsParameterToolSetup:
         self.alg = getattr(condSeq, self.algName)
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ConditionsParameterTool
-            ToolSvc += SCT_ConditionsParameterTool(name = self.toolName)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_ConditionsParameterTool(name = self.toolName)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConditionsSummaryToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConditionsSummaryToolSetup.py
index 0c85043e84d03511677c91c08dd5ca8e75e29c5b..f50ae4e070dc16efa005b7b1e771fe32f9fea66b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConditionsSummaryToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConditionsSummaryToolSetup.py
@@ -1,18 +1,26 @@
 # Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 
+def singleton(cls):
+    # Create only one instance for one toolName to use the same configuration
+    instances = {} # Dictionary: key: toolName, value instance
+    def wrapper(toolName="InDetSCT_ConditionsSummaryTool"):
+        if (cls, toolName) not in instances:
+            instances[(cls, toolName)] = cls(toolName)
+        return instances[(cls, toolName)]
+    return wrapper
+
+@singleton
 class SCT_ConditionsSummaryToolSetup:
-    "Class to simplify setup of SCT_ConditionsSummaryTool and required conditions algorithms"
+    # Class to simplify setup of SCT_ConditionsSummaryTool
 
-    def __init__(self):
-        self.toolName = "InDetSCT_ConditionsSummaryTool"
+    def __init__(self, toolName):
+        self.toolName = toolName
         self.tool = None
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ConditionsSummaryTool
-            ToolSvc += SCT_ConditionsSummaryTool(name = self.toolName)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_ConditionsSummaryTool(name = self.toolName)
 
     def getTool(self):
         return self.tool
@@ -20,8 +28,5 @@ class SCT_ConditionsSummaryToolSetup:
     def getToolName(self):
         return self.toolName
 
-    def setToolName(self, toolName):
-        self.toolName = toolName
-
     def setup(self):
         self.setTool()
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConfigurationConditionsToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConfigurationConditionsToolSetup.py
index 5c076d534644638dcec130a4b0475b8e26569582..b67aab56955dd0b77b84da9bfe2704a6651280c0 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConfigurationConditionsToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConfigurationConditionsToolSetup.py
@@ -94,11 +94,9 @@ class SCT_ConfigurationConditionsToolSetup:
         self.alg = getattr(condSeq, self.algName)
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ConfigurationConditionsTool
-            ToolSvc += SCT_ConfigurationConditionsTool(name = self.toolName)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_ConfigurationConditionsTool(name = self.toolName)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_DCSConditionsToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_DCSConditionsToolSetup.py
index f5db0a6cd1abb5bf35d8c95df679976195660d7f..5c82a744df50fc0067c383f11a64a7c95acd0753 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_DCSConditionsToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_DCSConditionsToolSetup.py
@@ -126,13 +126,11 @@ class SCT_DCSConditionsToolSetup:
             self.tempAlg = getattr(condSeq, self.tempAlgName)
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_DCSConditionsTool
-            ToolSvc += SCT_DCSConditionsTool(name = self.toolName,
-                                               ReadAllDBFolders = self.readAllDBFolders,
-                                               ReturnHVTemp = self.returnHVTemp)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_DCSConditionsTool(name = self.toolName,
+                                              ReadAllDBFolders = self.readAllDBFolders,
+                                              ReturnHVTemp = self.returnHVTemp)
 
     def setup(self):
         self.setFolders()
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_FlaggedConditionToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_FlaggedConditionToolSetup.py
index e17fda14c6be669639794a4535349c9cf2929f17..ca739cac6f40e261cc5c256c7f3a8f3b50c2dc70 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_FlaggedConditionToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_FlaggedConditionToolSetup.py
@@ -8,11 +8,9 @@ class SCT_FlaggedConditionToolSetup:
         self.tool = None
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_FlaggedConditionTool
-            ToolSvc += SCT_FlaggedConditionTool(name = self.toolName)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_FlaggedConditionTool(name = self.toolName)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_LinkMaskingToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_LinkMaskingToolSetup.py
index 0a59d3a173b4579cb6a35a0b816bb5e88ff13f41..5cb2bbb573780e55566423afb637880cb8f05a0e 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_LinkMaskingToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_LinkMaskingToolSetup.py
@@ -50,11 +50,9 @@ class SCT_LinkMaskingToolSetup:
         self.alg = getattr(condSeq, self.algName)
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_LinkMaskingTool
-            ToolSvc += SCT_LinkMaskingTool(name = self.toolName)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_LinkMaskingTool(name = self.toolName)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_MajorityConditionsToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_MajorityConditionsToolSetup.py
index ccecade4ea0bdb983faf04d6a089f9133a677164..58d8a3634001db16f6aae4ebbf6e70331cea66f2 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_MajorityConditionsToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_MajorityConditionsToolSetup.py
@@ -50,11 +50,9 @@ class SCT_MajorityConditionsToolSetup:
         self.alg = getattr(condSeq, self.algName)
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_MajorityConditionsTool
-            ToolSvc += SCT_MajorityConditionsTool(name = self.toolName)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_MajorityConditionsTool(name = self.toolName)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ModuleVetoToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ModuleVetoToolSetup.py
index aa9b25c82d16125ff2cc2999e802a405ce83038b..1b7082ee08e164c9c174c2bf9ed85b4a6ac7efb1 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ModuleVetoToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ModuleVetoToolSetup.py
@@ -61,11 +61,9 @@ class SCT_ModuleVetoToolSetup:
         self.alg = getattr(condSeq, self.algName)
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ModuleVetoTool
-            ToolSvc += SCT_ModuleVetoTool(name = self.toolName)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_ModuleVetoTool(name = self.toolName)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_MonitorConditionsToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_MonitorConditionsToolSetup.py
index 7e5ed1a218be92430e8f5c12e1e094e5f0c567ea..bf11982ee3313f78119fffbbdcb6369974c00e41 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_MonitorConditionsToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_MonitorConditionsToolSetup.py
@@ -51,15 +51,13 @@ class SCT_MonitorConditionsToolSetup:
         self.alg = getattr(condSeq, self.algName)
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_MonitorConditionsTool
             if self.outputLevel is None:
-                ToolSvc += SCT_MonitorConditionsTool(name = self.toolName)
+                self.tool = SCT_MonitorConditionsTool(name = self.toolName)
             else:
-                ToolSvc += SCT_MonitorConditionsTool(name = self.toolName,
-                                                     OutputLevel = self.outputLevel)
-        self.tool = getattr(ToolSvc, self.toolName)
+                self.tool = SCT_MonitorConditionsTool(name = self.toolName,
+                                                      OutputLevel = self.outputLevel)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_RODVetoToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_RODVetoToolSetup.py
index 1967c4889895b71b40d909aa3ef0b7903e5c6bd0..2f9306eb82e8dcc602a98464ef2484bf83c11f5c 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_RODVetoToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_RODVetoToolSetup.py
@@ -23,11 +23,9 @@ class SCT_RODVetoToolSetup:
         return self.alg
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_RODVetoTool
-            ToolSvc += SCT_RODVetoTool(name = self.toolName)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_RODVetoTool(name = self.toolName)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_RadDamageSummaryToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_RadDamageSummaryToolSetup.py
index e60380ef1f9a4388fcbaefcaf96e38a7ea1f17f7..ad5bf54c9d8c5adb6574594c705c82c45a8bd37b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_RadDamageSummaryToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_RadDamageSummaryToolSetup.py
@@ -8,11 +8,9 @@ class SCT_RadDamageSummaryToolSetup:
         self.tool = None
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_RadDamageSummaryTool
-            ToolSvc += SCT_RadDamageSummaryTool(name = self.toolName)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_RadDamageSummaryTool(name = self.toolName)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ReadCalibChipDataToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ReadCalibChipDataToolSetup.py
index 7aacb61fa188dc0362d0811195c82ecb213570eb..fe95b0e8ba35579f74aa2a7dfa9715d1d1159f84 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ReadCalibChipDataToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ReadCalibChipDataToolSetup.py
@@ -73,11 +73,9 @@ class SCT_ReadCalibChipDataToolSetup:
         self.alg = getattr(condSeq, self.gainAlgName)
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ReadCalibChipDataTool
-            ToolSvc += SCT_ReadCalibChipDataTool(name = self.toolName)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_ReadCalibChipDataTool(name = self.toolName)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ReadCalibDataToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ReadCalibDataToolSetup.py
index 4449f3fc0597ceb320a61961404172ce709f052c..ac0e3d7c37610e44032cedc80d7735c555a838b3 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ReadCalibDataToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ReadCalibDataToolSetup.py
@@ -41,11 +41,9 @@ class SCT_ReadCalibDataToolSetup:
         self.alg = getattr(condSeq, self.algName)
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ReadCalibDataTool
-            ToolSvc += SCT_ReadCalibDataTool(name = self.toolName)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_ReadCalibDataTool(name = self.toolName)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_SensorsToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_SensorsToolSetup.py
index f162246c97caeee8cbdfa5d330d885de2846934c..d67422a7ca49198caf2dfbc870c9c608044f3e9b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_SensorsToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_SensorsToolSetup.py
@@ -60,11 +60,9 @@ class SCT_SensorsToolSetup:
         self.alg = getattr(condSeq, self.algName)
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_SensorsTool
-            ToolSvc += SCT_SensorsTool(name = self.toolName)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_SensorsTool(name = self.toolName)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_SiliconConditionsToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_SiliconConditionsToolSetup.py
index 5567e9b3344e5227850f68687667c2c0bad3594c..3a44384c0c8c4259b0e1745ffe8ac7efd44d28b1 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_SiliconConditionsToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_SiliconConditionsToolSetup.py
@@ -70,13 +70,11 @@ class SCT_SiliconConditionsToolSetup:
         self.tempAlg = getattr(condSeq, self.tempAlgName)
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_SiliconConditionsTool
-            ToolSvc += SCT_SiliconConditionsTool(name = self.toolName,
-                                                 UseDB = self.useDB,
-                                                 ForceUseGeoModel = self.forceUseGeoModel)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_SiliconConditionsTool(name = self.toolName,
+                                                  UseDB = self.useDB,
+                                                  ForceUseGeoModel = self.forceUseGeoModel)
 
     def setUseDB(self, useDB):
         self.useDB = useDB
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_StripVetoToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_StripVetoToolSetup.py
index 0948ddec78dde64ff8b6be2132101a1e7d7ee845..3eed264358f7b8f6e791c1eca643d6878a1ee1b5 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_StripVetoToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_StripVetoToolSetup.py
@@ -8,11 +8,9 @@ class SCT_StripVetoToolSetup:
         self.tool = None
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_StripVetoTool
-            ToolSvc += SCT_StripVetoTool(name = self.toolName)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_StripVetoTool(name = self.toolName)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_TdaqEnabledToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_TdaqEnabledToolSetup.py
index 6d4e9e1c71f524254ae202a0104fdb6a3351f1cb..846570e28c8319ac36a0adbec9238ace3e0d2bef 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_TdaqEnabledToolSetup.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_TdaqEnabledToolSetup.py
@@ -65,12 +65,10 @@ class SCT_TdaqEnabledToolSetup:
         self.alg = getattr(condSeq, self.algName)
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_TdaqEnabledTool
-            ToolSvc += SCT_TdaqEnabledTool(name = self.toolName,
-                                           EventInfoKey = self.eventInfoKey)
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SCT_TdaqEnabledTool(name = self.toolName,
+                                            EventInfoKey = self.eventInfoKey)
 
     def getTool(self):
         return self.tool
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibChipDataTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibChipDataTool.cxx
index b5accffaece84477bf54f4aba30234cdc9abb9e1..11ac434fd022bbc4b96dbd16539b4192a23e4ef5 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibChipDataTool.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibChipDataTool.cxx
@@ -36,10 +36,7 @@ SCT_ReadCalibChipDataTool::SCT_ReadCalibChipDataTool (const std::string& type, c
 StatusCode 
 SCT_ReadCalibChipDataTool::initialize() {
   // Get SCT helper
-  if (detStore()->retrieve(m_id_sct, "SCT_ID").isFailure()) {
-    ATH_MSG_FATAL("Failed to get SCT helper");
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK(detStore()->retrieve(m_id_sct, "SCT_ID"));
 
   // Read Cond Handle Key
   ATH_CHECK(m_condKeyGain.initialize());
@@ -79,7 +76,7 @@ SCT_ReadCalibChipDataTool::isGood(const IdentifierHash& elementHashId) const {
   const SCT_ModuleNoiseCalibData& noiseOccData{(*condDataNoise)[moduleIdx]};
 
   // Retrieve the data
-  int i{noiseOccIndex("NoiseByChip")};
+  const int i{noiseOccIndex("NoiseByChip")};
   if (i<0) {
     ATH_MSG_ERROR("This NoiseOccupancy noise data does not exist");
     return true;
@@ -89,7 +86,7 @@ SCT_ReadCalibChipDataTool::isGood(const IdentifierHash& elementHashId) const {
   // Calcuate module status
   // For now just simple check NO mean noise level
   // Chip could be 0 if bypassed, need to check
-  int side{static_cast<int>(elementHashId%2)};
+  const int side{static_cast<int>(elementHashId%2)};
   int chip{side*CHIPS_PER_SIDE};
   const int endChip{CHIPS_PER_SIDE+chip};
   int nChips{0};
@@ -101,7 +98,7 @@ SCT_ReadCalibChipDataTool::isGood(const IdentifierHash& elementHashId) const {
       ++nChips;
     }
   }
-  float meanNoiseValue{sum/nChips};
+  const float meanNoiseValue{sum/nChips};
   ATH_MSG_DEBUG("Module mean noise: " << meanNoiseValue);
   return (meanNoiseValue < m_noiseLevel);
 } //SCT_ReadCalibChipDataTool::summary()
@@ -143,14 +140,14 @@ SCT_ReadCalibChipDataTool::getNPtGainData(const Identifier& moduleId, const int
   try {
     const SCT_ModuleGainCalibData& wantedNPGData{condDataGain->at(idx)};
     //find the correct index for the required data
-    int dataIdx{nPtGainIndex(datatype)};
+    const int dataIdx{nPtGainIndex(datatype)};
     if (dataIdx<0) {
       ATH_MSG_ERROR("This N-point gain data: " << datatype << " does not exist");
       return waferData;
     }
     const SCT_ModuleCalibParameter& moduleGains{wantedNPGData[dataIdx]};
-    int startOffset{side*CHIPS_PER_SIDE};
-    int endOffset{CHIPS_PER_SIDE+startOffset};
+    const int startOffset{side*CHIPS_PER_SIDE};
+    const int endOffset{CHIPS_PER_SIDE+startOffset};
     SCT_ModuleCalibParameter::const_iterator it{moduleGains.begin() + startOffset};
     SCT_ModuleCalibParameter::const_iterator end{moduleGains.begin() + endOffset};
     // Returns the data for the wanted wafer
@@ -160,7 +157,7 @@ SCT_ReadCalibChipDataTool::getNPtGainData(const Identifier& moduleId, const int
     waferData.assign(it, end);
     return waferData;
   } catch (const std::out_of_range& e) {
-    return waferData; 
+    return waferData;
   }
 } //SCT_ReadCalibChipDataTool::getNPtGainData()
 
@@ -188,22 +185,22 @@ SCT_ReadCalibChipDataTool::getNoiseOccupancyData(const Identifier& moduleId, con
     const SCT_ModuleNoiseCalibData& wantedNoiseData{condDataNoise->at(idx)};
 
     //find the correct index for the required data
-    int dataIdx{noiseOccIndex(datatype)};
+    const int dataIdx{noiseOccIndex(datatype)};
     if (dataIdx<0) {
       ATH_MSG_ERROR("This Noise Occupancy data: " << datatype << " does not exist");
       return waferData;
     }
     const SCT_ModuleCalibParameter& moduleNoise{wantedNoiseData[dataIdx]};
-    int startOffset{side*CHIPS_PER_SIDE};
-    int endOffset{CHIPS_PER_SIDE+startOffset};
+    const int startOffset{side*CHIPS_PER_SIDE};
+    const int endOffset{CHIPS_PER_SIDE+startOffset};
     SCT_ModuleCalibParameter::const_iterator it{moduleNoise.begin() + startOffset};
     SCT_ModuleCalibParameter::const_iterator end{moduleNoise.begin() + endOffset};
     // Returns the data for the wanted wafer
     if (*it != *it) return waferData;
-    waferData.assign(it, end); 
+    waferData.assign(it, end);
     return waferData;
   } catch (const std::out_of_range& e) {
-    return waferData; 
+    return waferData;
   }
 } // SCT_ReadCalibChipDataTool::getNoiseOccupancyData()
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibChipDataTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibChipDataTool.h
index 0ff7972b927354104b99e80f2b4ce6d50048a410..142897aed12280d6226d164e6331f8ad7509415c 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibChipDataTool.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibChipDataTool.h
@@ -11,20 +11,20 @@
 #define SCT_READ_CALIB_CHIP_DATA_TOOL
 
 // Include interface class
+#include "AthenaBaseComps/AthAlgTool.h"
 #include "SCT_ConditionsTools/ISCT_ReadCalibChipDataTool.h"
 
-// Include STL
-#include <mutex>
+// Include Athena stuff
+#include "SCT_ConditionsData/SCT_ConditionsParameters.h"
+#include "SCT_ConditionsData/SCT_GainCalibData.h"
+#include "SCT_ConditionsData/SCT_NoiseCalibData.h"
 
 // Include Gaudi classes
 #include "GaudiKernel/EventContext.h"
 #include "GaudiKernel/ContextSpecificPtr.h"
 
-// Include Athena stuff 
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "SCT_ConditionsData/SCT_ConditionsParameters.h"
-#include "SCT_ConditionsData/SCT_GainCalibData.h"
-#include "SCT_ConditionsData/SCT_NoiseCalibData.h"
+// Include STL
+#include <mutex>
 
 // Forward declarations
 class SCT_ID;
@@ -40,11 +40,11 @@ class SCT_ReadCalibChipDataTool: public extends<AthAlgTool, ISCT_ReadCalibChipDa
   // Structors
   SCT_ReadCalibChipDataTool(const std::string& type, const std::string& name, const IInterface* parent); //!< Constructor
   virtual ~SCT_ReadCalibChipDataTool() = default; //!< Destructor
-  
+
   // Standard Gaudi functions
   virtual StatusCode initialize() override; //!< Gaudi initialiser
   virtual StatusCode finalize() override; //!< Gaudi finaliser
-  
+
   /// @name Methods to be implemented from virtual baseclass methods, when introduced
   ///Return whether this service can report on the hierarchy level (e.g. module, chip...)
   virtual bool canReportAbout(InDetConditions::Hierarchy h) const override;
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.cxx
index 123deedde2a9a8722f07dd6c5599e2f1544aa418..aece404a9757c7117f0f206bd360f01dc478525a 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.cxx
@@ -118,7 +118,7 @@ bool SCT_ReadCalibDataTool::isGood(const Identifier& elementId, InDetConditions:
 
 //----------------------------------------------------------------------
 // Returns a defect summary of a defect strip, scan, type and value
-SCT_ReadCalibDataTool::CalibDefectType SCT_ReadCalibDataTool::defectType(const Identifier& stripId, InDetConditions::Hierarchy h) {
+SCT_ReadCalibDataTool::CalibDefectType SCT_ReadCalibDataTool::defectType(const Identifier& stripId, InDetConditions::Hierarchy h) const {
   // Print where you are
   ATH_MSG_DEBUG("in defectType()");
 
@@ -230,7 +230,7 @@ SCT_ReadCalibDataTool::CalibDefectType SCT_ReadCalibDataTool::defectType(const I
 
 //----------------------------------------------------------------------
 // Returns a summary of all defects on a module for a given scan
-SCT_CalibDefectData::CalibModuleDefects SCT_ReadCalibDataTool::defectsSummary(const Identifier& moduleId, const std::string& scan) {
+SCT_CalibDefectData::CalibModuleDefects SCT_ReadCalibDataTool::defectsSummary(const Identifier& moduleId, const std::string& scan) const {
   // Create pointer to the CalibDataDefect object 
   SCT_CalibDefectData::CalibModuleDefects wantedDefects;
 
@@ -261,7 +261,7 @@ SCT_CalibDefectData::CalibModuleDefects SCT_ReadCalibDataTool::defectsSummary(co
 //---------------------------------------------------------------------- 
 //----------------------------------------------------------------------
 // Returns a list of all strips with a certain defects
-std::list<Identifier> SCT_ReadCalibDataTool::defectList(const std::string& defect) {
+std::list<Identifier> SCT_ReadCalibDataTool::defectList(const std::string& defect) const {
   std::list<Identifier> defectList;
 
   // Retrieve defect data
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.h
index 4545e2e10b84546a93799998bf54076c1cf0d57e..fad58d5ab698cc3c62f8beeb947361c71adabea6 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadCalibDataTool.h
@@ -62,9 +62,9 @@ class SCT_ReadCalibDataTool: public extends<AthAlgTool, ISCT_ReadCalibDataTool>
   //@}
   
   // Methods to return calibration defect type and summary
-  virtual SCT_ReadCalibDataTool::CalibDefectType defectType(const Identifier& stripId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT); //!<Return summary of defect type and values for a strip
-  virtual SCT_CalibDefectData::CalibModuleDefects defectsSummary(const Identifier& moduleId, const std::string& scan); //!<Returns module summary of defect  
-  virtual std::list<Identifier> defectList(const std::string& defect); //!<Returns module summary of defect  
+  virtual SCT_ReadCalibDataTool::CalibDefectType defectType(const Identifier& stripId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const; //!<Return summary of defect type and values for a strip
+  virtual SCT_CalibDefectData::CalibModuleDefects defectsSummary(const Identifier& moduleId, const std::string& scan) const; //!<Returns module summary of defect
+  virtual std::list<Identifier> defectList(const std::string& defect) const; //!<Returns module summary of defect
 
  private:
   // Mutex to protect the contents.
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadoutTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadoutTool.cxx
index 388d802273a07c88f5d07c15cb3156d2e64d4496..1922ede5db4d54cf486057cdb95ba7c192e781c7 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadoutTool.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadoutTool.cxx
@@ -8,43 +8,13 @@
 
 #include <algorithm>
 
-// Helper functions to indicate whether a barrel module is modified.
-// The following modules have extra routing on one side or the other
-// 20220170200653 -> 169922560 has link0 modified
-// 20220170200113 -> 170801152 has link0 modified
-// 20220170200941 -> 170983424 has link1 modified
-// 20220330200701 -> 172556288 has link0 modified
-// 20220330200637 -> 172621824 has link0 modified
-// 20220170200183 -> 173268992 has link1 modified
-// 20220330200606 -> 174301184 has link1 modified
-// 20220330200209 -> 174342144 has link0 modified
-// 20220330200505 -> 174610432 has link0 modified
-// 20220330200117 -> 174962688 has link0 modified
-// 20220330200693 -> 175015936 has link1 modified
-
-static bool modified0(Identifier moduleId) {
-  return ((moduleId==169922560) or (moduleId==170801152) or (moduleId==172556288) or (moduleId==172621824) or 
-          (moduleId==174342144) or (moduleId==174610432) or (moduleId==174962688));
-}
-
-static bool modified1(Identifier moduleId) {
-  return ((moduleId==170983424) or (moduleId==173268992) or (moduleId==174301184) or (moduleId==175015936));
-}
-
-using namespace SCT_Parameters;
+#include "SCT_ConditionsData/SCT_ReadoutData.h"
 
 // Constructor
 SCT_ReadoutTool::SCT_ReadoutTool(const std::string& type, const std::string& name, const IInterface* parent):
   base_class(type, name, parent),
   m_sctId{nullptr},
-  m_chips{},
-  m_chipMap{},
-  m_linkActive{},
-  m_chipInReadout{},
-  m_type{SCT_Parameters::BARREL},
-  m_chipsOnLink0{},
-  m_chipsOnLink1{},
-  m_mutex{}
+  m_msgSvc{nullptr}
 {
 }
 
@@ -55,6 +25,9 @@ StatusCode SCT_ReadoutTool::initialize() {
   ATH_CHECK(m_cablingTool.retrieve());
   // Retrieve SCT helper
   ATH_CHECK(detStore()->retrieve(m_sctId, "SCT_ID"));
+  // Get MessageSvc for SCT_ReadoutData
+  ISvcLocator* svcLocator{Gaudi::svcLocator()};
+  ATH_CHECK(svcLocator->service("MessageSvc", m_msgSvc));
   return StatusCode::SUCCESS;
 }
 
@@ -64,83 +37,7 @@ StatusCode SCT_ReadoutTool::finalize() {
   return StatusCode::SUCCESS;
 }
 
-void SCT_ReadoutTool::setModuleType(Identifier moduleId) {
-  // Set module type as per the ModuleType enum
-  int bec{m_sctId->barrel_ec(moduleId)};
-  if (std::abs(bec) == 2) {
-    m_type = SCT_Parameters::ENDCAP;
-  } else if (modified0(moduleId)) {
-    m_type = SCT_Parameters::MODIFIED_0;
-  } else if (modified1(moduleId)) {
-    m_type = SCT_Parameters::MODIFIED_1;
-  } else {
-    m_type = SCT_Parameters::BARREL;
-  }
-}
-
-void SCT_ReadoutTool::setChipMap(ModuleType type) {
-  // Set Chip mapping depending on module type
- 
-  // Clear between calls and reserve space for the 12 chips
-  m_chipMap.clear();
-  m_chipMap.reserve(12);
-
-  if (type == BARREL) {
-    m_chipMap.emplace_back(Chip1,  Chip2,  None ,  None);
-    m_chipMap.emplace_back(Chip2,  Chip3,  Chip0,  Chip11);
-    m_chipMap.emplace_back(Chip3,  Chip4,  Chip1,  Chip0);
-    m_chipMap.emplace_back(Chip4,  Chip5,  Chip2,  Chip1);
-    m_chipMap.emplace_back(Chip5,  None ,  Chip3,  Chip2);
-    m_chipMap.emplace_back(None,   Chip7,  Chip4,  Chip3);
-    m_chipMap.emplace_back(Chip7,  Chip8,  None,   None);
-    m_chipMap.emplace_back(Chip8,  Chip9,  Chip6,  Chip5);
-    m_chipMap.emplace_back(Chip9,  Chip10, Chip7,  Chip6);
-    m_chipMap.emplace_back(Chip10, Chip11, Chip8,  Chip7);
-    m_chipMap.emplace_back(Chip11, None,   Chip9,  Chip8);
-    m_chipMap.emplace_back(None,   Chip1,  Chip10, Chip9);
-  } else if (type == MODIFIED_0) {
-    m_chipMap.emplace_back(Chip1,  Chip2,  Chip5,  None);
-    m_chipMap.emplace_back(Chip2,  Chip3,  Chip0,  Chip11);
-    m_chipMap.emplace_back(Chip3,  Chip4,  Chip1,  Chip0);
-    m_chipMap.emplace_back(Chip4,  Chip5,  Chip2,  Chip1);
-    m_chipMap.emplace_back(Chip5,  None,   Chip3,  Chip2);
-    m_chipMap.emplace_back(Chip0,  Chip7,  Chip4,  Chip3);
-    m_chipMap.emplace_back(Chip7,  Chip8,  None,   None);
-    m_chipMap.emplace_back(Chip8,  Chip9,  Chip6,  Chip5);
-    m_chipMap.emplace_back(Chip9,  Chip10, Chip7,  Chip6);
-    m_chipMap.emplace_back(Chip10, Chip11, Chip8,  Chip7);
-    m_chipMap.emplace_back(Chip11, None,   Chip9,  Chip8);
-    m_chipMap.emplace_back(None,   Chip1,  Chip10, Chip9);
-  } else if (type == MODIFIED_1) {
-    m_chipMap.emplace_back(Chip1,  Chip2,  None,   None);
-    m_chipMap.emplace_back(Chip2,  Chip3,  Chip0,  Chip11);
-    m_chipMap.emplace_back(Chip3,  Chip4,  Chip1,  Chip0);
-    m_chipMap.emplace_back(Chip4,  Chip5,  Chip2,  Chip1);
-    m_chipMap.emplace_back(Chip5,  None ,  Chip3,  Chip2);
-    m_chipMap.emplace_back(None,   Chip7,  Chip4,  Chip3);
-    m_chipMap.emplace_back(Chip7,  Chip8,  Chip11, None);
-    m_chipMap.emplace_back(Chip8,  Chip9,  Chip6,  Chip5);
-    m_chipMap.emplace_back(Chip9,  Chip10, Chip7,  Chip6);
-    m_chipMap.emplace_back(Chip10, Chip11, Chip8,  Chip7);
-    m_chipMap.emplace_back(Chip11, None,   Chip9,  Chip8);
-    m_chipMap.emplace_back(Chip6,  Chip1,  Chip10, Chip9);
-  } else if (type == ENDCAP) {
-    m_chipMap.emplace_back(Chip1,  Chip2,  Chip11, None);
-    m_chipMap.emplace_back(Chip2,  Chip3,  Chip0,  Chip11);
-    m_chipMap.emplace_back(Chip3,  Chip4,  Chip1,  Chip0);
-    m_chipMap.emplace_back(Chip4,  Chip5,  Chip2,  Chip1);
-    m_chipMap.emplace_back(Chip5,  None,   Chip3,  Chip2);
-    m_chipMap.emplace_back(Chip6,  Chip7,  Chip4,  Chip3);
-    m_chipMap.emplace_back(Chip7,  Chip8,  Chip5,  None);
-    m_chipMap.emplace_back(Chip8,  Chip9,  Chip6,  Chip5);
-    m_chipMap.emplace_back(Chip9,  Chip10, Chip7,  Chip6);
-    m_chipMap.emplace_back(Chip10, Chip11, Chip8,  Chip7);
-    m_chipMap.emplace_back(Chip11, None,   Chip9,  Chip8);
-    m_chipMap.emplace_back(Chip0,  Chip1,  Chip10, Chip9);
-  }
-}
-
-StatusCode SCT_ReadoutTool::determineReadout(const int truncatedSerialNumber, std::vector<SCT_Chip*>& chips, bool link0ok, bool link1ok) {
+StatusCode SCT_ReadoutTool::determineReadout(const int truncatedSerialNumber, std::vector<SCT_Chip*>& chips, bool link0ok, bool link1ok) const {
   // Determine which chips are in the module readout from truncated serial number
   
   // Get moduleId
@@ -152,11 +49,9 @@ StatusCode SCT_ReadoutTool::determineReadout(const int truncatedSerialNumber, st
   return determineReadout(moduleId, chips, link0ok, link1ok);
 }
 
-StatusCode SCT_ReadoutTool::determineReadout(const Identifier& moduleId, std::vector<SCT_Chip*>& chips, bool link0ok, bool link1ok) {
-  // Lock mutex
-  std::lock_guard<std::mutex> lock{m_mutex};
+StatusCode SCT_ReadoutTool::determineReadout(const Identifier& moduleId, std::vector<SCT_Chip*>& chips, bool link0ok, bool link1ok) const {
   // This determineReadout(const Identifier is the main method of this class.
-  // Other methods are called in the following order in this method:
+  // Methods of SCT_ReadoutData are called in the following order in this method:
   // setModuleType
   // setChipMap
   // checkLink
@@ -183,219 +78,29 @@ StatusCode SCT_ReadoutTool::determineReadout(const Identifier& moduleId, std::ve
     return StatusCode::SUCCESS;
   }
 
+  SCT_ReadoutData data(m_msgSvc);
+
   // Set the chips and sort in order of ID
-  m_chips = chips;
-  std::sort(m_chips.begin(), m_chips.end(), [](SCT_Chip* a, SCT_Chip* b) { return a->id() < b->id(); });
+  data.setChips(chips);
 
   // Set link status
-  m_linkActive[0] = link0ok;
-  m_linkActive[1] = link1ok;
+  data.setLinkStatus(link0ok, link1ok);
 
   // Determine module type (as per ModuleType enum) and set mapping
-  setModuleType(moduleId);
-  setChipMap(m_type);
+  data.setModuleType(moduleId, m_sctId->barrel_ec(moduleId));
+  data.setChipMap();
 
   // Set all chips out of readout and clear both links to start
-  m_chipInReadout.reset();
-  m_chipsOnLink0.clear();
-  m_chipsOnLink1.clear();
+  data.clearChipReadout();
 
   // Check the links
-  checkLink(0);
-  checkLink(1);
+  data.checkLink(0);
+  data.checkLink(1);
 
   // Mask chips not in readout
-  maskChipsNotInReadout();
+  data.maskChipsNotInReadout();
 
-  printStatus(moduleId);
+  data.printStatus(moduleId);
 
   return StatusCode::SUCCESS;
 }
-
-void SCT_ReadoutTool::checkLink(int link) {
-  // Follow the chips for each link to determine which chips are in the readout 
-  // and if readout is sane. 
-
-  // Follow chip from the start chip for each side
-  SCT_Chip& startChip{*m_chips.at(link*6)};
-  bool linkSane{followReadoutUpstream(link, startChip)};
-
-  if (not linkSane) {
-    std::vector<int>& chipsOnThisLink{(link==0) ? m_chipsOnLink0 : m_chipsOnLink1};
-
-    // Remove chips in that link from the readout
-    for (const int linkItr: chipsOnThisLink) setChipOut(*m_chips.at(linkItr));
-
-    // We do not have ERROR/FAILURE if the readout is not sane as it possibly only affects one of the SCT modules
-    ATH_MSG_WARNING("Readout for link " << link << " not sane");
-  }
-}
-
-bool SCT_ReadoutTool::hasConnectedInput(const SCT_Chip& chip) const {
-  // Does the chip have a correctly connected input
-
-  // The chip must not be an end 
-  if (chip.isEnd()) return false;
-  
-  int inChipId{inputChip(chip)};
-
-  // The port the chip is listening on should be mapped to an input (if the chip is not an end)
-  // Otherwise it'll never get to an end giving a timeout
-  if (inChipId == None) {
-    ATH_MSG_WARNING("Chip " << chip.id() << " is not an end but port " << chip.inPort() 
-                    << " is not mapped to anything");
-    return false;
-  }
-  
-  // The mapped chip should be talking on the same port as this chip is listening (if the chip is not an end)
-  // Again, otherwise it'll never get to an end giving a timeout
-  if (m_chips.at(inChipId)->outPort()!=chip.inPort()) {
-    ATH_MSG_WARNING("Chip" << chip.id() << " is not an end and is listening on Port " 
-                    << chip.inPort() << " but nothing is talking to it");
-    return false;
-  }
-  return true;
-}
-
-bool SCT_ReadoutTool::isEndBeingTalkedTo(const SCT_Chip& chip) const {
-  // Is something talking to a chip which is configured as an end
-  // (can possibly happen as chips must be talking to something)
-
-  // Is chip actually an end
-  if (not chip.isEnd()) return false;
-
-  // Is anything trying to talk to the end.
-  for (SCT_Chip* chipItr: m_chips) {
-    if (outputChip(*chipItr) == chip.id()) {
-      ATH_MSG_WARNING("Chip " << chip.id() << " is configured as end but something is trying to talk to it");
-      return true;
-    }
-  }
-  return false;
-}
-
-void SCT_ReadoutTool::maskChipsNotInReadout() {
-  // Mask chip (is set mask to 0 0 0 0) if not in readout
-  // If the readout of a particular link is not sane mask all chips on that link
-  for (SCT_Chip* thisChip: m_chips) {
-    if (not isChipReadOut(*thisChip)) {
-      ATH_MSG_DEBUG("Masking chip " <<  thisChip->id());
-      uint32_t masked{0};
-      thisChip->initializeMaskFromInts(masked, masked, masked, masked);
-    }
-  }
-}
-
-bool SCT_ReadoutTool::followReadoutUpstream(int link, const SCT_Chip& chip, int remainingDepth) {
-  // Follow the readout upstream (to input side).  Will return true if the readout is sane
-  // The "error" cases are only warnings since they possibly only affect one module of the SCT
-  // Have we gone though all 12 chips -> infinite loop
-  if (remainingDepth < 0) {
-    ATH_MSG_WARNING("Infinite loop detected in readout");
-    return false;
-  }
-
-  // Can the chip be a master
-  if (chip.canBeMaster()) {
-
-    if (chip.id()==link*6) {
-      ATH_MSG_DEBUG("Link " << link << " is " << (m_linkActive[link] ? "ENABLED" : "DISABLED"));
-    }
-
-    // Is the link enabled. If not the readout is still sane so return true
-    if (not m_linkActive[link]) return true;
-
-    // Is the chip actually configured as a master
-    if (chip.isMaster()) {
-      ATH_MSG_DEBUG("MasterChip");
-      // Chip will be set in readout below
-    } else if (chip.id() == link*6) {
-      // Link is active but the master position for THAT link does not contain a master 
-      // This can happen if everything is readout via other link, therefore the readout is still sane.
-
-      ATH_MSG_DEBUG("Link " << link << " is enabled but chip " << chip.id() << " is not a master");
-
-      return true;
-    }
-  }
-
-  ATH_MSG_DEBUG("Looking at chip " << chip.id());
-
-  // Is a slave chip mistakenly configured as a master 
-  if (chip.slaveConfiguredAsMaster()) {
-    ATH_MSG_WARNING("Found master chip in slave position " << chip.id());
-    return false;
-  }
-
-  // The chip is in the readout (this doesn't mean the readout necessarily is sane).
-  setChipIn(chip, link);
-
-  // Is the chip configured as an end (can be master and end)
-  if (chip.isEnd()) {
-    ATH_MSG_DEBUG("End Chip");
-
-    // End chip is in readout and readout is sane
-    return true;
-  } 
-
-  // Find the next chip if there is one connected
-  if (not hasConnectedInput(chip)) return false;
-  SCT_Chip& nextChip{*m_chips.at(inputChip(chip))};
-  return followReadoutUpstream(link, nextChip, remainingDepth-1);
-}
-
-bool SCT_ReadoutTool::isLinkStandard(int link) {
-  // Is the readout for a particular link standard 
-  // (i.e link active and 0-5 through link 0 or 6-11 through link 1)
-  
-  // First, the link must be active
-  if (not m_linkActive[link]) return false;
-
-  std::vector<int>& chipsOnThisLink{(link==0) ? m_chipsOnLink0 : m_chipsOnLink1};
-
-  // Then it must have six chips being readout ...
-  if (chipsOnThisLink.size()!=6) return false;
-
-  // ... in the correct order
-  int ichip{link*6};
-  for (int linkItr: chipsOnThisLink) {
-    if (linkItr!=ichip) return false;
-    ++ichip;
-  }
-
-  return true;
-}
-
-void SCT_ReadoutTool::printStatus(const Identifier& moduleId) {
-  // Print status for module (a la online) and whether it is standard or not
-  if (not msgLvl(MSG::DEBUG)) return;
-
-  bool standard{isLinkStandard(0) and isLinkStandard(1)};
-
-  msg(MSG::DEBUG) << "Readout status " <<  moduleId << ": "
-                  << ((m_type == SCT_Parameters::ENDCAP) ? "ENDCAP" : "")
-                  << ((m_type == SCT_Parameters::BARREL) ? "BARREL" : "")
-                  << ((m_type == SCT_Parameters::MODIFIED_0) ? "MOD_0" : "")
-                  << ((m_type == SCT_Parameters::MODIFIED_1) ? "MOD_1" : "");
-  msg(MSG::DEBUG) << " Link0 = " << std::boolalpha << m_linkActive[0] << " (";
-  
-  if (m_chipsOnLink0.empty()) {
-    msg(MSG::DEBUG) << "X";
-  } else {
-    for (unsigned int ilink0{0}; ilink0 < m_chipsOnLink0.size(); ++ilink0)  {
-      msg(MSG::DEBUG) << m_chipsOnLink0.at(ilink0) << " ";
-    }
-  }
-  
-  msg(MSG::DEBUG) << ") Link1 = " << std::boolalpha << m_linkActive[1] << " (";
-  
-  if (m_chipsOnLink1.empty()) {
-    msg(MSG::DEBUG) << "X";
-  } else {
-    for (unsigned int ilink1{0}; ilink1 < m_chipsOnLink1.size(); ++ilink1) {
-      msg(MSG::DEBUG) << m_chipsOnLink1.at(ilink1) << " ";
-    }
-  }
-
-  msg(MSG::DEBUG) << ") " << (standard ? "Standard" : "Non-standard") << endmsg;
-}
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadoutTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadoutTool.h
index b0569589e1109c103394e7f41012edf2b215a058..2b896909288e588150ae207c4a32467f1e882ea6 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadoutTool.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ReadoutTool.h
@@ -11,59 +11,19 @@
 #ifndef SCT_ConditionTools_SCT_ReadoutTool_h
 #define SCT_ConditionTools_SCT_ReadoutTool_h
 
-// C++ STL
-#include <vector> 
-#include <bitset>
-#include <mutex>
-
-// Gaudi
-#include "GaudiKernel/ToolHandle.h"
-
 // Athena
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "SCT_ConditionsTools/ISCT_ReadoutTool.h"
-#include "SCT_Cabling/ISCT_CablingTool.h"
 
+#include "SCT_Cabling/ISCT_CablingTool.h"
 #include "SCT_ConditionsData/SCT_Chip.h"
 
+// Gaudi
+#include "GaudiKernel/ToolHandle.h"
+
 // Forward declarations
 class SCT_ID;
 
-/** Enums for module and chip type*/
-namespace SCT_Parameters {
-  enum ModuleType {BARREL, MODIFIED_0, MODIFIED_1, ENDCAP};
-  enum ChipType   {Chip0=0, Chip1, Chip2, Chip3, Chip4, Chip5, Chip6, Chip7, Chip8, Chip9, Chip10, Chip11, NChips, None=-999};
-}
-
-/**
- * @class SCT_PortMap
- * Helper class to map the input/output ports of a chip
- **/
-
-class SCT_PortMap {
-
- public:
-
-  /** Constuctor from input and output chip types*/
-  SCT_PortMap(SCT_Parameters::ChipType in0, SCT_Parameters::ChipType in1, SCT_Parameters::ChipType out0, SCT_Parameters::ChipType out1) {
-    m_input[0]  = in0;
-    m_input[1]  = in1;
-    m_output[0] = out0;
-    m_output[1] = out1;
-  }
-
-  ~SCT_PortMap() = default;
-  
-  /** Functions to retrieve the chip mapped to the input and output ports*/
-  inline SCT_Parameters::ChipType input(int port) const  { return m_input[port];}
-  inline SCT_Parameters::ChipType output(int port) const { return m_output[port];}
-
- private:
-
-  SCT_Parameters::ChipType m_input[2];   //!<  Port type for the chip's two inputs
-  SCT_Parameters::ChipType m_output[2];  //!<  Port type for the chip's two outputs
-};
-
 /**
  * @class SCT_ReadoutTool
  * Class to represent the SCT module readout
@@ -80,67 +40,17 @@ class SCT_ReadoutTool : public extends<AthAlgTool, ISCT_ReadoutTool> {
   StatusCode finalize() override;
   
   /** Determine which chips are in the readout for a module of a particular type by Identifier*/
-  virtual StatusCode determineReadout(const Identifier& moduleId, std::vector<SCT_Chip*>& chips, bool link0ok, bool link1ok) override;
+  virtual StatusCode determineReadout(const Identifier& moduleId, std::vector<SCT_Chip*>& chips, bool link0ok, bool link1ok) const override;
   /** Determine which chips are in the readout for a module of a particular type by truncated serial number*/
-  virtual StatusCode determineReadout(const int truncatedSerialNumber, std::vector<SCT_Chip*>& chips, bool link0ok, bool link1ok) override;
+  virtual StatusCode determineReadout(const int truncatedSerialNumber, std::vector<SCT_Chip*>& chips, bool link0ok, bool link1ok) const override;
 
  private:
 
   /** Private data*/
   const SCT_ID*                       m_sctId;               //!< ID helper for SCT
+  IMessageSvc* m_msgSvc;
   ToolHandle<ISCT_CablingTool> m_cablingTool{this, "SCT_CablingTool", "SCT_CablingTool", "Tool to retrieve SCT Cabling"};
 
-  std::vector<SCT_Chip*>              m_chips;               //!< Vector of actual SCT Chips for that module
-  std::vector<SCT_PortMap>            m_chipMap;             //!< Vector of port mapping from the chips in an SCT module 
-  bool                                m_linkActive[2];       //!< Links status for link 0 and 1
-  std::bitset<SCT_Parameters::NChips> m_chipInReadout;       //!< Bitset indicating whether a chip is readout or not
-  SCT_Parameters::ModuleType          m_type;                //!< The type of this module (Barrel, Modified Barrel (0 or 1), Endcap)
-  std::vector<int>                    m_chipsOnLink0;        //!< The chips read out on link 0
-  std::vector<int>                    m_chipsOnLink1;        //! <The chips read out on link 1
-
-  // Mutex to protect the contents.
-  std::mutex m_mutex;
-
-  /** Find the ID of the input chip for chip*/ 
-  inline SCT_Parameters::ChipType inputChip(const SCT_Chip& chip) const {
-    return m_chipMap[chip.id()].input(chip.inPort());
-  }
-
-  /** Find the ID of the output chip for chip*/
-  inline SCT_Parameters::ChipType outputChip(const SCT_Chip& chip) const {
-    return m_chipMap[chip.id()].output(chip.outPort());
-  }
-
-  /** Set chip in readout and which link it is on*/
-  inline void setChipIn(const SCT_Chip& chip, int link) {
-    m_chipInReadout.set(chip.id());
-    if (link==0) m_chipsOnLink0.push_back(chip.id());
-    if (link==1) m_chipsOnLink1.push_back(chip.id());
-  }
-
-  /** Set chip out of readout and reset link*/
-  inline void                         setChipOut(const SCT_Chip& chip) {m_chipInReadout.reset(chip.id());}
-  /** Test if chip is in readout or not*/
-  inline bool                         isChipReadOut(const SCT_Chip& chip) const {return m_chipInReadout.test(chip.id());}
-  /** Set the module type */
-  void                                setModuleType(Identifier moduleId);
-  /** Fill the chip mapping*/
-  void                                setChipMap(SCT_Parameters::ModuleType type);
-  /** Chip is an end but is being talked to*/
-  bool                                isEndBeingTalkedTo(const SCT_Chip& chip) const;
-  /** Chip has a correctly connected input*/
-  bool                                hasConnectedInput(const SCT_Chip& chip) const;
-  /** Check which chips are in the readout for a particular link and if the readout is sane*/
-  void                                checkLink(int link);
-  /** Follow the readout to the input side*/
-  bool                                followReadoutUpstream(int link, const SCT_Chip& chip, int remainingDepth = 12);
-  /** is the readout for a particular link sane*/
-  bool                                isLinkStandard(int link);
-  /** Mask the chips that are not in the readout*/
-  void                                maskChipsNotInReadout();
-  /** Print readout status*/
-  void                                printStatus(const Identifier& moduleId);
-
 };
 
 #endif // SCT_ConditionTools_SCT_ReadoutTool_h
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/SiLorentzAngleSvc/SiLorentzAngleCHSvc.h b/InnerDetector/InDetConditions/SiLorentzAngleSvc/SiLorentzAngleSvc/SiLorentzAngleCHSvc.h
deleted file mode 100644
index 84fc0101e1857c74724ab63a3aca89278ce43228..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/SiLorentzAngleSvc/SiLorentzAngleCHSvc.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @file SiLorentzAngleCHSvc.h
- * @author Susumu.Oda@cern.ch
-**/
-#ifndef SiLorentzAngleCHSvc_h
-#define SiLorentzAngleCHSvc_h
-
-#include "InDetCondServices/ISiLorentzAngleSvc.h"
-
-//Gaudi Includes
-#include "GaudiKernel/IInterface.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
-#include "AthenaBaseComps/AthService.h"
-#include "StoreGate/ReadCondHandleKey.h"
-#include "SiPropertiesSvc/SiliconProperties.h"
-#include "SiLorentzAngleSvc/SiLorentzAngleCondData.h"
-// Amg
-#include "GeoPrimitives/GeoPrimitives.h"
-
-#include <string>
-
-//forward declarations
-class IdentifierHash;
-class StoreGateSvc;
-
-namespace InDetDD {
-  class SiDetectorManager;
-}  
-
-/**
- * @class SiLorentzAngleCHSvc
- * Concrete class for service providing Lorentz angle (and the corresponding correction for the shift of the measurement) 
- * for each detector element.
-**/
-
-class SiLorentzAngleCHSvc:  public AthService, virtual public ISiLorentzAngleSvc 
-{
-public:
-
-  SiLorentzAngleCHSvc(const std::string& name, ISvcLocator* sl);
-  virtual ~SiLorentzAngleCHSvc() = default;
-
-  virtual StatusCode initialize() override;          //!< Service init
-  virtual StatusCode finalize() override;            //!< Service finalize
-  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
-
-  static const InterfaceID& interfaceID();
-
-  /** Get the Lorentz shift correction in the local x (phiDist) direction
-      Assumes the center of the detector and is generally cached. */
-  virtual double getLorentzShift(const IdentifierHash& elementHash) override;
-
-  /** As above, but provide the local position. 
-      More accurate but slower. */
-  virtual double getLorentzShift(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) override;
-
-  /**Get the Lorentz shift correction in the local y (etaDist) direction
-     Assumes the center of the detector and is generally cached. */
-  virtual double getLorentzShiftEta(const IdentifierHash& elementHash) override;
-
-  /** As above, but provide the local position. 
-      More accurate but slower. */
-  virtual double getLorentzShiftEta(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) override;
-
-  /** Get tan af the Lorentz angle in the local x (phiDist) direction
-      Assumes the center of the detector and is generally cached. */
-  virtual double getTanLorentzAngle(const IdentifierHash& elementHash) override;
-
-  /** As above, but provide the local position. 
-      More accurate but slower. */
-  virtual double getTanLorentzAngle(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) override;
-
-  /** Get tan af the Lorentz angle in the local y (etaDist) direction
-      Assumes the center of the detector and is generally cached. */
-  virtual double getTanLorentzAngleEta(const IdentifierHash& elementHash) override;
-
-  /** As above, but provide the local position. 
-      More accurate but slower. */
-  virtual double getTanLorentzAngleEta(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) override;
-
-  /** Get bias voltage */
-  virtual double getBiasVoltage(const IdentifierHash& elementHash) override;
-
-  /** Get temperature */
-  virtual double getTemperature(const IdentifierHash& elementHash) override;
-
-  /** Get depletion voltage */
-  virtual double getDepletionVoltage(const IdentifierHash& elementHash) override;
-
-  /** IOV CallBack */
-  virtual StatusCode callBack(IOVSVC_CALLBACK_ARGS) override;
-
-private:
-  enum Variable {LorentzShift, LorentzShiftEta, TanLorentzAngle, TanLorentzAngleEta};
-
-  double getValue(const IdentifierHash& elementHash, const Amg::Vector2D& locPos, Variable variable);
-  double getCorrectionFactor() const;
-  Amg::Vector3D getMagneticField(const IdentifierHash& elementHash, const Amg::Vector2D& locPos);
-  const SiLorentzAngleCondData* getCondData() const;
- 
-  // Properties
-  std::string              m_detectorName;
-  bool                     m_isPixel;  
-  double                   m_nominalField;
-  bool                     m_useMagFieldSvc;
-  bool                     m_ignoreLocalPos;   // Makes methods using localPosition behave as method without passing localPosition.
-  SG::ReadCondHandleKey<SiLorentzAngleCondData> m_condData;
-
-  // needed services
-  ServiceHandle<MagField::IMagFieldSvc>  m_magFieldSvc;
-  ServiceHandle<StoreGateSvc>            m_detStore;
-
-  InDet::SiliconProperties m_siProperties;
-  const InDetDD::SiDetectorManager* m_detManager;
-
-  static const double s_invalidValue;
-};
-
-inline const InterfaceID& SiLorentzAngleCHSvc::interfaceID(){
-  return ISiLorentzAngleSvc::interfaceID();
-}
-
-#endif // SiLorentzAngleCHSvc_h
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/SiLorentzAngleSvc/SiLorentzAngleSvc.h b/InnerDetector/InDetConditions/SiLorentzAngleSvc/SiLorentzAngleSvc/SiLorentzAngleSvc.h
deleted file mode 100644
index 8802928e6e15bb51cb6ee7a2ff9f080cac898c89..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/SiLorentzAngleSvc/SiLorentzAngleSvc.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @file SiLorentzAngleSvc.h
- * @author Grant.Gorfine@cern.ch
-**/
-#ifndef SiLorentzAngleSvc_h
-#define SiLorentzAngleSvc_h
-
-#include "InDetCondServices/ISiLorentzAngleSvc.h"
-
-//Gaudi Includes
-#include "GaudiKernel/IInterface.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
-#include "AthenaBaseComps/AthService.h"
-#include "AthenaKernel/IOVSvcDefs.h"
-#include "StoreGate/DataHandle.h"
-#include "SiPropertiesSvc/ISiPropertiesSvc.h"
-// Amg
-#include "GeoPrimitives/GeoPrimitives.h"
-
-#include <string>
-#include <vector>
-
-
-//forward declarations
-class IdentifierHash;
-class ISiliconConditionsSvc;
-class StoreGateSvc;
-
-namespace InDetDD {
-  class SiDetectorManager;
-}  
-
-class AthenaAttributeList;
-
-/**
- * @class SiLorentzAngleSvc
- * Concrete class for service providing Lorentz angle (and the corresponding correction for the shift of the measurement) 
- * for each detector element.
-**/
-
-class SiLorentzAngleSvc:  public AthService, virtual public ISiLorentzAngleSvc {
-  public:
-
-    SiLorentzAngleSvc(const std::string& name, ISvcLocator* sl);
-    virtual ~SiLorentzAngleSvc();
-
-    virtual StatusCode initialize();          //!< Service init
-    virtual StatusCode finalize();            //!< Service finalize
-    virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
-
-    static const InterfaceID& interfaceID();
-
-    /** Get the Lorentz shift correction in the local x (phiDist) direction
-      Assumes the center of the detector and is generally cached. */
-    virtual double getLorentzShift(const IdentifierHash& elementHash) ;
-
-    /** As above, but provide the local position. 
-      More accurate but slower. */
-    virtual double getLorentzShift(const IdentifierHash& elementHash, const Amg::Vector2D& locPos);
-
-    /**Get the Lorentz shift correction in the local y (etaDist) direction
-      Assumes the center of the detector and is generally cached. */
-    virtual double getLorentzShiftEta(const IdentifierHash& elementHash);
-
-    /** As above, but provide the local position. 
-      More accurate but slower. */
-    virtual double getLorentzShiftEta(const IdentifierHash& elementHash, const Amg::Vector2D& locPos);
-
-    /** Get tan af the Lorentz angle in the local x (phiDist) direction
-      Assumes the center of the detector and is generally cached. */
-    virtual double getTanLorentzAngle(const IdentifierHash& elementHash);
-
-    /** As above, but provide the local position. 
-      More accurate but slower. */
-    virtual double getTanLorentzAngle(const IdentifierHash& elementHash, const Amg::Vector2D& locPos);
-
-    /** Get tan af the Lorentz angle in the local y (etaDist) direction
-      Assumes the center of the detector and is generally cached. */
-    virtual double getTanLorentzAngleEta(const IdentifierHash& elementHash);
-
-    /** As above, but provide the local position. 
-      More accurate but slower. */
-    virtual double getTanLorentzAngleEta(const IdentifierHash& elementHash, const Amg::Vector2D& locPos);
-
-    /** Get bias voltage */
-    virtual double getBiasVoltage(const IdentifierHash & elementHash);
-
-    /** Get temperature */
-    virtual double getTemperature(const IdentifierHash & elementHash);
-
-    /** Get depletion voltage */
-    virtual double getDepletionVoltage(const IdentifierHash & elementHash);
-
-    /** IOV CallBack */
-    virtual StatusCode callBack(IOVSVC_CALLBACK_ARGS);
-
-    /** IOV Callback for correction folder */
-    virtual StatusCode corrFolderCallBack(IOVSVC_CALLBACK_ARGS);
-
-  private:
-    void updateCache(const IdentifierHash& elementHash);
-    void updateCache(const IdentifierHash& elementHash, const Amg::Vector2D& locPos, bool useLocPos);
-    const Amg::Vector3D& getMagneticField(const IdentifierHash& elementHash, const Amg::Vector2D& locPos, bool useLocPos);
-    void invalidateCache();
-    bool invalidateMagFieldCache();
-
-  private:
-
-    // Properties
-    std::string              m_detectorName;
-    double                   m_temperature;
-    double                   m_temperaturePix;
-    double                   m_deplVoltage;
-    double                   m_biasVoltage;
-    double                   m_biasVoltageIBLPl;
-    double                   m_biasVoltageIBL3D;
-    double                   m_correctionFactor;
-    double                   m_nominalField;
-    bool                     m_useMagFieldSvc;
-    bool                     m_ignoreLocalPos;   // Makes methods using localPosition behave as method without passing localPosition.
-    bool                     m_calcEta;          // Control whether eta component is calculated. Default is false as its a negligible effect.
-    std::vector<std::string> m_bfieldFolders;
-    std::string              m_corrDBFolder;
-    bool                     m_pixelDefaults;
-    bool                     m_sctDefaults;
-
-    // needed services
-    ServiceHandle<ISiPropertiesSvc>        m_siPropertiesSvc;
-    ServiceHandle<ISiliconConditionsSvc>   m_siConditionsSvc;
-    ServiceHandle<MagField::IMagFieldSvc>  m_magFieldSvc;
-    ServiceHandle<StoreGateSvc>            m_detStore;
-
-    const DataHandle<AthenaAttributeList> m_dbData;
-
-    bool m_isPixel;  
-
-    const InDetDD::SiDetectorManager * m_detManager;
-
-    std::vector<double> m_lorentzShift;
-    std::vector<double> m_lorentzShiftEta;
-    std::vector<double> m_tanLorentzAngle;
-    std::vector<double> m_tanLorentzAngleEta;
-    std::vector<double> m_monitorBiasVoltage;
-    std::vector<double> m_monitorTemperature;
-    std::vector<double> m_monitorDepletionVoltage;
-
-    std::vector<Amg::Vector3D> m_magFieldCache;
-
-    std::vector<bool> m_cacheValid;
-    std::vector<bool> m_magFieldCacheValid;
-
-    //std::vector<double> m_lorentzShiftInput;
-
-    std::vector<bool> m_outOfRangeWarning;
-
-};
-
-inline const InterfaceID& SiLorentzAngleSvc::interfaceID(){
-  return ISiLorentzAngleSvc::interfaceID();
-}
-
-
-#endif
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/PixelLorentzAngleSvcSetup.py b/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/PixelLorentzAngleSvcSetup.py
deleted file mode 100644
index d70e4282d76738b25f7a8f9af07e0fb9f749fdde..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/PixelLorentzAngleSvcSetup.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-
-# Usage:
-#
-#  from SiLorentzAngleSvc.PixelLorentzAngleSvcSetup import pixelLorentzAngleSvcSetup
-#
-# By default will determine whether to use DB or not from GeoModel.
-# To force usage of DB (that is, use SiliconConditionsServices which should
-# normally read from DB):
-#
-#  pixelLorentzAngleSvcSetup.forceUseDB()
-#
-# For more configuration one can get access to the service configurable via
-#  pixelLorentzAngleSvcSetup.PixelLorentzAngleSvc.OutputLevel = VERBOSE
-#  print pixelLorentzAngleSvcSetup.PixelLorentzAngleSvc
-#
-# You can also access the pixel SiliconConditionsSvc:
-#
-#  pixelLorentzAngleSvcSetup.PixelSiliconConditionsSvc.CheckGeoModel = False # same as forceUseDB
-#  print pixelLorentzAngleSvcSetup.PixelSiliconConditionsSvc
-# 
-# Alternatively, you can also access the services by:
-#  from SiLorentzAngleSvc.PixelLorentzAngleSvcSetup import PixelLorentzAngleSvc
-# 
-#  PixelLorentzAngleSvc.ForceUseDB = True
-#  PixelLorentzAngleSvc.OutputLevel = VERBOSE
-#
-
-class PixelLorentzAngleSvcSetup:
-    "Class to simplify setup of LorentzAngleSvc"
-    def __init__(self):
-
-        from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-        from AthenaCommon.AppMgr import ToolSvc
-        
-        from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SiLorentzAngleSvc
-
-        # Init PixelLorentzAngleSvc
-        if hasattr(svcMgr,'PixelLorentzAngleSvc'):
-            pixelLorentzAngleSvc = svcMgr.PixelLorentzAngleSvc
-        else :
-            pixelLorentzAngleSvc = SiLorentzAngleSvc(name="PixelLorentzAngleSvc",DetectorName="Pixel")
-            svcMgr+=pixelLorentzAngleSvc
-
-        # Init PixelSiliconConditionsSvc
-        if hasattr(svcMgr,'PixelSiliconConditionsSvc'):
-            pixelSiliconConditionsSvc = svcMgr.PixelSiliconConditionsSvc
-        else :
-            from PixelConditionsServices.PixelConditionsServicesConf import PixelSiliconConditionsSvc
-            pixelSiliconConditionsSvc=PixelSiliconConditionsSvc()
-            svcMgr+=pixelSiliconConditionsSvc
-
-        pixelSiliconConditionsSvc.DepletionVoltage=10.0
-
-        from SiPropertiesSvc.SiPropertiesSvcConf import SiPropertiesSvc
-        pixelSiPropertiesSvc=SiPropertiesSvc(name="PixelSiPropertiesSvc",DetectorName="Pixel",SiConditionsServices=pixelSiliconConditionsSvc)
-        svcMgr+=pixelSiPropertiesSvc
-
-        # Pass the silicon conditions services to the Lorentz angle service
-        # Also make sure UseMagFieldTool is True as AtlasGeoModel sets this to False
-        # if loaded first.
-        pixelLorentzAngleSvc.UseMagFieldSvc = True
-        pixelLorentzAngleSvc.SiConditionsServices = pixelSiliconConditionsSvc
-        pixelLorentzAngleSvc.SiPropertiesSvc = pixelSiPropertiesSvc
-        #pixelLorentzAngleSvc.CorrectionFactor = 0.900
-        #Load Correction factor from database
-        from IOVDbSvc.CondDB import conddb
-        #conddb.addFolder("","/PIXEL/LorentzAngleScale<db>sqlite://;schema=PixelLorentzAngle_MC.db;dbname=OFLP200</db><tag>PIXELLorentzAngleScale-Simu-001</tag>")
-        #conddb.addFolder("PIXEL_OFL","/PIXEL/LorentzAngleScale")
-
-        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-        if athenaCommonFlags.isOnline():
-          conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/LorentzAngleScale", "/PIXEL/LorentzAngleScale")
-        else:
-          conddb.addFolder("PIXEL_OFL", "/PIXEL/LorentzAngleScale")
-        pixelLorentzAngleSvc.CorrDBFolder="/PIXEL/LorentzAngleScale"
-
-        self.PixelLorentzAngleSvc = pixelLorentzAngleSvc
-        self.pixelSiliconConditionsSvc = pixelSiliconConditionsSvc
-        self.PixelSiliconConditionsSvc = pixelSiliconConditionsSvc
-        self.pixelSiPropertiesSvc      = pixelSiPropertiesSvc
-        self.PixelSiPropertiesSvc      = pixelSiPropertiesSvc
-
-        self.PixelSiPropertiesSvc.UseConditionsDB = True
-
-    # Force the Lorentz angle sercive to use SiliconConditions service (which are assumed to use the DB)
-    # Default is to decide based on GeoModel.
-    def forceUseDB(self) :
-        "Force usage of conditions DB"
-        self.PixelSiliconConditionsSvc.CheckGeoModel = False
-        self.PixelSiliconConditionsSvc.UseDBForHV = True
-        self.PixelLorentzAngleSvc.usePixelDefaults = False
-    
-
-    # Force to use the defaults from GeoModel. In case it is not possible to use DCS
-    def forceUseGeoModel(self) :
-        "Force usage of GeoModel defaults"
-        self.PixelSiliconConditionsSvc.ForceUseGeoModel = True
-
-# configuration instance
-pixelLorentzAngleSvcSetup = PixelLorentzAngleSvcSetup()
-PixelLorentzAngleSvc = pixelLorentzAngleSvcSetup.PixelLorentzAngleSvc
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/PixelSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/PixelSiLorentzAngleCondAlg.cxx
index 55238dba97449dff6649256bdfc40cda16ffab5d..21ed2dd23e010018e7780d8243d57fd703489ce5 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/PixelSiLorentzAngleCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/PixelSiLorentzAngleCondAlg.cxx
@@ -104,7 +104,7 @@ StatusCode PixelSiLorentzAngleCondAlg::execute() {
 
   // Combined the validity ranges of temp and HV
   rangePIX = EventIDRange::intersect(rangeTemp, rangeHV);
-  if (rangePIX.start()>rangePIX.stop()) {
+  if (rangePIX.stop().isValid() and rangePIX.start()>rangePIX.stop()) {
     ATH_MSG_FATAL("Invalid intersection rangePIX: " << rangePIX);
     return StatusCode::FAILURE;
   }
@@ -127,16 +127,20 @@ StatusCode PixelSiLorentzAngleCondAlg::execute() {
 
       // Set the validity ranges of sensor
       rangeBField = rangeBFieldSensor;
-      if (rangeBField.start()>rangeBField.stop()) {
+      if (rangeBField.stop().isValid() and rangeBField.start()>rangeBField.stop()) {
         ATH_MSG_FATAL("Invalid intersection rangeBField: " << rangeBField);
         return StatusCode::FAILURE;
       }
     }
   }
 
-  // Combined the validity ranges of temp and HV
-  EventIDRange rangeW{EventIDRange::intersect(rangePIX, rangeBField)};
-  if (rangeW.start()>rangeW.stop()) {
+  // Combined the validity ranges of Pixel and BField if types are the same.
+  EventIDRange rangeW{rangePIX};
+  if (rangePIX.start().isTimeStamp()==rangeBField.start().isTimeStamp() and
+      rangePIX.start().isRunLumi()==rangeBField.start().isRunLumi()) {
+    rangeW = EventIDRange::intersect(rangePIX, rangeBField);
+  }
+  if (rangeW.stop().isValid() and rangeW.start()>rangeW.stop()) {
     ATH_MSG_FATAL("Invalid intersection rangeW: " << rangeW);
     return StatusCode::FAILURE;
   }
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx
index ac0a2dddb7c450d308ad751da383291616a59566..32976664a9b84953780e2f645fd4080453419985 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx
@@ -150,7 +150,7 @@ StatusCode SCTSiLorentzAngleCondAlg::execute()
     
     // Combined the validity ranges of temp and HV
     rangeSCT = EventIDRange::intersect(rangeTemp, rangeHV);
-    if (rangeSCT.start()>rangeSCT.stop()) {
+    if (rangeSCT.stop().isValid() and rangeSCT.start()>rangeSCT.stop()) {
       ATH_MSG_FATAL("Invalid intersection rangeSCT: " << rangeSCT);
       return StatusCode::FAILURE;
     }
@@ -174,7 +174,7 @@ StatusCode SCTSiLorentzAngleCondAlg::execute()
 
       // Set the validity ranges of sensor
       rangeBField = rangeBFieldSensor;
-      if (rangeBField.start()>rangeBField.stop()) {
+      if (rangeBField.stop().isValid() and rangeBField.start()>rangeBField.stop()) {
         ATH_MSG_FATAL("Invalid intersection rangeBField: " << rangeBField);
         return StatusCode::FAILURE;
       }
@@ -183,7 +183,7 @@ StatusCode SCTSiLorentzAngleCondAlg::execute()
 
   // Combined the validity ranges of temp and HV
   EventIDRange rangeW{EventIDRange::intersect(rangeSCT, rangeBField)};
-  if (rangeW.start()>rangeW.stop()) {
+  if (rangeW.stop().isValid() and rangeW.start()>rangeW.stop()) {
     ATH_MSG_FATAL("Invalid intersection rangeW: " << rangeW);
     return StatusCode::FAILURE;
   }
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleCHSvc.cxx b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleCHSvc.cxx
deleted file mode 100644
index dfa59a65f633ef9feae4528d035827d55d2a4836..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleCHSvc.cxx
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "SiLorentzAngleSvc/SiLorentzAngleCHSvc.h"
-
-#include <algorithm>
-#include <limits>
-
-#include "GaudiKernel/SystemOfUnits.h"
-
-#include "AthenaPoolUtilities/AthenaAttributeList.h"
-#include "Identifier/IdentifierHash.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "StoreGate/StoreGate.h"
-
-SiLorentzAngleCHSvc::SiLorentzAngleCHSvc(const std::string& name, ISvcLocator* pSvcLocator) :
-  AthService(name, pSvcLocator),
-  m_isPixel{false},
-  m_condData{"SCTSiLorentzAngleCondData"},
-  m_magFieldSvc{"AtlasFieldSvc", name},
-  m_detStore{"StoreGateSvc/DetectorStore", name},
-  m_detManager{nullptr}
-{
-  declareProperty("IgnoreLocalPos", m_ignoreLocalPos = false, 
-                  "Treat methods that take a local position as if one called the methods without a local position");
-  declareProperty("DetStore", m_detStore);
-  // IF SCT, YOU NEED TO USE THE SAME PROPERTIES AS USED IN SCTSiLorentzAngleCondAlg!!!
-  declareProperty("DetectorName", m_detectorName="Pixel", "Detector name (Pixel or SCT)");
-  declareProperty("MagFieldSvc", m_magFieldSvc);
-  declareProperty("NominalField", m_nominalField = 2.0834*Gaudi::Units::tesla);
-  declareProperty("UseMagFieldSvc", m_useMagFieldSvc = true);
-  declareProperty("SiLorentzAngleCondData", m_condData, "Key of input SiLorentzAngleCondData");
-}
-
-StatusCode SiLorentzAngleCHSvc::initialize() { 
-
-  ATH_MSG_DEBUG("SiLorentzAngleCHSvc Initialized");
-
-  // Detector store
-  CHECK(m_detStore.retrieve());
-
-  if ((m_detectorName not_eq "Pixel") and (m_detectorName not_eq "SCT")) {
-    ATH_MSG_FATAL("Invalid detector name: " << m_detectorName << ". Must be Pixel or SCT.");
-    return StatusCode::FAILURE;
-  }
-  m_isPixel = (m_detectorName == "Pixel");
-
-  if (m_isPixel) {
-    ATH_MSG_FATAL("SiLorentzAngleCHSvc is not yet implemented for Pixel!");
-    return StatusCode::FAILURE;
-  }
-
-  // Read Cond Handle
-  ATH_CHECK(m_condData.initialize());
-
-  // Get the detector manager
-  CHECK(m_detStore->retrieve(m_detManager, m_detectorName));
-
-  // MagneticFieldSvc handles updates itself
-  if (not m_useMagFieldSvc) {
-    ATH_MSG_DEBUG("Not using MagneticFieldSvc - Will be using Nominal Field!");
-  } else if (m_magFieldSvc.retrieve().isFailure()) {
-    ATH_MSG_WARNING("Could not retrieve MagneticFieldSvc - Will be using Nominal Field!");
-    m_useMagFieldSvc = false;
-  }
-  
-  return StatusCode::SUCCESS;
-}
-
-StatusCode SiLorentzAngleCHSvc::finalize() {
-  return StatusCode::SUCCESS;
-}
-
-// Query the interfaces.
-//   Input: riid, Requested interface ID
-//          ppvInterface, Pointer to requested interface
-//   Return: StatusCode indicating SUCCESS or FAILURE.
-// N.B. Don't forget to release the interface after use!!!
-StatusCode SiLorentzAngleCHSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
-  if (ISiLorentzAngleSvc::interfaceID().versionMatch(riid)) {
-    *ppvInterface = dynamic_cast<ISiLorentzAngleSvc*>(this);
-  } else {
-    // Interface is not directly available: try out a base class
-    return Service::queryInterface(riid, ppvInterface);
-  }
-  addRef();
-  return StatusCode::SUCCESS;
-}
-
-StatusCode SiLorentzAngleCHSvc::callBack(IOVSVC_CALLBACK_ARGS) {
-  ATH_MSG_FATAL("SiLorentzAngleCHSvc::callBack should not be used!!!");
-  return StatusCode::FAILURE;
-}
-
-
-double SiLorentzAngleCHSvc::getLorentzShift(const IdentifierHash& elementHash) {
-  const SiLorentzAngleCondData* condData{getCondData()};
-  if (condData) {
-    return condData->getLorentzShift(elementHash);
-  }
-  return s_invalidValue;
-}
-
-double SiLorentzAngleCHSvc::getLorentzShift(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) {
-  if (m_ignoreLocalPos) return getLorentzShift(elementHash);
-  // The cache is used to store the results. The cache is therefore invalidated if we specify a position.
-  return getValue(elementHash, locPos, LorentzShift);
-}
-
-double SiLorentzAngleCHSvc::getLorentzShiftEta(const IdentifierHash& elementHash) {
-  const SiLorentzAngleCondData* condData{getCondData()};
-  if (condData) {
-    return condData->getLorentzShiftEta(elementHash);
-  }
-  return s_invalidValue;
-}
-
-double SiLorentzAngleCHSvc::getLorentzShiftEta(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) {
-  if (m_ignoreLocalPos) return getLorentzShiftEta(elementHash);
-  // The cache is used to store the results. The cache is therefore invalidated if we specify a position.
-  return getValue(elementHash, locPos, LorentzShiftEta);
-}
-
-double SiLorentzAngleCHSvc::getTanLorentzAngle(const IdentifierHash& elementHash) {
-  const SiLorentzAngleCondData* condData{getCondData()};
-  if (condData) {
-    return condData->getTanLorentzAngle(elementHash);
-  }
-  return s_invalidValue;
-}
-
-double SiLorentzAngleCHSvc::getTanLorentzAngle(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) {
-  if (m_ignoreLocalPos) return getTanLorentzAngle(elementHash);
-  // The cache is used to store the results. The cache is therefore invalidated if we specify a position.
-  return getValue(elementHash, locPos, TanLorentzAngle);
-}
-
-double SiLorentzAngleCHSvc::getTanLorentzAngleEta(const IdentifierHash& elementHash) {
-  const SiLorentzAngleCondData* condData{getCondData()};
-  if (condData) {
-    return condData->getTanLorentzAngleEta(elementHash);
-  }
-  return s_invalidValue;
-}
-
-double SiLorentzAngleCHSvc::getTanLorentzAngleEta(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) {
-  if (m_ignoreLocalPos) return getTanLorentzAngleEta(elementHash);
-  // The cache is used to store the results. The cache is therefore invalidated if we specify a position.
-  return getValue(elementHash, locPos, TanLorentzAngleEta);
-}
-
-double SiLorentzAngleCHSvc::getBiasVoltage(const IdentifierHash& elementHash) {
-  const SiLorentzAngleCondData* condData{getCondData()};
-  if (condData) {
-    return condData->getBiasVoltage(elementHash);
-  }
-  return s_invalidValue;
-}
-
-double SiLorentzAngleCHSvc::getTemperature(const IdentifierHash& elementHash) {
-  const SiLorentzAngleCondData* condData{getCondData()};
-  if (condData) {
-    return condData->getTemperature(elementHash);
-  }
-  return s_invalidValue;
-}
-
-double SiLorentzAngleCHSvc::getDepletionVoltage(const IdentifierHash& elementHash) {
-  const SiLorentzAngleCondData* condData{getCondData()};
-  if (condData) {
-    return condData->getDepletionVoltage(elementHash);
-  }
-  return s_invalidValue;
-}
-   
-double SiLorentzAngleCHSvc::getValue(const IdentifierHash& elementHash, const Amg::Vector2D& locPos, Variable variable) {
-  if (not (variable==TanLorentzAngle or variable==LorentzShift or variable==TanLorentzAngleEta or variable==LorentzShiftEta)) {
-    ATH_MSG_WARNING("getValue with Variable=" << variable << " is not available");
-    return s_invalidValue;
-  }
-
-  double temperature{getTemperature(elementHash)};
-  double deplVoltage{getDepletionVoltage(elementHash)};
-  double biasVoltage{getBiasVoltage(elementHash)};
-
-  // 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)};
-  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)) {
-    depletionDepth *= sqrt(std::abs(biasVoltage / deplVoltage));
-  }
-  double meanElectricField{0.};
-  if (depletionDepth) { 
-    meanElectricField = biasVoltage / depletionDepth;
-  }
-  double mobility{0.};
-  m_siProperties.setConditions(temperature, meanElectricField);
-  mobility = m_siProperties.signedHallMobility(element->carrierType());
-  // Get magnetic field.
-  Amg::Vector3D magneticField{getMagneticField(elementHash, locPos)};
-
-  double correctionFactor{getCorrectionFactor()};
-
-  // 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).
-  // The hit depth axis is pointing from the readout side to the backside if  m_design->readoutSide() < 0
-  // The hit depth axis is pointing from the backside to the readout side if  m_design->readoutSide() > 0
-  if (variable==TanLorentzAngle or variable==LorentzShift) {
-    double tanLorentzAnglePhi{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitPhiDirection()*(element->normal().cross(magneticField)).dot(element->phiAxis())};
-    if (variable==TanLorentzAngle) {
-      return correctionFactor*tanLorentzAnglePhi;
-    }
-    // This gives the effective correction in the reconstruction frame hence the extra hitPhiDirection()
-    // as the angle above is in the hit frame.
-    double lorentzCorrectionPhi{-0.5*element->hitPhiDirection()*tanLorentzAnglePhi*depletionDepth};
-    return correctionFactor*lorentzCorrectionPhi;
-  }
-
-  // The Lorentz eta shift very small and so can be ignored, but we include it for completeness.
-  // It is < ~0.1 um in the pixel.
-  // In the SCT its largest in the stereo side of the barrel modules where it is about 0.3 micron along the strip. 
-  if (variable==TanLorentzAngleEta or variable==LorentzShiftEta) {
-    double tanLorentzAngleEta{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitEtaDirection()*(element->normal().cross(magneticField)).dot(element->etaAxis())};
-    if (variable==TanLorentzAngleEta) {
-      return correctionFactor*tanLorentzAngleEta;
-    }
-    double lorentzCorrectionEta{-0.5*element->hitPhiDirection()*tanLorentzAngleEta*depletionDepth};
-    return correctionFactor*lorentzCorrectionEta;
-  }
-
-  ATH_MSG_WARNING("You should not see this message. Something is wrong in getValue");
-  return s_invalidValue;
-}
-
-double SiLorentzAngleCHSvc::getCorrectionFactor() const
-{
-  const SiLorentzAngleCondData* condData{getCondData()};
-  if (condData) {
-    return condData->getCorrectionFactor();
-  }
-  return s_invalidValue;
-}
-
-Amg::Vector3D SiLorentzAngleCHSvc::getMagneticField(const IdentifierHash& elementHash, const Amg::Vector2D& locPos) {
-  // 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];
-    double point[3];
-    point[0] = pointvec[0];
-    point[1] = pointvec[1];
-    point[2] = pointvec[2];
-    m_magFieldSvc->getField(point, field);
-    return Amg::Vector3D(field[0], field[1], field[2]);
-  } else {
-    ATH_MSG_VERBOSE("Using Nominal Field");
-    return Amg::Vector3D(0., 0., m_nominalField);
-  }
-}
-
-const SiLorentzAngleCondData* SiLorentzAngleCHSvc::getCondData() const {
-  SG::ReadCondHandle<SiLorentzAngleCondData> handle{m_condData};
-  if (handle.isValid()) {
-    const SiLorentzAngleCondData* data{*handle};
-    return data;
-  }
-  ATH_MSG_WARNING(m_condData.key() << " cannot be retrieved.");
-  return nullptr;
-}
-
-const double SiLorentzAngleCHSvc::s_invalidValue{std::numeric_limits<double>::quiet_NaN()};
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleSvc.cxx b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleSvc.cxx
deleted file mode 100644
index dce41e9a0fc113c58e9d2207a061119f6be5598f..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleSvc.cxx
+++ /dev/null
@@ -1,498 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "SiLorentzAngleSvc/SiLorentzAngleSvc.h"
-
-#include "InDetIdentifier/PixelID.h"
-#include "InDetIdentifier/SCT_ID.h"
-#include "Identifier/IdentifierHash.h"
-
-#include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "InDetReadoutGeometry/PixelModuleDesign.h"
-
-#include "StoreGate/StoreGate.h"
-#include "GaudiKernel/SystemOfUnits.h"
-
-#include "InDetConditionsSummaryService/ISiliconConditionsSvc.h"
-
-#include <algorithm>
-#include "AthenaPoolUtilities/AthenaAttributeList.h"
-#include <stdexcept>
-
-SiLorentzAngleSvc::SiLorentzAngleSvc( const std::string& name, ISvcLocator* pSvcLocator ) : 
-  AthService(name, pSvcLocator),
-  m_pixelDefaults(false),
-  m_sctDefaults(false),
-	m_siPropertiesSvc("SiPropertiesSvc",name),
-  m_siConditionsSvc("PixelSiliconConditionsSvc", name),
-  m_magFieldSvc("AtlasFieldSvc", name),
-  m_detStore("StoreGateSvc/DetectorStore", name),
-  m_isPixel(true),
-  m_detManager(0)
- 
-{
-
-  m_bfieldFolders.push_back("/GLOBAL/BField/Map");
-  m_bfieldFolders.push_back("/EXT/DCS/MAGNETS/SENSORDATA");
-    
-	declareProperty("SiPropertiesSvc",m_siPropertiesSvc,"SiPropertiesSvc");
-  declareProperty("SiConditionsServices", m_siConditionsSvc);
-  declareProperty("DetectorName", m_detectorName="Pixel", "Detector name (Pixel or SCT)");
-  // Temperature and voltages from job options only used if SiConditionsServices is None or
-  // if value read from database is out of range.
-  declareProperty("Temperature",m_temperature = -7., "Default temperature in Celcius.");
-  declareProperty("TemperaturePixels",m_temperaturePix = -13., "Default temperature in Celcius for Pixels (incl. IBL).");
-  declareProperty("BiasVoltage", m_biasVoltage = 150., "Default bias voltage in Volt.");
-  declareProperty("BiasVoltageIBLPl", m_biasVoltageIBLPl = 80., "Default bias voltage for IBL SiPl in Volt.");
-  declareProperty("BiasVoltageIBL3D", m_biasVoltageIBL3D = 20., "Default bias voltage for IBL Si3D in Volt.");
-  declareProperty("DepletionVoltage", m_deplVoltage = 70., "Default depletion voltage in Volt.");
-  declareProperty("CorrectionFactor", m_correctionFactor = 1.);
-  declareProperty("UseMagFieldSvc", m_useMagFieldSvc = true);
-  declareProperty("NominalField", m_nominalField =  2.0834*Gaudi::Units::tesla);
-  declareProperty("IgnoreLocalPos", m_ignoreLocalPos = false, "Treat methods that take a local position as if one "
-                                                  "called the methods without a local position" );
-  declareProperty("CalcEtaComponent", m_calcEta = false);
-  declareProperty("DetStore", m_detStore);
-  declareProperty("MagFieldSvc", m_magFieldSvc);
-  declareProperty("BFieldFolders", m_bfieldFolders,"Magnetic field folders which may trigger  ");
-
-  declareProperty("CorrDBFolder",m_corrDBFolder="");
-  declareProperty("usePixelDefaults",m_pixelDefaults);
-  declareProperty("useSctDefaults",m_sctDefaults);
-
-}
-
-SiLorentzAngleSvc::~SiLorentzAngleSvc() {
-  //nop
-}
-
-StatusCode SiLorentzAngleSvc::initialize() { 
-
-  ATH_MSG_DEBUG( "SiLorentzAngleSvc Initialized" );
-
-  CHECK(m_siPropertiesSvc.retrieve());
-
-  // Detector store
-  CHECK(m_detStore.retrieve());
-
-  if (m_detectorName != "Pixel" && m_detectorName != "SCT") {
-    ATH_MSG_FATAL("Invalid detector name: " << m_detectorName << ". Must be Pixel or SCT." );
-    return StatusCode::FAILURE;
-  }
-  m_isPixel = (m_detectorName == "Pixel");
-
-  if (not m_isPixel) {
-    ATH_MSG_FATAL("DO NOT USE SiLorentzAngleSvc FOR SCT ANYMORE! USE SiLorentzAngleCHSvc FOR SCT!");
-    return StatusCode::FAILURE;
-  }
- 
-  // Get conditions summary service.
-  if (!m_siConditionsSvc.empty()) {
-    ATH_MSG_DEBUG("Conditions Summary Service not empty --> attempting to retrieve.");
-    CHECK(m_siConditionsSvc.retrieve());
-  }
-  else {
-    ATH_MSG_DEBUG("Conditions Summary Service not requested.");
-  }
-
-  // Get the detector manager
-  CHECK(m_detStore->retrieve(m_detManager, m_detectorName));
-
-  if (!m_siConditionsSvc.empty()) {
-    ATH_MSG_DEBUG("Conditions Summary Service not empty --> checking if has callback.");
-    if (m_siConditionsSvc->hasCallBack()) {
-      //Register callback. To be triggered after SiConditionsSvc's callback,
-      ATH_MSG_INFO("Registering callback." );
-      CHECK(m_detStore->regFcn(&ISiliconConditionsSvc::callBack,&*m_siConditionsSvc,&ISiLorentzAngleSvc::callBack,dynamic_cast<ISiLorentzAngleSvc*>(this),true));
-    } 
-    else {
-      ATH_MSG_WARNING("Conditions Summary Service has no callback." );
-    }
-  }
-
-  // Get maximum hash for vector sizes. We need the idhelper for this.
-  unsigned int maxHash = 0;
-  if (m_isPixel) { // Pixel
-    const PixelID * idHelper;
-    CHECK(m_detStore->retrieve(idHelper,"PixelID"));
-    maxHash = idHelper->wafer_hash_max();
-
-    // Check layout
-    if      (maxHash<2000) { ATH_MSG_INFO("Suppose RUN-1 geometry..."); }
-    else if (maxHash<2100) { ATH_MSG_INFO("Suppose RUN-2 geometry..."); }
-    else                   { ATH_MSG_INFO("Suppose RUN-4 geometry..."); }
-  } 
-  else { // SCT
-    const SCT_ID * idHelper;
-    CHECK(m_detStore->retrieve(idHelper,"SCT_ID"));
-   maxHash = idHelper->wafer_hash_max();
-  }
-
-  // In case geoInitialize is called more than once (not likely in practice) 
-  m_cacheValid.clear(); 
-  m_magFieldCacheValid.clear(); 
-  // Initialize the caches
-  m_lorentzShift.resize(maxHash);
-  m_lorentzShiftEta.resize(maxHash);
-  m_tanLorentzAngle.resize(maxHash);
-  m_tanLorentzAngleEta.resize(maxHash);
-  m_monitorBiasVoltage.resize(maxHash);
-  m_monitorTemperature.resize(maxHash);
-  m_monitorDepletionVoltage.resize(maxHash);
-  m_magFieldCache.resize(maxHash);
-  m_cacheValid.resize(maxHash); // initialized to false
-  m_magFieldCacheValid.resize(maxHash); // initialized to false
-  m_outOfRangeWarning.resize(maxHash); // initialized to false
-
-  // MagneticFieldSvc handles updates itself
-  if (!m_useMagFieldSvc) {
-    ATH_MSG_DEBUG("Not using MagneticFieldSvc - Will be using Nominal Field!");
-  } else if (m_magFieldSvc.retrieve().isFailure()) {
-    ATH_MSG_WARNING("Could not retrieve MagneticFieldSvc - Will be using Nominal Field!");
-    m_useMagFieldSvc = false;
-    //return StatusCode::FAILURE;
-  }
-  
-  // DB for corrections
-  if (m_corrDBFolder.size()>0) {
-    ATH_MSG_INFO("Loading lorentz angle correction value from database folder " << m_corrDBFolder);
-    CHECK(m_detStore->regFcn(&SiLorentzAngleSvc::corrFolderCallBack,this,m_dbData,m_corrDBFolder));
-  } else {
-    ATH_MSG_INFO("No database folder set for lorentz angle correction. Use value from jobOptions");
-  }
-
-  return StatusCode::SUCCESS;
-}    
-
-StatusCode SiLorentzAngleSvc::finalize() {
-  // Count number of modules that produced out of range errors.
-  int count = std::count(m_outOfRangeWarning.begin(),m_outOfRangeWarning.end(),true);
-  if (count > 0)
-      ATH_MSG_DEBUG( "Number of detector elements returning invalid temperature: " << count ); 
-  return StatusCode::SUCCESS;
-}
-
-// Query the interfaces.
-//   Input: riid, Requested interface ID
-//          ppvInterface, Pointer to requested interface
-//   Return: StatusCode indicating SUCCESS or FAILURE.
-// N.B. Don't forget to release the interface after use!!!
-StatusCode SiLorentzAngleSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
-  if ( ISiLorentzAngleSvc::interfaceID().versionMatch(riid) ) {
-    *ppvInterface = dynamic_cast<ISiLorentzAngleSvc *>(this);
-  }  else  {
-    // Interface is not directly available: try out a base class
-    return Service::queryInterface(riid, ppvInterface);
-  }
-  addRef();
-  return StatusCode::SUCCESS;
-}
-
-StatusCode SiLorentzAngleSvc::corrFolderCallBack(IOVSVC_CALLBACK_ARGS) {
-  m_correctionFactor=(*m_dbData)["LAScale"].data<float>();
-  ATH_MSG_INFO("Correction factor set to " << m_correctionFactor << " based on database (overriding jobO value)" );
-  return StatusCode::SUCCESS;
-}
-
-
-StatusCode SiLorentzAngleSvc::callBack(IOVSVC_CALLBACK_ARGS_P(I,keys)) {
-  (void) I; // avoid warning about unused parameter 
-  ATH_MSG_DEBUG("Callback called." );
-  // Work out what triggered the callback
-  bool magFieldTrigger = false;
-  bool otherTrigger = false;
-  if (!m_magFieldSvc.empty() || m_bfieldFolders.empty()) {
-    for (std::list<std::string>::const_iterator iter = keys.begin(); iter != keys.end(); ++iter) {
-      if (magFieldTrigger && otherTrigger) break; // No need to keep checking 
-      if (std::find(m_bfieldFolders.begin(),m_bfieldFolders.end(),*iter) != m_bfieldFolders.end()) {
-        magFieldTrigger = true;
-      } else {
-        otherTrigger = true;
-      }
-    }
-    if (magFieldTrigger) {
-      // Will return false if field was not actually updated
-      ATH_MSG_VERBOSE("Invalidate mag field cache." );
-      magFieldTrigger = invalidateMagFieldCache();
-      if (magFieldTrigger){
-         ATH_MSG_INFO("Field was updated." );
-      } else {
-         ATH_MSG_INFO("Field was not updated." );
-      }
-    }
-  } else {
-    otherTrigger = true;
-  }
-  // If either mag field or other item triggered callback then we need to invalidate the general cache.  
-  if (otherTrigger || magFieldTrigger) invalidateCache();
-  return StatusCode::SUCCESS;
-}
-
-
-double SiLorentzAngleSvc::getLorentzShift(const IdentifierHash & elementHash) {
-  if (!m_cacheValid[elementHash]) { updateCache(elementHash); }
-  return m_lorentzShift[elementHash];
-}
-
-double SiLorentzAngleSvc::getLorentzShift(const IdentifierHash & elementHash, const Amg::Vector2D & locPos) {
-  if (m_ignoreLocalPos) return getLorentzShift(elementHash);
-  // The cache is used to store the results.  The cache is therefore invalidated if we specify a position.
-  updateCache(elementHash, locPos, true);
-  return m_lorentzShift[elementHash];
-}
-
-double SiLorentzAngleSvc::getLorentzShiftEta(const IdentifierHash & elementHash) {
-  if (!m_cacheValid[elementHash]) { updateCache(elementHash); }
-  return m_lorentzShiftEta[elementHash];
-}
-
-double SiLorentzAngleSvc::getLorentzShiftEta(const IdentifierHash & elementHash, const Amg::Vector2D& locPos) {
-  if (m_ignoreLocalPos) return getLorentzShiftEta(elementHash);
-  // The cache is used to store the results.  The cache is therefore invalidated if we specify a position.
-  updateCache(elementHash, locPos, true);
-  return m_lorentzShiftEta[elementHash];
-}
-
-double SiLorentzAngleSvc::getTanLorentzAngle(const IdentifierHash & elementHash) {
-  if (!m_cacheValid[elementHash]) { updateCache(elementHash); }
-  return m_tanLorentzAngle[elementHash];
-}
-
-double SiLorentzAngleSvc::getTanLorentzAngle(const IdentifierHash & elementHash, const Amg::Vector2D& locPos) {
-  if (m_ignoreLocalPos) return getTanLorentzAngle(elementHash);
-  // The cache is used to store the results.  The cache is therefore invalidated if we specify a position.
-  updateCache(elementHash, locPos, true);
-  return m_tanLorentzAngle[elementHash];
-}
-
-double SiLorentzAngleSvc::getTanLorentzAngleEta(const IdentifierHash & elementHash) {
-  if (!m_cacheValid[elementHash]) { updateCache(elementHash); }
-  return m_tanLorentzAngleEta[elementHash];
-}
-
-double SiLorentzAngleSvc::getTanLorentzAngleEta(const IdentifierHash & elementHash, const Amg::Vector2D& locPos) {
-  if (m_ignoreLocalPos) return getTanLorentzAngleEta(elementHash);
-  // The cache is used to store the results.  The cache is therefore invalidated if we specify a position.
-  updateCache(elementHash, locPos, true);
-  return m_tanLorentzAngleEta[elementHash];
-}
-
-double SiLorentzAngleSvc::getBiasVoltage(const IdentifierHash & elementHash) {
-  if (!m_cacheValid[elementHash]) { updateCache(elementHash); }
-  return m_monitorBiasVoltage[elementHash];
-}
-
-double SiLorentzAngleSvc::getTemperature(const IdentifierHash & elementHash) {
-  if (!m_cacheValid[elementHash]) { updateCache(elementHash); }
-  return m_monitorTemperature[elementHash];
-}
-
-double SiLorentzAngleSvc::getDepletionVoltage(const IdentifierHash & elementHash) {
-  if (!m_cacheValid[elementHash]) { updateCache(elementHash); }
-  return m_monitorDepletionVoltage[elementHash];
-}
-
-void SiLorentzAngleSvc::invalidateCache() {
-  ATH_MSG_DEBUG("Invalidating general cache." );
-  // Invalidate all caches.
-  std::fill(m_cacheValid.begin(), m_cacheValid.end(), false);
-  
-  // InDetReadoutGometry caches the result so we need to invalidate
-  // the InDetReadoutGometry cache.
-  for (InDetDD::SiDetectorElementCollection::const_iterator iter = m_detManager->getDetectorElementBegin(); 
-       iter != m_detManager->getDetectorElementEnd(); 
-       ++iter){
-    const InDetDD::SiDetectorElement * element = *iter; 
-    if (element) element->invalidateConditions();
-  }
-}
-
-bool SiLorentzAngleSvc::invalidateMagFieldCache() {
-  // Only invalidate cache if field was actually updated.
-  if (false) {  // !< @TODO fixm e m_magField and m_magField->wasFieldUpdated()) {
-    ATH_MSG_VERBOSE("Invalidating magnetic field cache." );
-    std::fill(m_magFieldCacheValid.begin(), m_magFieldCacheValid.end(), false);
-    return true;
-  } else {
-    ATH_MSG_DEBUG("Magnetic field callback called but field was not updated. Invalidation of magnetic cache not required." );
-    return false;
-  }
-}  
-   
-void SiLorentzAngleSvc::updateCache(const IdentifierHash & elementHash) {
-  Amg::Vector2D zeroLocalPos(0.,0.);
-  updateCache(elementHash, zeroLocalPos, false);
-}
-
-void SiLorentzAngleSvc::updateCache(const IdentifierHash & elementHash, const Amg::Vector2D& locPos, bool useLocPos) {
-  ATH_MSG_VERBOSE("Updating cache for elementHash = " << elementHash );
-
-  if (!useLocPos) m_cacheValid[elementHash] = true;
-  const InDetDD::SiDetectorElement * element = m_detManager->getDetectorElement(elementHash);
-
-  double temperature{0.0};
-  double deplVoltage{0.0};
-  double biasVoltage{0.0};
-  double forceLorentzToZero{1.0};
-
-  // SCT
-  if (!m_isPixel) {
-    if (m_sctDefaults && !m_isPixel) {
-      biasVoltage = m_biasVoltage*CLHEP::volt;
-      deplVoltage = m_deplVoltage*CLHEP::volt;
-      temperature = m_temperature+273.15;
-    }
-    else {
-      temperature = m_siConditionsSvc->temperature(elementHash)+273.15;
-      deplVoltage = m_siConditionsSvc->depletionVoltage(elementHash)*CLHEP::volt;
-      biasVoltage = m_siConditionsSvc->biasVoltage(elementHash)*CLHEP::volt;
-      ATH_MSG_DEBUG("SCT Hash = " << elementHash << " Temperature = " << temperature << " BiasV = " << biasVoltage << " DeplV = " << deplVoltage);
-    }
-  }
-
-  // Pixel
-  if (m_isPixel) {
-    const InDetDD::PixelModuleDesign* p_design = dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design());
-    if (not p_design) throw std::runtime_error("Dynamic cast to PixelModuleDesign* failed in SiLorentzAngleSvc.cxx");
-    if (m_pixelDefaults) {
-      temperature = m_temperaturePix + 273.15;
-      if (p_design->getReadoutTechnology()==InDetDD::PixelModuleDesign::FEI4) {
-        if (p_design->numberOfCircuits()==2) {       // IBL planar
-          deplVoltage = 40.0*CLHEP::volt; 
-          biasVoltage = m_biasVoltageIBLPl*CLHEP::volt; 
-        }
-        else if (p_design->numberOfCircuits()==1 && p_design->rowsPerCircuit()>100) {  // IBL 3D
-          deplVoltage =  10.0*CLHEP::volt; 
-          biasVoltage = m_biasVoltageIBL3D*CLHEP::volt; 
-          forceLorentzToZero = 0.0;
-        }
-      }
-      else {
-        deplVoltage = m_deplVoltage*CLHEP::volt;
-        biasVoltage = m_biasVoltage*CLHEP::volt;
-      }
-      ATH_MSG_DEBUG("Pixel Hash = " << elementHash << " Temperature = " << temperature << " BiasV = " << biasVoltage << " DeplV = " << deplVoltage);
-    }
-    else {
-      temperature = m_siConditionsSvc->temperature(elementHash)+273.15;
-      deplVoltage = m_siConditionsSvc->depletionVoltage(elementHash)*CLHEP::volt;
-      biasVoltage = m_siConditionsSvc->biasVoltage(elementHash)*CLHEP::volt;
-      if (p_design->getReadoutTechnology()==InDetDD::PixelModuleDesign::FEI4) {
-        if (p_design->numberOfCircuits()==2) {        // IBL planar (this classification is a bit ugly since there is no method to choose sensor technology.)
-          deplVoltage = 40.0*CLHEP::volt; 
-        }
-        else if (p_design->numberOfCircuits()==1 && p_design->rowsPerCircuit()>100) {  // IBL 3D
-          deplVoltage = 10.0*CLHEP::volt; 
-          forceLorentzToZero = 0.0;
-        }
-      }
-      ATH_MSG_DEBUG("Pixel Hash = " << elementHash << " Temperature = " << temperature << " BiasV = " << biasVoltage << " DeplV = " << deplVoltage);
-    }
-  }
-
-
-  // Protect against invalid temperature
-  double temperatureC = temperature -  273.15;
-  if (!(temperatureC>-80.0 && temperatureC<100.0)) {
-    m_outOfRangeWarning[elementHash] = true;
-    temperature = m_temperature + 273.15;
-    ATH_MSG_DEBUG("Invalid temperature: " << temperatureC << " C. " << "Setting to " << m_temperature << " C. " << "Detector element hash: " << elementHash);
-  }
-
-  // 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 .  
-  double depletionDepth = element->thickness();
-  if (std::abs(biasVoltage) < std::abs(deplVoltage)) {
-    depletionDepth *= sqrt(std::abs(biasVoltage / deplVoltage));
-  }
- 
-  const InDet::SiliconProperties &siProperties = m_siPropertiesSvc->getSiProperties(elementHash);
-  double mobility = siProperties.signedHallMobility(element->carrierType());
-
-  // Get magnetic field. This first checks that field cache is valid.
-  const Amg::Vector3D& magneticField = getMagneticField(elementHash, locPos, useLocPos);
-  
-
-  // 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).
-  // The hit depth axis is pointing from the readout side to the backside if  m_design->readoutSide() < 0
-  // The hit depth axis is pointing from the backside to the readout side if  m_design->readoutSide() > 0  
-  double tanLorentzAnglePhi = forceLorentzToZero*element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitPhiDirection()*(element->normal().cross(magneticField)).dot(element->phiAxis());
-  m_tanLorentzAngle[elementHash] = m_correctionFactor*tanLorentzAnglePhi;
-
-  // This gives the effective correction in the reconstruction frame hence the extra hitPhiDirection()
-  // as the angle above is in the hit frame.
-  double lorentzCorrectionPhi = -0.5*element->hitPhiDirection()*tanLorentzAnglePhi*depletionDepth;
-  m_lorentzShift[elementHash] = m_correctionFactor*lorentzCorrectionPhi;
- 
-  // Generally no need for the eta component so we only calculate it if requested.
-  // Will return zero if not calculated as m_tanLorentzAngleEta[] and  m_lorentzShiftEta[] are initialized to zero.
-  //
-  // The Lorentz eta shift very small and so can be ignored, but we include it for completeness.
-  // It is < ~0.1 um in the pixel.
-  // In the SCT its largest in the stereo side of the barrel modules where it is about 0.3 micron along the strip. 
-  if (m_calcEta) {
-    double tanLorentzAngleEta = forceLorentzToZero*element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitEtaDirection()*(element->normal().cross(magneticField)).dot(element->etaAxis());
-    m_tanLorentzAngleEta[elementHash] = m_correctionFactor*tanLorentzAngleEta;
-    double lorentzCorrectionEta = -0.5*element->hitPhiDirection()*tanLorentzAngleEta*depletionDepth;
-    m_lorentzShiftEta[elementHash] = m_correctionFactor*lorentzCorrectionEta;
-  }
-
-  // Monitoring value
-  m_monitorBiasVoltage[elementHash]      = biasVoltage/CLHEP::volt;
-  m_monitorTemperature[elementHash]      = temperature - 273.15;
-  m_monitorDepletionVoltage[elementHash] = deplVoltage/CLHEP::volt;
-
-  ATH_MSG_DEBUG(" Hash = " << elementHash << " tanPhi = " << lorentzCorrectionPhi << " shiftPhi = " << m_lorentzShift[elementHash] << " Factor = " << m_correctionFactor << "Depletion depth = " << depletionDepth);
-
-  if (msgLvl(MSG::VERBOSE)) {
-    ATH_MSG_VERBOSE("Temperature (C), bias voltage, depletion voltage: " << temperature - 273.15 << ", " << biasVoltage/CLHEP::volt << ", " << deplVoltage/CLHEP::volt);
-    ATH_MSG_VERBOSE("Depletion depth: " << depletionDepth/CLHEP::mm);
-    ATH_MSG_VERBOSE("Mobility (cm2/V/s): " <<  mobility/(CLHEP::cm2/CLHEP::volt/CLHEP::s));
-    ATH_MSG_VERBOSE("Magnetic Field (tesla): " << "(" << magneticField.x()/CLHEP::tesla << "," << magneticField.y()/CLHEP::tesla << "," << magneticField.z()/CLHEP::tesla << ")");
-    ATH_MSG_VERBOSE("LorentzShift, tanLorentzAngle = " << m_lorentzShift[elementHash] << ", " << m_tanLorentzAngle[elementHash]);
-    if (m_calcEta) {
-      ATH_MSG_VERBOSE("LorentzShiftEta, tanLorentzAngleEta = " << m_lorentzShiftEta[elementHash] << ", " << m_tanLorentzAngleEta[elementHash]);
-    }
-  }
-}
-
-
-const Amg::Vector3D& SiLorentzAngleSvc::getMagneticField(const IdentifierHash & elementHash, const Amg::Vector2D& locPos, bool useLocPos) {
-  // Get the magnetic field. There are a few cases.
-  // If we are not specifying the position (and using the default position which is the center of the detector) 
-  // we return the cached value if it has been filled. Otherwise we fetch the field from the field service.
-  // For the case where we have a fixed field we use that.
-  const InDetDD::SiDetectorElement * element = m_detManager->getDetectorElement(elementHash);
-  if (useLocPos || !m_magFieldCacheValid[elementHash]) {
-    // Get Magnetic field
-    Amg::Vector3D pointvec = element->center();
-    if (useLocPos) {
-      pointvec = element->globalPosition(locPos);
-      // As we use the cache to store the result, it is invalid for subsequent calls
-      // which could have a different position and so we invalidate the cache
-      m_magFieldCacheValid[elementHash] = false; 
-    } else {
-      m_magFieldCacheValid[elementHash] = true;
-    }
-    if(m_useMagFieldSvc){
-      ATH_MSG_VERBOSE("Getting magnetic field from magnetic field service." );
-      double field[3];
-      double point[3];
-      point[0]= pointvec[0];
-      point[1]= pointvec[1];
-      point[2]= pointvec[2];
-      m_magFieldSvc->getField(point, field);
-      m_magFieldCache[elementHash] = Amg::Vector3D(field[0],field[1],field[2]);
-    }
-    else {
-      m_magFieldCache[elementHash] = Amg::Vector3D(0,0,m_nominalField);
-      ATH_MSG_VERBOSE("Using Nominal Field" );
-    }
-  }
-  else ATH_MSG_VERBOSE("Using cached field. " );
-  return m_magFieldCache[elementHash];
-}
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/components/SiLorentzAngleSvc_entries.cxx b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/components/SiLorentzAngleSvc_entries.cxx
index c1812ebc5136b69ad71d123f4edc9ad9096c6cda..b59856d9d9a72fd0ad8ae074a929303963ac1148 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/components/SiLorentzAngleSvc_entries.cxx
+++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/components/SiLorentzAngleSvc_entries.cxx
@@ -1,11 +1,7 @@
-#include "SiLorentzAngleSvc/SiLorentzAngleSvc.h"
-#include "SiLorentzAngleSvc/SiLorentzAngleCHSvc.h"
 #include "../SiLorentzAngleTool.h"
 #include "../SCTSiLorentzAngleCondAlg.h"
 #include "../PixelSiLorentzAngleCondAlg.h"
 
-DECLARE_COMPONENT( SiLorentzAngleSvc )
-DECLARE_COMPONENT( SiLorentzAngleCHSvc )
 DECLARE_COMPONENT( SiLorentzAngleTool )
 DECLARE_COMPONENT( SCTSiLorentzAngleCondAlg )
 DECLARE_COMPONENT( PixelSiLorentzAngleCondAlg )
diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/python/SCT_SiPropertiesToolSetup.py b/InnerDetector/InDetConditions/SiPropertiesSvc/python/SCT_SiPropertiesToolSetup.py
index b1b182cd2542b3dc91f708305a98d5b3e3914d5a..04d99f5dda6c4f7a6b96f905d7c3650aa27b6e1c 100644
--- a/InnerDetector/InDetConditions/SiPropertiesSvc/python/SCT_SiPropertiesToolSetup.py
+++ b/InnerDetector/InDetConditions/SiPropertiesSvc/python/SCT_SiPropertiesToolSetup.py
@@ -45,13 +45,11 @@ class SCT_SiPropertiesToolSetup:
         self.alg = getattr(condSeq, self.algName)
 
     def setTool(self):
-        from AthenaCommon.AppMgr import ToolSvc
-        if not hasattr(ToolSvc, self.toolName):
+        if self.tool is None:
             from SiPropertiesSvc.SiPropertiesSvcConf import SiPropertiesTool
-            ToolSvc += SiPropertiesTool(name = self.toolName,
-                                        DetectorName = "SCT",
-                                        ReadKey = "SCTSiliconPropertiesVector")
-        self.tool = getattr(ToolSvc, self.toolName)
+            self.tool = SiPropertiesTool(name = self.toolName,
+                                         DetectorName = "SCT",
+                                         ReadKey = "SCTSiliconPropertiesVector")
 
     def setup(self):
         self.setAlg()
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h
index b273978107634add537508fa7f3d33ccc2c6e92d..5f6f8ef5e00038c2a32ad8656778b7559fc9569f 100755
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h
@@ -18,7 +18,6 @@ class AtlasDetectorID;
 #include "GaudiKernel/ServiceHandle.h"
 #include "CLHEP/Geometry/Transform3D.h"
 #include "GeoModelKernel/RCBase.h"
-#include "InDetCondServices/ISiLorentzAngleSvc.h"
 #include "InDetCondServices/ISiLorentzAngleTool.h"
 
 namespace InDetDD {
@@ -44,9 +43,7 @@ namespace InDetDD {
           const AtlasDetectorID* getIdHelper() const;
           const HepGeom::Transform3D & solenoidFrame() const;
           void setSolenoidFrame(const HepGeom::Transform3D & transform) const; 
-          void setLorentzAngleSvc(const ServiceHandle<ISiLorentzAngleSvc> & lorentzAngleSvc);
           void setLorentzAngleTool(const ISiLorentzAngleTool* lorentzAngleTool);
-          ISiLorentzAngleSvc * lorentzAngleSvc() const;
           const ISiLorentzAngleTool * lorentzAngleTool() const;
 
           //Declaring the Message method for further use
@@ -62,9 +59,6 @@ namespace InDetDD {
           
           const AtlasDetectorID* m_idHelper; 
           mutable HepGeom::Transform3D m_solenoidFrame;
-          ServiceHandle<ISiLorentzAngleSvc> m_lorentzAngleSvcHandle;
-          mutable ISiLorentzAngleSvc * m_lorentzAngleSvc;
-          mutable bool m_lorentzAngleSvcInit;
           const ISiLorentzAngleTool *m_lorentzAngleTool;
         
     };
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h
index 8f967fbfaae480960b8e3b68d0ebcc100772613c..fa2e1d6bd4c294354809c9c6e4e8046957775b26 100755
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h
@@ -414,30 +414,6 @@ namespace InDetDD {
       SiIntersect inDetector(const HepGeom::Point3D<double> & globalPosition, double phiTol, double etaTol) const;
       //@}
     
-      ///////////////////////////////////////////////////////////////////
-      //
-      /// @name Lorentz Correction
-      //
-      ///////////////////////////////////////////////////////////////////
-      //@{
-    
-      /// tan(Lorentz angle). Component in phi direction (hit frame)
-      double getTanLorentzAnglePhi() const; 
-    
-      /// Same as getTanLorentzAnglePhi()
-      double getTanLorentzAngle() const; 
-    
-      /// tan(Lorentz angle). Component in eta direction (hit frame)
-      double getTanLorentzAngleEta() const; 
-    
-      /// Lorentz shift in distPhi (reconstruction local frame)
-      double getLorentzCorrection() const; 
-    
-      /// Correct a local position (reconstruction frame) for the Lorentz angle:
-      /// Users generally shouldn't need to call this as localPositionOfCell() returns the Lorentz corrected position.
-      Amg::Vector2D correctLocalPosition(const Amg::Vector2D &position) const;
-      //@}
-    
       ///////////////////////////////////////////////////////////////////
       //
       /// @name Readout cell id
@@ -468,12 +444,6 @@ namespace InDetDD {
       /// As in previous method but returns SiCellId 
       SiCellId cellIdOfPosition(const Amg::Vector2D &localPos) const;
     
-    
-      /// Returns position (center) of cell. These are corrected for the Lorentz shift
-      Amg::Vector2D localPositionOfCell(const SiCellId & cellId) const;
-      /// As above
-      Amg::Vector2D localPositionOfCell(const Identifier & id) const;
-    
       /// Returns position (center) of cell. These are the raw positions *NOT* corrected for the Lorentz shift
       Amg::Vector2D rawLocalPositionOfCell(const SiCellId & cellId) const;
       /// As above
@@ -522,15 +492,9 @@ namespace InDetDD {
       /// Invalidate general cache
       void invalidate() const; 
     
-      /// invalidate conditions cache
-      void invalidateConditions() const; 
-    
       /// Recalculate all cached values. 
       void updateCache() const; 
     
-      /// Recalculate subset of cached values.
-      void updateConditionsCache() const; 
-    
       /// Update all caches including surfaces.
       void updateAllCaches() const;
     
@@ -795,18 +759,11 @@ namespace InDetDD {
     inline void SiDetectorElement::invalidate() const
     {
       m_cacheValid = false;
-      // Conditions cache invalidation is done by SiLorentzAngleSvc.
-    }
-    
-    inline void SiDetectorElement::invalidateConditions() const
-    {
-      m_conditionsCacheValid = false;
     }
     
     inline void SiDetectorElement::updateAllCaches() const
     {
       if (!m_cacheValid) updateCache();
-      if (!m_conditionsCacheValid) updateConditionsCache();
       if (!m_surface) surface();
     }
     
@@ -944,6 +901,7 @@ namespace InDetDD {
     
     inline bool SiDetectorElement::swapPhiReadoutDirection() const
     {
+      if (m_firstTime) updateCache(); // In order to set m_phiDirection
       // equivalent to (m_design->swapHitPhiReadoutDirection() xor !m_phiDirection)
       return ((!m_design->swapHitPhiReadoutDirection() && !m_phiDirection)
     	  || (m_design->swapHitPhiReadoutDirection() && m_phiDirection));
@@ -951,36 +909,12 @@ namespace InDetDD {
     
     inline bool SiDetectorElement::swapEtaReadoutDirection() const
     {
+      if (m_firstTime) updateCache(); // In order to set m_etaDirection
       // equivalent to (m_design->swapHitEtaReadoutDirection() xor !m_etaDirection)
       return ((!m_design->swapHitEtaReadoutDirection() && !m_etaDirection)
     	  || (m_design->swapHitEtaReadoutDirection() && m_etaDirection));
     }
     
-    inline double SiDetectorElement::getTanLorentzAnglePhi() const
-    {
-      if (!m_conditionsCacheValid) updateConditionsCache();
-      return m_tanLorentzAnglePhi;
-    }
-    
-    // Same as getTanLorentzAnglePhi()
-    inline double SiDetectorElement::getTanLorentzAngle() const
-    {
-      if (!m_conditionsCacheValid) updateConditionsCache();
-      return m_tanLorentzAnglePhi;
-    }
-    
-    inline double SiDetectorElement::getTanLorentzAngleEta() const
-    {
-      if (!m_conditionsCacheValid) updateConditionsCache();
-      return m_tanLorentzAngleEta;
-    }
-    
-    inline double SiDetectorElement::getLorentzCorrection() const
-    {
-      if (!m_conditionsCacheValid) updateConditionsCache();
-      return m_lorentzCorrection;
-    }
-
 } // namespace InDetDD
 
 #endif // INDETREADOUTGEOMETRY_SIDETECTORELEMENT_H
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx
index 4a5e9a6faafe6ba1f142d35307ae30ea83a771fb..9df5ae1d295cac4047d90c57b2f6244b04ed9207 100755
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx
@@ -4,17 +4,12 @@
 
 #include "InDetReadoutGeometry/SiCommonItems.h"
 
-#include "InDetCondServices/ISiLorentzAngleSvc.h"
-
 namespace InDetDD {
 
 SiCommonItems::SiCommonItems(const AtlasDetectorID* const idHelper)
   :  m_msg("SiDetectorElement"),
      m_idHelper(idHelper), 
-     m_lorentzAngleSvcHandle("", "SiDetectorElement"),
-     m_lorentzAngleSvc(0),
-     m_lorentzAngleSvcInit(false),
-     m_lorentzAngleTool(0)
+     m_lorentzAngleTool(nullptr)
 {}
 
 void   
@@ -23,31 +18,9 @@ SiCommonItems::setSolenoidFrame(const HepGeom::Transform3D & transform) const
   m_solenoidFrame = transform;
 }
 
-void 
-SiCommonItems::setLorentzAngleSvc(const ServiceHandle<ISiLorentzAngleSvc> & lorentzAngleSvc)
-{
-  m_lorentzAngleSvcHandle = lorentzAngleSvc;
-}
-
 void SiCommonItems::setLorentzAngleTool(const ISiLorentzAngleTool* lorentzAngleTool) {
   m_lorentzAngleTool = lorentzAngleTool;
 }
-  
-ISiLorentzAngleSvc * 
-SiCommonItems::lorentzAngleSvc() const 
-{
-  if (!m_lorentzAngleSvcInit) {
-    if (!m_lorentzAngleSvcHandle.empty()) {
-      StatusCode sc = m_lorentzAngleSvcHandle.retrieve(); 
-      if (sc.isFailure()) {
-	msg(MSG::ERROR) << "InDetReadoutGeometry ERROR: Could not locate Lorentz angle service: " << m_lorentzAngleSvcHandle.name() << endmsg;
-      }
-    }
-    m_lorentzAngleSvc =  &*m_lorentzAngleSvcHandle;
-    m_lorentzAngleSvcInit = true;
-  }
-  return m_lorentzAngleSvc;
-}
 
 const ISiLorentzAngleTool* SiCommonItems::lorentzAngleTool() const {
   return m_lorentzAngleTool;
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx
index 8b404ed8ceed6842d34685c22a712c43ffa16445..f1ddcf9bde3fb0a6183d8e38bf8a972ea62b53ad 100755
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx
@@ -35,7 +35,6 @@
 #include "TrkSurfaces/PlaneSurface.h"
 #include "TrkSurfaces/SurfaceBounds.h"
 
-#include "InDetCondServices/ISiLorentzAngleSvc.h"
 #include <cmath>
 #include <cassert>
 #include <limits>
@@ -61,12 +60,8 @@ SiDetectorElement::SiDetectorElement(const Identifier &id,
   m_prevInPhi(0),
   m_otherSide(0),
   m_cacheValid(false),
-  m_conditionsCacheValid(false),
   m_firstTime(true),
   m_isStereo(false),
-  m_tanLorentzAnglePhi(0),
-  m_tanLorentzAngleEta(0),
-  m_lorentzCorrection(0),
   m_surface(0),
   m_geoAlignStore(geoAlignStore)
 {
@@ -368,17 +363,6 @@ SiDetectorElement::updateCache() const
 }
 
 
-void 
-SiDetectorElement::updateConditionsCache() const
-{
-  m_conditionsCacheValid = true;
-
-  m_tanLorentzAnglePhi = 0.;
-  m_tanLorentzAngleEta = 0.;
-  m_lorentzCorrection =  0.;
-}
-
-
 const HepGeom::Transform3D &
 SiDetectorElement::transformHit() const
 {
@@ -630,14 +614,6 @@ bool SiDetectorElement::isNextToInnermostPixelLayer() const
   }
 }  
 
-
-  Amg::Vector2D SiDetectorElement::correctLocalPosition(const Amg::Vector2D &position) const
-{
-  Amg::Vector2D correctedPosition(position);
-  correctedPosition[distPhi] += getLorentzCorrection();
-  return correctedPosition;
-}
-
 // compute sin(tilt angle) at center:
 double SiDetectorElement::sinTilt() const
 {
@@ -1056,22 +1032,6 @@ SiDetectorElement::nearBondGap(HepGeom::Point3D<double> globalPosition, double e
   return m_design->nearBondGap(localPosition(globalPosition), etaTol);
 }  
 
-
-  Amg::Vector2D
-SiDetectorElement::localPositionOfCell(const SiCellId &cellId) const
-{
-  Amg::Vector2D pos(m_design->localPositionOfCell(cellId));
-  return correctLocalPosition(pos);
-}
-
-Amg::Vector2D
-SiDetectorElement::localPositionOfCell(const Identifier & id) const
-{
-  SiCellId cellId = cellIdFromIdentifier(id);
-  Amg::Vector2D pos(m_design->localPositionOfCell(cellId));
-  return correctLocalPosition(pos);
-}
-
 Amg::Vector2D
 SiDetectorElement::rawLocalPositionOfCell(const SiCellId &cellId) const
 {
diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/SiRegionSelectorTable.h b/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/SiRegionSelectorTable.h
index 74db04d0e81c28589efb46a30a72e421c985344a..8009d741ff0195793d4fd7d571cb9e5402db27fb 100755
--- a/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/SiRegionSelectorTable.h
+++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/SiRegionSelectorTable.h
@@ -8,15 +8,16 @@
 #include "RegSelLUT/IRegionIDLUT_Creator.h"
 
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
 #include "PixelCabling/IPixelCablingSvc.h"
+#include "SCT_Cabling/ISCT_CablingTool.h"
 
-class RegSelSiLUT;
-class ISCT_CablingSvc;
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/ServiceHandle.h"
 
 #include <string>
 
+class RegSelSiLUT;
+
 /////////////////////////////////////////////////////////////////////////////
 
 class SiRegionSelectorTable : public AthAlgTool, virtual public IRegionIDLUT_Creator
@@ -47,7 +48,7 @@ private:
 
   // cablings
   ServiceHandle<IPixelCablingSvc> m_pixIdMapping;
-  ServiceHandle<ISCT_CablingSvc>  m_sctCablingSvc; // Although SCT_CablingSvc migrated to SCT_CablingTool, this class accesses SCT cabling during initialization.
+  ToolHandle<ISCT_CablingTool>  m_sctCablingToolCB; // This class accesses SCT cabling during initialization.
 
 };
 
diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx
index 9aa164c01683b6aff67cbd31ba08f9103cbc17c1..6df46e4b607c33dc09d6ede80d621d2c7a132021 100755
--- a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx
+++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegionSelectorTable.cxx
@@ -4,25 +4,23 @@
   
 #include "InDetRegionSelector/SiRegionSelectorTable.h"
 
-#include "CLHEP/Units/SystemOfUnits.h"
-
 #include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetReadoutGeometry/SiDetectorManager.h"
 #include "Identifier/IdentifierHash.h"
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/PixelID.h"
-#include "SCT_Cabling/ISCT_CablingSvc.h"
-
-#include <iostream>
-#include <fstream>
-#include <fstream>
 
 #include "RegSelLUT/StoreGateIDRS_ClassDEF.h" 
-
 #include "RegSelLUT/RegSelModule.h" 
 #include "RegSelLUT/RegSelSiLUT.h" 
 
+#include "CLHEP/Units/SystemOfUnits.h"
+
+#include <iostream>
+#include <fstream>
+#include <fstream>
+
 using namespace InDetDD;
 using namespace std;
 
@@ -42,7 +40,7 @@ SiRegionSelectorTable::SiRegionSelectorTable(const std::string& type,
      m_printTable(false),
      m_noDBM(true),
      m_pixIdMapping("PixelCablingSvc", name),
-     m_sctCablingSvc("SCT_CablingSvc",name)
+     m_sctCablingToolCB("SCT_CablingToolCB")
 {
   declareInterface<IRegionIDLUT_Creator>(this);
   declareProperty("ManagerName", m_managerName);
@@ -128,8 +126,8 @@ SiRegionSelectorTable::createTable()
       return StatusCode::FAILURE;
     }
   } else { // SCT
-    if (m_sctCablingSvc.retrieve().isFailure()) {
-      msg(MSG::ERROR) << "Can't get the SCT cabling service." << endmsg;
+    if (m_sctCablingToolCB.retrieve().isFailure()) {
+      msg(MSG::ERROR) << "Can't get the SCT_CablingToolCB." << endmsg;
       return StatusCode::FAILURE;
     }
   }
@@ -189,7 +187,7 @@ SiRegionSelectorTable::createTable()
 	if ( sctId!=0 ) {      
 	  barrelEC  = sctId->barrel_ec(element->identify());
 	  layerDisk = sctId->layer_disk(element->identify());
-	  robId=m_sctCablingSvc->getRobIdFromOfflineId(element->identify());       
+	  robId=m_sctCablingToolCB->getRobIdFromOfflineId(element->identify());
 	}
 	else { 
 	  msg(MSG::ERROR) << " could not get SCT_ID for " << element->getIdHelper() << endmsg;
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_CablingSvc.h b/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_CablingSvc.h
deleted file mode 100644
index c884f98ed68b9f78296ede3757117762425bda3c..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_CablingSvc.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef ISCT_CablingSvc_h
-#define ISCT_CablingSvc_h
-/**
- * @file ISCT_CablingSvc.h
- * Header file for abstract interface to SCT cabling service
- * @author Shaun Roe
- * @date 20 October, 2008
- **/
-
-//standard includes
-#include <cstdint> //C++11
-#include <vector>
-
-//Gaudi includes
-#include "GaudiKernel/IInterface.h"
-
-//InnerDetector
-//to ensure clients can actually use the conversion constructors, include these here (otherwise could be forward declared)
-#include "SCT_Cabling/SCT_SerialNumber.h"
-#include "SCT_Cabling/SCT_OnlineId.h"
-
-//fwd declarations
-
-class Identifier;
-class IdentifierHash;
-
-/**
- * @class ISCT_CablingSvc
- * Client interface to the cabling, providing conversions between online and offline identifiers
- **/
-class ISCT_CablingSvc: virtual public IInterface {
- public:
-  /// no-op destructor
-  virtual ~ISCT_CablingSvc() = default;
-
-  /// interfaceID re-implemented from IInterface
-  static const InterfaceID& interfaceID();
-
-  /// return offline hash, given the online Id (used by decoders)
-  virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings = true) const = 0;
-
-  /// return the online Id, given a hash (used by simulation encoders)
-  virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash) const = 0;
-
-  /// return the rob/rod Id, given a hash (used by simulation encoders)
-  virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash) const = 0;
-
-  /// return the online Id, given an offlineId
-  virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier& offlineId) const = 0;
-
-  /// return the rob/rod Id, given an offlineId (used by simulation encoders)
-  virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId) const = 0;
-
-  /// size of the data structure (for the SCT should be 8176, one for each module side)
-  virtual unsigned int size() const = 0;
-
-  /// is the data structure empty?
-  virtual bool empty() const = 0;
-
-  /// get hash from a module serial number, needed in the conditions service because configurations are stored by module s/n
-  virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber& sn) const = 0;
-
-  /// get module serial number from hash, needed during filling of data structure
-  virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash& hash) const = 0;
-
-  /// fill a users vector with all the RodIds
-  virtual void getAllRods(std::vector<std::uint32_t>& usersVector) const = 0;
-
-  /// fill a user's vector with all the hash ids which belong to a given rod
-  virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const = 0;
-
-  /// insert the hashId, onlineId and serial number to the data, used only within this package to fill the data structure
-  virtual bool insert(const IdentifierHash& hash, const SCT_OnlineId& onlineId, const SCT_SerialNumber& sn) = 0;
-};
-
-inline const InterfaceID& ISCT_CablingSvc::interfaceID() {
-  static const InterfaceID IID("ISCT_CablingSvc",1,0);
-  return IID;
-}
-
-#endif
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_FillCabling.h b/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_FillCabling.h
index 71a502a5f9ee27bfc2e584b74927340af7b6981a..1b2389ed5f76522f2c2b552ee9c4595b43874004 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_FillCabling.h
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_FillCabling.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 ISCT_FillCabling_H
@@ -7,21 +7,20 @@
 /**   
  *   @file ISCT_Fill_Cabling.h
  *
- *   @brief Interface for services which fill an SCT cabling object
+ *   @brief Interface for tools which fill an SCT cabling object
  *
  *   @author Shaun Roe
  *   @date 05/10/2008
  */
 
-//STL includes
-#include <string>
-
 //Gaudi includes
-#include "GaudiKernel/IInterface.h"
+#include "GaudiKernel/IAlgTool.h"
 
+//STL includes
+#include <string>
 
 //fwd declarations
-class ISCT_CablingSvc;
+class SCT_CablingData;
 class StatusCode;
  
 /**
@@ -29,13 +28,13 @@ class StatusCode;
  *    @brief Interface base class for objects which fill the SCT Cabling.
  *
  */
-class ISCT_FillCabling:virtual public IInterface{
+class ISCT_FillCabling: virtual public IAlgTool {
  public:
   ///Virtual destructor
-  virtual ~ISCT_FillCabling(){}
+  virtual ~ISCT_FillCabling() = default;
   
   /// interfaceID re-implemented from IInterface
-  static const InterfaceID& interfaceID();
+  DeclareInterfaceID(ISCT_FillCabling, 1, 0);
 
   /** May set the data source to textFile, database etc
    * @param[in] @c string name of datasource
@@ -47,10 +46,10 @@ class ISCT_FillCabling:virtual public IInterface{
    */
   virtual std::string getDataSource() const = 0;
   
-  /**Fill the cabling maps
-   * @param[in] @c SCT_CablingSvc& , reference to the underlying data service
+  /**Get the cabling maps
+   * @return @c cabling map object
    */
-  virtual StatusCode fillMaps(ISCT_CablingSvc* cabling) const = 0;
+  virtual SCT_CablingData getMaps() const = 0;
   
   /**Report whether the map was filled
    * @return @c bool
@@ -63,9 +62,4 @@ class ISCT_FillCabling:virtual public IInterface{
   virtual bool canFillDuringInitialize() const = 0;
 };//end of class
 
-inline const InterfaceID& ISCT_FillCabling::interfaceID() {
-  static const InterfaceID IID("ISCT_FillCabling",1,0);
-  return IID;
-}
-
-#endif
+#endif // ISCT_FillCabling_H
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfig.py b/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfig.py
index 97271b64a4cfe9084d29b480a00f73bcdb126e89..7b287d3402455b42e5c466cb7de1f8634adfb39d 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfig.py
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfig.py
@@ -50,12 +50,6 @@ def setSCT_CablingDataBase():
 
     return SCTConfigurationFolderPath
 
-def getSCT_CablingSvc(name="SCT_CablingSvc", **kwargs):
-    setSCT_CablingDataBase()
-    kwargs.setdefault("DataSource", "CORACOOL")
-    from SCT_Cabling.SCT_CablingConf import SCT_CablingSvc
-    return CfgMgr.SCT_CablingSvc(name, **kwargs)
-
 def getSCT_CablingTool(name="SCT_CablingTool", **kwargs):
     from SCT_Cabling.SCT_CablingConf import SCT_CablingTool
     return CfgMgr.SCT_CablingTool(name, **kwargs)
@@ -68,3 +62,12 @@ def getSCT_CablingCondAlgFromCoraCool(name="SCT_CablingCondAlgFromCoraCool", **k
     kwargs.setdefault("ReadKeyGeo", folderPath+"Geog")
     from SCT_Cabling.SCT_CablingConf import SCT_CablingCondAlgFromCoraCool
     return CfgMgr.SCT_CablingCondAlgFromCoraCool(name, **kwargs)
+
+def getSCT_CablingToolCB(name="SCT_CablingToolCB", **kwargs):
+    from SCT_Cabling.SCT_CablingConf import SCT_CablingToolCB
+    return CfgMgr.SCT_CablingToolCB(name, **kwargs)
+
+def getSCT_FillCablingFromCoraCool(name="SCT_FillCablingFromCoraCool", **kwargs):
+    from SCT_Cabling.SCT_CablingConf import SCT_FillCablingFromCoraCool
+    return CfgMgr.SCT_FillCablingFromCoraCool(name, **kwargs)
+
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfigDb.py b/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfigDb.py
index c678367de5bf24badfce95af17077817d8100a7b..0284d624ca803473559aee81a6ac064aaf3a890c 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfigDb.py
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfigDb.py
@@ -2,8 +2,9 @@
 
 # https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/ConfiguredFactory
 
-from AthenaCommon.CfgGetter import addService, addTool, addAlgorithm
+from AthenaCommon.CfgGetter import addTool, addAlgorithm
 
-addService("SCT_Cabling.SCT_CablingConfig.getSCT_CablingSvc", "SCT_CablingSvc")
 addTool("SCT_Cabling.SCT_CablingConfig.getSCT_CablingTool", "SCT_CablingTool")
 addAlgorithm("SCT_Cabling.SCT_CablingConfig.getSCT_CablingCondAlgFromCoraCool", "SCT_CablingCondAlgFromCoraCool")
+addTool("SCT_Cabling.SCT_CablingConfig.getSCT_CablingToolCB", "SCT_CablingToolCB")
+addTool("SCT_Cabling.SCT_CablingConfig.getSCT_FillCablingFromCoraCool", "SCT_FillCablingFromCoraCool")
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.cxx
deleted file mode 100644
index ef8258df6b401f062873c90000049561caa0140b..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.cxx
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @file SCT_CablingSvc.cxx
- * Implementation file for SCT cabling service
- * @author Shaun Roe
- * @date 20 October, 2008
- **/
- 
-//this package
-#include "SCT_CablingSvc.h"
-#include "SCT_Cabling/ISCT_FillCabling.h"
-#include "SCT_CablingUtilities.h"
-
-//Indet
-#include "InDetIdentifier/SCT_ID.h"
-#include "Identifier/Identifier.h"
-
-//Gaudi includes
-#include "GaudiKernel/StatusCode.h"
-#include "GaudiKernel/IIncidentSvc.h"
-#include "EventInfo/EventIncident.h"
-#include "StoreGate/StoreGateSvc.h"
-
-//constants in file scope
-static const std::string coracool("CORACOOL");
-static const std::string coolVectorPayload("COOLVECTOR");
-static const std::string coracoolFiller("SCT_FillCablingFromCoraCool");
-static const std::string coolVectorFiller("SCT_FillCablingFromCoraCool");
-static const std::string file("SCT_Sept08Cabling_svc.dat");
-static const std::string textFiller("SCT_FillCablingFromText");
-static const std::string defaultSource(coracool);
-//invalid identifiers to return in case of error
-static const SCT_OnlineId invalidId;
-static const IdentifierHash invalidHash;
-static const SCT_SerialNumber invalidSn;
-
-//Utility functions at file scope
-namespace {
-  //make a number even
-  IdentifierHash even(const IdentifierHash& hash) {
-    return (hash>>1) << 1;
-  }
-}
-
-// Constructor
-SCT_CablingSvc::SCT_CablingSvc(const std::string& name, ISvcLocator* pSvcLocator):
-  AthService(name,pSvcLocator), m_cablingFiller("ISCT_FillCabling",name), m_idHelper(nullptr), m_usingDatabase(true) {
-  declareProperty("DataSource", m_cablingDataSource=defaultSource);
-}
-
-//
-void
-SCT_CablingSvc::handle(const Incident& runIncident) {
-  ATH_MSG_INFO("Cabling event handler called.");
-  if (runIncident.type()==IncidentType::BeginRun) {
-    if (not empty()) {
-      ATH_MSG_INFO("Cabling data was already filled");
-    } else {
-      if (m_cablingFiller->fillMaps(this).isFailure()) {
-        ATH_MSG_FATAL("Callback to fill the cabling FAILED");
-      }
-    }
-  } else if (runIncident.type()==IncidentType::EndRun) {
-    m_data.invalidate();
-    ATH_MSG_INFO("Cabling has been emptied");
-  }
-}
-
-//
-StatusCode
-SCT_CablingSvc::initialize() {
-  StatusCode sc(StatusCode::FAILURE);
-  ATH_MSG_INFO("Initialize SCT cabling " << PACKAGE_VERSION);
-  const std::string cablingDataSource = m_cablingDataSource.value();
-  m_usingDatabase=(cablingDataSource == coracool) or (cablingDataSource == coolVectorPayload) or (cablingDataSource == file);
-  //select which service name to use
-  std::string cablingFillerName=coracoolFiller; //default to coracool
-  if (cablingDataSource == coolVectorPayload) cablingFillerName = coolVectorFiller;
-  if (not m_usingDatabase) cablingFillerName = textFiller;
-  //
-  m_cablingFiller=ServiceHandle<ISCT_FillCabling>(cablingFillerName,name());
-  if (m_cablingFiller.retrieve().isSuccess()) {
-    if (m_cablingFiller->setDataSource(m_cablingDataSource.value()).isFailure()) {
-      ATH_MSG_FATAL("Failed to find data");
-      return sc;
-    }
-    // if the filler can do its job during initialisation, then do it...
-    if (m_cablingFiller->canFillDuringInitialize()) {
-      sc=m_cablingFiller->fillMaps(this);
-    } else { //... otherwise, register a handler to fill on the 'BeginRun' incident.
-      ServiceHandle<IIncidentSvc> incidentSvc("IncidentSvc",name());
-      sc = incidentSvc.retrieve();
-      if (sc.isFailure()) {
-        ATH_MSG_FATAL("Failed to retrieve the IncidentSvc");
-        return StatusCode::FAILURE;
-      } else { 
-        const long priority(1); // Default is 0. To be called before RegSelSvc, a value slightly higher than the default value is necessary.
-        incidentSvc->addListener(this, IncidentType::BeginRun, priority);
-        incidentSvc->addListener(this, IncidentType::EndRun);
-      }
-    }
-  }
-  //
-  ServiceHandle<StoreGateSvc> detStore("DetectorStore", name());
-  ATH_CHECK(detStore.retrieve());
-  ATH_CHECK(detStore->retrieve(m_idHelper, "SCT_ID"));
-  return sc;
-}
-
-// 
-StatusCode
-SCT_CablingSvc::finalize() {
-  ATH_MSG_INFO("Thank-you for using the SCT_CablingSvc, version "<<PACKAGE_VERSION);
-  ATH_MSG_INFO("The cabling data source was "<<m_cablingFiller->getDataSource());
-  return StatusCode::SUCCESS;
-}
-
-//
-StatusCode
-SCT_CablingSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
-  if (IIncidentListener::interfaceID().versionMatch(riid)) {
-    *ppvInterface = dynamic_cast<IIncidentListener*>(this);
-  } else if (ISCT_CablingSvc::interfaceID().versionMatch(riid)) {
-    *ppvInterface = dynamic_cast<ISCT_CablingSvc*>(this);
-  } else {
-    // Interface is not directly available : try out a base class
-    return AthService::queryInterface(riid, ppvInterface);
-  }
-  addRef();
-  return StatusCode::SUCCESS;
-}
-
-//
-unsigned int
-SCT_CablingSvc::size() const {
-  return m_data.getHashEntries();
-}
-
-//
-bool
-SCT_CablingSvc::empty() const {
-  return (size()==0);
-}
-
-//
-IdentifierHash 
-SCT_CablingSvc::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings) const {
-  //is it valid at all?
-  if (not onlineId.is_valid()) {
-    if (withWarnings) ATH_MSG_WARNING("Invalid online id ("<<std::hex<<onlineId<<") "<<std::dec);
-    return invalidHash;
-  }
-  //is it specifically valid for the given datasource?
-  if (not onlineId.is_valid(m_usingDatabase)) {
-    const std::string alternative=m_usingDatabase?"text file cabling":"cabling from database";
-    if (withWarnings) ATH_MSG_WARNING("Invalid online id ("<<std::hex<<onlineId<<") try using the "<<alternative<<std::dec);
-    return invalidHash;
-  }
-
-  return m_data.getHashFromOnlineId(onlineId);
-}
-
-//
-SCT_OnlineId 
-SCT_CablingSvc::getOnlineIdFromHash(const IdentifierHash& hash) const {
-  return m_data.getOnlineIdFromHash(hash);
-}
-
-//
-SCT_OnlineId
-SCT_CablingSvc::getOnlineIdFromOfflineId(const Identifier& offlineId) const {
-  if (not offlineId.is_valid()) return invalidId;
-  IdentifierHash hash(m_idHelper->wafer_hash(offlineId));
-  return getOnlineIdFromHash(hash);
-}
-
-//
-IdentifierHash
-SCT_CablingSvc::getHashFromSerialNumber(const SCT_SerialNumber& sn) const {
-  if (not sn.isWellFormed()) return invalidHash;
-  return m_data.getHashFromSerialNumber(sn);
-}
-
-SCT_SerialNumber
-SCT_CablingSvc::getSerialNumberFromHash(const IdentifierHash& hash) const {
-  if (not hash.is_valid()) return invalidSn;
-  //hash must be even
-  IdentifierHash evenHash{even(hash)};
-  return m_data.getSerialNumberFromHash(evenHash);
-}
-
-void
-SCT_CablingSvc::getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const {
-  SCT_OnlineId firstPossibleId(rodId,SCT_OnlineId::FIRST_FIBRE);
-  const bool withWarnings(false);
-  for (SCT_OnlineId i(firstPossibleId);i!=SCT_OnlineId::INVALID_ONLINE_ID;++i) {
-    IdentifierHash thisHash(getHashFromOnlineId(i, withWarnings));
-    if (thisHash != invalidHash) {
-      usersVector.push_back(thisHash);
-    }
-  }
-}
-
-//
-bool
-SCT_CablingSvc::insert(const IdentifierHash& hash, const SCT_OnlineId& onlineId, const SCT_SerialNumber& sn) {
-  if (not sn.isWellFormed()) {
-    ATH_MSG_FATAL("Serial number is not in correct format");
-    return false;
-  }
-  if (not hash.is_valid()) {
-    ATH_MSG_FATAL("Invalid hash: "<<hash);
-    return false;
-  }
-  
-  if (not m_data.setHashForOnlineId(hash, onlineId)) return false;
-  if (not m_data.setOnlineIdForHash(onlineId, hash)) return false;
-
-  //only insert even hashes for serial numbers
-  IdentifierHash evenHash{even(hash)};
-  bool successfulInsert{m_data.setHashForSerialNumber(evenHash, sn)};
-  successfulInsert &= m_data.setSerialNumberForHash(sn, evenHash);
-  // in this form, the m_data.getHashEntries() will be half the number of hashes
-  if (successfulInsert) {
-    m_data.setRod(onlineId.rod()); //move this here so insertion only happens for valid onlineId, hash
-  }
-  return true;
-}
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.cxx
index 33d247439c1102f63d42823da4ceb792bb0127c5..440d98b5e9ed300c38425cba801c5f0ac094e03b 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.cxx
@@ -42,8 +42,12 @@ namespace {
 // Constructor
 SCT_CablingTool::SCT_CablingTool(const std::string& type, const std::string& name, const IInterface* parent) :
   base_class(type, name, parent),
-  m_idHelper(nullptr),
-  m_usingDatabase(true) {
+  m_idHelper{nullptr},
+  m_usingDatabase{true},
+  m_mutex{},
+  m_cache{},
+  m_condData{}
+{
   declareProperty("DataSource", m_cablingDataSource=defaultSource);
 }
 
@@ -181,10 +185,21 @@ SCT_CablingTool::getHashesForRod(std::vector<IdentifierHash>& usersVector, const
 
 const SCT_CablingData*
 SCT_CablingTool::getData() const {
-  SG::ReadCondHandle<SCT_CablingData> data{m_data};
-  if (not data.isValid()) {
-    ATH_MSG_ERROR("Failed to get " << m_data.key());
-    return nullptr;
+  static const EventContext::ContextEvt_t invalidValue{EventContext::INVALID_CONTEXT_EVT};
+  const EventContext& ctx{Gaudi::Hive::currentContext()};
+  const EventContext::ContextID_t slot{ctx.slot()};
+  const EventContext::ContextEvt_t evt{ctx.evt()};
+  std::lock_guard<std::mutex> lock{m_mutex};
+  if (slot>=m_cache.size()) {
+    m_cache.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement.
   }
-  return *data;
+  if (m_cache[slot]!=evt) {
+    SG::ReadCondHandle<SCT_CablingData> condData{m_data};
+    if (not condData.isValid()) {
+      ATH_MSG_ERROR("Failed to get " << m_data.key());
+    }
+    m_condData.set(*condData);
+    m_cache[slot] = evt;
+  }
+  return m_condData.get();
 }
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.h b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.h
index 1208d9934e5aa35ff3e10a9b234fb4bbc9bc0347..0cd29cac31cc6a800dda5f38455c9b20f5e6f995 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.h
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingTool.h
@@ -19,8 +19,14 @@
 #include "SCT_Cabling/SCT_CablingData.h"
 #include "StoreGate/ReadCondHandleKey.h"
 
+// Gaudi includes
+#include "GaudiKernel/ContextSpecificPtr.h"
+#include "GaudiKernel/EventContext.h"
+
 //STL includes
+#include <mutex>
 #include <string>
+#include <vector>
 
 //fwd declarations
 class StatusCode;
@@ -87,6 +93,13 @@ class SCT_CablingTool: public extends<AthAlgTool, ISCT_CablingTool> {
   const SCT_ID* m_idHelper; //!< helper for offlineId/hash conversions
   bool m_usingDatabase;
 
+  // Mutex to protect the contents.
+  mutable std::mutex m_mutex;
+  // Cache to store events for slots
+  mutable std::vector<EventContext::ContextEvt_t> m_cache;
+  // Pointer of SCT_CablingData
+  mutable Gaudi::Hive::ContextSpecificPtr<const SCT_CablingData> m_condData;
+
   const SCT_CablingData* getData() const;
 };
 
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..f9a11d8143e0ced2ecbbece71ba52d2edecbf393
--- /dev/null
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.cxx
@@ -0,0 +1,185 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file SCT_CablingToolCB.cxx
+ * Implementation file for SCT cabling tool using call back
+ * @author Shaun Roe
+ * @date 20 October, 2008
+ **/
+ 
+//this package
+#include "SCT_CablingToolCB.h"
+#include "SCT_Cabling/ISCT_FillCabling.h"
+#include "SCT_CablingUtilities.h"
+
+//Indet
+#include "InDetIdentifier/SCT_ID.h"
+#include "Identifier/Identifier.h"
+
+//Gaudi includes
+#include "GaudiKernel/StatusCode.h"
+#include "GaudiKernel/IIncidentSvc.h"
+#include "EventInfo/EventIncident.h"
+
+//constants in file scope
+static const std::string coracool("CORACOOL");
+static const std::string coolVectorPayload("COOLVECTOR");
+static const std::string file("SCT_Sept08Cabling_svc.dat");
+static const std::string defaultSource(coracool);
+//invalid identifiers to return in case of error
+static const SCT_OnlineId invalidId;
+static const IdentifierHash invalidHash;
+static const SCT_SerialNumber invalidSn;
+
+//Utility functions at file scope
+namespace {
+  //make a number even
+  IdentifierHash even(const IdentifierHash& hash) {
+    return (hash>>1) << 1;
+  }
+}
+
+// Constructor
+SCT_CablingToolCB::SCT_CablingToolCB(const std::string& type, const std::string& name, const IInterface* parent) :
+  base_class(type, name, parent), m_idHelper(nullptr), m_usingDatabase(true) {
+  declareProperty("DataSource", m_cablingDataSource=defaultSource);
+}
+
+//
+void
+SCT_CablingToolCB::handle(const Incident& runIncident) {
+  ATH_MSG_INFO("Cabling event handler called.");
+  if (runIncident.type()==IncidentType::BeginRun) {
+    if (not empty()) {
+      ATH_MSG_INFO("Cabling data was already filled");
+    } else {
+      if (not m_usingDatabase) {
+        m_data = m_cablingFillerText->getMaps();
+      } else {
+        m_data = m_cablingFillerCoraCool->getMaps();
+      }
+    }
+  } else if (runIncident.type()==IncidentType::EndRun) {
+    m_data.invalidate();
+    ATH_MSG_INFO("Cabling has been emptied");
+  }
+}
+
+//
+StatusCode
+SCT_CablingToolCB::initialize() {
+  ATH_MSG_INFO("Initialize SCT cabling " << PACKAGE_VERSION);
+  const std::string cablingDataSource = m_cablingDataSource.value();
+  m_usingDatabase=(cablingDataSource == coracool) or (cablingDataSource == coolVectorPayload) or (cablingDataSource == file);
+  //select which service name to use
+  bool filled{false};
+  if (not m_usingDatabase) {
+    m_cablingFillerCoraCool.disable();
+    ATH_CHECK(m_cablingFillerText.retrieve());
+    ATH_CHECK(m_cablingFillerText->setDataSource(m_cablingDataSource.value()));
+    if (m_cablingFillerText->canFillDuringInitialize()) {
+      m_data = m_cablingFillerText->getMaps();
+      filled = true;
+    }
+  } else {
+    m_cablingFillerText.disable();
+    ATH_CHECK(m_cablingFillerCoraCool.retrieve());
+    ATH_CHECK(m_cablingFillerCoraCool->setDataSource(m_cablingDataSource.value()));
+    if (m_cablingFillerCoraCool->canFillDuringInitialize()) {
+      m_data = m_cablingFillerCoraCool->getMaps();
+      filled = true;
+    }
+  }
+
+  if (not filled) { // register a handler to fill on the 'BeginRun' incident.
+    ServiceHandle<IIncidentSvc> incidentSvc("IncidentSvc", name());
+    ATH_CHECK(incidentSvc.retrieve());
+    const long priority(1); // Default is 0. To be called before RegSelSvc, a value slightly higher than the default value is necessary.
+    incidentSvc->addListener(this, IncidentType::BeginRun, priority);
+    incidentSvc->addListener(this, IncidentType::EndRun);
+  }
+  //
+  ATH_CHECK(detStore()->retrieve(m_idHelper, "SCT_ID"));
+  return StatusCode::SUCCESS;
+}
+
+// 
+StatusCode
+SCT_CablingToolCB::finalize() {
+  ATH_MSG_INFO("Thank-you for using the SCT_CablingToolCB, version "<<PACKAGE_VERSION);
+  ATH_MSG_INFO("The cabling data source was "<< ((not m_usingDatabase) ? m_cablingFillerText->getDataSource() : m_cablingFillerCoraCool->getDataSource()));
+  return StatusCode::SUCCESS;
+}
+
+//
+unsigned int
+SCT_CablingToolCB::size() const {
+  return m_data.getHashEntries();
+}
+
+//
+bool
+SCT_CablingToolCB::empty() const {
+  return (size()==0);
+}
+
+//
+IdentifierHash 
+SCT_CablingToolCB::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings) const {
+  //is it valid at all?
+  if (not onlineId.is_valid()) {
+    if (withWarnings) ATH_MSG_WARNING("Invalid online id ("<<std::hex<<onlineId<<") "<<std::dec);
+    return invalidHash;
+  }
+  //is it specifically valid for the given datasource?
+  if (not onlineId.is_valid(m_usingDatabase)) {
+    const std::string alternative=m_usingDatabase?"text file cabling":"cabling from database";
+    if (withWarnings) ATH_MSG_WARNING("Invalid online id ("<<std::hex<<onlineId<<") try using the "<<alternative<<std::dec);
+    return invalidHash;
+  }
+
+  return m_data.getHashFromOnlineId(onlineId);
+}
+
+//
+SCT_OnlineId 
+SCT_CablingToolCB::getOnlineIdFromHash(const IdentifierHash& hash) const {
+  return m_data.getOnlineIdFromHash(hash);
+}
+
+//
+SCT_OnlineId
+SCT_CablingToolCB::getOnlineIdFromOfflineId(const Identifier& offlineId) const {
+  if (not offlineId.is_valid()) return invalidId;
+  IdentifierHash hash(m_idHelper->wafer_hash(offlineId));
+  return getOnlineIdFromHash(hash);
+}
+
+//
+IdentifierHash
+SCT_CablingToolCB::getHashFromSerialNumber(const SCT_SerialNumber& sn) const {
+  if (not sn.isWellFormed()) return invalidHash;
+  return m_data.getHashFromSerialNumber(sn);
+}
+
+SCT_SerialNumber
+SCT_CablingToolCB::getSerialNumberFromHash(const IdentifierHash& hash) const {
+  if (not hash.is_valid()) return invalidSn;
+  //hash must be even
+  IdentifierHash evenHash{even(hash)};
+  return m_data.getSerialNumberFromHash(evenHash);
+}
+
+void
+SCT_CablingToolCB::getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const {
+  SCT_OnlineId firstPossibleId(rodId,SCT_OnlineId::FIRST_FIBRE);
+  const bool withWarnings(false);
+  for (SCT_OnlineId i(firstPossibleId);i!=SCT_OnlineId::INVALID_ONLINE_ID;++i) {
+    IdentifierHash thisHash(getHashFromOnlineId(i, withWarnings));
+    if (thisHash != invalidHash) {
+      usersVector.push_back(thisHash);
+    }
+  }
+}
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.h b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.h
similarity index 64%
rename from InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.h
rename to InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.h
index 685408c2fb1a871066205f3c9b48b755c4f5d5f3..2af4d4691efe9276117c6fe95057df522a85d883 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.h
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingToolCB.h
@@ -1,40 +1,33 @@
 /*
-  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 SCT_CablingSvc_h
-#define SCT_CablingSvc_h
+#ifndef SCT_CablingToolCB_h
+#define SCT_CablingToolCB_h
 /**
- * @file SCT_CablingSvc.h
- * Header file for  SCT cabling service
+ * @file SCT_CablingToolCB.h
+ * Header file for  SCT cabling tool using call back
  * @author Shaun Roe
  * @date 20 October, 2008
  **/
 
-//STL includes
-#include <string>
-#include <vector>
-//uint32 in std: namespace
-#include <cstdint>
-
-//Gaudi includes
-#include "AthenaBaseComps/AthService.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/IIncidentListener.h"
-
-//package includes
-//these are in the baseclass:
-//#include "SCT_Cabling/SCT_SerialNumber.h"
-//#include "SCT_Cabling/SCT_OnlineId.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "SCT_Cabling/ISCT_CablingTool.h"
 
 #include "Identifier/IdentifierHash.h"
-#include "SCT_Cabling/ISCT_CablingSvc.h"
 #include "SCT_Cabling/ISCT_FillCabling.h"
 #include "SCT_Cabling/SCT_CablingData.h"
 
+//Gaudi includes
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/IIncidentListener.h"
+
+//STL includes
+#include <cstdint> //uint32 in std: namespace
+#include <string>
+#include <vector>
+
 //fwd declarations
-template <class TYPE> class SvcFactory;
-class ISvcLocator;
 class StatusCode;
 class InterfaceID;
 class Incident;
@@ -42,10 +35,9 @@ class SCT_ID;
 class Identifier;
 
 /**
- * @class SCT_CablingSvc, providing mappings of online and offline identifiers and also serial numbers
+ * @class SCT_CablingToolCB, providing mappings of online and offline identifiers and also serial numbers
  **/
-class SCT_CablingSvc: virtual public ISCT_CablingSvc, virtual public IIncidentListener, public AthService {
-  friend class SvcFactory<SCT_CablingSvc>;
+class SCT_CablingToolCB: public extends<AthAlgTool, ISCT_CablingTool, IIncidentListener> {
  public:
 
   ///Incident listener method
@@ -53,15 +45,13 @@ class SCT_CablingSvc: virtual public ISCT_CablingSvc, virtual public IIncidentLi
     
   //@name Service methods, reimplemented
   //@{
-  SCT_CablingSvc(const std::string& name, ISvcLocator* svc);
-  virtual ~SCT_CablingSvc() = default;
+  SCT_CablingToolCB(const std::string& type, const std::string& name, const IInterface* parent);
+  virtual ~SCT_CablingToolCB() = default;
   virtual StatusCode initialize() override;
   virtual StatusCode finalize() override;
-  //interfaceID() implementation is in the baseclass
-  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
   //@}
   
-  //@name ISCT_CablingSvc methods implemented, these are visible to clients
+  //@name ISCT_CablingToolCB methods implemented, these are visible to clients
   //@{
   /// return offline hash, given the online Id (used by decoders)
   virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings=true) const override;
@@ -101,16 +91,14 @@ class SCT_CablingSvc: virtual public ISCT_CablingSvc, virtual public IIncidentLi
   virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const override;
   //@}
 
-  /// insert the hashId, onlineId and serial number to the data, used only within this package to fill the data structure
-  virtual bool insert(const IdentifierHash& hash, const SCT_OnlineId& onlineId, const SCT_SerialNumber& sn) override;
-
  private:
   SCT_CablingData m_data;
 
-  ServiceHandle<ISCT_FillCabling> m_cablingFiller; //!< The cabling filler by baseclass handle; the concrete class is decided by job options
+  ToolHandle<ISCT_FillCabling> m_cablingFillerText{"SCT_FillCablingFromText"};
+  ToolHandle<ISCT_FillCabling> m_cablingFillerCoraCool{"SCT_FillCablingFromCoraCool"};
   StringProperty m_cablingDataSource; //!< the name of the data source
   const SCT_ID* m_idHelper; //!< helper for offlineId/hash conversions
   bool m_usingDatabase;
 };
 
-#endif // SCT_CablingSvc_h
+#endif // SCT_CablingToolCB_h
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.cxx
index aea3c0a58b6a7d1a9a23bc375f80b93dcdbf6b63..94b2985a4f665733c2c31eae0c977db70b846312 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.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
 */
 
 /**   
@@ -13,30 +13,23 @@
 
 //package includes
 #include "SCT_FillCablingFromCoraCool.h"
-#include "SCT_Cabling/ISCT_CablingSvc.h"
 #include "SCT_CablingUtilities.h"
 
-//indet includes
-#include "InDetIdentifier/SCT_ID.h"
-
 //Athena includes
-#include "PathResolver/PathResolver.h"
+#include "AthenaPoolUtilities/AthenaAttributeList.h"
 #include "Identifier/Identifier.h"
 #include "Identifier/IdentifierHash.h"
-
-//DB utilities
-#include "AthenaPoolUtilities/AthenaAttributeList.h"
+#include "InDetIdentifier/SCT_ID.h"
+#include "SCT_Cabling/SCT_CablingData.h"
 
 //Gaudi includes
 #include "GaudiKernel/StatusCode.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "StoreGate/StoreGateSvc.h"
 
 //STL
-#include <set>
-#include <utility>
 #include <algorithm>
 #include <iostream>
+#include <set>
+#include <utility>
 
 //Constants at file scope
 //Run1: folder names in COMP200 database
@@ -176,8 +169,9 @@ namespace{
 }//end of anonymous namespace
 
 // Constructor
-SCT_FillCablingFromCoraCool::SCT_FillCablingFromCoraCool(const std::string& name, ISvcLocator* pSvcLocator):
-  AthService(name,pSvcLocator), m_filled{false}, m_detStore{"DetectorStore", name} {
+SCT_FillCablingFromCoraCool::SCT_FillCablingFromCoraCool(const std::string& type, const std::string& name, const IInterface* parent) :
+  base_class(type, name, parent),
+  m_filled{false} {
   //nop
 }
 
@@ -193,19 +187,6 @@ SCT_FillCablingFromCoraCool::finalize() {
   return StatusCode::SUCCESS;
 }
 
-//
-StatusCode 
-SCT_FillCablingFromCoraCool::queryInterface(const InterfaceID& riid, void** ppvInterface) {
-  if (ISCT_FillCabling::interfaceID().versionMatch(riid)) {
-    *ppvInterface = dynamic_cast<ISCT_FillCabling*>(this);
-  } else {
-    // Interface is not directly available : try out a base class
-    return AthService::queryInterface(riid, ppvInterface);
-  }
-  addRef();
-  return StatusCode::SUCCESS;
-}
-
 //
 StatusCode 
 SCT_FillCablingFromCoraCool::setDataSource(const std::string& dataSource) {
@@ -228,22 +209,23 @@ SCT_FillCablingFromCoraCool::filled() const {
 }
 
 //
-StatusCode 
-SCT_FillCablingFromCoraCool::fillMaps(ISCT_CablingSvc* cabling) const {
+SCT_CablingData
+SCT_FillCablingFromCoraCool::getMaps() const {
+  SCT_CablingData data;
   m_filled=false;
-  if (readDataFromDb(cabling).isFailure()) {
+  if (readDataFromDb(data).isFailure()) {
     ATH_MSG_FATAL("Could not read cabling from database");
-    return StatusCode::FAILURE;
+    return data;
   }
   m_filled=true;
-  return StatusCode::SUCCESS;
+  return data;
 }
 
 //
 StatusCode
-SCT_FillCablingFromCoraCool::readDataFromDb(ISCT_CablingSvc* cabling) const {
+SCT_FillCablingFromCoraCool::readDataFromDb(SCT_CablingData& data) const {
   const SCT_ID* idHelper{nullptr};
-  if (m_detStore->retrieve(idHelper,"SCT_ID").isFailure()) {
+  if (detStore()->retrieve(idHelper,"SCT_ID").isFailure()) {
     ATH_MSG_ERROR("SCT mgr failed to retrieve");
     return StatusCode::FAILURE;
   }
@@ -471,7 +453,7 @@ SCT_FillCablingFromCoraCool::readDataFromDb(ISCT_CablingSvc* cabling) const {
         ATH_MSG_INFO("MUR, position "<<mur<<", "<<harnessPosition);
       } 
       IdentifierHash offlineIdHash{idHelper->wafer_hash(offlineId)};
-      cabling->insert(offlineIdHash, onlineId, SCT_SerialNumber(sn));
+      insert(offlineIdHash, onlineId, SCT_SerialNumber(sn), data);
       numEntries++;
     }
   }
@@ -493,11 +475,7 @@ SCT_FillCablingFromCoraCool::readDataFromDb(ISCT_CablingSvc* cabling) const {
 }
 
 bool  SCT_FillCablingFromCoraCool::successfulFolderRetrieve(const DataHandle<CondAttrListVec>& pDataVec, const std::string& folderName) const {
-  if (!m_detStore) {
-    ATH_MSG_FATAL("The detector store pointer is NULL");
-    return false;
-  }
-  if (m_detStore->retrieve(pDataVec, folderName).isFailure()) {
+  if (detStore()->retrieve(pDataVec, folderName).isFailure()) {
     ATH_MSG_FATAL("Could not retrieve AttrListVec for "<<folderName);
     return false;
   }
@@ -510,8 +488,8 @@ bool  SCT_FillCablingFromCoraCool::successfulFolderRetrieve(const DataHandle<Con
 
 std::string SCT_FillCablingFromCoraCool::determineFolder(const std::string& option1, const std::string& option2) const {
   std::string result{""};
-  const bool option1Exists{m_detStore->contains<CondAttrListVec>(option1)};
-  const bool option2Exists{m_detStore->contains<CondAttrListVec>(option2)};
+  const bool option1Exists{detStore()->contains<CondAttrListVec>(option1)};
+  const bool option2Exists{detStore()->contains<CondAttrListVec>(option2)};
   //its only sensible if either of these exists (but not both)
   const bool nonsense{option1Exists == option2Exists};
   if (nonsense) {
@@ -523,3 +501,26 @@ std::string SCT_FillCablingFromCoraCool::determineFolder(const std::string& opti
   }
   return result;
 }
+
+bool
+SCT_FillCablingFromCoraCool::insert(const IdentifierHash& hash, const SCT_OnlineId& onlineId, const SCT_SerialNumber& sn, SCT_CablingData& data) const {
+  if (not sn.isWellFormed()) {
+    ATH_MSG_FATAL("Serial number is not in correct format");
+    return false;
+  }
+  if (not hash.is_valid()) {
+    ATH_MSG_FATAL("Invalid hash: "<<hash);
+    return false;
+  }
+
+  if (not data.setHashForOnlineId(hash, onlineId)) return false;
+  if (not data.setOnlineIdForHash(onlineId, hash)) return false;
+
+  bool successfulInsert{data.setHashForSerialNumber(hash, sn)};
+  successfulInsert &= data.setSerialNumberForHash(sn, hash);
+  // in this form, the data->getHashEntries() will be half the number of hashes
+  if (successfulInsert) {
+    data.setRod(onlineId.rod()); //move this here so insertion only happens for valid onlineId, hash
+  }
+  return true;
+}
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.h b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.h
index 67ad66c88f9f60cfc0eff889347bda29503f44c8..e3c753d36a8ead00c5f18381b3cd8a73ee36fa83 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.h
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.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 SCT_FillCablingFromCoraCool_H
@@ -13,26 +13,20 @@
  *   @date 05/11/2008
  */
 
-//STL includes
-#include <string>
-
-//Gaudi includes
-#include "AthenaBaseComps/AthService.h"
-
-#include "GaudiKernel/ServiceHandle.h"
-
 //Athena includes
-#include "StoreGate/StoreGateSvc.h"
-#include "AthenaPoolUtilities/CondAttrListVec.h"
-
-//local includes
+#include "AthenaBaseComps/AthAlgTool.h"
 #include "SCT_Cabling/ISCT_FillCabling.h"
 
+#include "AthenaPoolUtilities/CondAttrListVec.h"
+
+//STL includes
+#include <string>
 
 //fwd declarations
-template <class TYPE> class SvcFactory;
-class ISvcLocator;
-class ISCT_CablingSvc;
+class IdentifierHash;
+class SCT_CablingData;
+class SCT_OnlineId;
+class SCT_SerialNumber;
 class StatusCode;
 
 /**
@@ -40,17 +34,14 @@ class StatusCode;
  *    @brief Service which fill the SCT Cabling from the database, using CoraCool.
  *
  */
-class SCT_FillCablingFromCoraCool: virtual public ISCT_FillCabling, public AthService {
-  friend class SvcFactory<SCT_FillCablingFromCoraCool>;
+class SCT_FillCablingFromCoraCool: public extends<AthAlgTool, ISCT_FillCabling> {
 public:
   //@name Service methods, reimplemented
   //@{
-  SCT_FillCablingFromCoraCool(const std::string& name, ISvcLocator* svc);
+  SCT_FillCablingFromCoraCool(const std::string& type, const std::string& name, const IInterface* parent);
   virtual ~SCT_FillCablingFromCoraCool() = default;
   virtual StatusCode initialize();
   virtual StatusCode finalize();
-  //interfaceID() implementation is in the baseclass
-  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
   //@}
   
   /** May set the data source to textFile, database etc
@@ -64,9 +55,9 @@ public:
   virtual std::string getDataSource() const;
   
   /**Fill the cabling maps
-   * @param[in] @c SCT_CablingSvc& , reference to the underlying data service
+   * @return @c cabling map object
    */
-  virtual StatusCode fillMaps(ISCT_CablingSvc* cabling) const;
+  virtual SCT_CablingData getMaps() const;
   
   /**Report whether the map was filled
    * @return @c bool
@@ -79,15 +70,17 @@ public:
   virtual bool canFillDuringInitialize() const {return false;}
 private:
   //read from db
-  StatusCode readDataFromDb(ISCT_CablingSvc* cabling) const;
+  StatusCode readDataFromDb(SCT_CablingData& data) const;
   //determine which folder to use; COMP200 style or CONDBR2 style
   std::string determineFolder(const std::string& option1, const std::string& option2) const;
   
   //retrieve a IOVDbSvc coracool dataset, give error message if it is empty or the pointer is zero
   bool successfulFolderRetrieve(const DataHandle<CondAttrListVec>& pDataVec, const std::string& folderName) const;
+
+  bool insert(const IdentifierHash& hash, const SCT_OnlineId& onlineId, const SCT_SerialNumber& sn, SCT_CablingData& data) const;
+
   mutable bool m_filled;
   std::string m_source;
-  ServiceHandle<StoreGateSvc> m_detStore;
 };//end of class
 
 #endif
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.cxx
index bf83553a95c72508894932f4fde8f7ed80d07c70..66b3870f137155024cd96e8b054d62f726cae47a 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.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
 */
 
 /**   
@@ -13,21 +13,17 @@
 
 //package includes
 #include "SCT_FillCablingFromText.h"
-#include "SCT_Cabling/ISCT_CablingSvc.h"
 #include "SCT_CablingUtilities.h"
 
-//indet includes
-#include "InDetIdentifier/SCT_ID.h"
-
 //Athena includes
-#include "PathResolver/PathResolver.h"
 #include "Identifier/Identifier.h"
 #include "Identifier/IdentifierHash.h"
-#include "StoreGate/StoreGateSvc.h"
+#include "InDetIdentifier/SCT_ID.h"
+#include "PathResolver/PathResolver.h"
+#include "SCT_Cabling/SCT_CablingData.h"
 
 //Gaudi includes
 #include "GaudiKernel/StatusCode.h"
-#include "GaudiKernel/ServiceHandle.h"
 
 //STL includes
 #include <iostream>
@@ -60,8 +56,9 @@ namespace{
 }//end of anonymous namespace
 
 // Constructor
-SCT_FillCablingFromText::SCT_FillCablingFromText(const std::string& name, ISvcLocator* pSvcLocator):
-  AthService(name,pSvcLocator), m_filled{false} {
+SCT_FillCablingFromText::SCT_FillCablingFromText(const std::string& type, const std::string& name, const IInterface* parent) :
+  base_class(type, name, parent),
+  m_filled{false} {
   //nop
 }
 
@@ -77,19 +74,6 @@ SCT_FillCablingFromText::finalize() {
   return StatusCode::SUCCESS;
 }
 
-//
-StatusCode 
-SCT_FillCablingFromText::queryInterface(const InterfaceID& riid, void** ppvInterface) {
-  if (ISCT_FillCabling::interfaceID().versionMatch(riid)) {
-    *ppvInterface = dynamic_cast<ISCT_FillCabling*>(this);
-  } else {
-    // Interface is not directly available : try out a base class
-    return AthService::queryInterface(riid, ppvInterface);
-  }
-  addRef();
-  return StatusCode::SUCCESS;
-}
-
 //
 StatusCode
 SCT_FillCablingFromText::setDataSource(const std::string& dataSource) {
@@ -115,26 +99,22 @@ SCT_FillCablingFromText::filled() const {
 }
 
 //
-StatusCode
-SCT_FillCablingFromText::fillMaps(ISCT_CablingSvc* cabling) const {
-  if (readDataFromFile(cabling).isFailure()) {
+SCT_CablingData
+SCT_FillCablingFromText::getMaps() const {
+  SCT_CablingData data;
+  if (readDataFromFile(data).isFailure()) {
     ATH_MSG_FATAL("Could not read cabling from file");
-    return StatusCode::FAILURE;
+    return data;
   }
   m_filled=true;
-  return StatusCode::SUCCESS;
+  return data;
 }
 
 //
 StatusCode
-SCT_FillCablingFromText::readDataFromFile(ISCT_CablingSvc* cabling) const {
-  ServiceHandle<StoreGateSvc> detStore{"DetectorStore", name()};
-  if (detStore.retrieve().isFailure()) {
-    ATH_MSG_FATAL("Detector service  not found !");
-    return StatusCode::FAILURE;
-  }
+SCT_FillCablingFromText::readDataFromFile(SCT_CablingData& data) const {
   const SCT_ID* idHelper{nullptr};
-  if (detStore->retrieve(idHelper, "SCT_ID").isFailure()) {
+  if (detStore()->retrieve(idHelper, "SCT_ID").isFailure()) {
     ATH_MSG_ERROR("SCT mgr failed to retrieve");
     return StatusCode::FAILURE;
   }
@@ -200,7 +180,7 @@ SCT_FillCablingFromText::readDataFromFile(ISCT_CablingSvc* cabling) const {
       robid = robidFromfile;
       onlineId = (robid & 0xFFFFFF) | (link<<24);
       //std::cout<<" "<<offlineIdHash<<" "<<std::hex<<onlineId<<" "<<std::dec<<sn<<std::endl;
-      bool success{cabling->insert(offlineIdHash, onlineId, SCT_SerialNumber(sn))};
+      bool success{insert(offlineIdHash, onlineId, SCT_SerialNumber(sn), data)};
       if (not success) {
         ATH_MSG_ERROR("Insertion of fibre failed, "<<offlineIdHash<<", "<<std::hex<<onlineId<<std::dec<<" "<<sn);
       } else {
@@ -226,7 +206,7 @@ SCT_FillCablingFromText::readDataFromFile(ISCT_CablingSvc* cabling) const {
       //find the hash for the other side: if its odd, subtract 1; if its even, add 1.
       IdentifierHash otherIdHash{offlineIdHash + (s ? -1 : 1)};
       //and its online id
-      onlineId=cabling->getOnlineIdFromHash(otherIdHash);
+      onlineId=data.getOnlineIdFromHash(otherIdHash);
       int link{static_cast<int>((onlineId>>24) & 0x7F)};
       bool cableSwapped{(link % 2)!=os}; //if its odd and side is zero, or its even and side is 1.
       //now find the newlink by incrementing or decrementing the link number from the other side, according to whether we are on
@@ -236,8 +216,8 @@ SCT_FillCablingFromText::readDataFromFile(ISCT_CablingSvc* cabling) const {
       int newOnlineId{static_cast<int>((onlineId & 0xFFFFFF)|(newlink << 24))};
       ATH_MSG_DEBUG("new: "<<std::hex<<newOnlineId);
       //start entering for the disabled fibre:
-      SCT_SerialNumber sn{cabling->getSerialNumberFromHash(offlineIdHash)};
-      bool success{cabling->insert(offlineIdHash, newOnlineId, sn)};
+      SCT_SerialNumber sn{data.getSerialNumberFromHash(offlineIdHash)};
+      bool success{insert(offlineIdHash, newOnlineId, sn, data)};
       if (not success) {
         ATH_MSG_ERROR("Insertion of disabled fibre failed, "<<offlineIdHash<<", "<<std::hex<<newOnlineId<<std::dec<<" "<<sn.str());
       } else {
@@ -249,3 +229,26 @@ SCT_FillCablingFromText::readDataFromFile(ISCT_CablingSvc* cabling) const {
   m_filled=(numEntries not_eq 0);
   return (numEntries==0) ? (StatusCode::FAILURE) : (StatusCode::SUCCESS);
 }
+
+bool
+SCT_FillCablingFromText::insert(const IdentifierHash& hash, const SCT_OnlineId& onlineId, const SCT_SerialNumber& sn, SCT_CablingData& data) const {
+  if (not sn.isWellFormed()) {
+    ATH_MSG_FATAL("Serial number is not in correct format");
+    return false;
+  }
+  if (not hash.is_valid()) {
+    ATH_MSG_FATAL("Invalid hash: "<<hash);
+    return false;
+  }
+
+  if (not data.setHashForOnlineId(hash, onlineId)) return false;
+  if (not data.setOnlineIdForHash(onlineId, hash)) return false;
+
+  bool successfulInsert{data.setHashForSerialNumber(hash, sn)};
+  successfulInsert &= data.setSerialNumberForHash(sn, hash);
+  // in this form, the data->getHashEntries() will be half the number of hashes
+  if (successfulInsert) {
+    data.setRod(onlineId.rod()); //move this here so insertion only happens for valid onlineId, hash
+  }
+  return true;
+}
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.h b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.h
index 7e0a53e79e7bbd84ba0c7eb5c86dd481f5d99dae..18d4702aeae5d536115202636052983e7494a3a1 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.h
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.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 SCT_FillCablingFromText_H
@@ -13,19 +13,18 @@
  *   @date 05/11/2008
  */
 
+//Athena includes
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "SCT_Cabling/ISCT_FillCabling.h"
+
 //STL includes
 #include <string>
 
-//Gaudi includes
-#include "AthenaBaseComps/AthService.h"
-
-//local includes
-#include "SCT_Cabling/ISCT_FillCabling.h"
-
 //fwd declarations
-template <class TYPE> class SvcFactory;
-class ISvcLocator;
-class ISCT_CablingSvc;
+class IdentifierHash;
+class SCT_CablingData;
+class SCT_OnlineId;
+class SCT_SerialNumber;
 class StatusCode;
  
 /**
@@ -33,17 +32,14 @@ class StatusCode;
  *    @brief Service which fill the SCT Cabling from plain text (a file).
  *
  */
-class SCT_FillCablingFromText: virtual public ISCT_FillCabling, public AthService {
-  friend class SvcFactory<SCT_FillCablingFromText>;
+class SCT_FillCablingFromText: public extends<AthAlgTool, ISCT_FillCabling> {
  public:
   //@name Service methods, reimplemented
   //@{
-  SCT_FillCablingFromText(const std::string& name, ISvcLocator* svc);
+  SCT_FillCablingFromText(const std::string& type, const std::string& name, const IInterface* parent);
   virtual ~SCT_FillCablingFromText() = default;
   virtual StatusCode initialize();
   virtual StatusCode finalize();
-  //interfaceID() implementation is in the baseclass
-  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
   //@}
 
   /** May set the data source to textFile, database etc
@@ -57,9 +53,9 @@ class SCT_FillCablingFromText: virtual public ISCT_FillCabling, public AthServic
   virtual std::string getDataSource() const;
   
   /**Fill the cabling maps
-   * @param[in] @c ISCT_CablingSvc& , reference to the underlying data service
+   * @return @c cabling map object
    */
-  virtual StatusCode fillMaps(ISCT_CablingSvc* cabling) const;
+  virtual SCT_CablingData getMaps() const;
   
   /**Report whether the map was filled
    * @return @c bool
@@ -70,10 +66,14 @@ class SCT_FillCablingFromText: virtual public ISCT_FillCabling, public AthServic
    * @return @c bool
    */
   virtual bool canFillDuringInitialize() const {return true;}
+
  private:
-  StatusCode readDataFromFile(ISCT_CablingSvc* cabling) const;
+  StatusCode readDataFromFile(SCT_CablingData& data) const;
+
+  bool insert(const IdentifierHash& hash, const SCT_OnlineId& onlineId, const SCT_SerialNumber& sn, SCT_CablingData& data) const;
+
   mutable bool m_filled;
   std::string m_source;
 };//end of class
 
-#endif
+#endif // SCT_FillCablingFromText_H
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/components/SCT_Cabling_entries.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/components/SCT_Cabling_entries.cxx
index a37ffd1ff9d8a88f784fe76e13e00d2cfa27ffc2..fb29b78888ee016f5fe80ce3f3d51ee2cf63c3d3 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/components/SCT_Cabling_entries.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/components/SCT_Cabling_entries.cxx
@@ -1,13 +1,13 @@
-#include "../SCT_CablingSvc.h"
 #include "../SCT_CablingTool.h"
+#include "../SCT_CablingToolCB.h"
 #include "../SCT_FillCablingFromText.h"
 #include "../SCT_FillCablingFromCoraCool.h"
 #include "../SCT_TestCablingAlg.h"
 #include "../SCT_CablingCondAlgFromCoraCool.h"
 #include "../SCT_CablingCondAlgFromText.h"
 
-DECLARE_COMPONENT( SCT_CablingSvc )
 DECLARE_COMPONENT( SCT_CablingTool )
+DECLARE_COMPONENT( SCT_CablingToolCB )
 DECLARE_COMPONENT( SCT_FillCablingFromText )
 DECLARE_COMPONENT( SCT_FillCablingFromCoraCool )
 DECLARE_COMPONENT( SCT_TestCablingAlg )
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h
index 3cab409dddce26fcd3ea471619ec52e1e350970f..e79f72d6267c713aef80dd65b865af672e41223d 100755
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h
@@ -6,9 +6,10 @@
 #define SCT_GEOMODEL_SCT_DETECTORTOOL_H
 
 #include "GeoModelUtilities/GeoModelTool.h"
-#include "GaudiKernel/ServiceHandle.h"
 #include "SCT_GeoModel/SCT_GeoModelAthenaComps.h" 
 
+#include "GaudiKernel/ServiceHandle.h"
+
 #include <string>
 
 class IGeoDbTagSvc;
@@ -38,11 +39,10 @@ public:
   virtual StatusCode align(IOVSVC_CALLBACK_ARGS) override;
 
 private:
-  std::string m_detectorName;
-  bool m_initialLayout;
-  bool m_alignable;
+  StringProperty m_detectorName{this, "DetectorName", "SCT"};
+  BooleanProperty m_alignable{this, "Alignable", true};
+  BooleanProperty m_useDynamicAlignFolders{this, "useDynamicAlignFolders", false};
   bool m_cosmic;
-  bool m_useDynamicAlignFolders;
   
   const InDetDD::SCT_DetectorManager* m_manager;
   
@@ -52,10 +52,10 @@ private:
   ServiceHandle< IRDBAccessSvc > m_rdbAccessSvc;
   ServiceHandle< IGeometryDBSvc > m_geometryDBSvc;
 
-  std::string m_run1Folder;
-  std::string m_run2L1Folder;
-  std::string m_run2L2Folder;
-  std::string m_run2L3Folder;
+  StringProperty m_run1Folder{this, "Run1Folder", "/Indet/Align"};
+  StringProperty m_run2L1Folder{this, "Run2L1Folder", "/Indet/AlignL1/ID"};
+  StringProperty m_run2L2Folder{this, "Run2L2Folder", "/Indet/AlignL2/SCT"};
+  StringProperty m_run2L3Folder{this, "Run2L3Folder", "/Indet/AlignL3"};
 };
 
 #endif // SCT_GEOMODEL_SCT_DETECTORTOOL_H
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py b/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py
index 4f4b751a3c763a5e14fdf26873b004b26ac60129..6c8522d4cace79b1ba355c989cc57b9facd43743 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py
@@ -4,7 +4,6 @@ from AthenaCommon import CfgMgr
 
 def getSCT_DetectorTool(name="SCT_DetectorTool", **kwargs):
     kwargs.setdefault("DetectorName",     "SCT");
-    kwargs.setdefault("InitialLayout",    False);
     kwargs.setdefault("Alignable",        True);
     kwargs.setdefault("RDBAccessSvc",     "RDBAccessSvc");
     kwargs.setdefault("GeometryDBSvc",    "InDetGeometryDBSvc");
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx
index d73fad042a17f729e4ee2cdff802ff411c705ca3..198744c23d82321e36c8ea1d7f8ad79ac0176fe4 100755
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx
@@ -3,9 +3,8 @@
 */
 
 #include "SCT_GeoModel/SCT_DetectorTool.h"
+
 #include "SCT_GeoModel/SCT_DetectorFactory.h" 
-#include "SCT_GeoModel/SCT_DetectorFactoryCosmic.h" 
-#include "SCT_GeoModel/SCT_GeometryManager.h" 
 #include "SCT_GeoModel/SCT_DataBase.h" 
 #include "SCT_GeoModel/SCT_MaterialManager.h" 
 #include "SCT_GeoModel/SCT_Options.h" 
@@ -16,7 +15,6 @@
 #include "GeoModelUtilities/GeoModelExperiment.h"
 #include "GeoModelInterfaces/IGeoDbTagSvc.h"
 #include "GeoModelUtilities/DecodeVersionKey.h"
-#include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/DataHandle.h"
 #include "GeometryDBSvc/IGeometryDBSvc.h"
 #include "RDBAccessSvc/IRDBAccessSvc.h"
@@ -26,8 +24,8 @@
 #include "AthenaKernel/ClassID_traits.h"
 #include "SGTools/DataProxy.h"
 
-using InDetDD::SCT_DetectorManager; 
-using InDetDD::SiDetectorManager; 
+using InDetDD::SCT_DetectorManager;
+using InDetDD::SiDetectorManager;
 
 //
 // Constructor
@@ -36,28 +34,16 @@ SCT_DetectorTool::SCT_DetectorTool(const std::string& type,
                                    const std::string& name, 
                                    const IInterface* parent)
   : GeoModelTool(type, name, parent),
-    m_detectorName{"SCT"},
-    m_initialLayout{false},
-    m_alignable{true},
-    m_cosmic{false},
-    m_useDynamicAlignFolders{false},
-    m_manager{nullptr},
-    m_geoDbTagSvc{"GeoDbTagSvc", name},
-    m_rdbAccessSvc{"RDBAccessSvc", name},
-    m_geometryDBSvc{"InDetGeometryDBSvc", name}
+  m_cosmic{false},
+  m_manager{nullptr},
+  m_geoDbTagSvc{"GeoDbTagSvc", name},
+  m_rdbAccessSvc{"RDBAccessSvc", name},
+  m_geometryDBSvc{"InDetGeometryDBSvc", name}
 {
   // Get parameter values from jobOptions file
-  declareProperty("DetectorName", m_detectorName);
-  declareProperty("InitialLayout", m_initialLayout);
-  declareProperty("Alignable", m_alignable);
+  declareProperty("GeoDbTagSvc", m_geoDbTagSvc);
   declareProperty("RDBAccessSvc", m_rdbAccessSvc);
   declareProperty("GeometryDBSvc", m_geometryDBSvc);
-  declareProperty("GeoDbTagSvc", m_geoDbTagSvc);
-  declareProperty("Run1Folder", m_run1Folder="/Indet/Align");
-  declareProperty("Run2L1Folder", m_run2L1Folder="/Indet/AlignL1/ID");
-  declareProperty("Run2L2Folder", m_run2L2Folder="/Indet/AlignL2/SCT");
-  declareProperty("Run2L3Folder", m_run2L3Folder="/Indet/AlignL3");
-  declareProperty("useDynamicAlignFolders", m_useDynamicAlignFolders);
 }
 
 //
@@ -95,7 +81,7 @@ SCT_DetectorTool::create()
   // Check if version is empty. If so, then the SCT cannot be built. This may or may not be intentional. We
   // just issue an INFO message. 
   if (sctVersionTag.empty()) {
-    ATH_MSG_INFO("No SCT Version. SCT will not be built.");     
+    ATH_MSG_INFO("No SCT Version. SCT will not be built.");
   } else {
     std::string versionName;
     if (versionKey.custom()) {
@@ -106,33 +92,32 @@ SCT_DetectorTool::create()
 
       IRDBRecordset_ptr switchSet{m_rdbAccessSvc->getRecordsetPtr("SctSwitches", versionKey.tag(), versionKey.node())};
       const IRDBRecord* switches{(*switchSet)[0]};
-      m_detectorName = switches->getString("DETECTORNAME");
+      m_detectorName.setValue(switches->getString("DETECTORNAME"));
 
       m_cosmic = false;
       if (not switches->isFieldNull("COSMICLAYOUT")) {
         m_cosmic = switches->getInt("COSMICLAYOUT");
       }
       if (not switches->isFieldNull("VERSIONNAME")) {
-        versionName = switches->getString("VERSIONNAME"); 
+        versionName = switches->getString("VERSIONNAME");
       } 
     }
 
     if (versionName.empty()) {
       if (m_cosmic) {
-        versionName = "SR1"; 
+        versionName = "SR1";
       }
     }
 
     ATH_MSG_DEBUG("Creating the SCT");
     ATH_MSG_DEBUG("SCT Geometry Options: ");
-    ATH_MSG_DEBUG(" InitialLayout:         " << (m_initialLayout ? "true" : "false"));
-    ATH_MSG_DEBUG(" Alignable:             " << (m_alignable ? "true" : "false"));
+    ATH_MSG_DEBUG(" Alignable:             " << (m_alignable.value() ? "true" : "false"));
     ATH_MSG_DEBUG(" CosmicLayout:          " << (m_cosmic ? "true" : "false"));
     ATH_MSG_DEBUG(" VersionName:           " << versionName);
 
     SCT_Options options;
-    options.setAlignable(m_alignable);
-    options.setDynamicAlignFolders(m_useDynamicAlignFolders);
+    options.setAlignable(m_alignable.value());
+    options.setDynamicAlignFolders(m_useDynamicAlignFolders.value());
     m_manager = nullptr;
 
     // 
@@ -164,7 +149,7 @@ SCT_DetectorTool::create()
     m_manager = theSCT.getDetectorManager();
     
     if (m_manager==nullptr) {
-      ATH_MSG_ERROR("SCT_DetectorManager not created");
+      ATH_MSG_FATAL("SCT_DetectorManager not created");
       return StatusCode::FAILURE;
     }
       
@@ -173,7 +158,6 @@ SCT_DetectorTool::create()
     //   m_detector = theSCT.getDetectorManager();
       
     ATH_MSG_DEBUG("Registering SCT_DetectorManager. ");
-      
     ATH_CHECK(detStore()->record(m_manager, m_manager->getName()));
     theExpt->addManager(m_manager);
     
@@ -192,7 +176,7 @@ SCT_DetectorTool::create()
 StatusCode 
 SCT_DetectorTool::clear()
 {
-  SG::DataProxy* proxy{detStore()->proxy(ClassID_traits<InDetDD::SCT_DetectorManager>::ID(),m_manager->getName())};
+  SG::DataProxy* proxy{detStore()->proxy(ClassID_traits<SCT_DetectorManager>::ID(), m_manager->getName())};
   if (proxy) {
     proxy->reset();
     m_manager = nullptr;
@@ -203,55 +187,51 @@ SCT_DetectorTool::clear()
 StatusCode 
 SCT_DetectorTool::registerCallback()
 {
-  StatusCode sc{StatusCode::FAILURE};
-  if (m_alignable) {
-    if (m_useDynamicAlignFolders) {
+  StatusCode sc{StatusCode::FAILURE, true};
+  if (m_alignable.value()) {
+    if (m_useDynamicAlignFolders.value()) {
 
-      if (detStore()->contains<CondAttrListCollection>(m_run2L1Folder)) {
-	ATH_MSG_DEBUG("Registering callback on global Container with folder " << m_run2L1Folder);
-	const DataHandle<CondAttrListCollection> calc;
-	ATH_CHECK(detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), calc, m_run2L1Folder));
-	sc = StatusCode::SUCCESS;
+      if (detStore()->contains<CondAttrListCollection>(m_run2L1Folder.value())) {
+        ATH_MSG_DEBUG("Registering callback on global Container with folder " << m_run2L1Folder.value());
+        const DataHandle<CondAttrListCollection> calc;
+        ATH_CHECK(detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), calc, m_run2L1Folder.value()));
+        sc = StatusCode::SUCCESS;
       } else {
-	ATH_MSG_WARNING("Unable to register callback on global Container with folder " << m_run2L1Folder);
-	return StatusCode::FAILURE; 
+        ATH_MSG_WARNING("Unable to register callback on global Container with folder " << m_run2L1Folder.value());
+        return StatusCode::FAILURE;
       }
-    
 
-      if (detStore()->contains<CondAttrListCollection>(m_run2L2Folder)) {
-	ATH_MSG_DEBUG("Registering callback on global Container with folder " << m_run2L2Folder);
-	const DataHandle<CondAttrListCollection> calc;
-	ATH_CHECK(detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), calc, m_run2L2Folder));
-	sc = StatusCode::SUCCESS;
+      if (detStore()->contains<CondAttrListCollection>(m_run2L2Folder.value())) {
+        ATH_MSG_DEBUG("Registering callback on global Container with folder " << m_run2L2Folder.value());
+        const DataHandle<CondAttrListCollection> calc;
+        ATH_CHECK(detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), calc, m_run2L2Folder.value()));
+        sc = StatusCode::SUCCESS;
       } else {
-	ATH_MSG_WARNING("Unable to register callback on global Container with folder " << m_run2L2Folder);
-	return StatusCode::FAILURE; 
+        ATH_MSG_WARNING("Unable to register callback on global Container with folder " << m_run2L2Folder.value());
+        return StatusCode::FAILURE;
       }
-      
-      
-      if (detStore()->contains<AlignableTransformContainer>(m_run2L3Folder)) {
-	ATH_MSG_DEBUG("Registering callback on AlignableTransformContainer with folder " << m_run2L3Folder);
-	const DataHandle<AlignableTransformContainer> atc;
-	ATH_CHECK(detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool *>(this), atc, m_run2L3Folder));
-	sc = StatusCode::SUCCESS;
+
+      if (detStore()->contains<AlignableTransformContainer>(m_run2L3Folder.value())) {
+        ATH_MSG_DEBUG("Registering callback on AlignableTransformContainer with folder " << m_run2L3Folder.value());
+        const DataHandle<AlignableTransformContainer> atc;
+        ATH_CHECK(detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), atc, m_run2L3Folder.value()));
+        sc = StatusCode::SUCCESS;
       } else {
-	ATH_MSG_WARNING("Unable to register callback on AlignableTransformContainer with folder " << m_run2L3Folder);
-	return StatusCode::FAILURE;  
+        ATH_MSG_WARNING("Unable to register callback on AlignableTransformContainer with folder " << m_run2L3Folder.value());
+        return StatusCode::FAILURE;
       }
       
-    }
-
-    else {
+    } else {
 
-      if (detStore()->contains<AlignableTransformContainer>(m_run1Folder)) {
-	ATH_MSG_DEBUG("Registering callback on AlignableTransformContainer with folder " << m_run1Folder);
-	const DataHandle<AlignableTransformContainer> atc;
-	ATH_CHECK(detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool *>(this), atc, m_run1Folder));
-	sc = StatusCode::SUCCESS;
+      if (detStore()->contains<AlignableTransformContainer>(m_run1Folder.value())) {
+        ATH_MSG_DEBUG("Registering callback on AlignableTransformContainer with folder " << m_run1Folder.value());
+        const DataHandle<AlignableTransformContainer> atc;
+        ATH_CHECK(detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), atc, m_run1Folder.value()));
+        sc = StatusCode::SUCCESS;
       } else {
-	ATH_MSG_WARNING("Unable to register callback on AlignableTransformContainer with folder "
-			<< m_run1Folder << ", Alignment disabled (only if no Run2 scheme is loaded)!");
-	return StatusCode::FAILURE; 
+        ATH_MSG_WARNING("Unable to register callback on AlignableTransformContainer with folder "
+                        << m_run1Folder.value() << ", Alignment disabled (only if no Run2 scheme is loaded)!");
+        return StatusCode::FAILURE;
       }
     }
 
@@ -268,11 +248,11 @@ StatusCode
 SCT_DetectorTool::align(IOVSVC_CALLBACK_ARGS_P(I, keys))
 {
   if (m_manager==nullptr) { 
-    ATH_MSG_WARNING("Manager does not exist");
+    ATH_MSG_FATAL("Manager does not exist");
     return StatusCode::FAILURE;
   }    
-  if (m_alignable) {     
-    return m_manager->align(I,keys);
+  if (m_alignable.value()) {
+    return m_manager->align(I, keys);
   } else {
     ATH_MSG_DEBUG("Alignment disabled. No alignments applied");
     return StatusCode::SUCCESS;
diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_SLHC_DetectorTool.h b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_SLHC_DetectorTool.h
index a6e6712e8523d41a4a90e52f7e83a91af4ff696d..c1d1c8ce88df27df005bbd9dfe5aa43e1db6e854 100644
--- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_SLHC_DetectorTool.h
+++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_SLHC_DetectorTool.h
@@ -6,6 +6,7 @@
 #define SCT_SLHC_GeoModel_SCT_DETECTORTOOL_H
 
 #include "GeoModelUtilities/GeoModelTool.h"
+
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 
@@ -24,13 +25,13 @@ namespace InDetDDSLHC {
   class SCT_GeoModelAthenaComps;
 }
 
-class SCT_SLHC_DetectorTool : public GeoModelTool{
+class SCT_SLHC_DetectorTool : public GeoModelTool {
 
 public:
 
   // Standard Constructor
-  SCT_SLHC_DetectorTool( const std::string& type, const std::string& name, 
-		    const IInterface* parent );
+  SCT_SLHC_DetectorTool(const std::string& type, const std::string& name,
+                        const IInterface* parent);
 
   // Standard Destructor
   virtual ~SCT_SLHC_DetectorTool() override final;
@@ -39,13 +40,13 @@ public:
   virtual StatusCode clear() override final;
 
 private:
-  std::string m_detectorName;
-  bool m_alignable;
-  bool m_forceBuild;
+  StringProperty m_detectorName{this, "DetectorName", "SCT"};
+  BooleanProperty m_alignable{this, "Alignable", false};
+  BooleanProperty m_forceBuild{this, "ForceBuild", false};
 
-  const InDetDD::SCT_DetectorManager * m_manager;
+  const InDetDD::SCT_DetectorManager* m_manager;
   
-  InDetDDSLHC::SCT_GeoModelAthenaComps * m_athenaComps;
+  InDetDDSLHC::SCT_GeoModelAthenaComps* m_athenaComps;
 
   ToolHandle< IInDetServMatBuilderTool > m_serviceBuilderTool;
   ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc;
diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_SLHC_DetectorTool.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_SLHC_DetectorTool.cxx
index 215df52ca3cc42181ea3b7f35a6841929c0285cc..7936bafd95d4e448b2ab4faa21b3fb97113e40d5 100644
--- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_SLHC_DetectorTool.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_SLHC_DetectorTool.cxx
@@ -1,17 +1,16 @@
 /*
-  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 "SCT_SLHC_GeoModel/SCT_SLHC_DetectorTool.h"
+
 #include "SCT_SLHC_GeoModel/SCT_DetectorFactory.h" 
-#include "SCT_SLHC_GeoModel/SCT_GeometryManager.h" 
 #include "SCT_SLHC_GeoModel/SCT_Options.h" 
 #include "SCT_SLHC_GeoModel/SCT_GeoModelAthenaComps.h" 
 #include "InDetReadoutGeometry/SCT_DetectorManager.h" 
 #include "GeoModelUtilities/GeoModelExperiment.h"
 #include "GeoModelInterfaces/IGeoDbTagSvc.h"
 #include "GeoModelUtilities/DecodeVersionKey.h"
-#include "StoreGate/StoreGateSvc.h"
 #include "GeometryDBSvc/IGeometryDBSvc.h"
 #include "RDBAccessSvc/IRDBAccessSvc.h"
 #include "RDBAccessSvc/IRDBRecord.h"
@@ -21,32 +20,25 @@
 #include "AthenaKernel/ClassID_traits.h"
 #include "SGTools/DataProxy.h"
 
-using InDetDD::SCT_DetectorManager; 
-using InDetDD::SiDetectorManager; 
-
-
-SCT_SLHC_DetectorTool::SCT_SLHC_DetectorTool( const std::string& type,
-				    const std::string& name, 
-				    const IInterface* parent )
-  : GeoModelTool( type, name, parent ),
-    m_detectorName("SCT"),
-    m_alignable(false),
-    m_forceBuild(false),
-    m_manager(nullptr), 
-    m_athenaComps(nullptr),
-    m_serviceBuilderTool("", this),
-    m_geoDbTagSvc("GeoDbTagSvc",name),
-    m_rdbAccessSvc("RDBAccessSvc",name),
-    m_geometryDBSvc("InDetGeometryDBSvc",name)
+using InDetDD::SCT_DetectorManager;
+using InDetDD::SiDetectorManager;
+
+SCT_SLHC_DetectorTool::SCT_SLHC_DetectorTool(const std::string& type,
+                                             const std::string& name,
+                                             const IInterface* parent)
+  : GeoModelTool(type, name, parent),
+  m_manager{nullptr},
+  m_athenaComps{nullptr},
+  m_serviceBuilderTool{"", this},
+  m_geoDbTagSvc{"GeoDbTagSvc", name},
+  m_rdbAccessSvc{"RDBAccessSvc", name},
+  m_geometryDBSvc{"InDetGeometryDBSvc", name}
 {
-    // Get parameter values from jobOptions file
-    declareProperty("ForceBuild", m_forceBuild);
-    declareProperty("DetectorName", m_detectorName);
-    declareProperty("Alignable", m_alignable);
-    declareProperty("ServiceBuilderTool", m_serviceBuilderTool);
-    declareProperty("RDBAccessSvc", m_rdbAccessSvc);
-    declareProperty("GeometryDBSvc", m_geometryDBSvc);
-    declareProperty("GeoDbTagSvc", m_geoDbTagSvc);
+  // Get parameter values from jobOptions file
+  declareProperty("ServiceBuilderTool", m_serviceBuilderTool);
+  declareProperty("GeoDbTagSvc", m_geoDbTagSvc);
+  declareProperty("RDBAccessSvc", m_rdbAccessSvc);
+  declareProperty("GeometryDBSvc", m_geometryDBSvc);
 }
 
 SCT_SLHC_DetectorTool::~SCT_SLHC_DetectorTool()
@@ -55,12 +47,12 @@ SCT_SLHC_DetectorTool::~SCT_SLHC_DetectorTool()
 }
 
 // Create the Geometry via the factory corresponding to this tool
-StatusCode SCT_SLHC_DetectorTool::create(){ 
+StatusCode SCT_SLHC_DetectorTool::create() {
 
   // Get the detector configuration.
   ATH_CHECK(m_geoDbTagSvc.retrieve());
 
-  DecodeVersionKey versionKey(&*m_geoDbTagSvc, "SCT");
+  DecodeVersionKey versionKey{&*m_geoDbTagSvc, "SCT"};
  
   // Issue error if AUTO.
   if (versionKey.tag() == "AUTO"){
@@ -78,13 +70,13 @@ StatusCode SCT_SLHC_DetectorTool::create(){
 
   // Check if version is empty. If so, then the SCT cannot be built. 
   //This may or may not be intentional. We just issue an INFO message. 
-  if (sctVersionTag.empty()) { 
+  if (sctVersionTag.empty()) {
     ATH_MSG_INFO("No SCT Version. SCT_SLHC will not be built.");
   } else {
     std::string versionName;
-    std::string descrName="noDescr";
+    std::string descrName{"noDescr"};
 
-    if (versionKey.custom()){
+    if (versionKey.custom()) {
       ATH_MSG_WARNING("SCT_SLHC_DetectorTool:  Detector Information coming "
                       <<"from a custom configuration!!");
     } else {
@@ -92,16 +84,16 @@ StatusCode SCT_SLHC_DetectorTool::create(){
                     <<" database and job options IGNORED.");
       ATH_MSG_DEBUG("Keys for SCT Switches are "  << versionKey.tag()  
                     << "  " << versionKey.node());
-      IRDBRecordset_ptr switchSet = m_rdbAccessSvc->getRecordsetPtr("SctSwitches", versionKey.tag(), versionKey.node());
-      const IRDBRecord    *switches   = (*switchSet)[0];
+      IRDBRecordset_ptr switchSet{m_rdbAccessSvc->getRecordsetPtr("SctSwitches", versionKey.tag(), versionKey.node())};
+      const IRDBRecord* switches{(*switchSet)[0]};
         
-      m_detectorName       = switches->getString("DETECTORNAME");
+      m_detectorName.setValue(switches->getString("DETECTORNAME"));
       
-      if (!switches->isFieldNull("VERSIONNAME")) {
-	versionName = switches->getString("VERSIONNAME"); 
+      if (not switches->isFieldNull("VERSIONNAME")) {
+        versionName = switches->getString("VERSIONNAME");
       } 
-      if (!switches->isFieldNull("DESCRIPTION")) {
-	descrName = switches->getString("DESCRIPTION");
+      if (not switches->isFieldNull("DESCRIPTION")) {
+        descrName = switches->getString("DESCRIPTION");
       }
   
     }
@@ -110,7 +102,7 @@ StatusCode SCT_SLHC_DetectorTool::create(){
 
     // Only build if versionName is "SLHC" or ForceBuild is true
 
-    if (!m_forceBuild && versionName != "SLHC") {
+    if ((not m_forceBuild.value()) and versionName != "SLHC") {
 
       ATH_MSG_INFO("Not SLHC version. SCT_SLHC will not be built.");
 
@@ -121,8 +113,8 @@ StatusCode SCT_SLHC_DetectorTool::create(){
       // Create the SCT_DetectorFactory
       m_manager = 0;
       // Locate the top level experiment node  
-      GeoModelExperiment * theExpt = nullptr; 
-      ATH_CHECK(detStore()->retrieve(theExpt, "ATLAS")); 
+      GeoModelExperiment* theExpt{nullptr};
+      ATH_CHECK(detStore()->retrieve(theExpt, "ATLAS"));
 
       // Retrieve the Geometry DB Interface
       ATH_CHECK(m_geometryDBSvc.retrieve());
@@ -133,50 +125,50 @@ StatusCode SCT_SLHC_DetectorTool::create(){
       m_athenaComps->setGeoDbTagSvc(&*m_geoDbTagSvc);
       m_athenaComps->setGeometryDBSvc(&*m_geometryDBSvc);
       m_athenaComps->setRDBAccessSvc(&*m_rdbAccessSvc);
-
-      const SCT_ID* idHelper = nullptr;
+      const SCT_ID* idHelper{nullptr};
       ATH_CHECK(detStore()->retrieve(idHelper, "SCT_ID"));
       m_athenaComps->setIdHelper(idHelper);
 
       // Service builder tool
-      if (!m_serviceBuilderTool.empty()) {
-	StatusCode sc = m_serviceBuilderTool.retrieve(); 
-	if (!sc.isFailure()) {
-	  ATH_MSG_INFO("Service builder tool retrieved: " << m_serviceBuilderTool);
-	  m_athenaComps->setServiceBuilderTool(&*m_serviceBuilderTool);
-	} else {
-	  ATH_MSG_ERROR("Could not retrieve " <<  m_serviceBuilderTool << ",  some services will not be built.");
-	}
+      if (not m_serviceBuilderTool.empty()) {
+        StatusCode sc{m_serviceBuilderTool.retrieve()};
+        if (not sc.isFailure()) {
+          ATH_MSG_INFO("Service builder tool retrieved: " << m_serviceBuilderTool);
+          m_athenaComps->setServiceBuilderTool(&*m_serviceBuilderTool);
+        } else {
+          ATH_MSG_ERROR("Could not retrieve " << m_serviceBuilderTool << ",  some services will not be built.");
+        }
       } else {
-	// This will become an error once the tool is ready.
-	// ATH_MSG_ERROR("Service builder tool not specified. Some services will not be built");
-	ATH_MSG_INFO("Service builder tool not specified.");
-      } 
-
+        // This will become an error once the tool is ready.
+        // ATH_MSG_ERROR("Service builder tool not specified. Some services will not be built");
+        ATH_MSG_INFO("Service builder tool not specified.");
+        m_serviceBuilderTool.disable();
+      }
 
       // This strange way of casting is to avoid an
       // utterly brain damaged compiler warning.
-      GeoPhysVol *world=&*theExpt->getPhysVol();
+      GeoPhysVol* world{&*theExpt->getPhysVol()};
       InDetDDSLHC::SCT_Options options;
-      options.setAlignable(m_alignable);
-      InDetDDSLHC::SCT_DetectorFactory theSCT(m_athenaComps, options);
-      if(descrName.compare("TrackingGeometry")!=0) theSCT.create(world);
-      else ATH_MSG_INFO("SCT_SLHC - TrackingGeometry tag - no geometry built"); 
+      options.setAlignable(m_alignable.value());
+      InDetDDSLHC::SCT_DetectorFactory theSCT{m_athenaComps, options};
+      if (descrName.compare("TrackingGeometry")!=0) theSCT.create(world);
+      else ATH_MSG_INFO("SCT_SLHC - TrackingGeometry tag - no geometry built");
       m_manager = theSCT.getDetectorManager();
     
       if (m_manager==nullptr) {
-	ATH_MSG_ERROR("SCT_DetectorManager not created");
-	return StatusCode::FAILURE;
+        ATH_MSG_FATAL("SCT_DetectorManager not created");
+        return StatusCode::FAILURE;
       }
     
       // Get the manager from the factory and store it in the detector store.
       ATH_MSG_DEBUG("Registering SCT_DetectorManager. ");
       ATH_CHECK(detStore()->record(m_manager, m_manager->getName()));
       theExpt->addManager(m_manager);
+
       // Create a symLink to the SiDetectorManager base class
-      const SiDetectorManager * siDetManager = m_manager;
+      const SiDetectorManager* siDetManager{m_manager};
       ATH_CHECK(detStore()->symLink(m_manager, siDetManager));
-    }  
+    }
   }
   return StatusCode::SUCCESS;
 }
@@ -184,11 +176,10 @@ StatusCode SCT_SLHC_DetectorTool::create(){
 StatusCode 
 SCT_SLHC_DetectorTool::clear()
 {
-  SG::DataProxy* proxy = detStore()->proxy(ClassID_traits<InDetDD::SCT_DetectorManager>::ID(),m_manager->getName());
-  if(proxy) {
+  SG::DataProxy* proxy{detStore()->proxy(ClassID_traits<SCT_DetectorManager>::ID(), m_manager->getName())};
+  if (proxy) {
     proxy->reset();
     m_manager = nullptr;
   }
   return StatusCode::SUCCESS;
 }
-
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h
index 7ea9aed0642a44a1941fb2b82abbba7f834eb686..03c11185f619542a795b015d9bd2701d5802908e 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h
@@ -130,7 +130,7 @@ private:
   TimedHitCollection<SiHit>* m_thpcsi;
 
   ToolHandle<InDet::ClusterMakerTool>  m_clusterMaker;
-  ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
+  ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
   bool m_sctUseClusterMaker;       //!< use the pixel cluster maker or not
   IntegerProperty  m_vetoThisBarcode;
 
diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx
index 6a9565cb5bd190a31b7cefc103f2d8623d906f22..a0b2a2df3343051454acde1bdaf8216a5024b1ea 100644
--- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx
+++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx
@@ -79,6 +79,8 @@ StatusCode SensorSimPlanarTool::initialize() {
   CHECK(m_radDamageUtil.retrieve());
   ATH_MSG_DEBUG ( "RadDamageUtil tool retrieved successfully");
 
+  ATH_CHECK(m_lorentzAngleTool.retrieve());
+
   //Calculate trapping times based on fluence (already includes check for fluence=0)
   if(m_doRadDamage){
 
@@ -335,7 +337,7 @@ StatusCode SensorSimPlanarTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiC
 
   double collectionDist = 0.2*CLHEP::mm;//kept for consistency with previosu version of digi. Does someone know where this number comes from?
   double smearScale = 1. + 0.35*smearRand;//ditto...
-  double tanLorentz = Module.getTanLorentzAnglePhi();
+  double tanLorentz = m_lorentzAngleTool->getTanLorentzAngle(Module.identifyHash());
   double coLorentz=sqrt(1+pow(tanLorentz,2));
   
   //**************************************//
diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.h
index e73f67d43b1064995d5ad4f9f5050ce4018e4eac..e08b590993dd002bcf1bfc089d9884a5a1d689a2 100644
--- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.h
+++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.h
@@ -22,6 +22,7 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "StoreGate/WriteHandle.h"
+#include "InDetCondServices/ISiLorentzAngleTool.h"
 
 #include "SensorSimTool.h"
 #include "RadDamageUtil.h"
@@ -66,6 +67,7 @@ class SensorSimPlanarTool : public SensorSimTool {
     std::map<std::pair<int, int>, double> m_fluence_layersMaps;
     double m_trappingTimeElectrons;
     double m_trappingTimeHoles;
+    ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle"};
 };
 
 }
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_SurfaceChargesGenerator.h b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_SurfaceChargesGenerator.h
index 7288af2dc5cc85abb0e9502789239d2fbbe14b1d..53acc0d8619983f85c7012c78d248ab7d54f4bb9 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_SurfaceChargesGenerator.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_SurfaceChargesGenerator.h
@@ -51,15 +51,10 @@ class ISCT_SurfaceChargesGenerator : virtual public IAlgTool {
   // Destructor:
   virtual ~ISCT_SurfaceChargesGenerator() {}
 
-  virtual void setDetectorElement(const InDetDD::SiDetectorElement* ele) = 0 ;
-  virtual void process(const TimedHitPtr<SiHit>& phit,
+  virtual void process(const InDetDD::SiDetectorElement* ele,
+                       const TimedHitPtr<SiHit>& phit,
                        const ISiSurfaceChargesInserter& inserter) const =0;
-  virtual void processFromTool(const SiHit* phit, const ISiSurfaceChargesInserter& inserter, const float p_eventTime, const unsigned short p_eventId) const =0;
-  //TESTING NEW METHODS
-  virtual void setComTime(float comTime) =0;                                 
   virtual void setFixedTime(float fixedTime) =0;                             
-  virtual void setCosmicsRun(bool cosmicsRun) =0;                            
-  virtual void setComTimeFlag(bool useComTime) =0;                                 
   virtual void setRandomEngine(CLHEP::HepRandomEngine* rndmEngine) =0;       
 };
 
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h
index 52dcbbe35bf136a3f5674eaf7198c121f54a90e0..9e4de90c378b34a5aa28eca889d0d3041e9dc0f4 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h
@@ -1,7 +1,7 @@
 /* -*- 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 SCT_DIGITZATION_SCT_DIGITZATIONTOOL_H
@@ -17,65 +17,45 @@
 
 // Athena headers
 #include "AthenaKernel/IAtRndmGenSvc.h"
-#include "CommissionEvent/ComTime.h"
 #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 "SCT_Digitization/ISCT_FrontEnd.h"
+#include "SCT_Digitization/ISCT_RandomDisabledCellGenerator.h"
+#include "SCT_Digitization/ISCT_SurfaceChargesGenerator.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"
 
 // Gaudi headers
+#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 
 // STL headers
-#include "boost/shared_ptr.hpp"
 #include <string>
 
-class InDetSimDataCollection;
-
 // Forward declarations
-class AtlasDetectorID; //FIXME should be removed
-class ComTime;
+class ISiChargedDiodesProcessorTool;
 class SCT_ID;
-
-class ISCT_FrontEnd;
-class ISCT_SurfaceChargesGenerator;
-class ISCT_RandomDisabledCellGenerator;
-class ISiSurfaceChargesInserter;
-
 class SiChargedDiodeCollection;
-class ISiChargedDiodesProcessorTool;
-class StoreGateService;
-
-namespace InDetDD
-{
-  class SiDetectorElement;
-}
 
 namespace CLHEP
 {
   class HepRandomEngine;
 }
 
-static const InterfaceID IID_ISCT_DigitizationTool ("SCT_DigitizationTool", 1, 0);
-
-class SCT_DigitizationTool :
-  virtual public IPileUpTool,
-  public PileUpToolBase
+class SCT_DigitizationTool : public extends<PileUpToolBase, IPileUpTool>
 {
 public:
   static const InterfaceID& interfaceID();
   SCT_DigitizationTool(const std::string& type,
                        const std::string& name,
                        const IInterface* parent);
+  virtual ~SCT_DigitizationTool();
   /**
      @brief Called before processing physics events
   */
@@ -95,7 +75,6 @@ protected:
   void       addSDO(SiChargedDiodeCollection* collection);
 
   void storeTool(ISiChargedDiodesProcessorTool* p_processor) {m_diodeCollectionTools.push_back(p_processor);}
-  void store(const AtlasDetectorID* p_helper) {m_atlasID = p_helper;}  //FIXME should be removed
 
 private:
 
@@ -138,12 +117,10 @@ private:
   void       digitizeNonHits();     //!< digitize SCT without hits
 
   float m_tfix;           //!< Use fixed timing for cosmics
-  float m_comTime;         //!< Use Commission time for timing
 
   bool m_enableHits;            //!< Flag to enable hits
   bool m_onlyHitElements;       //!<
   bool m_cosmicsRun;            //!< Select a cosmic run
-  bool m_useComTime;            //!< Flag to set the use of cosmics time for timing
   bool m_barrelonly;            //!< Only the barrel layers
   bool m_randomDisabledCells;   //!< Use Random disabled cells, default no
   bool m_createNoiseSDO;        //!< Create SDOs for strips with only noise hits (huge increase in SDO collection size)
@@ -158,18 +135,16 @@ private:
 
   void SetupRdoOutputType(Property&);
 
-  SG::ReadHandleKey<ComTime>        m_ComTimeKey ; //!< Handle to retrieve commissioning timing info from SG
-
   const SCT_ID*                                      m_detID;                             //!< Handle to the ID helper
-  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
+  ToolHandle<ISCT_FrontEnd> m_sct_FrontEnd{this, "FrontEnd", "SCT_FrontEnd", "Handle the Front End Electronic tool"};
+  ToolHandle<ISCT_SurfaceChargesGenerator> m_sct_SurfaceChargesGenerator{this, "SurfaceChargesGenerator", "SCT_SurfaceChargesGenerator", "Choice of using a more detailed charge drift model"};
+  ToolHandle<ISCT_RandomDisabledCellGenerator> m_sct_RandomDisabledCellGenerator{this, "RandomDisabledCellGenerator", "SCT_RandomDisabledCellGenerator", ""};
 
   std::vector<SiHitCollection*> m_hitCollPtrs;
 
-  SG::WriteHandleKey<SCT_RDO_Container>              m_rdoContainerKey; //!< RDO container key
-  SG::WriteHandle<SCT_RDO_Container>                 m_rdoContainer; //!< RDO container handle
-  SG::WriteHandleKey<InDetSimDataCollection>         m_simDataCollMapKey; //!< SDO Map key
+  SG::WriteHandleKey<SCT_RDO_Container> m_rdoContainerKey{this, "OutputObjectName", "SCT_RDOs", "Output Object name"};
+  SG::WriteHandle<SCT_RDO_Container> m_rdoContainer; //!< RDO container handle
+  SG::WriteHandleKey<InDetSimDataCollection> m_simDataCollMapKey{this, "OutputSDOName", "SCT_SDO_Map", "Output SDO container name"};
   SG::WriteHandle<InDetSimDataCollection>            m_simDataCollMap; //!< SDO Map handle
   SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
@@ -178,15 +153,13 @@ private:
   ServiceHandle <PileUpMergeSvc>                     m_mergeSvc; //!
 
   CLHEP::HepRandomEngine*                            m_rndmEngine;          //! Random number engine used - not init in SiDigitization
-  const AtlasDetectorID*                             m_atlasID;  //FIXME should be replaced with m_detID usage
   std::list<ISiChargedDiodesProcessorTool*>          m_diodeCollectionTools;
   TimedHitCollection<SiHit>*                         m_thpcsi;
   SiChargedDiodeCollection*                          m_chargedDiodes;
   IntegerProperty                                    m_vetoThisBarcode;
-
-
 };
 
+static const InterfaceID IID_ISCT_DigitizationTool ("SCT_DigitizationTool", 1, 0);
 inline const InterfaceID& SCT_DigitizationTool::interfaceID()
 {
   return IID_ISCT_DigitizationTool;
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.cxx
index e61c86cbd25040efbc8ad8609f9886143adc1713..13e2311d3c44087fbca7569514fdb2cbeb153dcf 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.cxx
@@ -43,9 +43,6 @@ SCT_DetailedSurfaceChargesGenerator::SCT_DetailedSurfaceChargesGenerator(const s
     m_distInterStrip(1.0),
     m_distHalfInterStrip(0),
     m_SurfaceDriftFlag(0),
-    m_comTime(0),
-    m_useComTime(false),
-    m_cosmicsRun(false),
     m_doDistortions(false),
     m_doHistoTrap(false),
     m_doTrapping(false),
@@ -57,7 +54,6 @@ SCT_DetailedSurfaceChargesGenerator::SCT_DetailedSurfaceChargesGenerator(const s
     m_h_yEfield(nullptr),
     m_h_zEfield(nullptr),
     
-    m_hashId(0),
     m_bulk_depth(0.0285), //<!285 micron, expressed in cm units
     m_strip_pitch(0.0080), //<! 80 micron, expressed in cm units
     m_depletion_depth(0.0285),
@@ -72,7 +68,6 @@ SCT_DetailedSurfaceChargesGenerator::SCT_DetailedSurfaceChargesGenerator(const s
   m_ExValue150{{0.}},
   m_EyValue150{{0.}},
   //m_stripCharge{{{{0.}}}},
-  m_element(0),
   m_rndmEngine(0),
   m_rndmEngineName("SCT_Digitization")
   {
@@ -195,7 +190,7 @@ StatusCode SCT_DetailedSurfaceChargesGenerator::initialize() {
 #ifdef SCT_DIG_DEBUG
     ATH_MSG_INFO ( "\tsurface drift ON: surface drift time at d="    <<m_distInterStrip<<"   (mid strip)    ="<< this->SurfaceDriftTime(m_distInterStrip) ) ;
     ATH_MSG_INFO ( "\tsurface drift ON: surface drift time at d="    <<m_distHalfInterStrip<<" (half way)     ="<< this->SurfaceDriftTime(m_distHalfInterStrip) );
-    ATH_MSG_INFO ( "\tsurface drift ON: surface drift time at d=0.0"         <<" (strip center) ="<< this->SurfaceDriftTime(0) );
+    ATH_MSG_INFO ( "\tsurface drift ON: surface drift time at d=0.0"         <<" (strip center) ="<< this->SurfaceDriftTime(0.) );
 #endif
   }
   else ATH_MSG_INFO ("\tsurface drift still not on, wrong params") ;
@@ -251,16 +246,17 @@ StatusCode SCT_DetailedSurfaceChargesGenerator::finalize() {
 //----------------------------------------------------------------------
 // perpandicular Drift time calculation
 //----------------------------------------------------------------------
-float SCT_DetailedSurfaceChargesGenerator::DriftTime(float zhit) const {
+float SCT_DetailedSurfaceChargesGenerator::DriftTime(float zhit, const SiDetectorElement* element) const {
 
-  float sensorThickness = m_element->thickness();
+  float sensorThickness = element->thickness();
   if((zhit<0.0) || (zhit>sensorThickness)) {
     ATH_MSG_DEBUG ( "DriftTime: hit coordinate zhit="<<zhit/CLHEP::micrometer<<" out of range") ;
     return -2.0 ;
   }
+  const IdentifierHash hashId{element->identifyHash()};
 
-  float vdepl=m_siConditionsTool->depletionVoltage(m_hashId) * CLHEP::volt;
-  float vbias=m_siConditionsTool->biasVoltage(m_hashId) * CLHEP::volt;
+  float vdepl=m_siConditionsTool->depletionVoltage(hashId) * CLHEP::volt;
+  float vbias=m_siConditionsTool->biasVoltage(hashId) * CLHEP::volt;
   float denominator = vdepl+vbias-(2.0*zhit*vdepl/sensorThickness);
   if (denominator<=0.0) {
     if(vbias>=vdepl) { //Should not happen
@@ -276,18 +272,19 @@ float SCT_DetailedSurfaceChargesGenerator::DriftTime(float zhit) const {
   }
 
   float driftTime = log((vdepl+vbias)/denominator) ;
-  driftTime = driftTime*sensorThickness*sensorThickness/(2.0*m_siPropertiesTool->getSiProperties(m_hashId).holeDriftMobility()*vdepl) ;
+  driftTime = driftTime*sensorThickness*sensorThickness/(2.0*m_siPropertiesTool->getSiProperties(hashId).holeDriftMobility()*vdepl) ;
   return driftTime ;
 }
 
 //----------------------------------------------------------------------
 // Sigma Diffusion calculation
 //----------------------------------------------------------------------
-float SCT_DetailedSurfaceChargesGenerator::DiffusionSigma(float zhit) const {
+float SCT_DetailedSurfaceChargesGenerator::DiffusionSigma(float zhit, const InDetDD::SiDetectorElement* element) const {
+  const IdentifierHash hashId{element->identifyHash()};
 
-  float t = this->DriftTime(zhit); // in ns
+  float t = this->DriftTime(zhit, element); // in ns
   if(t>0.0) {
-    float diffusionSigma = sqrt(2*m_siPropertiesTool->getSiProperties(m_hashId).holeDiffusionConstant()*t); // in mm    
+    float diffusionSigma = sqrt(2*m_siPropertiesTool->getSiProperties(hashId).holeDiffusionConstant()*t); // in mm    
     return diffusionSigma;  
   }
   else return 0.0 ;
@@ -296,11 +293,11 @@ float SCT_DetailedSurfaceChargesGenerator::DiffusionSigma(float zhit) const {
 //----------------------------------------------------------------------
 // Maximum drift time
 //----------------------------------------------------------------------
-float SCT_DetailedSurfaceChargesGenerator::MaxDriftTime() const {
+float SCT_DetailedSurfaceChargesGenerator::MaxDriftTime(const SiDetectorElement* element) const {
   
-  if (m_element) {
-    float sensorThickness=m_element->thickness() ;
-    return this->DriftTime(sensorThickness);
+  if (element) {
+    float sensorThickness=element->thickness() ;
+    return this->DriftTime(sensorThickness, element);
   }
   else {
     ATH_MSG_INFO ("Error: SiDetectorElement not set!") ;
@@ -311,11 +308,11 @@ float SCT_DetailedSurfaceChargesGenerator::MaxDriftTime() const {
 //----------------------------------------------------------------------
 // Maximum Sigma difusion
 //----------------------------------------------------------------------
-float SCT_DetailedSurfaceChargesGenerator::MaxDiffusionSigma() const {
+float SCT_DetailedSurfaceChargesGenerator::MaxDiffusionSigma(const SiDetectorElement* element) const {
 
-  if (m_element) {
-    float sensorThickness=m_element->thickness();
-    return this->DiffusionSigma(sensorThickness);
+  if (element) {
+    float sensorThickness=element->thickness();
+    return this->DiffusionSigma(sensorThickness, element);
   }
   else {
     ATH_MSG_INFO ("Error: SiDetectorElement not set!") ;
@@ -351,24 +348,16 @@ float SCT_DetailedSurfaceChargesGenerator::SurfaceDriftTime(float ysurf) const {
   else return 0.0 ;
 }
 
-//-------------------------------------------------------------------------------------------
-// create a list of surface charges from a hit - called from SCT_DigitizationTool PileUpTool
-//-------------------------------------------------------------------------------------------
-void SCT_DetailedSurfaceChargesGenerator::processFromTool(const SiHit* phit, const ISiSurfaceChargesInserter& inserter, const float p_eventTime, const unsigned short p_eventId) const {
-  ATH_MSG_VERBOSE ( "SCT_DetailedSurfaceChargesGenerator::processFromTool starts") ;
-  processSiHit(*phit,inserter,p_eventTime,p_eventId);
-  return;
-}
 //-------------------------------------------------------------------------------------------
 // create a list of surface charges from a hit - called from SCT_Digitization AthAlgorithm
 //-------------------------------------------------------------------------------------------
-void SCT_DetailedSurfaceChargesGenerator::process(const TimedHitPtr<SiHit> & phit, const ISiSurfaceChargesInserter& inserter) const {
+void SCT_DetailedSurfaceChargesGenerator::process(const InDetDD::SiDetectorElement* element, const TimedHitPtr<SiHit> & phit, const ISiSurfaceChargesInserter& inserter) const {
 
   ATH_MSG_VERBOSE ( "SCT_DetailedSurfaceChargesGenerator::process starts") ;
 
   float p_eventTime =  phit.eventTime();
   unsigned short p_eventId = phit.eventId();
-  processSiHit(*phit,inserter,p_eventTime,p_eventId);
+  processSiHit(element, *phit,inserter,p_eventTime,p_eventId);
   return;
 
 }
@@ -376,9 +365,8 @@ void SCT_DetailedSurfaceChargesGenerator::process(const TimedHitPtr<SiHit> & phi
 //-------------------------------------------------------------------------------------------
 // create a list of surface charges from a hit - called from both AthAlgorithm and PileUpTool
 //-------------------------------------------------------------------------------------------
-void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const ISiSurfaceChargesInserter& inserter, float p_eventTime, unsigned short p_eventId) const {
-
-  const InDetDD::SCT_ModuleSideDesign *p_design = dynamic_cast<const SCT_ModuleSideDesign *>(&(m_element->design() ) );
+void SCT_DetailedSurfaceChargesGenerator::processSiHit(const InDetDD::SiDetectorElement* element, const SiHit& phit, const ISiSurfaceChargesInserter& inserter, float p_eventTime, unsigned short p_eventId) const {
+  const InDetDD::SCT_ModuleSideDesign *p_design = dynamic_cast<const SCT_ModuleSideDesign *>(&(element->design() ) );
   if (!p_design) {
     ATH_MSG_ERROR ( "SCT_DetailedSurfaceChargesGenerator::process can not get "<<p_design) ;
     return ;
@@ -391,17 +379,14 @@ void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const
   float timeOfFlight = p_eventTime + hitTime(phit) ;  //  hitTime(phit): Open functions of InDetSimEvent/SiHit.h  hitTime(phit) =  phit->meanTime() ;
 
   // Kondo 19/09/2007: Use the coordinate of the center of the module to calculate the time of flight                                                                           
-  timeOfFlight -= (m_element->center().mag())/CLHEP::c_light ;  //!< extract the distance to the origin of the module to Time of flight 
+  timeOfFlight -= (element->center().mag())/CLHEP::c_light ;  //!< extract the distance to the origin of the module to Time of flight 
 
-  //!< Commissioning time taken into account for the particle time of flight calculation
-  if(m_cosmicsRun && m_useComTime)  timeOfFlight -= m_comTime ; 
-  if(m_useComTime)  timeOfFlight -= m_comTime ;
   //!< timing set from jo to adjust (subtract) the timing   
   if (m_tsubtract>-998) timeOfFlight -= m_tsubtract ;
   //---**************************************
 
   //Get HashId
-  IdentifierHash hashId = m_element->identifyHash();
+  IdentifierHash hashId = element->identifyHash();
 
   //get sensor thickness and tg lorentz from SiDetectorDesign
   const float sensorThickness  = p_design->thickness();  
@@ -431,7 +416,7 @@ void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const
   float zhit = xDep ;
   
   if(m_doDistortions){
-    if(m_element->isBarrel() == 1){//Only apply distortions to barrel modules
+    if(element->isBarrel() == 1){//Only apply distortions to barrel modules
       Amg::Vector2D BOW; 
       BOW[0] = (m_distortionsTool->correctSimulation(hashId, xhit, yhit, cEta, cPhi, cDep))[0];
       BOW[1] = (m_distortionsTool->correctSimulation(hashId, xhit, yhit, cEta, cPhi, cDep))[1];
@@ -461,7 +446,7 @@ void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const
     //Distance between charge and readout side. p_design->readoutSide() is +1 if readout side is in +ve depth axis direction and visa-versa.
     float zReadout = 0.5*sensorThickness - p_design->readoutSide() * z1 ;
       
-    float tdrift=DriftTime(zReadout) ;  //!< tdrift: perpandicular drift time 
+    float tdrift=DriftTime(zReadout, element) ;  //!< tdrift: perpandicular drift time 
     if(tdrift>-2.0000002 && tdrift<-1.9999998)
       {
         ATH_MSG_DEBUG ( "Checking for rounding errors in compression");
@@ -471,7 +456,7 @@ void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const
             if(z1<0.0) { z1= 0.0000005-0.5*sensorThickness; } //set new coordinate to be 0.5nm inside wafer volume.
             else { z1 = 0.5*sensorThickness-0.0000005; } //set new coordinate to be 0.5nm inside wafer volume.
             zReadout = 0.5*sensorThickness - p_design->readoutSide() * z1 ;
-            tdrift=DriftTime(zReadout);
+            tdrift=DriftTime(zReadout, element);
             if(tdrift>-2.0000002 && tdrift<-1.9999998)
               {
                 ATH_MSG_WARNING ( "Attempt failed. Making no correction.");
@@ -488,16 +473,16 @@ void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const
       float y1 = yhit+StepY*dstep;//(static_cast<float>(istep)+0.5) ;
 
       //PJ select driftmodel here
-      if (m_chargeDriftModel == 0 || m_element->isEndcap()){ //Standard SCT driftmodel
+      if (m_chargeDriftModel == 0 || element->isEndcap()){ //Standard SCT driftmodel
         y1 += tanLorentz*zReadout ; //!< Taking into account the magnetic field
-        float diffusionSigma = DiffusionSigma(zReadout);
+        float diffusionSigma = DiffusionSigma(zReadout, element);
         for(int i=0 ; i<m_numberOfCharges; ++i) {
           float rx = CLHEP::RandGaussZiggurat::shoot(m_rndmEngine) ;
           float xd = x1+diffusionSigma*rx;
           float ry = CLHEP::RandGaussZiggurat::shoot(m_rndmEngine) ;
           float yd = y1+diffusionSigma*ry;
 
-          SiLocalPosition position(m_element->hitLocalToLocal(xd,yd)) ;
+          SiLocalPosition position(element->hitLocalToLocal(xd,yd)) ;
           if(p_design->inActiveArea(position)) {
             float sdist = p_design->scaledDistanceToNearestDiode(position) ;       //!< dist on the surface from the hit point to the nearest strip (diode)
             float tsurf = this->SurfaceDriftTime(2.0*sdist) ;                      //!< Surface drift time
@@ -516,11 +501,11 @@ void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const
           }
         } // end of loop on charges
       }
-      else if (m_chargeDriftModel == 1  && m_element->isBarrel()){ //TKs eh-transport model
+      else if (m_chargeDriftModel == 1  && element->isBarrel()){ //TKs eh-transport model
         //PJ calculates induced charge from e's and h's for 5 strips with 0.5 ns steps
         // Set up local taka parameters, TK using cm...
 
-        const InDetDD::SCT_BarrelModuleSideDesign *b_design = dynamic_cast<const InDetDD::SCT_BarrelModuleSideDesign *>(&(m_element->design() ) );
+        const InDetDD::SCT_BarrelModuleSideDesign *b_design = dynamic_cast<const InDetDD::SCT_BarrelModuleSideDesign *>(&(element->design() ) );
         if (!b_design) {
           ATH_MSG_ERROR ( "SCT_DetailedSurfaceChargesGenerator::process can not get "<<b_design) ;
           return ;
@@ -544,7 +529,7 @@ void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const
         double Q_m2[50], Q_m1[50], Q_00[50], Q_p1[50], Q_p2[50] ; // Charge arrays for up to 25 ns
 
 #ifdef SCT_DIG_DEBUG
-        ATH_MSG_INFO("m_element->isBarrel(): " << m_element->isBarrel() << " stripPitch: " << stripPitch << " stripPatternCentre: " << stripPatternCentre);
+        ATH_MSG_INFO("element->isBarrel(): " << element->isBarrel() << " stripPitch: " << stripPitch << " stripPatternCentre: " << stripPatternCentre);
         ATH_MSG_INFO("tanLorentz, y1, xtakadist = " << tanLorentz << ", " << y1 << ", " << xtakadist);
 #endif
 
@@ -560,7 +545,7 @@ void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const
         //Loop over the strips and add the surface charges from each step and strip
         for (int strip=-2; strip<=2; strip++) {
           double ystrip = y1 + strip*stripPitch;
-          SiLocalPosition position(m_element->hitLocalToLocal(x1,ystrip)) ;
+          SiLocalPosition position(element->hitLocalToLocal(x1,ystrip)) ;
           if(p_design->inActiveArea(position)) {
             for (int itq=0; itq<50; itq++) {
               double charge(0.);
@@ -585,10 +570,10 @@ void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const
         }
 
       }
-      else if (m_chargeDriftModel == 2 && m_element->isBarrel()){ //TKs fixed charge map model
+      else if (m_chargeDriftModel == 2 && element->isBarrel()){ //TKs fixed charge map model
         ATH_MSG_ERROR ("Fixed charge map model, implementation not finished yet...");
 
-        const InDetDD::SCT_BarrelModuleSideDesign *b_design = dynamic_cast<const InDetDD::SCT_BarrelModuleSideDesign *>(&(m_element->design() ) );
+        const InDetDD::SCT_BarrelModuleSideDesign *b_design = dynamic_cast<const InDetDD::SCT_BarrelModuleSideDesign *>(&(element->design() ) );
         if (!b_design) {
           ATH_MSG_ERROR ( "SCT_DetailedSurfaceChargesGenerator::process can not get "<<b_design) ;
           return ;
@@ -614,7 +599,7 @@ void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const
         //Loop over the strips and add the surface charges from each step and strip
         for (int strip=-2; strip<=2; strip++) {
           float ystrip = y1 + strip*stripPitch;
-          SiLocalPosition position(m_element->hitLocalToLocal(x1,ystrip)) ;
+          SiLocalPosition position(element->hitLocalToLocal(x1,ystrip)) ;
           if(p_design->inActiveArea(position)) {
             //PJ best way of doing this...
             double time = 0.;
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.h
index 5cc41cedc1d18404a66132555d743c1419807188..7f0b1bb42b424bbee7c5f3e75e1d8ad45679033d 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.h
@@ -72,24 +72,19 @@ class SCT_DetailedSurfaceChargesGenerator : public AthAlgTool, virtual public IS
 
  private:
 
-  void setComTime(float comTime)                                 {m_comTime = comTime;} 
   void setFixedTime(float fixedTime)                             {m_tfix = fixedTime;} 
-  void setCosmicsRun(bool cosmicsRun)                            {m_cosmicsRun = cosmicsRun;}
-  void setComTimeFlag(bool useComTime)                           {m_useComTime = useComTime;}      
   void setRandomEngine(CLHEP::HepRandomEngine *rndmEngine)       {m_rndmEngine = rndmEngine;}
-  void setDetectorElement(const InDetDD::SiDetectorElement *ele) {m_element = ele;} 
 
   /** create a list of surface charges from a hit */
-  virtual void process(const TimedHitPtr<SiHit> & phit, const ISiSurfaceChargesInserter& inserter) const;
-  virtual void processFromTool(const SiHit* phit, const ISiSurfaceChargesInserter& inserter, float p_eventTime, unsigned short p_eventId) const;
-  void processSiHit(const SiHit& phit, const ISiSurfaceChargesInserter& inserter, const float eventTime, const unsigned short eventID) const;
+  virtual void process(const InDetDD::SiDetectorElement* element, const TimedHitPtr<SiHit> & phit, const ISiSurfaceChargesInserter& inserter) const;
+  void processSiHit(const InDetDD::SiDetectorElement* element, const SiHit& phit, const ISiSurfaceChargesInserter& inserter, const float eventTime, const unsigned short eventID) const;
   
   // some diagnostics methods are needed here too
-  float DriftTime(float zhit) const;           //!< calculate drift time perpandicular to the surface for a charge at distance zhit from mid gap
-  float DiffusionSigma(float zhit) const;      //!< calculate diffusion sigma from a gaussian dist scattered charge
+  float DriftTime(float zhit, const InDetDD::SiDetectorElement* element) const;           //!< calculate drift time perpandicular to the surface for a charge at distance zhit from mid gap
+  float DiffusionSigma(float zhit, const InDetDD::SiDetectorElement* element) const;      //!< calculate diffusion sigma from a gaussian dist scattered charge
   float SurfaceDriftTime(float ysurf) const;   //!< Calculate of the surface drift time 
-  float MaxDriftTime() const;                  //!< max drift charge equivalent to the detector thickness
-  float MaxDiffusionSigma() const;             //!< max sigma diffusion 
+  float MaxDriftTime(const InDetDD::SiDetectorElement* element) const;                  //!< max drift charge equivalent to the detector thickness
+  float MaxDiffusionSigma(const InDetDD::SiDetectorElement* element) const;             //!< max sigma diffusion 
 
   // methods for Taka Kondos's new charge drift m
   void initTransportModel();
@@ -125,9 +120,6 @@ class SCT_DetailedSurfaceChargesGenerator : public AthAlgTool, virtual public IS
   float m_tfix;       //!< fixed time
   float m_tsubtract;  //!< subtract drift time from mid gap 
 
-  float m_comTime ;       //!< use cosmics time for timing
-  bool  m_useComTime ;    //!< Flag to decide the use of cosmics time for timing
-  bool  m_cosmicsRun ;    //!< Flag to set Cosmics Run
   bool  m_doDistortions ; //!< Flag to set Distortions
 
   // -- Charge Trapping -- //
@@ -143,8 +135,6 @@ class SCT_DetailedSurfaceChargesGenerator : public AthAlgTool, virtual public IS
   TProfile2D *m_h_yEfield;
   TProfile2D *m_h_zEfield;
 
-  IdentifierHash m_hashId;
-
   //TK model settings
   int m_chargeDriftModel; //!< 0 default SCT model, 1 eh transport, 2 use of fixed charge map 
   int m_eFieldModel;      //!< 0 uniform E-field model, 1 flat diode model, 2 FEM solutions
@@ -197,9 +187,8 @@ class SCT_DetailedSurfaceChargesGenerator : public AthAlgTool, virtual public IS
   ToolHandle<ISCT_ModuleDistortionsTool> m_distortionsTool{this, "SCTDistortionsTool", "SCT_DistortionsTool", "Tool to retrieve SCT distortions"};
   ToolHandle<ISiPropertiesTool> m_siPropertiesTool{this, "SiPropertiesTool", "SCT_SiPropertiesTool", "Tool to retrieve SCT silicon properties"};
   ToolHandle<ISiliconConditionsTool> m_siConditionsTool{this, "SiConditionsTool", "SCT_SiliconConditionsTool", "Tool to retrieve SCT silicon information"};
-  ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
+  ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
 
-  const InDetDD::SiDetectorElement * m_element;   
   CLHEP::HepRandomEngine *           m_rndmEngine;          //!< Random Engine
   std::string                        m_rndmEngineName;      //!< name of random engine, actual pointer in SiDigitization
 
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
index bc0678b87247810d3f04732a20e50ea86db091fb..88a7dd734f793748a875fbb6801b6391ba102caf 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
@@ -1,12 +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 <algorithm>
 #include "SCT_Digitization/SCT_DigitizationTool.h"
 
-#include "PileUpTools/PileUpMergeSvc.h"
-
 // Mother Package includes
 #include "SiDigitization/SiHelper.h"
 #include "SiDigitization/SiChargedDiodeCollection.h"
@@ -23,19 +20,14 @@
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetReadoutGeometry/SCT_ModuleSideDesign.h"
 
-// SCT_Digitization tools
-#include "SCT_Digitization/ISCT_FrontEnd.h"
-#include "SCT_Digitization/ISCT_SurfaceChargesGenerator.h"
-#include "SCT_Digitization/ISCT_RandomDisabledCellGenerator.h"
-
 // Data Handle
 #include "StoreGate/ReadCondHandle.h"
 #include "StoreGate/ReadHandle.h"
 
 // C++ Standard Library
-#include <sstream>
-#include <string>
 #include <limits>
+#include <memory>
+#include <sstream>
 
 static constexpr unsigned int crazyParticleBarcode(std::numeric_limits<int32_t>::max());
 // Barcodes at the HepMC level are int
@@ -45,49 +37,44 @@ using InDetDD::SiCellId;
 SCT_DigitizationTool::SCT_DigitizationTool(const std::string& type,
                                            const std::string& name,
                                            const IInterface* parent) :
-  PileUpToolBase(type, name, parent),
-  m_tfix{-999.},
-  m_comTime{0.},
-  m_enableHits{true},
-  m_onlyHitElements{false},
-  m_HardScatterSplittingMode{0},
+  base_class(type, name, parent),
   m_HardScatterSplittingSkipper{false},
-  m_ComTimeKey{"ComTime"},
   m_detID{nullptr},
-  m_sct_FrontEnd{"SCT_FrontEnd", this},
-  m_sct_SurfaceChargesGenerator{"SCT_SurfaceChargesGenerator", this},
-  m_sct_RandomDisabledCellGenerator{"SCT_RandomDisabledCellGenerator", this},
-  m_rdoContainerKey{""},
   m_rndmSvc{"AtRndmGenSvc", name},
   m_mergeSvc{"PileUpMergeSvc", name},
   m_rndmEngine{nullptr},
-  m_atlasID{nullptr},
   m_thpcsi{nullptr},
   m_chargedDiodes{nullptr},
   m_vetoThisBarcode{crazyParticleBarcode} {
     declareInterface<SCT_DigitizationTool>(this);
-    declareProperty("FixedTime", m_tfix, "Fixed time for Cosmics run selection");
+
+    declareProperty("FixedTime", m_tfix = -999., "Fixed time for Cosmics run selection");
     declareProperty("CosmicsRun", m_cosmicsRun = false, "Cosmics run selection");
-    declareProperty("UseComTime", m_useComTime = false, "Flag to set ComTime");
-    declareProperty("EnableHits", m_enableHits, "Enable hits");
-    declareProperty("OnlyHitElements", m_onlyHitElements, "Process only elements with hits");
+    declareProperty("EnableHits", m_enableHits = true, "Enable hits");
+    declareProperty("OnlyHitElements", m_onlyHitElements = false, "Process only elements with hits");
     declareProperty("BarrelOnly", m_barrelonly = false, "Only Barrel layers");
     declareProperty("RandomDisabledCells", m_randomDisabledCells = false, "Use Random disabled cells, default no");
     declareProperty("CreateNoiseSDO", m_createNoiseSDO = false, "Set create noise SDO flag");
     declareProperty("WriteSCT1_RawData", m_WriteSCT1_RawData = false, "Write out SCT1_RawData rather than SCT3_RawData");
-
     declareProperty("InputObjectName", m_inputObjectName = "", "Input Object name");
-    declareProperty("OutputObjectName", m_rdoContainerKey = "SCT_RDOs", "Output Object name");
-    declareProperty("OutputSDOName", m_simDataCollMapKey = "SCT_SDO_Map", "Output SDO container name");
     declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used in SCT & Pixel digitization");
     declareProperty("MergeSvc", m_mergeSvc, "Merge service used in Pixel & SCT digitization");
-    declareProperty("FrontEnd", m_sct_FrontEnd, "Choice of using a development release");
-    declareProperty("SurfaceChargesGenerator", m_sct_SurfaceChargesGenerator, "Choice of using a more detailed charge drift model");
-    declareProperty("HardScatterSplittingMode", m_HardScatterSplittingMode, "Control pileup & signal splitting");
+    declareProperty("HardScatterSplittingMode", m_HardScatterSplittingMode = 0, "Control pileup & signal splitting");
     declareProperty("ParticleBarcodeVeto", m_vetoThisBarcode = crazyParticleBarcode, "Barcode of particle to ignore");
+
     m_WriteSCT1_RawData.declareUpdateHandler(&SCT_DigitizationTool::SetupRdoOutputType, this);
   }
 
+SCT_DigitizationTool::~SCT_DigitizationTool() {
+  delete m_chargedDiodes;
+  delete m_thpcsi;
+  for (SiHitCollection* hit: m_hitCollPtrs) {
+    hit->Clear();
+    delete hit;
+  }
+  m_hitCollPtrs.clear();
+}
+
 // ----------------------------------------------------------------------
 // Initialize method:
 // ----------------------------------------------------------------------
@@ -102,29 +89,30 @@ StatusCode SCT_DigitizationTool::initialize() {
   }
 
   // +++ Init the services
-  CHECK(initServices());
+  ATH_CHECK(initServices());
 
   // +++ Get the random generator engine
-  CHECK(initRandomEngine());
+  ATH_CHECK(initRandomEngine());
 
   // +++ Get the Surface Charges Generator tool
-  CHECK(initSurfaceChargesGeneratorTool());
+  ATH_CHECK(initSurfaceChargesGeneratorTool());
 
   // +++ Get the Front End tool
-  CHECK(initFrontEndTool());
+  ATH_CHECK(initFrontEndTool());
 
   // +++ Initialise for disabled cells from the random disabled cells tool
   // +++ Default off, since disabled cells taken form configuration in
   // reconstruction stage
   if (m_randomDisabledCells) {
-    CHECK(initDisabledCells());
+    ATH_CHECK(initDisabledCells());
     ATH_MSG_INFO("Use of Random disabled cells");
+  } else {
+    m_sct_RandomDisabledCellGenerator.disable();
   }
 
   // +++ Initialize WriteHandleKey
   ATH_CHECK(m_rdoContainerKey.initialize());
   ATH_CHECK(m_simDataCollMapKey.initialize());
-  ATH_CHECK(m_ComTimeKey.initialize(m_useComTime));
 
   // Initialize ReadCondHandleKey
   ATH_CHECK(m_SCTDetEleCollKey.initialize());
@@ -168,36 +156,31 @@ namespace {
 // Initialise the surface charge generator Tool
 // ----------------------------------------------------------------------
 StatusCode SCT_DigitizationTool::initSurfaceChargesGeneratorTool() {
-  StatusCode sc{m_sct_SurfaceChargesGenerator.retrieve()};
+  ATH_CHECK(m_sct_SurfaceChargesGenerator.retrieve());
 
-  if (!sc.isSuccess()) {
-    ATH_MSG_ERROR(" Can't get SCT Surface Charges Generator " << m_sct_SurfaceChargesGenerator);
-    return sc;
-  }
-  m_sct_SurfaceChargesGenerator->setCosmicsRun(m_cosmicsRun);
-  m_sct_SurfaceChargesGenerator->setComTimeFlag(m_useComTime);
   m_sct_SurfaceChargesGenerator->setRandomEngine(m_rndmEngine);
 
+  if (m_cosmicsRun and m_tfix > -998) {
+    m_sct_SurfaceChargesGenerator->setFixedTime(m_tfix);
+    ATH_MSG_INFO("Use of FixedTime = " << m_tfix << " in cosmics");
+  }
+
   ATH_MSG_DEBUG("Retrieved and initialised tool " << m_sct_SurfaceChargesGenerator);
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 // ----------------------------------------------------------------------
 // Initialise the Front End electronics Tool
 // ----------------------------------------------------------------------
 StatusCode SCT_DigitizationTool::initFrontEndTool() {
-  StatusCode sc{m_sct_FrontEnd.retrieve()};
+  ATH_CHECK(m_sct_FrontEnd.retrieve());
 
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR(" Can't get SCT FrontEnd tool: " << m_sct_FrontEnd);
-    return sc;
-  }
   m_sct_FrontEnd->setRandomEngine(m_rndmEngine);
   storeTool(&(*m_sct_FrontEnd));
 
   ATH_MSG_DEBUG("Retrieved and initialised tool " << m_sct_FrontEnd);
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 // ----------------------------------------------------------------------
@@ -207,8 +190,8 @@ StatusCode SCT_DigitizationTool::initRandomEngine() {
   std::string rndmEngineName{"SCT_Digitization"};
 
   m_rndmEngine = m_rndmSvc->GetEngine(rndmEngineName);
-  if (m_rndmEngine == 0) {
-    ATH_MSG_ERROR("Could not find RndmEngine : " << rndmEngineName);
+  if (m_rndmEngine == nullptr) {
+    ATH_MSG_FATAL("Could not find RndmEngine : " << rndmEngineName);
     return StatusCode::FAILURE;
   }
   ATH_MSG_DEBUG("Get random number engine : <" << rndmEngineName << ">");
@@ -221,24 +204,12 @@ StatusCode SCT_DigitizationTool::initRandomEngine() {
 StatusCode SCT_DigitizationTool::initServices() {
   // Get SCT ID helper for hash function and Store them using methods from the
   // SiDigitization.
-  StatusCode sc = detStore()->retrieve(m_detID, "SCT_ID");
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR("Failed to get SCT ID helper");
-    return sc;
-  }
-
-  if (not m_mergeSvc.retrieve().isSuccess()) {
-    ATH_MSG_ERROR("Could not find PileUpMergeSvc");
-    return StatusCode::FAILURE;
-  }
-  if (not m_rndmSvc.retrieve().isSuccess()) {
-    ATH_MSG_ERROR("Could not find given RndmSvc");
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK(detStore()->retrieve(m_detID, "SCT_ID"));
 
-  store(m_detID);
+  ATH_CHECK(m_mergeSvc.retrieve());
+  ATH_CHECK(m_rndmSvc.retrieve());
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 // ----------------------------------------------------------------------
@@ -246,18 +217,13 @@ StatusCode SCT_DigitizationTool::initServices() {
 // ----------------------------------------------------------------------
 StatusCode SCT_DigitizationTool::initDisabledCells() {
   // +++ Retrieve the SCT_RandomDisabledCellGenerator
-  StatusCode sc{m_sct_RandomDisabledCellGenerator.retrieve()};
-
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR("Failed to retrieve the SCT_RandomDisabledCellGenerator tool:" << m_sct_RandomDisabledCellGenerator);
-    return sc;
-  }
+  ATH_CHECK(m_sct_RandomDisabledCellGenerator.retrieve());
 
   m_sct_RandomDisabledCellGenerator->setRandomEngine(m_rndmEngine);
   storeTool(&(*m_sct_RandomDisabledCellGenerator));
 
   ATH_MSG_INFO("Retrieved the SCT_RandomDisabledCellGenerator tool:" << m_sct_RandomDisabledCellGenerator);
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 StatusCode SCT_DigitizationTool::processAllSubEvents() {
@@ -265,7 +231,7 @@ StatusCode SCT_DigitizationTool::processAllSubEvents() {
     return StatusCode::FAILURE;
   }
   ATH_MSG_VERBOSE("Begin digitizeAllHits");
-  if (m_enableHits && !getNextEvent().isFailure()) {
+  if (m_enableHits and (not getNextEvent().isFailure())) {
     digitizeAllHits();
   } else {
     ATH_MSG_DEBUG("no hits found in event!");
@@ -282,7 +248,6 @@ StatusCode SCT_DigitizationTool::processAllSubEvents() {
   return StatusCode::SUCCESS;
 }
 
-
 // ======================================================================
 // prepareEvent
 // ======================================================================
@@ -297,22 +262,6 @@ StatusCode SCT_DigitizationTool::prepareEvent(unsigned int /*index*/) {
   m_simDataCollMap = SG::makeHandle(m_simDataCollMapKey);
   ATH_CHECK(m_simDataCollMap.record(std::make_unique<InDetSimDataCollection>()));
 
-  if (m_useComTime) {
-    SG::ReadHandle<ComTime> comTime(m_ComTimeKey);
-    if (comTime.isValid()) {
-      m_comTime = comTime->getTime();
-      m_sct_SurfaceChargesGenerator->setComTime(m_comTime);
-      ATH_MSG_DEBUG("Found tool for cosmic/commissioning timing: ComTime");
-    } else {
-      ATH_MSG_WARNING("Did not find tool needed for cosmic/commissioning timing: ComTime");
-    }
-  }
-
-  if (m_cosmicsRun and m_tfix > -998) {
-    m_sct_SurfaceChargesGenerator->setFixedTime(m_tfix);
-    ATH_MSG_INFO("Use of FixedTime = " << m_tfix << " in cosmics");
-  }
-
   m_processedElements.clear();
   m_processedElements.resize(m_detID->wafer_hash_max(), false);
 
@@ -337,9 +286,9 @@ StatusCode SCT_DigitizationTool::mergeEvent() {
 
   digitizeNonHits();
 
-  for (std::vector<SiHitCollection*>::iterator it{m_hitCollPtrs.begin()}; it != m_hitCollPtrs.end(); it++) {
-    (*it)->Clear();
-    delete (*it);
+  for (SiHitCollection* hit: m_hitCollPtrs) {
+    hit->Clear();
+    delete hit;
   }
   m_hitCollPtrs.clear();
 
@@ -381,7 +330,7 @@ void SCT_DigitizationTool::digitizeAllHits() {
 
     // create and store RDO and SDO
 
-    if (!m_chargedDiodes->empty()) {
+    if (not m_chargedDiodes->empty()) {
       StatusCode sc{createAndStoreRDO(m_chargedDiodes)};
       if (sc.isSuccess()) { // error msg is given inside
         // createAndStoreRDO()
@@ -406,16 +355,16 @@ void SCT_DigitizationTool::digitizeNonHits() {
 
   // Get SCT_DetectorElementCollection
   SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
-  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
+  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]) {
+    if (not m_processedElements[i]) {
       IdentifierHash idHash{i};
-      if (!idHash.is_valid()) {
+      if (not idHash.is_valid()) {
         ATH_MSG_ERROR("SCT Detector element id hash is invalid = " << i);
       }
 
@@ -433,7 +382,7 @@ void SCT_DigitizationTool::digitizeNonHits() {
 
         // Create and store RDO and SDO
         // Don't create empty ones.
-        if (!m_chargedDiodes->empty()) {
+        if (not m_chargedDiodes->empty()) {
           StatusCode sc{createAndStoreRDO(m_chargedDiodes)};
           if (sc.isSuccess()) {// error msg is given inside
             // createAndStoreRDO()
@@ -452,8 +401,8 @@ void SCT_DigitizationTool::digitizeNonHits() {
 }
 
 bool SCT_DigitizationTool::digitizeElement(SiChargedDiodeCollection* chargedDiodes) {
-  if (0 == m_thpcsi) {
-    ATH_MSG_ERROR("thpcsi should not be zero!");
+  if (nullptr == m_thpcsi) {
+    ATH_MSG_ERROR("thpcsi should not be nullptr!");
 
     return false;
   }
@@ -469,29 +418,14 @@ 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()};
-
-  // For testbeam
-
-  if (m_atlasID == NULL) {
-    id = 0;
-  } else {
-    const SCT_ID* sctID{dynamic_cast<const SCT_ID*>(m_atlasID)};
-    if (sctID == nullptr) {
-      ATH_MSG_ERROR("expected a SCT_ID but failed...");
-      return false;
-    }
-    id = sctID->wafer_id(Barrel,
-                         firstHit->getLayerDisk(),
-                         firstHit->getPhiModule(),
-                         firstHit->getEtaModule(),
-                         firstHit->getSide());
-    waferHash = sctID->wafer_hash(id);
-  }
+  int barrel{firstHit->getBarrelEndcap()};
+  Identifier id{m_detID->wafer_id(barrel,
+                                  firstHit->getLayerDisk(),
+                                  firstHit->getPhiModule(),
+                                  firstHit->getEtaModule(),
+                                  firstHit->getSide())};
+  IdentifierHash waferHash{m_detID->wafer_hash(id)};
 
   // Get SCT_DetectorElementCollection
   SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey);
@@ -505,7 +439,7 @@ bool SCT_DigitizationTool::digitizeElement(SiChargedDiodeCollection* chargedDiod
   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());
+    ATH_MSG_DEBUG("Barrel=" << barrel << " layer=" << firstHit->getLayerDisk() << " Eta=" << firstHit->getEtaModule() << " Phi=" << firstHit->getPhiModule() << " Side=" << firstHit->getSide());
     ATH_MSG_ERROR("detector manager could not find element with id = " << id);
     return false;
   }
@@ -524,9 +458,7 @@ bool SCT_DigitizationTool::digitizeElement(SiChargedDiodeCollection* chargedDiod
                                                                        phit->getEtaModule(),
                                                                        phit->getSide())));
       ATH_MSG_DEBUG("calling process() for all methods");
-      m_sct_SurfaceChargesGenerator->setDetectorElement(sielement);
-
-      m_sct_SurfaceChargesGenerator->process(phit, SiDigitizationSurfaceChargeInserter(sielement, chargedDiodes));
+      m_sct_SurfaceChargesGenerator->process(sielement, phit, SiDigitizationSurfaceChargeInserter(sielement, chargedDiodes));
       ATH_MSG_DEBUG("charges filled!");
     }
   }
@@ -542,8 +474,8 @@ void SCT_DigitizationTool::applyProcessorTools(SiChargedDiodeCollection* charged
   ATH_MSG_DEBUG("applyProcessorTools()");
   int processorNumber{0};
 
-  for (std::list<ISiChargedDiodesProcessorTool*>::iterator p_proc{m_diodeCollectionTools.begin()}; p_proc != m_diodeCollectionTools.end(); ++p_proc) {
-    (*p_proc)->process(*chargedDiodes);
+  for (ISiChargedDiodesProcessorTool* proc: m_diodeCollectionTools) {
+    proc->process(*chargedDiodes);
 
     processorNumber++;
     ATH_MSG_DEBUG("Applied processor # " << processorNumber);
@@ -556,22 +488,22 @@ StatusCode SCT_DigitizationTool::processBunchXing(int bunchXing,
     ATH_MSG_VERBOSE("SCT_DigitizationTool::processBunchXing() " << bunchXing);
     // decide if this event will be processed depending on
     // HardScatterSplittingMode & bunchXing
-    if (m_HardScatterSplittingMode == 2 && !m_HardScatterSplittingSkipper) {
+    if (m_HardScatterSplittingMode == 2 and (not m_HardScatterSplittingSkipper)) {
         m_HardScatterSplittingSkipper = true;
         return StatusCode::SUCCESS;
     }
-    if (m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper) {
+    if (m_HardScatterSplittingMode == 1 and m_HardScatterSplittingSkipper) {
         return StatusCode::SUCCESS;
     }
-    if (m_HardScatterSplittingMode == 1 && !m_HardScatterSplittingSkipper) {
+    if (m_HardScatterSplittingMode == 1 and (not m_HardScatterSplittingSkipper)) {
         m_HardScatterSplittingSkipper = true;
     }
 
     typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
     TimedHitCollList hitCollList;
 
-    if (!(m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing,
-					    bSubEvents, eSubEvents).isSuccess()) &&
+    if ((not (m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing,
+                                                bSubEvents, eSubEvents).isSuccess())) and
         hitCollList.size() == 0) {
       ATH_MSG_ERROR("Could not fill TimedHitCollList");
       return StatusCode::FAILURE;
@@ -580,14 +512,12 @@ StatusCode SCT_DigitizationTool::processBunchXing(int bunchXing,
 		      m_inputObjectName << " found");
     }
 
-    TimedHitCollList::iterator iColl(hitCollList.begin());
-    TimedHitCollList::iterator endColl(hitCollList.end());
-
-    for( ; iColl != endColl; iColl++){
-      SiHitCollection *hitCollPtr = new SiHitCollection(*iColl->second);
-      PileUpTimeEventIndex timeIndex(iColl->first);
+    TimedHitCollList::iterator endColl{hitCollList.end()};
+    for (TimedHitCollList::iterator iColl{hitCollList.begin()}; iColl != endColl; iColl++) {
+      SiHitCollection *hitCollPtr{new SiHitCollection(*iColl->second)};
+      PileUpTimeEventIndex timeIndex{iColl->first};
       ATH_MSG_DEBUG("SiHitCollection found with " << hitCollPtr->size() <<
-		    " hits");
+                    " hits");
       ATH_MSG_VERBOSE("time index info. time: " << timeIndex.time()
 		      << " index: " << timeIndex.index()
 		      << " type: " << timeIndex.type());
@@ -648,7 +578,7 @@ StatusCode SCT_DigitizationTool::createAndStoreRDO(SiChargedDiodeCollection* chD
   Identifier id_coll{RDOColl->identify()};
   int barrelec{m_detID->barrel_ec(id_coll)};
 
-  if (!m_barrelonly or std::abs(barrelec) <= 1) {
+  if ((not m_barrelonly) or (std::abs(barrelec) <= 1)) {
     if (m_rdoContainer->addCollection(RDOColl, RDOColl->identifyHash()).isFailure()) {
       ATH_MSG_FATAL("SCT RDO collection could not be added to container!");
       delete RDOColl;
@@ -832,27 +762,23 @@ StatusCode SCT_DigitizationTool::getNextEvent() {
   // create a new hits collection
   m_thpcsi = new TimedHitCollection<SiHit>{numberOfSiHits};
   // now merge all collections into one
-  TimedHitCollList::iterator iColl{hitCollList.begin()};
   TimedHitCollList::iterator endColl{hitCollList.end()};
-  while (iColl != endColl) {
+  for (TimedHitCollList::iterator iColl{hitCollList.begin()}; iColl != endColl; ++iColl) {
     // decide if this event will be processed depending on
     // HardScatterSplittingMode & bunchXing
-    if (m_HardScatterSplittingMode == 2 and not m_HardScatterSplittingSkipper) {
+    if (m_HardScatterSplittingMode == 2 and (not m_HardScatterSplittingSkipper)) {
       m_HardScatterSplittingSkipper = true;
-      ++iColl;
       continue;
     }
     if (m_HardScatterSplittingMode == 1 and m_HardScatterSplittingSkipper) {
-      ++iColl;
       continue;
     }
-    if (m_HardScatterSplittingMode == 1 and not m_HardScatterSplittingSkipper) {
+    if (m_HardScatterSplittingMode == 1 and (not m_HardScatterSplittingSkipper)) {
       m_HardScatterSplittingSkipper = true;
     }
     const SiHitCollection* p_collection{iColl->second};
     m_thpcsi->insert(iColl->first, p_collection);
-    ATH_MSG_DEBUG("SiTrackerHitCollection found with" << p_collection->size() << " hits");    // loop on the hit collections
-    ++iColl;
+    ATH_MSG_DEBUG("SiTrackerHitCollection found with" << p_collection->size() << " hits"); // loop on the hit collections
   }
   return StatusCode::SUCCESS;
 }
@@ -880,15 +806,15 @@ void SCT_DigitizationTool::addSDO(SiChargedDiodeCollection* collection) {
       if ((barcode == 0) or (barcode == m_vetoThisBarcode)) {
         continue;
       }
-      if (!real_particle_hit) {
+      if (not real_particle_hit) {
         // Types of SiCharges expected from SCT
-        // Noise:                        barcode==0 &&
+        // Noise:                        barcode==0 and
         // processType()==SiCharge::noise
-        // Delta Rays:                   barcode==0 &&
+        // Delta Rays:                   barcode==0 and
         // processType()==SiCharge::track
-        // Pile Up Tracks With No Truth: barcode!=0 &&
+        // Pile Up Tracks With No Truth: barcode!=0 and
         // processType()==SiCharge::cut_track
-        // Tracks With Truth:            barcode!=0 &&
+        // Tracks With Truth:            barcode!=0 and
         // processType()==SiCharge::track
         if (barcode != 0 and i_ListOfCharges->processType() == SiCharge::track) {
           real_particle_hit = true;
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx
index cfef99454c303fa86c80c7ea3e1cc861510f4fb2..bb271ce3992bd38579a40bf5f1f6f40b0cf15611 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx
@@ -44,10 +44,7 @@ SCT_SurfaceChargesGenerator::SCT_SurfaceChargesGenerator(const std::string& type
   m_tHalfwayDrift{0},
   m_distInterStrip{1.0},
   m_distHalfInterStrip{0},
-  m_SurfaceDriftFlag{0},
-  m_comTime{0},
-  m_useComTime{false},
-  m_cosmicsRun{false},
+  m_SurfaceDriftFlag{false},
   m_doDistortions{false},
   m_useSiCondDB{true},
   m_doTrapping{false},
@@ -76,8 +73,6 @@ SCT_SurfaceChargesGenerator::SCT_SurfaceChargesGenerator(const std::string& type
   m_h_velocity_trap{nullptr},
   m_h_mobility_trap{nullptr},
   m_h_trap_pos{nullptr},
-  m_hashId{0},
-  m_element{nullptr},
   m_rndmEngine{nullptr},
   m_rndmEngineName{"SCT_Digitization"} {
     declareInterface<ISCT_SurfaceChargesGenerator>(this);
@@ -197,7 +192,7 @@ StatusCode SCT_SurfaceChargesGenerator::initialize() {
   m_distHalfInterStrip = m_distInterStrip * 0.5;
   if ((m_tSurfaceDrift > m_tHalfwayDrift) and (m_tHalfwayDrift >= 0.0) and
       (m_distHalfInterStrip > 0.0) and (m_distHalfInterStrip < m_distInterStrip)) {
-    m_SurfaceDriftFlag = 1;
+    m_SurfaceDriftFlag = true;
   } else {
     ATH_MSG_INFO("\tsurface drift still not on, wrong params");
   }
@@ -231,15 +226,37 @@ StatusCode SCT_SurfaceChargesGenerator::finalize() {
 // ----------------------------------------------------------------------
 // perpandicular Drift time calculation
 // ----------------------------------------------------------------------
-float SCT_SurfaceChargesGenerator::driftTime(float zhit) const {
-  if ((zhit < 0.0) or (zhit > m_thickness)) {
+float SCT_SurfaceChargesGenerator::driftTime(float zhit, const SiDetectorElement* element) const {
+  if (element==nullptr) {
+    ATH_MSG_ERROR("SCT_SurfaceChargesGenerator::process element is nullptr");
+    return -2.0;
+  }
+  const SCT_ModuleSideDesign* design{dynamic_cast<const SCT_ModuleSideDesign*>(&(element->design()))};
+  if (design==nullptr) {
+    ATH_MSG_ERROR("SCT_SurfaceChargesGenerator::process can not get " << design);
+    return -2.0;
+  }
+  const double thickness{design->thickness()};
+  const IdentifierHash hashId{element->identifyHash()};
+
+  if ((zhit < 0.0) or (zhit > thickness)) {
     ATH_MSG_DEBUG("driftTime: hit coordinate zhit=" << zhit / CLHEP::micrometer << " out of range");
     return -2.0;
   }
 
-  const float denominator{static_cast<float>(m_depletionVoltage + m_biasVoltage - (2.0 * zhit * m_depletionVoltage / m_thickness))};
+  float depletionVoltage{0.};
+  float biasVoltage{0.};
+  if (m_useSiCondDB) {
+    depletionVoltage = m_siConditionsTool->depletionVoltage(hashId) * CLHEP::volt;
+    biasVoltage = m_siConditionsTool->biasVoltage(hashId) * CLHEP::volt;
+  } else {
+    depletionVoltage = m_vdepl * CLHEP::volt;
+    biasVoltage = m_vbias * CLHEP::volt;
+  }
+
+  const float denominator{static_cast<float>(depletionVoltage + biasVoltage - (2.0 * zhit * depletionVoltage / thickness))};
   if (denominator <= 0.0) {
-    if (m_biasVoltage >= m_depletionVoltage) { // Should not happen
+    if (biasVoltage >= depletionVoltage) { // Should not happen
       if(not m_isOverlay) {
         ATH_MSG_ERROR("driftTime: negative argument X for log(X) " << zhit);
       }
@@ -250,20 +267,25 @@ float SCT_SurfaceChargesGenerator::driftTime(float zhit) const {
     }
   }
 
-  float driftTime{log((m_depletionVoltage + m_biasVoltage) / denominator)};
-  driftTime *= m_thickness * m_thickness / (2.0 * m_holeDriftMobility * m_depletionVoltage);
-  return driftTime;
+  float t_drift{log((depletionVoltage + biasVoltage) / denominator)};
+  t_drift *= thickness * thickness / (2.0 * m_siPropertiesTool->getSiProperties(hashId).holeDriftMobility() * depletionVoltage);
+  return t_drift;
 }
 
 // ----------------------------------------------------------------------
 // Sigma diffusion calculation
 // ----------------------------------------------------------------------
-float SCT_SurfaceChargesGenerator::diffusionSigma(float zhit) const {
-  const float t{driftTime(zhit)}; // in ns
+float SCT_SurfaceChargesGenerator::diffusionSigma(float zhit, const SiDetectorElement* element) const {
+  if (element==nullptr) {
+    ATH_MSG_ERROR("SCT_SurfaceChargesGenerator::diffusionSigma element is nullptr");
+    return 0.0;
+  }
+  const IdentifierHash hashId{element->identifyHash()};
+  const float t{driftTime(zhit, element)}; // in ns
 
   if (t > 0.0) {
-    const float diffusionSigma{static_cast<float>(sqrt(2. * m_holeDiffusionConstant * t))}; // in mm
-    return diffusionSigma;
+    const float sigma{static_cast<float>(sqrt(2. * m_siPropertiesTool->getSiProperties(hashId).holeDiffusionConstant() * t))}; // in mm
+    return sigma;
   } else {
     return 0.0;
   }
@@ -272,26 +294,26 @@ float SCT_SurfaceChargesGenerator::diffusionSigma(float zhit) const {
 // ----------------------------------------------------------------------
 // Maximum drift time
 // ----------------------------------------------------------------------
-float SCT_SurfaceChargesGenerator::maxDriftTime() const {
-  if (m_element) {
-    const float sensorThickness{static_cast<float>(m_element->thickness())};
-    return driftTime(sensorThickness);
+float SCT_SurfaceChargesGenerator::maxDriftTime(const SiDetectorElement* element) const {
+  if (element) {
+    const float sensorThickness{static_cast<float>(element->thickness())};
+    return driftTime(sensorThickness, element);
   } else {
     ATH_MSG_INFO("Error: SiDetectorElement not set!");
-    return 0;
+    return 0.;
   }
 }
 
 // ----------------------------------------------------------------------
 // Maximum Sigma difusion
 // ----------------------------------------------------------------------
-float SCT_SurfaceChargesGenerator::maxDiffusionSigma() const {
-  if (m_element) {
-    const float sensorThickness{static_cast<float>(m_element->thickness())};
-    return diffusionSigma(sensorThickness);
+float SCT_SurfaceChargesGenerator::maxDiffusionSigma(const SiDetectorElement* element) const {
+  if (element) {
+    const float sensorThickness{static_cast<float>(element->thickness())};
+    return diffusionSigma(sensorThickness, element);
   } else {
     ATH_MSG_INFO("Error: SiDetectorElement not set!");
-    return 0;
+    return 0.;
   }
 }
 
@@ -302,15 +324,15 @@ float SCT_SurfaceChargesGenerator::maxDiffusionSigma() const {
 float SCT_SurfaceChargesGenerator::surfaceDriftTime(float ysurf) const {
   if (m_SurfaceDriftFlag) {
     if ((ysurf >= 0.0) and (ysurf <= m_distInterStrip)) {
-      float surfaceDriftTime{0.};
+      float t_surfaceDrift{0.};
       if (ysurf < m_distHalfInterStrip) {
         const float y{ysurf / m_distHalfInterStrip};
-        surfaceDriftTime = m_tHalfwayDrift * y * y;
+        t_surfaceDrift= m_tHalfwayDrift * y * y;
       } else {
         const float y{(m_distInterStrip - ysurf) / (m_distInterStrip - m_distHalfInterStrip)};
-        surfaceDriftTime = m_tSurfaceDrift + (m_tHalfwayDrift - m_tSurfaceDrift) * y * y;
+        t_surfaceDrift = m_tSurfaceDrift + (m_tHalfwayDrift - m_tSurfaceDrift) * y * y;
       }
-      return surfaceDriftTime;
+      return t_surfaceDrift;
     } else {
       ATH_MSG_INFO(" ysurf out of range " << ysurf);
       return -1.0;
@@ -320,27 +342,15 @@ float SCT_SurfaceChargesGenerator::surfaceDriftTime(float ysurf) const {
   }
 }
 
-// -------------------------------------------------------------------------------------------
-// create a list of surface charges from a hit - called from
-// SCT_DigitizationTool PileUpTool
-// -------------------------------------------------------------------------------------------
-void SCT_SurfaceChargesGenerator::processFromTool(const SiHit* phit,
-                                                  const ISiSurfaceChargesInserter& inserter,
-                                                  float p_eventTime,
-                                                  unsigned short p_eventId) const {
-  ATH_MSG_VERBOSE("SCT_SurfaceChargesGenerator::processFromTool starts");
-  processSiHit(*phit, inserter, p_eventTime, p_eventId);
-  return;
-}
-
 // -------------------------------------------------------------------------------------------
 // create a list of surface charges from a hit - called from SCT_Digitization
 // AthAlgorithm
 // -------------------------------------------------------------------------------------------
-void SCT_SurfaceChargesGenerator::process(const TimedHitPtr<SiHit>& phit, 
+void SCT_SurfaceChargesGenerator::process(const SiDetectorElement* element,
+                                          const TimedHitPtr<SiHit>& phit,
                                           const ISiSurfaceChargesInserter& inserter) const {
   ATH_MSG_VERBOSE("SCT_SurfaceChargesGenerator::process starts");
-  processSiHit(*phit, inserter, phit.eventTime(), phit.eventId());
+  processSiHit(element, *phit, inserter, phit.eventTime(), phit.eventId());
   return;
 }
 
@@ -348,15 +358,21 @@ void SCT_SurfaceChargesGenerator::process(const TimedHitPtr<SiHit>& phit,
 // create a list of surface charges from a hit - called from both AthAlgorithm
 // and PileUpTool
 // -------------------------------------------------------------------------------------------
-void SCT_SurfaceChargesGenerator::processSiHit(const SiHit& phit,
+void SCT_SurfaceChargesGenerator::processSiHit(const SiDetectorElement* element,
+                                               const SiHit& phit,
                                                const ISiSurfaceChargesInserter& inserter,
                                                float p_eventTime,
                                                unsigned short p_eventId) const {
-  if (!m_design) {
-    ATH_MSG_ERROR("SCT_SurfaceChargesGenerator::process can not get " << m_design);
+  const SCT_ModuleSideDesign* design{dynamic_cast<const SCT_ModuleSideDesign*>(&(element->design()))};
+  if (design==nullptr) {
+    ATH_MSG_ERROR("SCT_SurfaceChargesGenerator::process can not get " << design);
     return;
   }
 
+  const double thickness{design->thickness()};
+  const IdentifierHash hashId{element->identifyHash()};
+  const double tanLorentz{m_lorentzAngleTool->getTanLorentzAngle(hashId)};
+
   // ---**************************************
   //  Time of Flight Calculation - separate method?
   // ---**************************************
@@ -364,16 +380,9 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit& phit,
   float timeOfFlight{p_eventTime + hitTime(phit)};
 
   // Kondo 19/09/2007: Use the coordinate of the center of the module to calculate the time of flight
-  timeOfFlight -= (m_center) / CLHEP::c_light;
+  timeOfFlight -= (element->center().mag()) / CLHEP::c_light;
   // !< extract the distance to the origin of the module to Time of flight
 
-  // !< Commissioning time taken into account for the particle time of flight calculation
-  if (m_cosmicsRun and m_useComTime) {
-    timeOfFlight -= m_comTime;
-  }
-  if (m_useComTime) {
-    timeOfFlight -= m_comTime;
-  }
   // !< timing set from jo to adjust (subtract) the timing
   if (m_tsubtract > -998.) {
     timeOfFlight -= m_tsubtract;
@@ -394,7 +403,7 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit& phit,
   const int numberOfSteps{static_cast<int>(LargeStep / m_smallStepLength) + 1};
   const float steps{static_cast<float>(m_numberOfCharges * numberOfSteps)};
   const float e1{static_cast<float>(phit.energyLoss() / steps)};
-  const float q1{static_cast<float>(e1 * m_electronHolePairsPerEnergy)};
+  const float q1{static_cast<float>(e1 * m_siPropertiesTool->getSiProperties(hashId).electronHolePairsPerEnergy())};
 
   // in the following, to test the code, we will use the original coordinate
   // system of the SCTtest3SurfaceChargesGenerator x is eta y is phi z is depth
@@ -403,10 +412,10 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit& phit,
   float zhit{xDep};
 
   if (m_doDistortions) {
-    if (m_isBarrel) {// Only apply disortions to barrel modules
+    if (element->isBarrel()) {// Only apply disortions to barrel modules
       Amg::Vector2D BOW;
-      BOW[0] = m_distortionsTool->correctSimulation(m_hashId, xhit, yhit, cEta, cPhi, cDep)[0];
-      BOW[1] = m_distortionsTool->correctSimulation(m_hashId, xhit, yhit, cEta, cPhi, cDep)[1];
+      BOW[0] = m_distortionsTool->correctSimulation(hashId, xhit, yhit, cEta, cPhi, cDep)[0];
+      BOW[1] = m_distortionsTool->correctSimulation(hashId, xhit, yhit, cEta, cPhi, cDep)[1];
       xhit = BOW.x();
       yhit = BOW.y();
     }
@@ -432,8 +441,8 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit& phit,
     float z1{zhit + StepZ * dstep};
 
     // Distance between charge and readout side.
-    // m_design->readoutSide() is +1 if readout side is in +ve depth axis direction and visa-versa.
-    float zReadout{static_cast<float>(0.5 * m_thickness - m_design->readoutSide() * z1)};
+    // design->readoutSide() is +1 if readout side is in +ve depth axis direction and visa-versa.
+    float zReadout{static_cast<float>(0.5 * thickness - design->readoutSide() * z1)};
     const double spess{zReadout};
 
     if (m_doHistoTrap) {
@@ -441,34 +450,34 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit& phit,
       m_h_spess->Fill(spess);
     }
 
-    float tdrift{driftTime(zReadout)};  // !< tdrift: perpandicular drift time
-    if (tdrift>-2.0000002 and tdrift<-1.9999998) {
+    float t_drift{driftTime(zReadout, element)};  // !< t_drift: perpandicular drift time
+    if (t_drift>-2.0000002 and t_drift<-1.9999998) {
       ATH_MSG_DEBUG("Checking for rounding errors in compression");
-      if ((fabs(z1) - 0.5 * m_thickness) < 0.000010) {
+      if ((fabs(z1) - 0.5 * thickness) < 0.000010) {
         ATH_MSG_DEBUG("Rounding error found attempting to correct it. z1 = " << std::fixed << std::setprecision(8) << z1);
         if (z1 < 0.0) {
-          z1 = 0.0000005 - 0.5 * m_thickness;
+          z1 = 0.0000005 - 0.5 * thickness;
           // set new coordinate to be 0.5nm inside wafer volume.
         } else {
-          z1 = 0.5 * m_thickness - 0.0000005;
+          z1 = 0.5 * thickness - 0.0000005;
           // set new coordinate to be 0.5nm inside wafer volume.
         }
-        zReadout = 0.5 * m_thickness - m_design->readoutSide() * z1;
-        tdrift = driftTime(zReadout);
-        if (tdrift>-2.0000002 and tdrift<-1.9999998) {
+        zReadout = 0.5 * thickness - design->readoutSide() * z1;
+        t_drift = driftTime(zReadout, element);
+        if (t_drift>-2.0000002 and t_drift<-1.9999998) {
           ATH_MSG_WARNING("Attempt failed. Making no correction.");
         } else {
-          ATH_MSG_DEBUG("Correction Successful! z1 = " << std::fixed << std::setprecision(8) << z1 << ", zReadout = " << zReadout << ", tdrift = " << tdrift);
+          ATH_MSG_DEBUG("Correction Successful! z1 = " << std::fixed << std::setprecision(8) << z1 << ", zReadout = " << zReadout << ", t_drift = " << t_drift);
         }
       } else {
         ATH_MSG_DEBUG("No rounding error found. Making no correction.");
       }
     }
-    if (tdrift > 0.0) {
+    if (t_drift > 0.0) {
       const float x1{xhit + StepX * dstep};
       float y1{yhit + StepY * dstep};
-      y1 += m_tanLorentz * zReadout; // !< Taking into account the magnetic field
-      const float sigma{diffusionSigma(zReadout)};
+      y1 += tanLorentz * zReadout; // !< Taking into account the magnetic field
+      const float sigma{diffusionSigma(zReadout, element)};
 
       for (int i{0}; i < m_numberOfCharges; ++i) {
         const float rx{CLHEP::RandGaussZiggurat::shoot(m_rndmEngine)};
@@ -487,7 +496,7 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit& phit,
 
         // now y will be x and z will be y ....just to make sure to confuse everebody
         double y0{dstrip * stripPitch}; // mm
-        double z0{m_thickness - zReadout}; // mm
+        double z0{thickness - zReadout}; // mm
 
         // -- Charge Trapping
         if (m_doTrapping) {
@@ -495,7 +504,7 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit& phit,
             m_h_zhit->Fill(zhit);
           }
           double trap_pos{-999999.}, drift_time{-999999.}; // FIXME need better default values
-          if (chargeIsTrapped(spess, trap_pos, drift_time)) {
+          if (chargeIsTrapped(spess, element, trap_pos, drift_time)) {
             if (not m_doRamo) {
               break;
             } else {  // if we want to take into account also Ramo Potential
@@ -514,13 +523,13 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit& phit,
 
               // now y will be x and z will be y ....just to make sure to confuse everebody
               double yfin{dstrip * stripPitch}; // mm
-              double zfin{m_thickness - trap_pos}; // mm
+              double zfin{thickness - trap_pos}; // mm
 
               m_radDamageTool->holeTransport(y0, z0, yfin, zfin, Q_m2, Q_m1, Q_00, Q_p1, Q_p2);
               for (int strip{-2}; strip<=2; strip++) {
                 const double ystrip{yd + strip * stripPitch}; // mm
-                const SiLocalPosition position(m_element->hitLocalToLocal(xd, ystrip));
-                if (m_design->inActiveArea(position)) {
+                const SiLocalPosition position(element->hitLocalToLocal(xd, ystrip));
+                if (design->inActiveArea(position)) {
                   double charge{0.};
                   if (strip == -2) charge = Q_m2;
                   if (strip == -1) charge = Q_m1;
@@ -540,11 +549,11 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit& phit,
         } // m_doTrapping==true
         
         if (not m_doRamo) {
-          const SiLocalPosition position{m_element->hitLocalToLocal(xd, yd)};
-          if (m_design->inActiveArea(position)) {
-            const float sdist{static_cast<float>(m_design->scaledDistanceToNearestDiode(position))}; // !< dist on the surface from the hit point to the nearest strip (diode)
-            const float tsurf{surfaceDriftTime(2.0 * sdist)}; // !< Surface drift time
-            const float totaltime{(m_tfix > -998.) ? m_tfix : tdrift + timeOfFlight + tsurf}; // !< Total drift time
+          const SiLocalPosition position{element->hitLocalToLocal(xd, yd)};
+          if (design->inActiveArea(position)) {
+            const float sdist{static_cast<float>(design->scaledDistanceToNearestDiode(position))}; // !< dist on the surface from the hit point to the nearest strip (diode)
+            const float t_surf{surfaceDriftTime(2.0 * sdist)}; // !< Surface drift time
+            const float totaltime{(m_tfix > -998.) ? m_tfix : t_drift + timeOfFlight + t_surf}; // !< Total drift time
             inserter(SiSurfaceCharge(position, SiCharge(q1, totaltime, hitproc, trklink)));
           } else {
             ATH_MSG_VERBOSE(std::fixed << std::setprecision(8) << "Local position (phi, eta, depth): ("
@@ -559,10 +568,16 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit& phit,
 }
 
 bool SCT_SurfaceChargesGenerator::chargeIsTrapped(double spess,
+                                                  const SiDetectorElement* element,
                                                   double& trap_pos,
                                                   double& drift_time) const {
+  if (element==nullptr) {
+    ATH_MSG_ERROR("SCT_SurfaceChargesGenerator::chargeIsTrapped element is nullptr");
+    return false;
+  }
   bool isTrapped{false};
-  const SCT_ChargeTrappingCondData condData{m_radDamageTool->getCondData(m_hashId, spess)};
+  const IdentifierHash hashId{element->identifyHash()};
+  const SCT_ChargeTrappingCondData condData{m_radDamageTool->getCondData(hashId, spess)};
   const double electric_field{condData.getElectricField()};
 
   if (m_doHistoTrap) {
@@ -609,33 +624,3 @@ bool SCT_SurfaceChargesGenerator::chargeIsTrapped(double spess,
   }
   return isTrapped;
 }
-
-void SCT_SurfaceChargesGenerator::setVariables() {
-  // Get HashId
-  m_hashId = m_element->identifyHash();
-
-  m_design = dynamic_cast<const SCT_ModuleSideDesign*>(&(m_element->design()));
-  
-  if (m_useSiCondDB) {
-    m_depletionVoltage = m_siConditionsTool->depletionVoltage(m_hashId) * CLHEP::volt;
-    m_biasVoltage = m_siConditionsTool->biasVoltage(m_hashId) * CLHEP::volt;
-  } else {
-    m_depletionVoltage = m_vdepl * CLHEP::volt;
-    m_biasVoltage = m_vbias * CLHEP::volt;
-  }
-
-  m_holeDriftMobility = m_siPropertiesTool->getSiProperties(m_hashId).holeDriftMobility();
-  m_holeDiffusionConstant = m_siPropertiesTool->getSiProperties(m_hashId).holeDiffusionConstant();
-  m_electronHolePairsPerEnergy = m_siPropertiesTool->getSiProperties(m_hashId).electronHolePairsPerEnergy();
-
-  // get sensor thickness and tg lorentz from SiDetectorDesign
-  if(m_design) {
-    m_thickness = m_design->thickness();
-  } else {
-    m_thickness = 0.;
-  }
-
-  m_center = m_element->center().mag();
-  m_tanLorentz = m_lorentzAngleTool->getTanLorentzAngle(m_hashId);
-  m_isBarrel = m_element->isBarrel();
-}
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.h
index d48d5ea33c8c7ddc8150e8ed74cf7f5ea1c760fe..0fdde720870f4bbd2fc0db676ecefda311680d70 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.h
@@ -85,27 +85,22 @@ class SCT_SurfaceChargesGenerator : public AthAlgTool, virtual public ISCT_Surfa
 
  private:
 
-  virtual void setComTime(float comTime)                                 {m_comTime = comTime;}
   virtual void setFixedTime(float fixedTime)                             {m_tfix = fixedTime;}
-  virtual void setCosmicsRun(bool cosmicsRun)                            {m_cosmicsRun = cosmicsRun;}
-  virtual void setComTimeFlag(bool useComTime)                           {m_useComTime = useComTime;}
   virtual void setRandomEngine(CLHEP::HepRandomEngine* rndmEngine)       {m_rndmEngine = rndmEngine;}
-  virtual void setDetectorElement(const InDetDD::SiDetectorElement* ele) {m_element = ele; setVariables();}
 
   /** create a list of surface charges from a hit */
-  virtual void process(const TimedHitPtr<SiHit>& phit, const ISiSurfaceChargesInserter& inserter) const;
-  virtual void processFromTool(const SiHit* phit, const ISiSurfaceChargesInserter& inserter, float p_eventTime, unsigned short p_eventId) const;
-  void processSiHit(const SiHit& phit, const ISiSurfaceChargesInserter& inserter, float eventTime, unsigned short eventID) const;
+  virtual void process(const InDetDD::SiDetectorElement* element, const TimedHitPtr<SiHit>& phit, const ISiSurfaceChargesInserter& inserter) const;
+  void processSiHit(const InDetDD::SiDetectorElement* element, const SiHit& phit, const ISiSurfaceChargesInserter& inserter, float eventTime, unsigned short eventID) const;
   
   // some diagnostics methods are needed here too
-  float driftTime(float zhit) const;           //!< calculate drift time perpandicular to the surface for a charge at distance zhit from mid gap
-  float diffusionSigma(float zhit) const;      //!< calculate diffusion sigma from a gaussian dist scattered charge
-  float surfaceDriftTime(float ysurf) const;   //!< Calculate of the surface drift time
-  float maxDriftTime() const;                  //!< max drift charge equivalent to the detector thickness
-  float maxDiffusionSigma() const;             //!< max sigma diffusion
+  float driftTime(float zhit, const InDetDD::SiDetectorElement* element) const; //!< calculate drift time perpandicular to the surface for a charge at distance zhit from mid gap
+  float diffusionSigma(float zhit, const InDetDD::SiDetectorElement* element) const; //!< calculate diffusion sigma from a gaussian dist scattered charge
+  float surfaceDriftTime(float ysurf) const; //!< Calculate of the surface drift time
+  float maxDriftTime(const InDetDD::SiDetectorElement* element) const; //!< max drift charge equivalent to the detector thickness
+  float maxDiffusionSigma(const InDetDD::SiDetectorElement* element) const; //!< max sigma diffusion
 
   // trap_pos and drift_time are updated based on spess.
-  bool chargeIsTrapped(double spess, double& trap_pos, double& drift_time) const;
+  bool chargeIsTrapped(double spess, const InDetDD::SiDetectorElement* element, double& trap_pos, double& drift_time) const;
 
   int m_numberOfCharges;           //!< number of charges
   float m_smallStepLength;         //!< max internal step along the larger G4 step
@@ -116,14 +111,11 @@ class SCT_SurfaceChargesGenerator : public AthAlgTool, virtual public ISCT_Surfa
   float m_distInterStrip;         //!< Inter strip distance normalized to 1
   float m_distHalfInterStrip;     //!< Half way distance inter strip
 
-  char m_SurfaceDriftFlag;        //!< surface drift ON/OFF
+  bool m_SurfaceDriftFlag;        //!< surface drift ON/OFF
 
   float m_tfix;       //!< fixed time
   float m_tsubtract;  //!< subtract drift time from mid gap 
 
-  float  m_comTime;       //!< use cosmics time for timing
-  bool   m_useComTime;    //!< Flag to decide the use of cosmics time for timing
-  bool   m_cosmicsRun;    //!< Flag to set Cosmics Run
   bool   m_doDistortions; //!< Flag to set Distortions
   bool   m_useSiCondDB;   //!< Flag to change from using DB values to below ones, default True
   float  m_vdepl;         //!< depletion voltage, default 70V
@@ -157,32 +149,17 @@ class SCT_SurfaceChargesGenerator : public AthAlgTool, virtual public ISCT_Surfa
   TProfile* m_h_mobility_trap;
   TH1F* m_h_trap_pos;
 
-  IdentifierHash m_hashId;
-
   //ToolHandles
   ToolHandle<ISCT_ModuleDistortionsTool> m_distortionsTool{this, "SCTDistortionsTool", "SCT_DistortionsTool", "Tool to retrieve SCT distortions"};
   ToolHandle<ISiPropertiesTool> m_siPropertiesTool{this, "SiPropertiesTool", "SCT_SiPropertiesTool", "Tool to retrieve SCT silicon properties"};
   ToolHandle<ISCT_RadDamageSummaryTool> m_radDamageTool{this, "RadDamageSummaryTool", "SCT_RadDamageSummaryTool", "Tool to retrieve SCT radiation damages"};
   ToolHandle<ISiliconConditionsTool> m_siConditionsTool{this, "SiConditionsTool", "SCT_SiliconConditionsTool", "Tool to retrieve SCT silicon information"};
-  ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
+  ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
 
-  const InDetDD::SiDetectorElement* m_element;
   CLHEP::HepRandomEngine*           m_rndmEngine;          //!< Random Engine
   std::string                       m_rndmEngineName;      //!< name of random engine, actual pointer in SiDigitization
 
   bool m_isOverlay; // flag for overlay
-
-  void setVariables();
-  const InDetDD::SCT_ModuleSideDesign* m_design;
-  float m_depletionVoltage;
-  float m_biasVoltage;
-  double m_holeDriftMobility;
-  double m_holeDiffusionConstant;
-  double m_electronHolePairsPerEnergy;
-  double m_thickness;
-  double m_center;
-  double m_tanLorentz;
-  bool m_isBarrel;
 };
 
 #endif // SCT_SURFACECHARGESGENERATOR_H
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/PixelRDORetriever.h b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/PixelRDORetriever.h
index 6755321b3f8b3bbd6bba41b66f4807e7a11491d7..6ce628058d550295923daeba5151c7ba9c974b19 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/PixelRDORetriever.h
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/PixelRDORetriever.h
@@ -5,6 +5,7 @@
 #ifndef JIVEXML_PIXELRDORETRIEVER_H
 #define JIVEXML_PIXELRDORETRIEVER_H
 
+#include "InDetCondServices/ISiLorentzAngleTool.h"
 #include "JiveXML/IDataRetriever.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "InDetJiveXML/IInDetGeoModelTool.h"
@@ -40,7 +41,7 @@ namespace JiveXML {
       virtual std::string dataTypeName() const { return m_typeName; };
 
       /// Only retrieve geo tool in initialize
-      virtual StatusCode initialize() { return m_geo.retrieve(); };
+      virtual StatusCode initialize();
     
     private:
       
@@ -50,6 +51,9 @@ namespace JiveXML {
       /// A tool handle to the geo model tool
       const ToolHandle<IInDetGeoModelTool> m_geo;
 
+      /// A tool handle to the SiLorentzAngleTool
+      ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
+
       /// The StoreGate key for the PixelRDO container
       std::string m_PixelRDOContainerName;
 
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SCTRDORetriever.h b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SCTRDORetriever.h
index 66d08f65e5c9a875f91bb8a6f0e3f9f42ab5b8b4..8f0b17c98359828370b09d601677d28332d83f09 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SCTRDORetriever.h
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/SCTRDORetriever.h
@@ -8,6 +8,7 @@
 #include "JiveXML/IDataRetriever.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 
+#include "InDetCondServices/ISiLorentzAngleTool.h"
 #include "InDetJiveXML/IInDetGeoModelTool.h"
 #include "InDetRawData/SCT_RDO_Container.h"
 #include "InDetReadoutGeometry/SiDetectorElementCollection.h"
@@ -57,6 +58,9 @@ namespace JiveXML {
     /// A tool handle to the geo model tool
     const ToolHandle<IInDetGeoModelTool> m_geo;
 
+    /// A tool handle to the SiLorentzAngleTool
+    ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
+
     /// The StoreGate key for the SCTRDO container
     SG::ReadHandleKey<SCT_RDO_Container> m_SCTRDOContainerName;
 
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelRDORetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelRDORetriever.cxx
index ca2b25da40f2c51ab40c47bab90d0e7cec005406..6fbb3a7a40a26c468f844f53fff99b1126bcca39 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelRDORetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelRDORetriever.cxx
@@ -81,7 +81,8 @@ namespace JiveXML {
         }
 
         //Get the global position from the local position
-	Amg::Vector2D localPos = element->localPositionOfCell(id);
+        Amg::Vector2D localPos = element->rawLocalPositionOfCell(id);
+        localPos[Trk::distPhi] += m_lorentzAngleTool->getLorentzShift(element->identifyHash());
 	Amg::Vector3D globalPos = element->globalPosition(localPos);
 
         //Fill in all the data in our data vectors
@@ -120,4 +121,10 @@ namespace JiveXML {
     return StatusCode::SUCCESS;
   }
 
+
+  StatusCode PixelRDORetriever::initialize() {
+    ATH_CHECK( m_lorentzAngleTool.retrieve() );
+
+    return m_geo.retrieve();
+  }
 }
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SCTRDORetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SCTRDORetriever.cxx
index 0db28677a6d538b14fc54174e4ac0fa0b873bc3c..a66b99baca8229f85428967a496336c3f97d0305 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SCTRDORetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SCTRDORetriever.cxx
@@ -114,8 +114,9 @@ namespace JiveXML {
         }
 
         //Get the local position and store it
-	Amg::Vector2D localPos = element->localPositionOfCell(id);
-        const std::pair<Amg::Vector3D, Amg::Vector3D > endsOfStrip = element->endsOfStrip(localPos);
+        Amg::Vector2D localPos = element->rawLocalPositionOfCell(id);
+        localPos[Trk::distPhi] += m_lorentzAngleTool->getLorentzShift(waferHash);
+        const std::pair<Amg::Vector3D, Amg::Vector3D> endsOfStrip = element->endsOfStrip(localPos);
         ident.push_back(DataType( id.get_compact() ));
         x0.push_back(DataType( endsOfStrip.first.x()*CLHEP::mm/CLHEP::cm));
         y0.push_back(DataType( endsOfStrip.first.y()*CLHEP::mm/CLHEP::cm));
@@ -181,6 +182,8 @@ namespace JiveXML {
     // Read Cond Handle Key
     ATH_CHECK( m_SCTDetEleCollKey.initialize() );
 
+    ATH_CHECK( m_lorentzAngleTool.retrieve() );
+
     return m_geo.retrieve();
   }
 
diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx
index a94ce486d1a66b0282fe29bba374f94f12d44952..7e1599127f1cd6d5d3df65eec368802803fe2d77 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx
@@ -34,7 +34,6 @@
 /////////////////////////////////////////////////////////////////////
 SCT_PrepDataToxAOD::SCT_PrepDataToxAOD(const std::string &name, ISvcLocator *pSvcLocator) :
   AthAlgorithm(name,pSvcLocator),
-  m_incidentSvc("IncidentSvc", name),
   m_SCTHelper(0),
   m_firstEventWarnings(true)
 { 
@@ -66,10 +65,6 @@ StatusCode SCT_PrepDataToxAOD::initialize()
 
   CHECK ( detStore()->retrieve(m_SCTHelper, "SCT_ID") );
 
-  CHECK ( m_incidentSvc.retrieve() );
-  // register to the incident service:
-  m_incidentSvc->addListener( this, IncidentType::EndEvent);
-
   //make sure we don't write what we don't have
   if (not  m_useTruthInfo) {
     m_writeSDOs = false;
@@ -97,6 +92,7 @@ StatusCode SCT_PrepDataToxAOD::initialize()
 StatusCode SCT_PrepDataToxAOD::execute() 
 {     
   // the cluster ambiguity map
+  std::map< Identifier, const SCT_RDORawData* > idToRAWDataMap;
   if ( m_writeRDOinformation ) {
       SG::ReadHandle<SCT_RDO_Container> rdoContainer(m_rdoContainer);
       if( rdoContainer.isValid() )
@@ -114,7 +110,7 @@ StatusCode SCT_PrepDataToxAOD::execute()
 		  
 		  Identifier rdoId = rdo->identify();
 		  
-		  m_IDtoRAWDataMap.insert( std::pair< Identifier, const SCT_RDORawData*>( rdoId, rdo ) );      
+		  idToRAWDataMap.insert( std::pair< Identifier, const SCT_RDORawData*>( rdoId, rdo ) );
 	      } // collection
 	  } // Have container;
       }
@@ -123,12 +119,12 @@ StatusCode SCT_PrepDataToxAOD::execute()
 	  ATH_MSG_WARNING( "Failed to retrieve SCT RDO container" );
       }
   }
-  ATH_MSG_DEBUG("Size of RDO map is "<<m_IDtoRAWDataMap.size());
+  ATH_MSG_DEBUG("Size of RDO map is "<<idToRAWDataMap.size());
 
   // Mandatory. This is needed and required if this algorithm is scheduled.
   SG::ReadHandle<InDet::SCT_ClusterContainer> sctClusterContainer(m_clustercontainer);
   if( not sctClusterContainer.isValid() ) {
-    ATH_MSG_ERROR("Cannot retrieve SCT PrepDataContainer " << m_clustercontainer.key());
+    ATH_MSG_FATAL("Cannot retrieve SCT PrepDataContainer " << m_clustercontainer.key());
     return StatusCode::FAILURE;
   }
 
@@ -192,7 +188,7 @@ StatusCode SCT_PrepDataToxAOD::execute()
       if(localCov.size() == 1){
         xprd->setLocalPositionError( localCov(0,0), 0., 0. ); 
       } else if(localCov.size() == 4){
-        xprd->setLocalPositionError( localCov(0,0), localCov(1,1), localCov(0,1) );     
+        xprd->setLocalPositionError( localCov(0,0), localCov(1,1), localCov(0,1) );
       } else {
         xprd->setLocalPositionError(0.,0.,0.);
       }
@@ -202,7 +198,7 @@ StatusCode SCT_PrepDataToxAOD::execute()
       for( const auto &hitIdentifier : prd->rdoList() ){
         rdoIdentifierList.push_back( hitIdentifier.get_compact() );
       }
-      xprd->setRdoIdentifierList(rdoIdentifierList);      
+      xprd->setRdoIdentifierList(rdoIdentifierList);
 
       //Add SCT specific information
       const InDet::SiWidth cw = prd->width();
@@ -210,7 +206,7 @@ StatusCode SCT_PrepDataToxAOD::execute()
       AUXDATA(xprd, int, hitsInThirdTimeBin) = (int)(prd->hitsInThirdTimeBin());
 
       AUXDATA(xprd, int, bec)          =   m_SCTHelper->barrel_ec(clusterId)   ;
-      AUXDATA(xprd, int, layer)        =   m_SCTHelper->layer_disk(clusterId)  ;   
+      AUXDATA(xprd, int, layer)        =   m_SCTHelper->layer_disk(clusterId)  ;
       AUXDATA(xprd, int, phi_module)   =   m_SCTHelper->phi_module(clusterId)  ;
       AUXDATA(xprd, int, eta_module)   =   m_SCTHelper->eta_module(clusterId)  ;
       AUXDATA(xprd, int, side)         =   m_SCTHelper->side(clusterId)        ;
@@ -228,7 +224,7 @@ StatusCode SCT_PrepDataToxAOD::execute()
    
       //Add details about the individual hits 
       if(m_writeRDOinformation)
-        addRDOInformation(xprd, prd);
+        addRDOInformation(xprd, prd, idToRAWDataMap);
    
       
       // Use the MultiTruth Collection to get a list of all true particle contributing to the cluster
@@ -292,7 +288,7 @@ void SCT_PrepDataToxAOD::addSDOInformation( xAOD::TrackMeasurementValidation* xp
         if(deposit.first){
           sdoDepBC.push_back( deposit.first->barcode());
         } else {
-          sdoDepBC.push_back( -1 );   
+          sdoDepBC.push_back( -1 );
         }
         sdoDepEnergy.push_back( deposit.second  );
         ATH_MSG_DEBUG(" SDO Energy Deposit " << deposit.second  ) ;
@@ -420,8 +416,8 @@ std::vector<SiHit> SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster( const I
 
       if( abs( int(diode.phiIndex()) -  m_SCTHelper->strip( hitIdentifier ) ) <=1)
       {
-        multiMatchingHits.push_back(&siHit);   
-        break;   
+        multiMatchingHits.push_back(&siHit);
+        break;
       }     
     }
   }
@@ -440,7 +436,7 @@ std::vector<SiHit> SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster( const I
     std::vector<const SiHit* > ajoiningHits;
     ajoiningHits.push_back( *siHitIter );
   
-    siHitIter2 = siHitIter+1;    
+    siHitIter2 = siHitIter+1;
     while ( siHitIter2 != multiMatchingHits.end() ) {
     // Need to come from the same truth particle 
       if( (*siHitIter)->particleLink().barcode() != (*siHitIter2)->particleLink().barcode() ){
@@ -486,7 +482,7 @@ std::vector<SiHit> SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster( const I
       float time(0);
       for( auto& siHit :  ajoiningHits){
         energyDep += siHit->energyLoss();
-        time += siHit->meanTime();    
+        time += siHit->meanTime();
       }
       time /= (float)ajoiningHits.size();
        
@@ -510,7 +506,8 @@ std::vector<SiHit> SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster( const I
 }
 
 void SCT_PrepDataToxAOD::addRDOInformation(xAOD::TrackMeasurementValidation* xprd, 
-                                           const InDet::SCT_Cluster* prd) const{
+                                           const InDet::SCT_Cluster* prd,
+                                           const std::map<Identifier, const SCT_RDORawData*>& idToRAWDataMap) const{
 
 
   std::vector<int> strip;
@@ -518,8 +515,8 @@ void SCT_PrepDataToxAOD::addRDOInformation(xAOD::TrackMeasurementValidation* xpr
   std::vector<int> groupsize;
   
   for( const auto &hitIdentifier : prd->rdoList() ){
-    auto result = m_IDtoRAWDataMap.find(hitIdentifier);
-    if( result != m_IDtoRAWDataMap.end() ){
+    auto result = idToRAWDataMap.find(hitIdentifier);
+    if( result != idToRAWDataMap.end() ){
       const SCT_RDORawData *sctRdo = result->second;
       const SCT3_RawData* rdo3 = dynamic_cast<const SCT3_RawData*>(sctRdo);
       int tbin(-1);
@@ -534,7 +531,7 @@ void SCT_PrepDataToxAOD::addRDOInformation(xAOD::TrackMeasurementValidation* xpr
     } else {
       timebin.push_back( -1 );
       strip.push_back( -1 );
-      groupsize.push_back( -1 );     
+      groupsize.push_back( -1 );
     }
   }
   
@@ -544,18 +541,6 @@ void SCT_PrepDataToxAOD::addRDOInformation(xAOD::TrackMeasurementValidation* xpr
   
 }
 
-void SCT_PrepDataToxAOD::handle(const Incident& inc) {
-  
-  /// clear map of RDOs<->identifiers
-  if ( m_writeRDOinformation && inc.type() == IncidentType::EndEvent ){
-    ATH_MSG_VERBOSE("'EndEvent' incident caught. Refreshing Cache.");
-    m_IDtoRAWDataMap.clear();
-  }     
-}
-
-
-
-
 /////////////////////////////////////////////////////////////////////
 //
 //        Finalize method: 
diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.h b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.h
index 01fa59905c677808f3cf4d1549197ac044e7882a..c113728539513100b35efae59928eccb1ebc6787 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.h
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.h
@@ -11,8 +11,6 @@
 #define SCT_PREPDATATOXAOD_H
 
 #include "AthenaBaseComps/AthAlgorithm.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/IIncidentListener.h"
 
 #include "InDetPrepRawData/SCT_ClusterContainer.h"
 #include "InDetReadoutGeometry/SiDetectorElementCollection.h"
@@ -41,7 +39,7 @@ namespace InDet
 }
 
 
-class SCT_PrepDataToxAOD : public AthAlgorithm, virtual public IIncidentListener {
+class SCT_PrepDataToxAOD : public AthAlgorithm {
 
 public:
   // Constructor with parameters:
@@ -52,8 +50,6 @@ public:
   virtual StatusCode execute();
   virtual StatusCode finalize();
 
-  virtual void handle(const Incident& inc);
-  
 private:
 
 
@@ -69,10 +65,9 @@ private:
   std::vector<SiHit>  findAllHitsCompatibleWithCluster(const InDet::SCT_Cluster* prd,
                                                        const SiHitCollection* collection) const;
 
-  void addRDOInformation(xAOD::TrackMeasurementValidation*, const InDet::SCT_Cluster*) const;
- 
+  void addRDOInformation(xAOD::TrackMeasurementValidation*, const InDet::SCT_Cluster*,
+                         const std::map<Identifier, const SCT_RDORawData*>& idToRAWDataMap) const;
  
-  ServiceHandle<IIncidentSvc>                         m_incidentSvc;   //!< IncidentSvc to catch begin of event and end of envent
  
   const SCT_ID *m_SCTHelper;
   SG::ReadHandleKey<InDet::SCT_ClusterContainer>  m_clustercontainer;
@@ -91,8 +86,6 @@ private:
   bool  m_writeSDOs;
   bool  m_writeSiHits;
   
-  std::map< Identifier, const SCT_RDORawData* > m_IDtoRAWDataMap;
-
   // --- private members
   bool m_firstEventWarnings;
   
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ISCT_RodDecoder.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ISCT_RodDecoder.h
index 93eda7f6dfe22bed0a2251951dc1ac54141caec0..0fd05400e0f5d9501f1da41738f0b668adc6247d 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ISCT_RodDecoder.h
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ISCT_RodDecoder.h
@@ -42,7 +42,7 @@ class ISCT_RodDecoder : virtual public IAlgTool {
                                     ISCT_RDO_Container&,
                                     InDetBSErrContainer* errs,
                                     SCT_ByteStreamFractionContainer* bsFracCont,
-                                    std::vector<IdentifierHash>* vec=0) = 0;
+                                    const std::vector<IdentifierHash>* vec=nullptr) const = 0;
 };
 
 #endif //SCT_RAWDATABYTESTREAM_ISCT_RODDECODER_H
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx
index 8020f77925126b27c0c934c4721d222111f80c37..cfebfaf2f283534e0a030cc2c753c51d485af2f1 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx
@@ -7,17 +7,14 @@
 //Athena
 #include "ByteStreamData/RawEvent.h"
 #include "InDetIdentifier/SCT_ID.h"
+#include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "StoreGate/ReadCondHandle.h"
-
-//Gaudi
-#include "GaudiKernel/IIncidentSvc.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 
 //STL
+#include <algorithm>
 #include <deque>
-#include <vector>
 #include <utility>
-#include <algorithm>
 
 union RawWord {
   uint32_t word32;
@@ -29,8 +26,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_condensedMode{false},
-  m_superCondensedMode{false},
   m_singleCondHitNumber{0},
   m_pairedCondHitNumber{0},
   m_firstExpHitNumber{0},
@@ -60,16 +55,13 @@ SCT_RodDecoder::SCT_RodDecoder
   m_truncatedRODNumber{0},
   m_numMissingLinkHeader{0},
   m_numUnknownOfflineId{0},
-  m_incidentSvc{"IncidentSvc", name}
+  m_swapPhiReadoutDirection{}
 {
-  declareProperty("TriggerMode", m_triggerMode=true);
 }
 
 StatusCode SCT_RodDecoder::initialize() {
   ATH_CHECK(AlgTool::initialize());
 
-  ATH_CHECK(m_incidentSvc.retrieve());
- 
   /** Retrieve cabling tool */
   ATH_CHECK(m_cabling.retrieve());
   ATH_MSG_DEBUG("Retrieved tool " << m_cabling);
@@ -79,8 +71,19 @@ StatusCode SCT_RodDecoder::initialize() {
 
   ATH_CHECK(m_configTool.retrieve());
 
-  // Initialize ReadCondHandleKey
-  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+  // See if strip numbers go from 0 to 767 or vice versa for all the wafers.
+  // swapPhiReadoutDirection will not change during a run.
+  // Since this is access to SiDetectorElement during initialization,
+  // condition object of SiDetectorElementCollection is not accessible.
+  // SCT_DetectorManager has to be used.
+  const InDetDD::SCT_DetectorManager* detManager{nullptr};
+  ATH_CHECK(detStore()->retrieve(detManager, "SCT"));
+  const InDetDD::SiDetectorElementCollection* elements{detManager->getDetectorElementCollection()};
+  for (const InDetDD::SiDetectorElement* element: *elements) {
+    if (element->swapPhiReadoutDirection()) {
+      m_swapPhiReadoutDirection.insert(element->identifyHash());
+    }
+  }
 
   return StatusCode::SUCCESS;
 }
@@ -90,14 +93,13 @@ SCT_RodDecoder::finalize() {
   
   /** print out summaries of data and errors decoded */
   ATH_MSG_INFO("SCT BytestreamCnv summary: " << m_headnumber  <<" link headers found");
-  if (m_condensedMode) {
-    ATH_MSG_INFO("SCT decoding bytestream summary: " << m_singleCondHitNumber << " single strips with hit in condensed mode");
-    ATH_MSG_INFO("SCT decoding bytestream summary: " << m_pairedCondHitNumber << " paired strips with hit in condensed mode");
-  } else {
-    ATH_MSG_INFO("SCT decoding bytestream summary: " << m_firstExpHitNumber << " first strips with hit in expanded mode");
-    ATH_MSG_INFO("SCT decoding bytestream summary: " << m_evenExpHitNumber << " consecutive paired strips with hit in expanded mode");
-    ATH_MSG_INFO("SCT decoding bytestream summary: " << m_lastExpHitNumber << " last consecutive strip with hit in expanded mode");
-  }
+
+  ATH_MSG_INFO("SCT decoding bytestream summary: " << m_singleCondHitNumber << " single strips with hit in condensed mode");
+  ATH_MSG_INFO("SCT decoding bytestream summary: " << m_pairedCondHitNumber << " paired strips with hit in condensed mode");
+
+  ATH_MSG_INFO("SCT decoding bytestream summary: " << m_firstExpHitNumber << " first strips with hit in expanded mode");
+  ATH_MSG_INFO("SCT decoding bytestream summary: " << m_evenExpHitNumber << " consecutive paired strips with hit in expanded mode");
+  ATH_MSG_INFO("SCT decoding bytestream summary: " << m_lastExpHitNumber << " last consecutive strip with hit in expanded mode");
 
   ATH_MSG_INFO("SCT BytestreamCnv summary: " << m_trailnumber << " link trailers found");
   if (m_head_error_bcid > 0)      ATH_MSG_INFO("SCT BytestreamCnv summary: header-> "       << m_head_error_lvl1id << " LVL1d errors found");
@@ -135,18 +137,20 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
                                ISCT_RDO_Container& rdoIdc,
                                InDetBSErrContainer* errs,
                                SCT_ByteStreamFractionContainer* bsFracCont,
-                               std::vector<IdentifierHash>* vecHash)
+                               const std::vector<IdentifierHash>* vecHash) const
 {
-  uint32_t robid{robFrag.rod_source_id()};
+  const uint32_t robid{robFrag.rod_source_id()};
   /**determine whether this data was generated using the ROD simulator */
-  uint32_t rod_datatype{robFrag.rod_detev_type()};
+  const uint32_t rod_datatype{robFrag.rod_detev_type()};
   const bool rodSimulatedData{static_cast<bool>((rod_datatype >> 20) & 1)};
   if (bsFracCont) bsFracCont->insert(SCT_ByteStreamFractionContainer::SimulatedData, robid, rodSimulatedData);
-  if (rodSimulatedData) addRODError(robid,SCT_ByteStreamErrors::RODSimulatedData, errs);
+  if (rodSimulatedData) addRODError(robid, SCT_ByteStreamErrors::RODSimulatedData, errs);
 
   /** look for the bit that denotes "Super-condensed" mode.*/
-  m_superCondensedMode = ((rod_datatype >> 21) & 1);   
-  if (bsFracCont) bsFracCont->insert(SCT_ByteStreamFractionContainer::SuperCondensedMode, robid, m_superCondensedMode);
+  const bool superCondensedMode{static_cast<bool>((rod_datatype >> 21) & 1)};
+  if (bsFracCont) bsFracCont->insert(SCT_ByteStreamFractionContainer::SuperCondensedMode, robid, superCondensedMode);
+
+  bool condensedMode{true};
 
   int strip{0};
   int oldstrip{-1};
@@ -180,14 +184,6 @@ 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) {
@@ -196,18 +192,18 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
     if ((*rob_status)!=0) {
       ATH_MSG_DEBUG("ROB status word for robid " << std::hex << robid << " is non-zero " << (*rob_status) << std::dec);
       /// first store generic "ROBFragmentError" error type..
-      addRODError(robid,SCT_ByteStreamErrors::ROBFragmentError, errs);
+      addRODError(robid, SCT_ByteStreamErrors::ROBFragmentError, errs);
       sc = StatusCode::RECOVERABLE;
       /// now look for specific problems, e.g. truncated or masked-off RODs
       if (((*rob_status) >> 27) & 0x1) {
         ATH_MSG_DEBUG("ROB status word for robid " << std::hex << robid << std::dec << " indicates data truncation.");
-        addRODError(robid,SCT_ByteStreamErrors::TruncatedROD, errs);
+        addRODError(robid, SCT_ByteStreamErrors::TruncatedROD, errs);
         m_truncatedRODNumber++;
         return sc;
       }
       if ((((*rob_status) >> 29) & 0x1) or (((*rob_status) >> 31) & 0x1)) {
         ATH_MSG_DEBUG("ROB status word for robid " << std::hex << robid << std::dec << " indicates resource was masked off.");
-        addRODError(robid,SCT_ByteStreamErrors::MaskedROD, errs);
+        addRODError(robid, SCT_ByteStreamErrors::MaskedROD, errs);
         m_maskedRODNumber++;
         return sc;
       }
@@ -217,23 +213,23 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
   /// look at ROD status words /////////
 
   OFFLINE_FRAGMENTS_NAMESPACE::PointerType vRodStatus;
-  long unsigned int vRodStatusSize{robFrag.rod_nstatus()};
+  const long unsigned int vRodStatusSize{robFrag.rod_nstatus()};
 
   robFrag.rod_status(vRodStatus);
   for (long unsigned int j{0}; j<vRodStatusSize; j++) {
-    uint32_t statusWord{vRodStatus[j]};
+    const uint32_t statusWord{vRodStatus[j]};
     /** check for clock errors in second ROD status word */
     if (j==1) {
-      int timClockError{static_cast<int>((statusWord >> 16) & 0x1)};
-      int bocClockError{static_cast<int>((statusWord >> 17) & 0x1)};
+      const int timClockError{static_cast<int>((statusWord >> 16) & 0x1)};
+      const int bocClockError{static_cast<int>((statusWord >> 17) & 0x1)};
       if (timClockError or bocClockError) {
         ATH_MSG_DEBUG(" Clock error in ROD status word: " << timClockError << " " << bocClockError);
-        addRODError(robid,SCT_ByteStreamErrors::RODClockError, errs);
+        addRODError(robid, SCT_ByteStreamErrors::RODClockError, errs);
         m_RODClockErrorNumber++;
         sc=StatusCode::RECOVERABLE;
       }
       /** look at bits 20-23 for DCS HV */
-      int hvBits{static_cast<int>((statusWord >> 20) & 0xf)};
+      const int hvBits{static_cast<int>((statusWord >> 20) & 0xf)};
       const bool hvOn{hvBits==0xf};
       if (bsFracCont) bsFracCont->insert(SCT_ByteStreamFractionContainer::HVOn, robid, hvOn);
     }
@@ -244,7 +240,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
   bool foundHeader{false};
   
   OFFLINE_FRAGMENTS_NAMESPACE::PointerType vRobData;
-  unsigned long int vRobDataSize{robFrag.rod_ndata()};
+  const unsigned long int vRobDataSize{robFrag.rod_ndata()};
   robFrag.rod_data(vRobData);
   
   for (unsigned long int i{0}; i<vRobDataSize; i++) {
@@ -260,23 +256,23 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
       /// hit element
       ///---------------------------------------------------------------------
       if (d[n]&0x8000) {
-        if (!foundHeader) {
+        if (not foundHeader) {
           ATH_MSG_INFO(" Missing link header in ROD " << std::hex << robid << std::dec);
-          addRODError(robid,SCT_ByteStreamErrors::MissingLinkHeaderError, errs);
+          addRODError(robid, SCT_ByteStreamErrors::MissingLinkHeaderError, errs);
           m_numMissingLinkHeader++;
           sc = StatusCode::RECOVERABLE;
           continue;
         }
 
         m_nHits++;
-        if (m_superCondensedMode) {
+        if (superCondensedMode) {
 
           /** super-condensed mode
            *  chip info : 4 bits  d[n]>>11)0xF
            *  chip number == (d[n]>>11)&0x7 and chip side == (d[n]>>14)&0x1
            *  For example if d[n]>>11)0xF = 0101 => chip5 or chip5 on side0, d[n]>>11)0xF = 1101 => chip13 or chip5 on side1
            */
-          chip  = ((d[n]>>11)&0x7); 
+          chip = ((d[n]>>11)&0x7); 
           side = ((d[n]>>14)&0x1);
           strip = chip*128 + ((d[n]>>4)&0x7F);
           tbin = 0x2; /** assuming tbin is 010 in super-condensed mode */
@@ -289,11 +285,11 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
             continue;
           }
 
-          /**------------ Search for redundancy only for the master chip  */
-          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, elements)};
+          /**------------ Search for redundancy only for the master chip */
+          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 */
+              const int rdoMade{makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -306,10 +302,10 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
             }
             linkNb++;
           }
-          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, elements)};
+          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 */
+              const int rdoMade{makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -329,10 +325,10 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
             oldside = side;
           }
           
-          if ((strip != oldstrip) or (side!=oldside)) {
+          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, elements)};
+            const int rdoMade{makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
             if (rdoMade == -1) {
               sc=StatusCode::RECOVERABLE;
               addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -345,14 +341,14 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
           }
           groupSize+=nStripsInWord; // Split clusters have the same strip number.
      
-        } else if (m_condensedMode) {
+        } else if (condensedMode) {
     
           /** condensed mode
            *  chip info : 4 bits  d[n]>>11)0xF
            *  chip number == (d[n]>>11)&0x7 and chip side == (d[n]>>14)&0x1
            *  For example if d[n]>>11)0xF = 0101 => chip5 or chip5 on side0, d[n]>>11)0xF = 1101 => chip13 or chip5 on side1
            */
-          chip  = ((d[n]>>11)&0x7); 
+          chip = ((d[n]>>11)&0x7); 
           side = ((d[n]>>14)&0x1);
           strip = chip*128 + ((d[n]>>4)&0x7F);
           tbin = 0x2; /** assuming tbin is 010 in condensed mode */
@@ -364,11 +360,11 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
             continue;
           }
 
-          /**------------ Search for redundancy only for the master chip  */
-          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, elements)};
+          /**------------ Search for redundancy only for the master chip */
+          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 */
+              const int rdoMade{makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -381,10 +377,10 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
             }
             linkNb++;
           }
-          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, elements)};
+          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 */
+              const int rdoMade{makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -402,12 +398,12 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
             oldstrip = strip; /** if it's the first condensed word */
             oldside = side;
           }
-          if (!(d[n]&0x1)) { /** 1-hit */
+          if (not (d[n]&0x1)) { /** 1-hit */
             m_singleCondHitNumber++;
-            if ((strip != oldstrip) or (side!=oldside)) {
+            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, elements)};
+              const int rdoMade{makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -437,10 +433,10 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
               continue;
             }
             m_pairedCondHitNumber++;
-            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, elements)};
+            if ((strip!=oldstrip) or (side!=oldside)) { /** if it is a new cluster,
+                                                         * make RDO with the previous cluster 
+                                                         */
+              const int rdoMade{makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -461,7 +457,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
             if (d[n]&0x8) { /** Error in the second hit */
               ATH_MSG_DEBUG("    Hit condensed : xxx ERROR in 2nd hit" << std::hex << d[n]);
               errorHit.push_back(groupSize);
-              m_cond_hit1_error++;
+              m_cond_hit2_error++;
               ERRORS = (ERRORS | 0x20);
               sc=StatusCode::RECOVERABLE;
             }
@@ -474,9 +470,9 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
            * For example if d[n]>>11)0xF = 0101 => chip5 or chip5 on side0, d[n]>>11)0xF = 1101 => chip13 or chip5 on side1
            */
 
-          if (!(d[n]&0x8)) {  /** 1st hit cluster expanded */
+          if (not (d[n]&0x8)) {  /** 1st hit cluster expanded */
             m_firstExpHitNumber++;
-            chip  = ((d[n]>>11)&0x7);  
+            chip = ((d[n]>>11)&0x7);  
             side = ((d[n]>>14)&0x1);
             strip = chip*128 + ((d[n]>>4)&0x7F);
             tbin = d[n]&0x7; /** Real way for obtaining tbin info */
@@ -489,16 +485,16 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
             }
       
 
-            /** -------------- Search for redundancy only for the master chip  */
-            if ((side == 1) and ((linkNb%2)==0))  {
+            /** -------------- Search for redundancy only for the master chip */
+            if ((side==1) and ((linkNb%2)==0))  {
               linkNb++;
             }
-            if ((side == 0) and ((linkNb%2)!=0)) {
+            if ((side==0) and ((linkNb%2)!=0)) {
               linkNb--;
             }
-            onlineId = ((robid & 0xFFFFFF)|(linkNb << 24)); 
+            onlineId = ((robid & 0xFFFFFF) | (linkNb << 24)); 
             groupSize =  1;
-            int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
+            const int rdoMade{makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
             if (rdoMade == -1) {
               sc=StatusCode::RECOVERABLE;
               addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -506,7 +502,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
               saved[side*768+strip] = rdoMade; 
             }
             groupSize = 0;
-          } else {  /** next hits cluster expanded */
+          } else { /** next hits cluster expanded */
             if (d[n]&0x80) { /** paired hits */
               if (strip > 767) {
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -525,22 +521,22 @@ 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, elements)};
-              if (rdoMade == -1) {
+              const int rdoMade1{makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+              if (rdoMade1 == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
               } else {
-                saved[side*768+strip] = rdoMade; 
+                saved[side*768+strip] = rdoMade1;
               }
               /** second hit from the pair */
               strip++;
-              tbin = (d[n] >> 4) & 0x7;
-              rdoMade = this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements);
-              if (rdoMade == -1) {
+              tbin = ((d[n] >> 4) & 0x7);
+              const int rdoMade2{makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
+              if (rdoMade2 == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
               } else {
-                saved[side*768+strip] = rdoMade; 
+                saved[side*768+strip] = rdoMade2;
               }
               groupSize = 0;
             } else {  /** Last hit of the cluster */
@@ -552,9 +548,9 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
                 continue;
               }     
               strip++;
-              tbin = d[n]&0x7;
+              tbin = (d[n]&0x7);
               groupSize = 1;
-              int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit, elements)};
+              const int rdoMade{makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
               if (rdoMade == -1) {
                 sc=StatusCode::RECOVERABLE;
                 addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -576,7 +572,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, elements)};
+          const int rdoMade{makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
           if (rdoMade == -1) {
             sc=StatusCode::RECOVERABLE;
             addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -590,13 +586,12 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
         oldstrip = -1;
         oldside = -1;
         groupSize = 0;
-        //ErrorHeader = false;
         ERRORS = 0;
         memset(saved,0,768*2);
         errorHit.clear();
 
         /** Link Number (or stream) in the ROD fragment */
-        int rodlinkNb{static_cast<int>(d[n] & 0x7F)};
+        const int rodlinkNb{static_cast<int>(d[n] & 0x7F)};
 
         /** This is the real calculation for the offline  */
         linkNb = (((rodlinkNb >>4)&0x7)*12+(rodlinkNb &0xF));
@@ -651,7 +646,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
           sc=StatusCode::RECOVERABLE;
         }
 
-        m_condensedMode = static_cast<bool>(d[n]&0x100);
+        condensedMode = static_cast<bool>(d[n]&0x100);
 
         continue;
   
@@ -744,7 +739,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
           addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Invalid, errs);
         } else {
           // Chip is 4 bits. The highest bit 3 represents side. Chip 0-5 on side 0 and chip 8-13 on side 1.
-          unsigned int side_ABCDError{static_cast<unsigned int>(chip/8)};
+          const unsigned int side_ABCDError{static_cast<unsigned int>(chip/8)};
           if (flagIdHash.value()%2!=side_ABCDError) {
             // If the sides from the ABCD error and online ID are different,
             // the module is expected to read side 0 via link 1 and side 1 and via link 0.
@@ -804,7 +799,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, elements)};
+    const int rdoMade{makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, cache, errorHit)};
     if (rdoMade == -1) {
       sc=StatusCode::RECOVERABLE;
       addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
@@ -813,7 +808,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
     }
   }
 
-  if (bsFracCont) bsFracCont->insert(SCT_ByteStreamFractionContainer::CondensedMode, robid, m_condensedMode);
+  if (bsFracCont) bsFracCont->insert(SCT_ByteStreamFractionContainer::CondensedMode, robid, condensedMode);
 
   if (sc.isFailure()) ATH_MSG_DEBUG("One or more ByteStream errors found ");
   return sc;
@@ -825,25 +820,21 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
  *            on as StatusCode::RECOVERABLE by fillCollection().
  */
 
-int SCT_RodDecoder::makeRDO(int strip, int groupSize, int tbin, uint32_t onlineId, int ERRORS, ISCT_RDO_Container& rdoIdc,
+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 InDetDD::SiDetectorElementCollection* elements)
+                            const std::vector<int>& errorHit) const
 {
-
   if (onlineId == 0x0) {
     ATH_MSG_WARNING("No link header found, possibly corrupt ByteStream.  Will not try to make RDO");
     return -1;
   }
   /** get offlineId from the link number and ROB number */
-  IdentifierHash idCollHash{m_cabling->getHashFromOnlineId(onlineId)};
+  const IdentifierHash idCollHash{m_cabling->getHashFromOnlineId(onlineId)};
   if (not idCollHash.is_valid()) {
     m_numUnknownOfflineId++;
     ATH_MSG_ERROR("Unknown OfflineId for OnlineId -> cannot create RDO");
     ATH_MSG_WARNING("Unknown OfflineId for OnlineId " << std::hex << onlineId << " -> cannot create RDO" << std::dec);
-
-    //fire an incident whenever there is a "unknown offline id..." so they are listened by /InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo
-    m_incidentSvc->fireIncident(Incident(name(), "UnknownOfflineId"));
     return -1;
   }
 
@@ -860,7 +851,7 @@ int SCT_RodDecoder::makeRDO(int strip, int groupSize, int tbin, uint32_t onlineI
     } else if (idCollHash != cache.lastHash) {
       cache.lastHash = idCollHash;
       /** maybe the new hash is not in the list, so test it */
-      std::vector<IdentifierHash>::iterator p{find(cache.vecHash->begin(), cache.vecHash->end(), idCollHash)};
+      std::vector<IdentifierHash>::const_iterator p{find(cache.vecHash->begin(), cache.vecHash->end(), idCollHash)};
       if (p == cache.vecHash->end()) {
         ATH_MSG_VERBOSE("Collection for Hash not to be decoded, skip");
         /** remember this one, so that we do not find(...) forever */
@@ -870,29 +861,25 @@ int SCT_RodDecoder::makeRDO(int strip, int groupSize, int tbin, uint32_t onlineI
     }
   }
 
-
-  if(rdoIdc.hasExternalCache() && rdoIdc.tryFetch(idCollHash)){
+  if(rdoIdc.hasExternalCache() and rdoIdc.tryFetch(idCollHash)){
     ATH_MSG_DEBUG("Hash already in collection - cache hit " << idCollHash);
     return 0;
   }
 
-  /** get identifier from the hash, this is not nice */
-  Identifier idColl{m_sct_id->wafer_id(idCollHash)};
-
-
   /** see if strips go from 0 to 767 or vice versa */
-  const InDetDD::SiDetectorElement* p_element{elements->getDetectorElement(idCollHash)};
-  if (p_element->swapPhiReadoutDirection()) {
+  if (m_swapPhiReadoutDirection.count(idCollHash)) {
     strip = 767 - strip;
     strip = strip-(groupSize-1);
   }
 
-  Identifier iddigit{m_sct_id->strip_id(idColl,strip)};
+  /** get identifier from the hash, this is not nice */
+  const Identifier idColl{m_sct_id->wafer_id(idCollHash)};
+  const Identifier iddigit{m_sct_id->strip_id(idColl, strip)};
   if (not m_sct_id->is_sct(iddigit)) {
     ATH_MSG_WARNING("Cluster with invalid Identifier. Will not make RDO");
     return -1;
   }
-  unsigned int rawDataWord{static_cast<unsigned int>(groupSize | (strip << 11) | (tbin <<22) | (ERRORS << 25))};
+  const unsigned int rawDataWord{static_cast<unsigned int>(groupSize | (strip << 11) | (tbin <<22) | (ERRORS << 25))};
 
   ATH_MSG_DEBUG("Output Raw Data " << std::hex << " Coll " << idColl.getString() << ":-> " << m_sct_id->print_to_string(iddigit) << std::dec);
 
@@ -904,12 +891,12 @@ int SCT_RodDecoder::makeRDO(int strip, int groupSize, int tbin, uint32_t onlineI
   if (col==nullptr) {
     ATH_MSG_DEBUG(" Collection ID = " << idCollHash << " does not exist, create it ");
     /** create new collection */   
-    col  = new SCT_RDO_Collection(idCollHash);
+    col = new SCT_RDO_Collection(idCollHash);
     col->setIdentifier(idColl);
-    StatusCode sc = rdoIdc.addCollection(col, idCollHash);
+    StatusCode sc{rdoIdc.addCollection(col, idCollHash)};
     ATH_MSG_DEBUG("Adding " << idCollHash);
     if (sc.isFailure()){
-        ATH_MSG_ERROR("failed to add SCT RDO collection to container");
+      ATH_MSG_ERROR("failed to add SCT RDO collection to container");
     }
   }
   
@@ -923,24 +910,22 @@ int SCT_RodDecoder::makeRDO(int strip, int groupSize, int tbin, uint32_t onlineI
 
 void 
 SCT_RodDecoder::addRODError(uint32_t rodid, int errorType,
-                            InDetBSErrContainer* errs)
+                            InDetBSErrContainer* errs) const
 {
   std::vector<IdentifierHash> idHashes;
   m_cabling->getHashesForRod(idHashes, rodid);
-  std::vector<IdentifierHash>::iterator hashIt{idHashes.begin()};
-  std::vector<IdentifierHash>::iterator hashEnd{idHashes.end()};
-  for (; hashIt != hashEnd; ++hashIt) {
-    addSingleError(*hashIt, errorType, errs);
+  for (const IdentifierHash& hash: idHashes) {
+    addSingleError(hash, errorType, errs);
   }
   return;
 }
 
 bool 
-SCT_RodDecoder::addSingleError(const IdentifierHash idHash,
-                               const int bsErrorType,
-                               InDetBSErrContainer* errs)
+SCT_RodDecoder::addSingleError(const IdentifierHash& idHash,
+                               int bsErrorType,
+                               InDetBSErrContainer* errs) const
 {
-  bool ok{idHash.is_valid() and errs!=nullptr};
+  const bool ok{idHash.is_valid() and errs!=nullptr};
   if (ok) {
     errs->push_back(std::make_unique<std::pair<IdentifierHash, int> >(idHash, bsErrorType));
   }
@@ -948,7 +933,7 @@ SCT_RodDecoder::addSingleError(const IdentifierHash idHash,
 }
 
 void
-SCT_RodDecoder::setFirstTempMaskedChip(const IdentifierHash& hashId, const unsigned int firstTempMaskedChip, InDetBSErrContainer* errs) {
+SCT_RodDecoder::setFirstTempMaskedChip(const IdentifierHash& hashId, unsigned int firstTempMaskedChip, InDetBSErrContainer* errs) const {
   if (not hashId.is_valid()) {
     ATH_MSG_INFO("setFirstTempMaskedChip hashId " << hashId << " is invalid.");
     return;
@@ -976,7 +961,7 @@ SCT_RodDecoder::setFirstTempMaskedChip(const IdentifierHash& hashId, const unsig
 
   int type{0};
   // Check if Rx redundancy is used or not in this module
-  std::pair<bool, bool> badLinks{m_configTool->badLinks(moduleId)};
+  const std::pair<bool, bool> badLinks{m_configTool->badLinks(moduleId)};
   if (badLinks.first xor badLinks.second) {
     // Rx redundancy is used in this module.
     if (badLinks.first and not badLinks.second) {
@@ -1001,7 +986,7 @@ SCT_RodDecoder::setFirstTempMaskedChip(const IdentifierHash& hashId, const unsig
   // modified0 and modified1 functions of SCT_ReadoutTool.cxx and
   // Table 3.8 of CERN-THESIS-2008-001 https://cds.cern.ch/record/1078223
   // However, there are two exceptions of the exceptions.
-  unsigned long long fullSerialNumber{m_cabling->getSerialNumberFromHash(hashId).to_ulonglong()};
+  const unsigned long long fullSerialNumber{m_cabling->getSerialNumberFromHash(hashId).to_ulonglong()};
   if (// Readout through link-0
       fullSerialNumber==20220170200183 or // hash=4662 bec=0 layer=2 eta= 6 phi=39
       fullSerialNumber==20220330200606 or // hash=5032 bec=0 layer=3 eta=-2 phi= 7
@@ -1060,7 +1045,7 @@ SCT_RodDecoder::setFirstTempMaskedChip(const IdentifierHash& hashId, const unsig
     // In that case, information is swapped.
     if ((6<firstTempMaskedChip_side0 and firstTempMaskedChip_side0<=12) or
         (0<firstTempMaskedChip_side1 and firstTempMaskedChip_side1<= 6)) {
-      unsigned int swapFirstTempMaskedChip_side0{firstTempMaskedChip_side0};
+      const unsigned int swapFirstTempMaskedChip_side0{firstTempMaskedChip_side0};
       firstTempMaskedChip_side0 = firstTempMaskedChip_side1;
       firstTempMaskedChip_side1 = swapFirstTempMaskedChip_side0;
     }
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.h
index 3cfb00a6f95e7c4114d7b613b9eec5c88319f2ad..065a0f93b6ac4d10514371c76afe8840ba6e26ba 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.h
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.h
@@ -16,19 +16,20 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 
 #include "Identifier/IdContext.h"
+#include "Identifier/IdentifierHash.h"
 #include "InDetByteStreamErrors/InDetBSErrContainer.h"
-#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "SCT_Cabling/ISCT_CablingTool.h"
 #include "SCT_ConditionsData/SCT_ByteStreamErrors.h"
 #include "SCT_ConditionsTools/ISCT_ConfigurationConditionsTool.h"
-#include "StoreGate/ReadCondHandleKey.h"
 
-#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 
 //STL
-#include <string>
+#include <atomic>
 #include <cstdint>
+#include <set>
+#include <string>
+#include <vector>
 
 class SCT_ID;
 
@@ -43,14 +44,14 @@ class SCT_RodDecoder : public extends<AthAlgTool, ISCT_RodDecoder>
 
   struct CacheHelper{//temp object to help with trigger caching
     IdentifierHash skipHash, lastHash;
-    std::vector<IdentifierHash>* vecHash;
+    const std::vector<IdentifierHash>* vecHash;
   };
 
  public: 
   //@name Usual AlgTool methods
   //@{
   /** constructor*/
-  SCT_RodDecoder(const std::string& type, const std::string& name, const IInterface* parent ) ;
+  SCT_RodDecoder(const std::string& type, const std::string& name, const IInterface* parent);
   
   /** destructor  */
   virtual ~SCT_RodDecoder() = default;
@@ -63,74 +64,70 @@ class SCT_RodDecoder : public extends<AthAlgTool, ISCT_RodDecoder>
   
   /** @brief Decode the rob data fragment and fill the collection SCT_RDO_Collection 
    *  with the RDO built by the makeRDO(..) method
+   * rdoIdc, errs, and bsFracCont are updated based on robFrag and vecHash.
    **/
   virtual StatusCode fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& robFrag,
                                     ISCT_RDO_Container& rdoIdc,
                                     InDetBSErrContainer* errs,
                                     SCT_ByteStreamFractionContainer* bsFracCont,
-                                    std::vector<IdentifierHash>* vecHash = 0) override;
+                                    const std::vector<IdentifierHash>* vecHash = nullptr) const override;
 
  private:
   /// method that builds the RawData RDO and add it to the collection 
-  int makeRDO(int strip, int groupSize, int tbin, 
+  /// rdoIdc and cache are updated based on other arguments
+  int makeRDO(int strip, int groupSize, int tbin,
               uint32_t onlineId, int ERRORS,
               ISCT_RDO_Container& rdoIdc,
-              CacheHelper&,
-              const std::vector<int>& errorHit,
-              const InDetDD::SiDetectorElementCollection* elements);
+              CacheHelper& cache,
+              const std::vector<int>& errorHit) const;
 
   /// add an error for each wafer in a problematic ROD.
   void addRODError(uint32_t rodid, int errorType,
-                   InDetBSErrContainer* errs);
+                   InDetBSErrContainer* errs) const;
+  bool addSingleError(const IdentifierHash& idHash,
+                      int bsErrorType,
+                      InDetBSErrContainer* errs) const;
 
-  bool addSingleError(const IdentifierHash idHash,
-                      const int bsErrorType,
-                      InDetBSErrContainer* errs);
   /** Set first temporarily masked chip information from byte stream trailer */
-  void setFirstTempMaskedChip(const IdentifierHash& hashId, const unsigned int firstTempMaskedChip, InDetBSErrContainer* errs);
+  void setFirstTempMaskedChip(const IdentifierHash& hashId, unsigned int firstTempMaskedChip, InDetBSErrContainer* errs) const;
+
   const SCT_ID* m_sct_id;
   IdContext m_cntx_sct;
   ToolHandle<ISCT_CablingTool> m_cabling{this, "SCT_CablingTool", "SCT_CablingTool", "Tool to retrieve SCT 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 */
-  //  unsigned int m_hitnumber;             //!< Total number of decoded hits
-  unsigned int m_singleCondHitNumber;   //!< Total number of single hit decoded in condensed mode
-  unsigned int m_pairedCondHitNumber;   //!< Total number of paired hit decoded in condensed mode
-  unsigned int m_firstExpHitNumber;     //!< Total number of first hit decoded in expanded mode
-  unsigned int m_evenExpHitNumber;      //!< Total number of paired hit decoded in expanded mode
-  unsigned int m_lastExpHitNumber;      //!< Total number of last hit decoded in expanded mode
-  unsigned int m_headnumber;            //!< Total number of decoded header data
-  unsigned int m_trailnumber;           //!< Total number of decoded trailer data
-  unsigned int m_head_error_bcid;       //!< Total number of bcid error in the header data
-  unsigned int m_head_error_lvl1id;     //!< Total number of lvl1id error in the header data 
-  unsigned int m_head_error_timeout;    //!< Total number of timeout error in the header data
-  unsigned int m_head_error_formatter;  //!< Total number of formatter error in the header data
-  unsigned int m_head_error_preamb;     //!< Total number of preamble error in the header data  
-  unsigned int m_trail_error_overflow;  //!< Total number of overflow error in the trailer data
-  unsigned int m_trail_error_limit;     //!< Total number of header trailer limit error in the trailer data 
-  unsigned int m_trail_error_bit;       //!< Total number of trailer bit error 
-  unsigned int m_config_data_bit;       //!< Total number of configuration data
-  unsigned int m_flag_error_bit;        //!< Total number of flag error data
-  unsigned int m_cond_hit1_error;       //!< Total number of first hit data error
-  unsigned int m_cond_hit2_error;       //!< Total number second hit data errors 
-  unsigned int m_chip_number_error;     //!< Total number of chip number error  
-  unsigned int m_unknown_data_format;   //!< Total number of unknown data format
-  unsigned int m_nHits;
-  unsigned int m_nRDOs;
-  unsigned int m_maskedLinkNumber;
-  unsigned int m_maskedRODNumber;
-  unsigned int m_RODClockErrorNumber;
-  unsigned int m_truncatedRODNumber;
-  unsigned int m_numMissingLinkHeader;
-  unsigned int m_numUnknownOfflineId;
+  mutable std::atomic_uint m_singleCondHitNumber;   //!< Total number of single hit decoded in condensed mode
+  mutable std::atomic_uint m_pairedCondHitNumber;   //!< Total number of paired hit decoded in condensed mode
+  mutable std::atomic_uint m_firstExpHitNumber;     //!< Total number of first hit decoded in expanded mode
+  mutable std::atomic_uint m_evenExpHitNumber;      //!< Total number of paired hit decoded in expanded mode
+  mutable std::atomic_uint m_lastExpHitNumber;      //!< Total number of last hit decoded in expanded mode
+  mutable std::atomic_uint m_headnumber;            //!< Total number of decoded header data
+  mutable std::atomic_uint m_trailnumber;           //!< Total number of decoded trailer data
+  mutable std::atomic_uint m_head_error_bcid;       //!< Total number of bcid error in the header data
+  mutable std::atomic_uint m_head_error_lvl1id;     //!< Total number of lvl1id error in the header data
+  mutable std::atomic_uint m_head_error_timeout;    //!< Total number of timeout error in the header data
+  mutable std::atomic_uint m_head_error_formatter;  //!< Total number of formatter error in the header data
+  mutable std::atomic_uint m_head_error_preamb;     //!< Total number of preamble error in the header data
+  mutable std::atomic_uint m_trail_error_overflow;  //!< Total number of overflow error in the trailer data
+  mutable std::atomic_uint m_trail_error_limit;     //!< Total number of header trailer limit error in the trailer data
+  mutable std::atomic_uint m_trail_error_bit;       //!< Total number of trailer bit error
+  mutable std::atomic_uint m_config_data_bit;       //!< Total number of configuration data
+  mutable std::atomic_uint m_flag_error_bit;        //!< Total number of flag error data
+  mutable std::atomic_uint m_cond_hit1_error;       //!< Total number of first hit data error
+  mutable std::atomic_uint m_cond_hit2_error;       //!< Total number second hit data errors
+  mutable std::atomic_uint m_chip_number_error;     //!< Total number of chip number error
+  mutable std::atomic_uint m_unknown_data_format;   //!< Total number of unknown data format
+  mutable std::atomic_uint m_nHits;
+  mutable std::atomic_uint m_nRDOs;
+  mutable std::atomic_uint m_maskedLinkNumber;
+  mutable std::atomic_uint m_maskedRODNumber;
+  mutable std::atomic_uint m_RODClockErrorNumber;
+  mutable std::atomic_uint m_truncatedRODNumber;
+  mutable std::atomic_uint m_numMissingLinkHeader;
+  mutable std::atomic_uint m_numUnknownOfflineId;
   
-  bool m_triggerMode;
-
-  ServiceHandle<IIncidentSvc> m_incidentSvc;
+  std::set<IdentifierHash> m_swapPhiReadoutDirection;
 };
 
 #endif //SCT_RAWDATABYTESTREAM_SCT_RODDECODER_H
diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h
index 6f482587d3b31c44bf85ec1bd635fa7b7ee69687..e6d42e052ec0c0e9a3e2f2644dbd94f4c42ec63a 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h
@@ -17,7 +17,6 @@
 #include "InDetConditionsSummaryService/ISiliconConditionsTool.h"
 #include "InDetCondServices/ISiLorentzAngleTool.h"
 #include "InDetConditionsSummaryService/ISiliconConditionsSvc.h"
-#include "InDetCondServices/ISiLorentzAngleSvc.h"
 #include "SiPropertiesSvc/ISiPropertiesSvc.h"
 
 #include <vector>
diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
index 51f9b4f414cb82f159c0495263cfc5719f273f17..35e47b009511e5419aa9aeaec535f361dc795daa 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
@@ -589,8 +589,6 @@ ReadSiDetectorElements::testElement(const Identifier & id,
       
       InDetDD::SiLocalPosition localPosRaw1 = element->rawLocalPositionOfCell(cellId);
       InDetDD::SiLocalPosition localPosRaw2 = element->rawLocalPositionOfCell(fullCellId);
-      InDetDD::SiLocalPosition localPos1 = element->localPositionOfCell(cellId);
-      InDetDD::SiLocalPosition localPos2 = element->localPositionOfCell(fullCellId);
       ATH_MSG_ALWAYS(" raw localPosition (using cell id) (xPhi,xEta) = " 
                      << localPosRaw1.xPhi() << ", " << localPosRaw1.xEta());
       ATH_MSG_ALWAYS(" raw localPosition (using full id) (xPhi,xEta) = " 
@@ -598,13 +596,6 @@ ReadSiDetectorElements::testElement(const Identifier & id,
       SiCellId cellIdRaw(element->cellIdOfPosition(localPosRaw1));
       ATH_MSG_ALWAYS(" corresponding cell (phiIndex,etaIndex) = " 
                      << cellIdRaw); 
-      ATH_MSG_ALWAYS(" lorentz corrected localPosition (using cell id) (xPhi,xEta) = " 
-                     << localPos1.xPhi() << ", " << localPos1.xEta());
-      ATH_MSG_ALWAYS(" lorentz corrected localPosition (using cell id) (xPhi,xEta) = " 
-                     << localPos2.xPhi() << ", " << localPos2.xEta());
-      SiCellId cellIdNew(element->cellIdOfPosition(localPos1));
-      ATH_MSG_ALWAYS(" corresponding cell (phiIndex,etaIndex) = " 
-                     << cellIdNew); 
       ATH_MSG_ALWAYS(" Number of connected cells (2 means ganged): " 
                      << element->numberOfConnectedCells(cellId));
       msg(MSG::ALWAYS) << " Connected cells";
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredBackTracking.py b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredBackTracking.py
index daef063256ffec0d366fa8653db20c22c8d45297..f49f1c31c2adfd861fd42e8808e983d6fb9a15c3 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredBackTracking.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredBackTracking.py
@@ -113,19 +113,13 @@ class ConfiguredBackTracking:
                useDynamicAlignFolders = False
                try:
                   from InDetRecExample.InDetJobProperties import InDetFlags
+                  from IOVDbSvc.CondDB import conddb
                   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)
+               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 69fb1d738fe42abb9215325dc3895e884680bf72..9871a6f43340d2c1e9d3a08aca24a625591435ba 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
@@ -170,19 +170,13 @@ class  ConfiguredNewTrackingSiPattern:
                useDynamicAlignFolders = False
                try:
                   from InDetRecExample.InDetJobProperties import InDetFlags
+                  from IOVDbSvc.CondDB import conddb
                   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)
+               condSeq += InDet__SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk",
+                                                             UseDynamicAlignFolders = useDynamicAlignFolders)
 
          #
          # --- Local track finding using sdCaloSeededSSSpace point seed
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py
index 34dc8dd195839f971e9b41a85ce740a0c251ae37..adcd3dcc4cd46800e08287b54b43839ff7a51eba 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py
@@ -33,8 +33,7 @@ if DetFlags.readRDOBS.pixel_on():
 
 if DetFlags.readRDOBS.SCT_on():
   from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCT_RodDecoder
-  InDetSCTRodDecoder = SCT_RodDecoder(name        = "InDetSCTRodDecoder",
-                                      TriggerMode = False)
+  InDetSCTRodDecoder = SCT_RodDecoder(name        = "InDetSCTRodDecoder")
   if (InDetFlags.doPrintConfigurables()):
     print      InDetSCTRodDecoder
   #InDetSCTRodDecoder.OutputLevel = VERBOSE
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecCabling.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecCabling.py
index 5af482f7bf337ea67ba5cbdeab5ad5535f27e1e7..229393aad5257e415465c0f2a71d91f0051adaa7 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecCabling.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecCabling.py
@@ -20,23 +20,15 @@ if DetFlags.detdescr.pixel_on() and not 'PixelCabling' in dir():
 #
 # --- SCT cabling
 #
-if DetFlags.detdescr.SCT_on() and not 'SCT_CablingSvc' in dir():
-  # SCT_CablingSvc is now used by only RegSelSvc, SiRegionSelectorTable and FTKRegionalWrapper.
-  # Those access SCT cabling during initialization
-  # and cannot use SCT_CablingTool using SCT_CablingCondAlgFromCoraCool.
-  from AthenaCommon.CfgGetter import getService
-  SCT_CablingSvc = getService("SCT_CablingSvc")
-  ServiceMgr += SCT_CablingSvc
-  if (InDetFlags.doPrintConfigurables()):
-    print  SCT_CablingSvc
-
+if DetFlags.detdescr.SCT_on():
   from AthenaCommon.AlgSequence import AthSequencer
   condSeq = AthSequencer("AthCondSeq")
-  from AthenaCommon.CfgGetter import getAlgorithm
-  SCT_CablingCondAlgFromCoraCool = getAlgorithm("SCT_CablingCondAlgFromCoraCool")
-  condSeq += SCT_CablingCondAlgFromCoraCool
-  if (InDetFlags.doPrintConfigurables()):
-    print  SCT_CablingCondAlgFromCoraCool
+  if not hasattr(condSeq, "SCT_CablingCondAlgFromCoraCool"):
+    from AthenaCommon.CfgGetter import getAlgorithm
+    SCT_CablingCondAlgFromCoraCool = getAlgorithm("SCT_CablingCondAlgFromCoraCool")
+    condSeq += SCT_CablingCondAlgFromCoraCool
+    if (InDetFlags.doPrintConfigurables()):
+      print  SCT_CablingCondAlgFromCoraCool
   
 #
 # --- TRT cabling
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py
index 22b282434edd80a45ce08cf2323194947d5f0cf4..682da3c9372f7ee1d970131804bfbafa35fbb1a7 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py
@@ -290,8 +290,7 @@ if DetFlags.haveRIO.SCT_on():
         print InDetSCT_ConditionsSummaryTool
 
     # Conditions summary tool without InDetSCT_FlaggedConditionTool
-    sct_ConditionsSummaryToolSetupWithoutFlagged = SCT_ConditionsSummaryToolSetup()
-    sct_ConditionsSummaryToolSetupWithoutFlagged.setToolName("InDetSCT_ConditionsSummaryToolWithoutFlagged")
+    sct_ConditionsSummaryToolSetupWithoutFlagged = SCT_ConditionsSummaryToolSetup("InDetSCT_ConditionsSummaryToolWithoutFlagged")
     sct_ConditionsSummaryToolSetupWithoutFlagged.setup()
     InDetSCT_ConditionsSummaryToolWithoutFlagged = sct_ConditionsSummaryToolSetupWithoutFlagged.getTool()    
     condTools = []
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py
index 59a08564ad63d4aa28657ad643c7c25f40d8982c..161d56221a58af0d4a25802335af5b5dbbca95fc 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py
@@ -257,8 +257,7 @@ class SCT_ConditionsToolsSetup:
   def initSummaryTool(self, instanceName):
     "Init summary conditions tool"
     from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup
-    sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup()
-    sct_ConditionsSummaryToolSetup.setToolName(instanceName)
+    sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup(instanceName)
     sct_ConditionsSummaryToolSetup.setup()
     summaryTool = sct_ConditionsSummaryToolSetup.getTool()
     if self._print:  print summaryTool
@@ -267,8 +266,7 @@ class SCT_ConditionsToolsSetup:
   def initSummaryToolWithoutFlagged(self, instanceName):
     "Init summary conditions tool without flaggedConditionTool"
     from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup
-    sct_ConditionsSummaryToolSetupWithoutFlagged = SCT_ConditionsSummaryToolSetup()
-    sct_ConditionsSummaryToolSetupWithoutFlagged.setToolName(instanceName)
+    sct_ConditionsSummaryToolSetupWithoutFlagged = SCT_ConditionsSummaryToolSetup(instanceName)
     sct_ConditionsSummaryToolSetupWithoutFlagged.setup()
     summaryToolWoFlagged = sct_ConditionsSummaryToolSetupWithoutFlagged.getTool()
     condTools = []
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py
index 6e2807bf03e1852b33e5d72bee521ab3c53a3c66..eb567e7bfd62ec2612e03e9364fe3e2e024beb3a 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py
@@ -915,13 +915,18 @@ if InDetTrigFlags.doNewTracking():
     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
+      # Copied from InDetAlignFolders.py
+      useDynamicAlignFolders = False
+      try:
+        from InDetRecExample.InDetJobProperties import InDetFlags
+        from IOVDbSvc.CondDB import conddb
+        if InDetFlags.useDynamicAlignFolders and conddb.dbdata == "CONDBR2":
+          useDynamicAlignFolders = True
+      except ImportError:
+        pass
       condSeq += InDet__SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk",
-                                                    IBLDistFolderKey = IBLDistFolderKey)
+                                                    UseDynamicAlignFolders = useDynamicAlignFolders)
 
   # 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 87cb8087e893a955aaeccc2f0cb64471be60e996..ef714c02eb75fbbfc1e75d2ce2dc711948b83bb9 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsCosmics.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsCosmics.py
@@ -89,13 +89,18 @@ 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
+    # Copied from InDetAlignFolders.py
+    useDynamicAlignFolders = False
+    try:
+      from InDetRecExample.InDetJobProperties import InDetFlags
+      from IOVDbSvc.CondDB import conddb
+      if InDetFlags.useDynamicAlignFolders and conddb.dbdata == "CONDBR2":
+        useDynamicAlignFolders = True
+    except ImportError:
+      pass
     condSeq += InDet__SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk",
-                                                  IBLDistFolderKey = IBLDistFolderKey)
+                                                  UseDynamicAlignFolders = useDynamicAlignFolders)
 
 #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 e4e5444b76cc589ac159736b4ad7aef6e48eb621..8778b62883c8bbaa91a13c288b7a5f38bf40cf2a 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py
@@ -68,13 +68,18 @@ 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
+    # Copied from InDetAlignFolders.py
+    useDynamicAlignFolders = False
+    try:
+      from InDetRecExample.InDetJobProperties import InDetFlags
+      from IOVDbSvc.CondDB import conddb
+      if InDetFlags.useDynamicAlignFolders and conddb.dbdata == "CONDBR2":
+        useDynamicAlignFolders = True
+    except ImportError:
+      pass
     condSeq += InDet__SiDetElementsRoadCondAlg_xk(name = "InDet__SiDetElementsRoadCondAlg_xk",
-                                                  IBLDistFolderKey = IBLDistFolderKey)
+                                                  UseDynamicAlignFolders = useDynamicAlignFolders)
 
 # Local combinatorial track finding using space point seed and detector element road
 #
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
index 98667c3fb6f7025ea03a4cb8ff9174078dbe3d04..f8e99a44e44a12c42cd2961b894a8ca978cccb2f 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
@@ -116,8 +116,7 @@ class SCTClustering_EF( InDet__SCT_TrgClusterization ):
       InDetTrigBSErrorTool = SCT_ByteStreamErrorsTool(name=SCT_ConditionsSetup.instanceName("InDetSCT_ByteStreamErrorsTool"))
 
       from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCT_RodDecoder
-      InDetTrigSCTRodDecoder = SCT_RodDecoder(name = "InDetTrigSCTRodDecoder",
-                                              TriggerMode = True)
+      InDetTrigSCTRodDecoder = SCT_RodDecoder(name = "InDetTrigSCTRodDecoder")
       ToolSvc += InDetTrigSCTRodDecoder
       if (InDetTrigFlags.doPrintConfigurables()):
         print      InDetTrigSCTRodDecoder
diff --git a/InnerDetector/InDetG4/TRT_G4Utilities/CMakeLists.txt b/InnerDetector/InDetG4/TRT_G4Utilities/CMakeLists.txt
index 9ecfe2b70dc65142f9c14e0a3a46cca7b3e355ca..912ea2f30323815b792f912e452e556e15ad7620 100644
--- a/InnerDetector/InDetG4/TRT_G4Utilities/CMakeLists.txt
+++ b/InnerDetector/InDetG4/TRT_G4Utilities/CMakeLists.txt
@@ -15,6 +15,7 @@ atlas_depends_on_subdirs( PUBLIC
 find_package( CLHEP )
 find_package( Geant4 )
 find_package( XercesC )
+find_package( Boost COMPONENTS unit_test_framework )
 
 # Component(s) in the package:
 atlas_add_library( TRT_G4Utilities
@@ -28,3 +29,10 @@ atlas_add_library( TRT_G4Utilities
 # Install files from the package:
 atlas_install_runtime( share/TRT_G4Utilities_management.txt share/TRT_G4Utilities_geometry.txt )
 
+atlas_add_test( ut_TRT_G4UtilitiesTest
+   SOURCES test/ut_TRTParametersTest.cxx
+   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
+   PRIVATE_INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS}
+   LINK_LIBRARIES ${Boost_LIBRARIES} TRT_G4Utilities )
+
+
diff --git a/InnerDetector/InDetG4/TRT_G4Utilities/share/ut_TRT_G4UtilitiesTest.ref b/InnerDetector/InDetG4/TRT_G4Utilities/share/ut_TRT_G4UtilitiesTest.ref
new file mode 100644
index 0000000000000000000000000000000000000000..852c6dd72d82f936dde0ccc7070307f9f9f5c626
--- /dev/null
+++ b/InnerDetector/InDetG4/TRT_G4Utilities/share/ut_TRT_G4UtilitiesTest.ref
@@ -0,0 +1,9 @@
+Running 7 test cases...
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
+Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout
+*** No errors detected
diff --git a/InnerDetector/InDetG4/TRT_G4Utilities/test/ut_TRTParametersTest.cxx b/InnerDetector/InDetG4/TRT_G4Utilities/test/ut_TRTParametersTest.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b697f5213c966af0f9ffa0a4af74b8cf46023d57
--- /dev/null
+++ b/InnerDetector/InDetG4/TRT_G4Utilities/test/ut_TRTParametersTest.cxx
@@ -0,0 +1,102 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#define BOOST_TEST_DYN_LINK
+#define BOOST_TEST_MAIN
+#define BOOST_TEST_MODULE TEST_TRT_G4_UTILITIES
+#include <boost/test/unit_test.hpp>
+#include "TRT_G4Utilities/TRTParameters.hh"
+#include "TRT_G4Utilities/TRTOutputFile.hh"
+
+namespace utf = boost::unit_test;
+
+struct setupParameters{
+  const TRTParameters * p;
+  setupParameters()   { 
+    BOOST_TEST_MESSAGE("starting test" );
+    p=TRTParameters::GetPointer();
+  }
+ 
+  ~setupParameters(){
+    BOOST_TEST_MESSAGE("ending test");
+    delete p;
+  }
+};
+
+struct setupOutputFile{
+  TRTOutputFile * p;
+  setupOutputFile()   { 
+    BOOST_TEST_MESSAGE("starting test" );
+    p=TRTOutputFile::GetPointer();
+  }
+ 
+  ~setupOutputFile(){
+    BOOST_TEST_MESSAGE("ending test");
+    delete p;
+  }
+};
+
+
+BOOST_FIXTURE_TEST_SUITE(Test_TRTParameters , setupParameters)
+
+BOOST_AUTO_TEST_CASE( GetExistingInteger ){
+  BOOST_TEST(p->GetInteger("NumberOfSectorsAB") == 24);
+}
+
+BOOST_AUTO_TEST_CASE( GetExistingDouble , * utf::tolerance(0.01)){
+  BOOST_TEST(p->GetDouble("InnerRadiusOfStraw") == 2.);
+}
+
+BOOST_AUTO_TEST_CASE( GetExistingIntegerArray){
+  const int numberOfStrawLayersB =p->GetInteger("NumberOfStrawLayersB");
+  BOOST_TEST(numberOfStrawLayersB == 24);
+  int* numberOfStrawsInLayersB = new int[numberOfStrawLayersB];
+  p->GetIntegerArray("NumberOfStrawsInLayersB", numberOfStrawLayersB,numberOfStrawsInLayersB);
+  std::array<int, 24> answer{19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 24, 24, 23};
+  BOOST_CHECK_EQUAL_COLLECTIONS(numberOfStrawsInLayersB, (numberOfStrawsInLayersB+24), answer.begin(), answer.end());
+  delete[] numberOfStrawsInLayersB;
+}
+
+BOOST_AUTO_TEST_CASE(GetExistingDoubleArray, * utf::tolerance(0.01)){
+  const int numberOfShellCorners = p->GetInteger("NumberOfShellCorners");
+  BOOST_TEST(numberOfShellCorners == 4);
+  double* xOfShellCornersA = new double[numberOfShellCorners];
+  p->GetDoubleArray("XOfShellCornersA", numberOfShellCorners,xOfShellCornersA);
+  std::array<double, 4> answer{564.600, 564.600, 686.690, 699.874};
+  BOOST_CHECK_EQUAL_COLLECTIONS(xOfShellCornersA, (xOfShellCornersA+4), answer.begin(), answer.end());
+  delete[] xOfShellCornersA;
+}
+
+BOOST_AUTO_TEST_CASE( GetPartOfExistingIntegerArray){
+  int numberOfLayersWithShortStrawsA =     p->GetInteger("NumberOfLayersWithShortStrawsA");
+  BOOST_TEST(numberOfLayersWithShortStrawsA == 9);
+  int* numberOfShortStrawsInLayersA =     new int[numberOfLayersWithShortStrawsA];
+  p->GetPartOfIntegerArray("NumberOfStrawsInLayersA",   numberOfLayersWithShortStrawsA, numberOfShortStrawsInLayersA);
+  std::array<int, 9> answer{15, 16, 16, 16, 16, 17, 17, 17, 17};
+  BOOST_CHECK_EQUAL_COLLECTIONS(numberOfShortStrawsInLayersA, (numberOfShortStrawsInLayersA+9), answer.begin(), answer.end());
+  delete[] numberOfShortStrawsInLayersA;
+}
+
+BOOST_AUTO_TEST_CASE(GetPartOfExistingDoubleArray, * utf::tolerance(0.01) ){
+  const int numberOfStrawPlanesB = p->GetInteger("NumberOfStrawPlanesB");
+  BOOST_TEST(numberOfStrawPlanesB == 8);
+  double * rotationAnglesOfStrawPlanesB = new double[numberOfStrawPlanesB];
+  p->GetPartOfDoubleArray("RotationsOfStrawPlanes",numberOfStrawPlanesB, rotationAnglesOfStrawPlanesB);
+  std::array<double, 8> answer{0.000, 0.375, 0.750, 0.125, 0.500, 0.875, 0.250, 0.625};
+  BOOST_CHECK_EQUAL_COLLECTIONS(rotationAnglesOfStrawPlanesB, (rotationAnglesOfStrawPlanesB+8), answer.begin(), answer.end());
+  delete[] rotationAnglesOfStrawPlanesB;
+}
+
+//GetElementOfIntegerArray method is never used in code
+BOOST_AUTO_TEST_SUITE_END()
+
+
+BOOST_FIXTURE_TEST_SUITE(Test_TRTOutputFile , setupOutputFile)
+BOOST_AUTO_TEST_CASE(OutputToFile  ){
+  auto & f(p->GetReference());
+  BOOST_CHECK_NO_THROW((f<<"My Testing"));
+}
+BOOST_AUTO_TEST_SUITE_END()
+
+
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTMonitor_topOptions.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTMonitor_topOptions.py
index 374c73dd9ca61c700058cda5021727d9220abea5..9689976b558063c6498a7bc3d5e40adc9e85d3d2 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTMonitor_topOptions.py
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTMonitor_topOptions.py
@@ -49,8 +49,7 @@ if not conddb.folderRequested(SCTConfigurationFolderPath+"MUR"):
 
 # Load condtions tool
 from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup
-sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup()
-sct_ConditionsSummaryToolSetup.setToolName("SCT_MonConditionsSummaryTool")
+sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup("SCT_MonConditionsSummaryTool")
 sct_ConditionsSummaryToolSetup.setup()
 SCT_MonConditionsSummaryTool = sct_ConditionsSummaryToolSetup.getTool()
 
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt b/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt
index 4d954986171f02ec77b5345ac34ea1b6da91e719..33aa59ddfb17ffecf07bada60d15cf964c9b2364 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt
@@ -31,5 +31,4 @@ atlas_add_component( InDetOverlay
 
 # Install files from the package:
 atlas_install_headers( InDetOverlay )
-atlas_install_joboptions( share/*.py )
 atlas_install_python_modules( python/*.py )
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/InDetOverlay.h b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/InDetOverlay.h
deleted file mode 100755
index e4600b5686f46f1deee48163b0e4e7a6aa4b9ff2..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/InDetOverlay.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Dear emacs, this is -*-c++-*-
-
-/** 
- * @file
- *
- * Overlaying RDOs from two different events for InDet subdetectors.
- *
- * @author Andrei Gaponenko, 2006-2009
- */
-
-#ifndef INDETOVERLAY_H
-#define INDETOVERLAY_H
-
-#include <string>
-
-#include "GaudiKernel/ServiceHandle.h"
-
-#include "IDC_OverlayBase/IDC_OverlayBase.h"
-
-#include "InDetRawData/TRT_RDO_Container.h"
-#include "InDetRawData/SCT_RDO_Container.h"
-#include "InDetRawData/PixelRDO_Container.h"
-#include "TRT_ElectronPidTools/ITRT_LocalOccupancy.h"
-typedef  InDetRawDataCollection<TRT_RDORawData> TRT_RDO_Collection;
-
-#include "InDetSimData/InDetSimDataCollection.h"
-#include "AthenaKernel/IAtRndmGenSvc.h"
-
-
-class StoreGateSvc;
-class SCT_ID;
-class TRT_ID;
-
-namespace CLHEP {
-  class HepRandomEngine;
-}
-
-class InDetOverlay : public IDC_OverlayBase {
-public:
-  
-  InDetOverlay(const std::string &name,ISvcLocator *pSvcLocator);
-  
-  virtual StatusCode overlayInitialize();
-  virtual StatusCode overlayExecute();
-  virtual StatusCode overlayFinalize();
-
-  // SCT collection merging needs an ID helper.  Instead of retrieving
-  // it thousands of times per event in the collection merging code,
-  // do it once in InDetOverlay initialization and make available here
-  const SCT_ID *get_sct_id() const { return m_sct_id; }
-
-  enum SCT_numbers {NextBC=0, CurrentBC=1, PreviousBC=2, AnyBC=3, NumberOfBCs=3, NumberOfBitSets=4,
-                    NumberOfStrips=768,
-                    MCSource=0, DataSource=1, NumberOfSources=2};
-private:
-
- 
-  void overlayTRTContainers(const TRT_RDO_Container *pileupContainer,
-                            const TRT_RDO_Container *signalContainer,
-                            TRT_RDO_Container *outputContainer,
-                            std::map<int,double>&  occupancyMap,
-                            const InDetSimDataCollection& SDO_Map);
-
-
-  void mergeTRTCollections(TRT_RDO_Collection *mc_coll, 
-                           TRT_RDO_Collection *data_coll, 
-                           TRT_RDO_Collection *out_coll, 
-                           double occupancy, 
-                           const InDetSimDataCollection& SDO_Map);
-
-private:
-
-  ServiceHandle<StoreGateSvc> m_detStore;
-  const SCT_ID *m_sct_id;
-  const TRT_ID *m_trt_id;
-
-  // ----------------------------------------------------------------
-  //! jO controllable properties.
-  //! "Main" containers are read, have data from "overlay" containers added,
-  //! and written out with the original SG keys.
-  bool m_do_TRT, m_do_TRT_background;
-  SG::ReadHandleKey<TRT_RDO_Container> m_mainInputTRTKey;
-  SG::ReadHandleKey<TRT_RDO_Container> m_overlayInputTRTKey;
-  SG::WriteHandleKey<TRT_RDO_Container> m_mainOutputTRTKey;
-
-  bool m_do_SCT, m_do_SCT_background;
-  SG::ReadHandleKey<SCT_RDO_Container> m_mainInputSCTKey;
-  SG::ReadHandleKey<SCT_RDO_Container> m_overlayInputSCTKey;
-  SG::WriteHandleKey<SCT_RDO_Container> m_mainOutputSCTKey;
-
-  bool m_do_Pixel, m_do_Pixel_background;
-  SG::ReadHandleKey<PixelRDO_Container> m_mainInputPixelKey;
-  SG::ReadHandleKey<PixelRDO_Container> m_overlayInputPixelKey;
-  SG::WriteHandleKey<PixelRDO_Container> m_mainOutputPixelKey;
-  
-  // Following tools, services and configurables are there only for the correct of HT hits
-  ServiceHandle <IAtRndmGenSvc> m_rndmSvc;
-  std::string                   m_rndmEngineName;
-  CLHEP::HepRandomEngine *      m_rndmEngine;
-  
-  SG::ReadHandleKey<InDetSimDataCollection> m_TRTinputSDO_Key;
-  double                                      m_HTOccupancyCorrectionB;
-  double                                      m_HTOccupancyCorrectionEC;
-  double                                      m_HTOccupancyCorrectionB_noE;
-  double                                      m_HTOccupancyCorrectionEC_noE;
-  ToolHandle< InDet::ITRT_LocalOccupancy >    m_TRT_LocalOccupancyTool; 
-};
-
-#endif/*INDETOVERLAY_H*/
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/PixelOverlay.h b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/PixelOverlay.h
new file mode 100644
index 0000000000000000000000000000000000000000..08a1d10d7d4416a795bc4a102ef7593db18ea721
--- /dev/null
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/PixelOverlay.h
@@ -0,0 +1,28 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef INDETOVERLAY_PIXELOVERLAY_H
+#define INDETOVERLAY_PIXELOVERLAY_H
+
+#include "IDC_OverlayBase/IDC_OverlayBase.h"
+#include "InDetRawData/PixelRDO_Container.h"
+
+class PixelOverlay : public IDC_OverlayBase
+{
+public:
+
+  PixelOverlay(const std::string &name, ISvcLocator *pSvcLocator);
+
+  virtual StatusCode initialize();
+  virtual StatusCode execute();
+
+private:
+  SG::ReadHandleKey<PixelRDO_Container> m_bkgInputKey{ this, "BkgInputKey", "OriginalEvent_SG+PixelRDOs", "ReadHandleKey for Background Input PixelRDO_Container" };
+  SG::ReadHandleKey<PixelRDO_Container> m_signalInputKey{ this, "SignalInputKey", "BkgEvent_0_SG+PixelRDOs", "ReadHandleKey for Signal Input PixelRDO_Container" };
+  SG::WriteHandleKey<PixelRDO_Container> m_outputKey{ this, "OutputKey", "StoreGateSvc+PixelRDOs", "WriteHandleKey for Output PixelRDO_Container" };
+
+  BooleanProperty m_includeBkg { this, "includeBkg", true, "Include Background RDO Container" };
+};
+
+#endif // INDETOVERLAY_PIXELOVERLAY_H
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/SCTOverlay.h b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/SCTOverlay.h
new file mode 100644
index 0000000000000000000000000000000000000000..936fa55261acf1a352fcaaebefa953e528de5f0a
--- /dev/null
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/SCTOverlay.h
@@ -0,0 +1,41 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef INDETOVERLAY_SCTOVERLAY_H
+#define INDETOVERLAY_SCTOVERLAY_H
+
+#include "IDC_OverlayBase/IDC_OverlayBase.h"
+#include "InDetRawData/SCT_RDO_Container.h"
+
+class SCT_ID;
+
+class SCTOverlay : public IDC_OverlayBase
+{
+public:
+
+  SCTOverlay(const std::string &name, ISvcLocator *pSvcLocator);
+
+  virtual StatusCode initialize();
+  virtual StatusCode execute();
+
+  // SCT collection merging needs an ID helper.  Instead of retrieving
+  // it thousands of times per event in the collection merging code,
+  // do it once in InDetOverlay initialization and make available here
+  const SCT_ID *get_sct_id() const { return m_sctId; }
+
+  enum SCT_numbers {NextBC=0, CurrentBC=1, PreviousBC=2, AnyBC=3, NumberOfBCs=3,
+                    NumberOfBitSets=4, NumberOfStrips=768,
+                    BkgSource=0, SignalSource=1, NumberOfSources=2};
+
+private:
+  const SCT_ID *m_sctId;
+
+  SG::ReadHandleKey<SCT_RDO_Container> m_bkgInputKey{ this, "BkgInputKey", "OriginalEvent_SG+SCT_RDOs", "ReadHandleKey for Background Input SCT_RDO_Container" };
+  SG::ReadHandleKey<SCT_RDO_Container> m_signalInputKey{ this, "SignalInputKey", "BkgEvent_0_SG+SCT_RDOs", "ReadHandleKey for Signal Input SCT_RDO_Container" };
+  SG::WriteHandleKey<SCT_RDO_Container> m_outputKey{ this, "OutputKey", "StoreGateSvc+SCT_RDOs", "WriteHandleKey for Output SCT_RDO_Container" };
+
+  BooleanProperty m_includeBkg { this, "includeBkg", true, "Include Background RDO Container" };
+};
+
+#endif // INDETOVERLAY_SCTOVERLAY_H
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/TRTOverlay.h b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/TRTOverlay.h
new file mode 100644
index 0000000000000000000000000000000000000000..b6f44e88087a94590a9cde55fbc3514b9fa1be4b
--- /dev/null
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/TRTOverlay.h
@@ -0,0 +1,68 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef INDETOVERLAY_TRTOVERLAY_H
+#define INDETOVERLAY_TRTOVERLAY_H
+
+#include "IDC_OverlayBase/IDC_OverlayBase.h"
+#include "InDetRawData/TRT_RDO_Container.h"
+
+#include "AthenaKernel/IAtRndmGenSvc.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "InDetSimData/InDetSimDataCollection.h"
+#include "TRT_ElectronPidTools/ITRT_LocalOccupancy.h"
+
+class TRT_ID;
+
+namespace CLHEP {
+  class HepRandomEngine;
+}
+
+typedef InDetRawDataCollection<TRT_RDORawData> TRT_RDO_Collection;
+
+class TRTOverlay : public IDC_OverlayBase
+{
+public:
+  
+  TRTOverlay(const std::string &name, ISvcLocator *pSvcLocator);
+
+  virtual StatusCode initialize();
+  virtual StatusCode execute();
+
+private:
+
+  void overlayTRTContainers(const TRT_RDO_Container *bkgContainer,
+                            const TRT_RDO_Container *signalContainer,
+                            TRT_RDO_Container *outputContainer,
+                            std::map<int, double> &occupancyMap,
+                            const InDetSimDataCollection &SDO_Map);
+
+  void mergeTRTCollections(TRT_RDO_Collection *bkgCollection, 
+                           TRT_RDO_Collection *signalCollection, 
+                           TRT_RDO_Collection *outputCollection, 
+                           double occupancy, 
+                           const InDetSimDataCollection &SDO_Map);
+
+  const TRT_ID *m_trtId;
+
+  SG::ReadHandleKey<TRT_RDO_Container> m_bkgInputKey{this, "BkgInputKey", "OriginalEvent_SG+TRT_RDOs"," ReadHandleKey for Background Input TRT_RDO_Container"};
+  SG::ReadHandleKey<TRT_RDO_Container> m_signalInputKey{this, "SignalInputKey", "BkgEvent_0_SG+TRT_RDOs", "ReadHandleKey for Signal Input TRT_RDO_Container"};
+  SG::WriteHandleKey<TRT_RDO_Container> m_outputKey{this, "OutputKey", "StoreGateSvc+TRT_RDOs", "WriteHandleKey for Output TRT_RDO_Container"};
+  SG::ReadHandleKey<InDetSimDataCollection> m_signalInputSDOKey{this, "SignalInputSDOKey", "BkgEvent_0_SG+TRT_SDO_Map", "ReadHandleKey for Signal Input InDetSimDataCollection for TRT"};
+
+  BooleanProperty m_includeBkg { this, "includeBkg", true, "Include Background RDO Container" };
+
+  // Following tools, services and configurables are there only for the correct of HT hits
+  ServiceHandle<IAtRndmGenSvc> m_rndmSvc;
+  std::string                  m_rndmEngineName;
+  CLHEP::HepRandomEngine      *m_rndmEngine;
+
+  double                                 m_HTOccupancyCorrectionB;
+  double                                 m_HTOccupancyCorrectionEC;
+  double                                 m_HTOccupancyCorrectionB_noE;
+  double                                 m_HTOccupancyCorrectionEC_noE;
+  ToolHandle<InDet::ITRT_LocalOccupancy> m_TRT_LocalOccupancyTool; 
+};
+
+#endif // INDETOVERLAY_TRTOVERLAY_H
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py
index 9422070307727208334edb0483ff0c510a6711ea..ae56833b4415c0c019ac5e7863cd7d4b0a0775fc 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py
@@ -2,34 +2,52 @@
 
 from AthenaCommon import CfgMgr
 
-def getInDetOverlay(name="InDetOverlay", **kwargs):
-    from AthenaCommon.DetFlags import DetFlags
+
+def getPixelOverlay(name="PixelOverlay", **kwargs):
+    from OverlayCommonAlgs.OverlayFlags import overlayFlags
+
+    kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+PixelRDOs");
+    kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+PixelRDOs");
+    kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+PixelRDOs");
+
+    kwargs.setdefault("includeBkg", True);
+
+    return CfgMgr.PixelOverlay(name, **kwargs)
+
+
+def getSCTOverlay(name="SCTOverlay", **kwargs):
+    from OverlayCommonAlgs.OverlayFlags import overlayFlags
+
+    kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+SCT_RDOs");
+    kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+SCT_RDOs");
+    kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+SCT_RDOs");
+
+    kwargs.setdefault("includeBkg", True);
+
+    return CfgMgr.SCTOverlay(name, **kwargs)
+
+
+def getTRTOverlay(name="TRTOverlay", **kwargs):
     from OverlayCommonAlgs.OverlayFlags import overlayFlags
     from Digitization.DigitizationFlags import digitizationFlags
-    kwargs.setdefault("do_TRT", DetFlags.overlay.TRT_on());
-    kwargs.setdefault("do_TRT_background", DetFlags.overlay.TRT_on());
-    kwargs.setdefault("mainInputTRTKey", overlayFlags.dataStore() + "+TRT_RDOs");
-    kwargs.setdefault("overlayInputTRTKey", overlayFlags.evtStore() + "+TRT_RDOs");
-    kwargs.setdefault("mainOutputTRTKey", overlayFlags.outputStore() + "+TRT_RDOs");
-    kwargs.setdefault("TRTinputSDO_Key", overlayFlags.evtStore() + "+TRT_SDO_Map");
-    kwargs.setdefault("RndmEngine", "InDetOverlay")
-    kwargs.setdefault("RndmSvc",digitizationFlags.rndmSvc.get_Value())
-    kwargs.setdefault("TRT_LocalOccupancyTool","TRT_LocalOccupancy")
-    #HT hit correction fraction
-    kwargs.setdefault("TRT_HT_OccupancyCorrectionBarrel",0.160)
-    kwargs.setdefault("TRT_HT_OccupancyCorrectionEndcap",0.130)
-    kwargs.setdefault("do_SCT", DetFlags.overlay.SCT_on());
-    kwargs.setdefault("do_SCT_background", DetFlags.overlay.SCT_on());
-    kwargs.setdefault("mainInputSCTKey", overlayFlags.dataStore() + "+SCT_RDOs");
-    kwargs.setdefault("overlayInputSCTKey", overlayFlags.evtStore() + "+SCT_RDOs");
-    kwargs.setdefault("mainOutputSCTKey", overlayFlags.outputStore() + "+SCT_RDOs");
-    kwargs.setdefault("do_Pixel", DetFlags.overlay.pixel_on());
-    kwargs.setdefault("do_Pixel_background", DetFlags.overlay.pixel_on());
-    kwargs.setdefault("mainInputPixelKey", overlayFlags.dataStore() + "+PixelRDOs");
-    kwargs.setdefault("overlayInputPixelKey", overlayFlags.evtStore() + "+PixelRDOs");
-    kwargs.setdefault("mainOutputPixelKey", overlayFlags.outputStore() + "+PixelRDOs");
 
-    return CfgMgr.InDetOverlay(name, **kwargs)
+    kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+TRT_RDOs");
+    kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+TRT_RDOs");
+    kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+TRT_RDOs");
+    kwargs.setdefault("SignalInputSDOKey", overlayFlags.evtStore() + "+TRT_SDO_Map");
+
+    kwargs.setdefault("includeBkg", True);
+
+    kwargs.setdefault("RndmEngine", "TRTOverlay")
+    kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc.get_Value())
+
+    kwargs.setdefault("TRT_LocalOccupancyTool", "TRT_LocalOccupancy")
+
+    # HT hit correction fraction
+    kwargs.setdefault("TRT_HT_OccupancyCorrectionBarrel", 0.160)
+    kwargs.setdefault("TRT_HT_OccupancyCorrectionEndcap", 0.130)
+
+    return CfgMgr.TRTOverlay(name, **kwargs)
 
 
 def getInDetSDOOverlay(name="InDetSDOOverlay", **kwargs):
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfigDb.py b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfigDb.py
index c8c4a87d5d65a9fc9c3c62cd512e6dbe3f6b49f0..d11eae4ef875e45bf601d33d6c8c29e234d50595 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfigDb.py
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfigDb.py
@@ -1,5 +1,9 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.CfgGetter import addAlgorithm
-addAlgorithm("InDetOverlay.InDetOverlayConfig.getInDetOverlay", "InDetOverlay")
+
+addAlgorithm("InDetOverlay.InDetOverlayConfig.getPixelOverlay", "PixelOverlay")
+addAlgorithm("InDetOverlay.InDetOverlayConfig.getSCTOverlay", "SCTOverlay")
+addAlgorithm("InDetOverlay.InDetOverlayConfig.getTRTOverlay", "TRTOverlay")
+
 addAlgorithm("InDetOverlay.InDetOverlayConfig.getInDetSDOOverlay", "InDetSDOOverlay")
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/share/jobOptions-overlay.py b/InnerDetector/InDetRawAlgs/InDetOverlay/share/jobOptions-overlay.py
deleted file mode 100755
index 7b8f0fe4e2926f3cef61bd131cf17a883fcbad7e..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/share/jobOptions-overlay.py
+++ /dev/null
@@ -1,146 +0,0 @@
-import AthenaCommon.AtlasUnixStandardJob
-
-## get a handle to the ApplicationManager
-from AthenaCommon.AppMgr import theApp
-theApp.EventLoop = "PileUpEventLoopMgr"
-theApp.EvtMax = 6
-
-#--------------------------------------------------------------
-# Load POOL support
-#--------------------------------------------------------------
-import AthenaPoolCnvSvc.ReadAthenaPool
-import AthenaPoolCnvSvc.WriteAthenaPool
-
-# Geometry
-from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-CSC-02-00-00"
-
-from AtlasGeoModel import SetGeometryVersion
-from AtlasGeoModel import GeoModelInit
-
-
-from AthenaCommon.AppMgr import ServiceMgr
-
-#=======================================================================
-from PileUpComps.PileUpCompsConf import PileUpEventLoopMgr
-    
-from PileUpComps.PileUpCompsConf import BkgStreamsCache
-from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import EventSelectorAthenaPool
-
-
-pileUpEventLoopMgr = PileUpEventLoopMgr()
-pileUpEventLoopMgr.OutStreamType = "AthenaOutputStream"
-
-# Set up data input
-pileUpEventLoopMgr.OrigSelector="EventSelector"
-ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/user/a/andr/scratch0/ideal2_valid1.007211.singlepart_mu10.digit.RDO.v13003002/RDO.016155._00001.pool.root.1"]
-pileUpEventLoopMgr.firstXing=0
-pileUpEventLoopMgr.lastXing=0
-ServiceMgr.EventSelector.SkipEvents = 0
-
-# Set up MC input
-pileUpEventLoopMgr.bkgCaches += [BkgStreamsCache("mcSignalEvent"+"_Cache")]
-tmpCache=pileUpEventLoopMgr.bkgCaches[0]
-tmpCache.CollPerXing=1
-tmpCache.CollDistribution="Fixed"
-tmpCache.ReadDownscaleFactor=1
-
-tmpEvtSel=EventSelectorAthenaPool("mcSignalEvent"+"_EventSelector")
-tmpEvtSel.InputCollections = [ "/afs/cern.ch/user/a/andr/scratch0/ideal2_valid1.007211.singlepart_mu10.digit.RDO.v13003002/RDO.016155._00002.pool.root.1" ]
-
-tmpEvtSel.KeepInputFilesOpen = True
-tmpEvtSel.SkipEvents = 1
-
-ServiceMgr += tmpEvtSel
-tmpCache.EventSelector="mcSignalEvent"+"_EventSelector"
-
-ServiceMgr += pileUpEventLoopMgr
-
-#****************************************************************
-from AthenaCommon.AlgSequence import AlgSequence
-job = AlgSequence()
-
-#================================================================
-# Configure the overlaying algs 
-
-from InDetOverlay.InDetOverlayConf import InDetOverlay
-job.insert(0, InDetOverlay())
-
-#job.InDetOverlay.OutputLevel = INFO
-
-# McEventCollection copying
-from OverlayCommonAlgs.OverlayCommonAlgsConf import CopyMcEventCollection
-job += CopyMcEventCollection()
-
-#--------------------------------------------------------------
-# Output options
-#--------------------------------------------------------------
-
-from StoreGate.StoreGateConf import StoreGateSvc
-ServiceMgr += StoreGateSvc("StoreGateSvc")
-ServiceMgr.StoreGateSvc.Dump = True
-
-
-from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
-outStream = AthenaPoolOutputStream( "OverlayOutputStream" )
-outStream.Store = ServiceMgr.StoreGateSvc
-
-# Stream's output file
-outStream.OutputFile  = "InDetOverlayOut.pool.root"
-
-#FIXME: ### FIXME: this does not work because I and O stores are separate.
-#FIXME: # Copy everything from the input and must force reading of all input
-#FIXME: # objects
-#FIXME: #outStream.ForceRead          = True
-#FIXME: #outStream.TakeItemsFromInput = True  # Need to set this to False if an explicit list is to be used
-
-# Can use an explicit list to avoid broken classes. Requires TakeItemsFromInput=False.
-
-outStream.ItemList = []
-
-# Define output stream
-outStream.ItemList += [ "EventInfo#*" ]            #FIXME: not InDet-specific
-outStream.ItemList += [ "PileUpEventInfo#*" ]      #FIXME: not InDet-specific
-outStream.ItemList += [ "McEventCollection#*" ]    #FIXME: not InDet-specific
-
-# InDet MC truth
-outStream.ItemList += [ "InDetSimDataCollection#*" ]
-
-# InDet RDO
-outStream.ItemList += [ "PixelRDO_Container#*" ]
-outStream.ItemList += [ "SCT_RDO_Container#*" ]
-outStream.ItemList += [ "TRT_RDO_Container#*" ]
-
-print "jobOptions-overlay: final outStream = ", outStream
-
-#================================================================
-# Logging
-#--------------------------------------------------------------
-#ServiceMgr.MessageSvc.OutputLevel = INFO
-ServiceMgr.MessageSvc.OutputLevel = DEBUG
-ServiceMgr.MessageSvc.Format = "% F%45W%S%7W%R%T %0W%M"
-# to change the default limit on number of message
-ServiceMgr.MessageSvc.defaultLimit = 9999999  # all messages
-# ServiceMgr.MessageSvc.debugLimit = 10000000   # all debug message etc...
-
-#================================================================
-### From RecExCommon_topOptions.py
-# change traceback handling. It is in principle not needed but the observation
-# is that in most case it helps recovering a meaningful trace back
-# http://cern.ch/seal/workbook/sealbase.html
-# USR1_DUMP_CORE        =   1
-# FATAL_ON_QUIT	        =   2 x
-# FATAL_ON_INT          =   4 x
-# FATAL_DUMP_CORE       =   8
-# FATAL_DUMP_SIG        =  16 x
-# FATAL_DUMP_STACK      =  32 x
-# FATAL_DUMP_LIBS       =  64 
-# FATAL_DUMP_CONTEXT    = 128 x
-# FATAL_AUTO_EXIT       = 256 x
-gbl.AthenaServices.SetFatalHandler(438)
-#pylcgdict.libPyROOT.SetSignalPolicy( pylcgdict.libPyROOT.kSignalFast )
-
-
-
-print "jobOptions-overlay: at the end. job=\n", job
-print "\n\njobOptions-overlay: at the end. ServiceMgr=\n", ServiceMgr
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/share/jobOptions-rdoWrite.py b/InnerDetector/InDetRawAlgs/InDetOverlay/share/jobOptions-rdoWrite.py
deleted file mode 100755
index b517b56623f3353e57d22244c3ad2ed644708c0e..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/share/jobOptions-rdoWrite.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# This jO is to test writing RDOs in as "standard" setup as possible.
-# It uses RecExCommon to configure athena job with all the current idiosyncrasies.
-#
-
-#DetDescrVersion = "ATLAS-DC3-07"
-#PoolRDOInput = ["/afs/cern.ch/user/a/andr/scratch0/data/testIdeal_07.007233.singlepart_mu100.digit.RDO.v12000201_tid002765._00001.pool.root.1"]
-
-DetDescrVersion = "ATLAS-CSC-02-00-00"
-PoolRDOInput = ["/afs/cern.ch/user/a/andr/scratch0/ideal2_valid1.007211.singlepart_mu10.digit.RDO.v13003002/RDO.016155._00001.pool.root.1"]
-
-
-
-doTrigger = False # for example do not run trigger simulation
-# doTruth=False
-# number of event to process
-EvtMax=2
-
-# By default write ESD, AOD and TAG simultenaously, but note that in productio
-#      these should be done in separate steps (results might not be bit-by-bit identical).
-doWriteESD=False # uncomment if do not write ESD
-doWriteAOD=False # uncomment if do not write AOD
-doAOD=False # uncomment if do not run AOD making algorithms
-doWriteTAG=False # uncomment if do not write TAG
-doAOD=False
-doAODall=False
-doCBNT=False
-doHist=False
-doJiveXML=False
-
-doWriteRDO=True
-
-
-# DetFlags modifications are best set here (uncomment RecExCommon_flags first)
-include ("RecExCommon/RecExCommon_flags.py")
-# switch off ID, calo, or muons
-# DetFlags.ID_setOff()
-# DetFlags.Calo_setOff()
-# DetFlags.Muon_setOff()
-
-# main jobOption
-include ("RecExCommon/RecExCommon_topOptions.py")
-
-
-sg = Service ("StoreGateSvc" )
-#StoreGateSvc.ActivateHistory=False
-sg.Dump = True
-
-
-# 20080102 dev val 3: muons crash again.
-# Redefine output list so it does not include muon stuff
-
-print "AG: original StreamRDO.ItemList = ", StreamRDO.ItemList
-
-StreamRDO.ItemList = []
-
-# Define output stream
-StreamRDO.ItemList += [ "EventInfo#*" ];
-StreamRDO.ItemList += [ "McEventCollection#*" ]
-# InDet RDO
-StreamRDO.ItemList += [ "PixelRDO_Container#*" ]
-StreamRDO.ItemList += [ "SCT_RDO_Container#*" ]
-StreamRDO.ItemList += [ "TRT_RDO_Container#*" ]
-StreamRDO.ItemList += [ "InDetSimDataCollection#*" ]
-# Calo RDO
-StreamRDO.ItemList += [ "LArRawChannelContainer#*" ]
-StreamRDO.ItemList += [ "TileRawChannelContainer#*" ]
-# Calo calib hit
-StreamRDO.ItemList += [ "TileHitVector#*" ]
-StreamRDO.ItemList += [ "CaloCalibrationHitContainer#*" ]
-
-#AG: # Muon RDO
-#AG: StreamRDO.ItemList += [ "CscRawDataContainer#*" ]
-#AG: StreamRDO.ItemList += [ "MdtCsmContainer#*" ]
-#AG: StreamRDO.ItemList += [ "RpcPadContainer#*" ]
-#AG: StreamRDO.ItemList += [ "TgcRdoContainer#*" ]
-#AG: StreamRDO.ItemList += [ "TrackRecordCollection#*" ]
-#AG: StreamRDO.ItemList += [ "MuonSimDataCollection#*" ]
-#AG: # from LVL1
-#AG: StreamRDO.ItemList += [ "ROIB::RoIBResult#*", "MuCTPI_RDO#*" ]
-#AG: # Muon digit
-#AG: StreamRDO.ItemList += [ "MdtDigitContainer#*"]
-#AG: StreamRDO.ItemList += [ "RpcDigitContainer#*"]
-#AG: StreamRDO.ItemList += [ "TgcDigitContainer#*"]
-#AG: StreamRDO.ItemList += [ "CscDigitContainer#*"]
-#AG: #StreamRDO.ItemList += [ "CscDigitCollection#*"]
-#AG: #StreamRDO.ItemList += [ "CscClusterCollection#*"]
-
-print "AG: final StreamRDO.ItemList = ", StreamRDO.ItemList
-
-
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetOverlay.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetOverlay.cxx
deleted file mode 100755
index 5a2c70075126a6680b2b9d32646e86f8a53c66f3..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetOverlay.cxx
+++ /dev/null
@@ -1,702 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Andrei Gaponenko <agaponenko@lbl.gov>, 2006, 2007
-
-#include "InDetRawData/InDetRawData.h"
-#include "InDetOverlay/InDetOverlay.h"
-#include "AthenaBaseComps/AthMsgStreamMacros.h"
-
-#include "AthenaKernel/IAtRndmGenSvc.h"
-#include "CLHEP/Random/RandomEngine.h"
-#include "CLHEP/Random/RandFlat.h"
-#include "CLHEP/Units/SystemOfUnits.h"
-
-
-#include "StoreGate/StoreGateSvc.h"
-#include "StoreGate/DataHandle.h"
-#include "StoreGate/ReadHandle.h"
-#include "StoreGate/WriteHandle.h"
-#include "CxxUtils/make_unique.h"
- 
-#include "GeneratorObjects/McEventCollection.h"
-#include "InDetSimData/InDetSimDataCollection.h"
-
-#include "InDetRawData/TRT_RDORawData.h"
-#include "InDetRawData/TRT_LoLumRawData.h"
-#include "InDetRawData/SCT3_RawData.h"
-
-#include "InDetIdentifier/SCT_ID.h"
-#include "InDetIdentifier/TRT_ID.h"
-
-#include <iostream>
-#include <sstream>
-#include <typeinfo>
-#include <bitset>
-
-//================================================================
-namespace Overlay {
-
-  // Specialize mergeChannelData() for the TRT
-  template<> void mergeChannelData(TRT_RDORawData& r1, const TRT_RDORawData& r2, IDC_OverlayBase* parent) {
-
-    // ----------------------------------------------------------------
-    // demo
-    static bool first_time = true;
-    if(first_time) {
-      first_time = false;
-      parent->msg(MSG::INFO)<<"Overlay::mergeChannelData(): "
-                            <<"TRT specific code is called for "
-                            <<typeid(TRT_RDORawData).name()
-                            <<endmsg;
-    }
-
-    // ----------------------------------------------------------------
-    // FIXME: That should really be a call to r1.merge(r2);
-
-    TRT_LoLumRawData *pr1 = dynamic_cast<TRT_LoLumRawData*>(&r1);
-    const TRT_LoLumRawData *pr2 = dynamic_cast<const TRT_LoLumRawData*>(&r2);
-
-    if(pr1 && pr2) {
-      // the actual merging
-      pr1->merge (*pr2);
-    }
-    else {
-      static bool first_time = true;
-      if(first_time) {
-        first_time = false;
-        parent->msg(MSG::INFO)<<"Overlay::mergeChannelData(): "
-                              <<"TRT specific code for "
-                              <<typeid(TRT_RDORawData).name()
-                              <<" is not implemented"
-                              <<endmsg;
-      }
-    } // else - dyncasts
-  } // mergeChannelData()
-
-  //================================================================
-  template<> void copyCollection(const InDetRawDataCollection<TRT_RDORawData> *input_coll, InDetRawDataCollection<TRT_RDORawData>*copy_coll){
-    
-    copy_coll->setIdentifier(input_coll->identify());
-    InDetRawDataCollection<TRT_RDORawData>::const_iterator firstData = input_coll->begin();
-    InDetRawDataCollection<TRT_RDORawData>::const_iterator lastData = input_coll->end();	
-    for ( ; firstData != lastData; ++firstData)
-      {	
-	const Identifier ident = (*firstData)->identify();
-	const unsigned int word = (*firstData)->getWord();
-	TRT_LoLumRawData * newData=new TRT_LoLumRawData(ident,word);
-	copy_coll->push_back (newData );
-      }
-  }
-  
-  template<> void copyCollection(const InDetRawDataCollection<SCT_RDORawData> *input_coll, InDetRawDataCollection<SCT_RDORawData>*copy_coll){
-    
-    copy_coll->setIdentifier(input_coll->identify());
-    InDetRawDataCollection<SCT_RDORawData>::const_iterator firstData = input_coll->begin();
-    InDetRawDataCollection<SCT_RDORawData>::const_iterator lastData = input_coll->end();	
-    for ( ; firstData != lastData; ++firstData)
-      {	
-	const Identifier ident = (*firstData)->identify();
-	const unsigned int word = (*firstData)->getWord();
-	const SCT3_RawData* oldData = dynamic_cast<const SCT3_RawData*>(*firstData);	
-	std::vector<int> errorHit=oldData->getErrorCondensedHit();
-	SCT3_RawData * newData=new SCT3_RawData(ident,word, &errorHit);
-	copy_coll->push_back (newData );
-      }
-  }
-  
-  template<> void copyCollection(const InDetRawDataCollection<PixelRDORawData> *input_coll, InDetRawDataCollection<PixelRDORawData>*copy_coll){
-   
-    copy_coll->setIdentifier(input_coll->identify());
-    InDetRawDataCollection<PixelRDORawData>::const_iterator firstData = input_coll->begin();
-    InDetRawDataCollection<PixelRDORawData>::const_iterator lastData = input_coll->end();	
-    for ( ; firstData != lastData; ++firstData)
-      {	
-	const Identifier ident = (*firstData)->identify();
-	const unsigned int word = (*firstData)->getWord();
-	Pixel1RawData * newData=new Pixel1RawData(ident,word);
-	copy_coll->push_back (newData );
-      }
-  }
-
-  template<> void mergeCollectionsNew(InDetRawDataCollection<SCT_RDORawData> *mc_coll,
-                                      InDetRawDataCollection<SCT_RDORawData> *data_coll,
-                                      InDetRawDataCollection<SCT_RDORawData> *out_coll,
-                                      IDC_OverlayBase *tmp)
-  {
-    // We want to use the SCT_ID helper provided by InDetOverlay, thus the constraint
-    InDetOverlay *parent = dynamic_cast<InDetOverlay*>(tmp);
-    if(!parent) {
-      std::ostringstream os;
-      os<<"mergeCollectionsNew<SCT_RDORawData>() called by a wrong parent algorithm?  Must be InDetOverlay.";
-      throw std::runtime_error(os.str());
-    }
-
-    // ----------------------------------------------------------------
-    // debug
-    static bool first_time = true;
-    if(first_time) {
-      first_time = false;
-      parent->msg(MSG::INFO)<<"InDetOverlay::mergeCollectionsNew(): "
-                            <<" SCT specific code is called for "
-                            <<typeid(*mc_coll).name()
-                            <<endmsg;
-    }
-
-    // ----------------------------------------------------------------
-    // Useful reading:
-    //
-    // Real data are handled like this:
-    //
-    // https://svnweb.cern.ch/trac/atlasoff/browser/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/trunk/src/SCT_RodDecoder.cxx?rev=332542
-    //
-    // Note that SCT3 is hardcoded (no chance to get SCT1 from real data).
-    // The SCT3 format is also the default in digitization:
-    //
-    // https://svnweb.cern.ch/trac/atlasoff/browser/InnerDetector/InDetDigitization/SCT_Digitization/trunk/src/SCT_Digitization.cxx?rev=355953
-
-    // So we'll just go with SCT3.
-    //
-    // The client code that consumes SCT RDOs:
-    //
-    // http://alxr.usatlas.bnl.gov/lxr/source/atlas/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx
-
-
-    // ----------------------------------------------------------------
-    if(mc_coll->identify() != data_coll->identify()) {
-      std::ostringstream os;
-      os<<"mergeCollectionsNew<SCT_RDORawData>(): collection Id mismatch";
-      parent->msg(MSG::FATAL)<<os.str()<<endmsg;
-      throw std::runtime_error(os.str());
-    }
-
-    const Identifier idColl = parent->get_sct_id()->wafer_id(mc_coll->identifyHash());
-
-    // Empty the input collections and move RDOs to local vectors.
-    InDetRawDataCollection<SCT_RDORawData> mc(mc_coll->identifyHash());
-    mc.setIdentifier(idColl);
-    mc_coll->swap(mc);
-
-    InDetRawDataCollection<SCT_RDORawData> data(data_coll->identifyHash());
-    data.setIdentifier(idColl);
-    data_coll->swap(data);
-
-    // Strip hit timing information for Next, Current, Previous and Any BCs
-    // Prepare one more strip to create the last one. The additional strip has no hits.
-    std::bitset<InDetOverlay::NumberOfStrips+1> stripInfo[InDetOverlay::NumberOfBitSets];
-    // Process MC and data in the wafer
-    for (unsigned source=InDetOverlay::MCSource; source<InDetOverlay::NumberOfSources; source++) {
-      InDetRawDataCollection<SCT_RDORawData>::const_iterator rdo;
-      InDetRawDataCollection<SCT_RDORawData>::const_iterator rdoEnd;
-      if (source==InDetOverlay::MCSource) { // MC
-        rdo = mc.begin();
-        rdoEnd = mc.end();
-      } else { // Data
-        rdo = data.begin();
-        rdoEnd = data.end();
-      } 
-      // Loop over all RDOs in the wafer
-      for (; rdo!=rdoEnd; ++rdo) {
-        const SCT3_RawData* rdo3 = dynamic_cast<const SCT3_RawData*>(*rdo);
-        if (!rdo3) {
-          std::ostringstream os;
-          const auto& elt = **rdo;
-          os<<"mergeCollectionNew<SCT_RDORawData>(): wrong datum format. Only SCT3_RawData are produced by SCT_RodDecoder and supported by overlay."
-            <<"For the supplied datum  typeid(datum).name() = "<<typeid(elt).name();
-          throw std::runtime_error(os.str());
-        }
-        int strip = parent->get_sct_id()->strip(rdo3->identify());
-        int stripEnd = strip + rdo3->getGroupSize();
-        int timeBin = rdo3->getTimeBin();
-        for (; strip<stripEnd and strip<InDetOverlay::NumberOfStrips; strip++) {
-          // Fill timing information for each strips, loop over 3 BCs
-          for (unsigned int bc=InDetOverlay::NextBC; bc<InDetOverlay::NumberOfBCs; bc++) {
-            if (timeBin & (1 << bc)) stripInfo[bc].set(strip);
-          }
-        }
-      }
-    }
-    // Get OR for AnyBC, loop over 3 BCs
-    for (unsigned int bc=InDetOverlay::NextBC; bc<InDetOverlay::NumberOfBCs; bc++) {
-      stripInfo[InDetOverlay::AnyBC] |= stripInfo[bc];
-    }
-    // Check if we need to use Expanded mode by checking if there is at least one hit in Next BC or Previous BC
-    bool anyNextBCHits = stripInfo[InDetOverlay::NextBC].any();
-    bool anyPreivousBCHits = stripInfo[InDetOverlay::PreviousBC].any();
-    bool isExpandedMode = (anyNextBCHits or anyPreivousBCHits);
-    // No error information is recorded because this information is not filled in data and no errors are assumed in MC.
-    const int ERRORS = 0;
-    const std::vector<int> errvec{};
-    if (isExpandedMode) {
-      // Expanded mode (record strip one by one)
-      const int groupSize = 1;
-      int tbin = 0;
-      for (unsigned int strip=0; strip<InDetOverlay::NumberOfStrips; strip++) {
-        if (stripInfo[InDetOverlay::AnyBC][strip]) {
-          tbin = 0;
-          for (unsigned int bc=InDetOverlay::NextBC; bc<InDetOverlay::NumberOfBCs; bc++) {
-            if (stripInfo[bc][strip]) {
-              tbin |= (1 << bc);
-            }
-          }
-          unsigned int SCT_Word = (groupSize | (strip << 11) | (tbin <<22) | (ERRORS << 25));
-          Identifier rdoId = parent->get_sct_id()->strip_id(idColl, strip) ;
-          out_coll->push_back(new SCT3_RawData(rdoId, SCT_Word, &errvec));
-        }
-      }
-    } else {
-      // We can record consecutive hits into one RDO if all hits have timeBin of 010.
-      unsigned int groupSize = 0;
-      const int tbin = (1 << InDetOverlay::CurrentBC);
-      for (unsigned int strip=0; strip<InDetOverlay::NumberOfStrips+1; strip++) { // Loop over one more strip to create the last one if any
-        if (stripInfo[InDetOverlay::AnyBC][strip]) {
-          groupSize++;
-        } else {
-          if (groupSize>0) {
-            unsigned int firstStrip = strip - groupSize;
-            unsigned int SCT_Word = (groupSize | (firstStrip << 11) | (tbin <<22) | (ERRORS << 25));
-            Identifier rdoId = parent->get_sct_id()->strip_id(idColl, firstStrip) ;
-            out_coll->push_back(new SCT3_RawData(rdoId, SCT_Word, &errvec));
-            groupSize = 0;
-          }
-        }
-      }
-    }
-
-  } // mergeCollectionsNew()
-
-} // namespace
-
-//================================================================
-InDetOverlay::InDetOverlay(const std::string &name, ISvcLocator *pSvcLocator) :
-  IDC_OverlayBase(name, pSvcLocator),
-  m_detStore("StoreGateSvc/DetectorStore", name),
-  m_sct_id(nullptr),
-  m_trt_id(nullptr),
-  m_rndmSvc("AtRndmGenSvc",name),
-  m_rndmEngineName("InDetOverlay"),
-  m_rndmEngine(nullptr),
-  m_TRT_LocalOccupancyTool("TRT_LocalOccupancy")
-{
-
-  //change via postExec indetovl.do_XXX=True
-
-  declareProperty("do_TRT", m_do_TRT=true);
-  declareProperty("do_TRT_background", m_do_TRT_background=true);
-  declareProperty("mainInputTRTKey", m_mainInputTRTKey);
-  declareProperty("overlayInputTRTKey", m_overlayInputTRTKey);
-  declareProperty("mainOutputTRTKey", m_mainOutputTRTKey);
-
-  declareProperty("do_SCT", m_do_SCT=true);
-  declareProperty("do_SCT_background", m_do_SCT_background=true);
-  declareProperty("mainInputSCTKey", m_mainInputSCTKey);
-  declareProperty("overlayInputSCTKey", m_overlayInputSCTKey);
-  declareProperty("mainOutputSCTKey", m_mainOutputSCTKey);
-
-  declareProperty("do_Pixel", m_do_Pixel=true);
-  declareProperty("do_Pixel_background", m_do_Pixel_background=true);
-  declareProperty("mainInputPixelKey", m_mainInputPixelKey);
-  declareProperty("overlayInputPixelKey", m_overlayInputPixelKey);
-  declareProperty("mainOutputPixelKey", m_mainOutputPixelKey);    
-  
-  
-  declareProperty("TRTinputSDO_Key", m_TRTinputSDO_Key);
-  declareProperty("TRT_HT_OccupancyCorrectionBarrel",m_HTOccupancyCorrectionB=0.160);
-  declareProperty("TRT_HT_OccupancyCorrectionEndcap",m_HTOccupancyCorrectionEC=0.130);
-  declareProperty("TRT_HT_OccupancyCorrectionBarrelNoE",m_HTOccupancyCorrectionB_noE=0.105);
-  declareProperty("TRT_HT_OccupancyCorrectionEndcapNoE",m_HTOccupancyCorrectionEC_noE=0.080);
-
-  declareProperty("RndmSvc",    m_rndmSvc,       "Random Number Service");
-  declareProperty("RndmEngine", m_rndmEngineName,"Random engine name");
-  declareProperty("TRT_LocalOccupancyTool", m_TRT_LocalOccupancyTool);
-  
-}
-
-//================================================================
-StatusCode InDetOverlay::overlayInitialize()
-{
-  ATH_MSG_INFO("InDetOverlay initialize()");
-
-  if(!m_detStore->retrieve(m_sct_id,"SCT_ID").isSuccess() || !m_sct_id ) {
-    msg(MSG::FATAL) << "Cannot retrieve SCT ID helper"  << endmsg;
-    return StatusCode::FAILURE;
-  }
-
-  // Check and initialize keys
-  ATH_CHECK( m_mainInputTRTKey.initialize() );
-  ATH_CHECK( m_overlayInputTRTKey.initialize() );
-  ATH_CHECK( m_mainOutputTRTKey.initialize() );
-  ATH_CHECK( m_mainInputSCTKey.initialize() );
-  ATH_CHECK( m_overlayInputSCTKey.initialize() );
-  ATH_CHECK( m_mainOutputSCTKey.initialize() );
-  ATH_CHECK( m_mainInputPixelKey.initialize() );
-  ATH_CHECK( m_overlayInputPixelKey.initialize() );
-  ATH_CHECK( m_mainOutputPixelKey.initialize() );
-  ATH_CHECK( m_TRTinputSDO_Key.initialize() );
-
-
-  if(m_do_TRT){
-  
-    if(!m_detStore->retrieve(m_trt_id,"TRT_ID").isSuccess() || !m_sct_id ) {
-      ATH_MSG_FATAL("Cannot retrieve TRT ID helper");
-      return StatusCode::FAILURE;
-    }
-  
-    // Initialize random number generator
-    CHECK(m_rndmSvc.retrieve());
-    m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName);
-    if (!m_rndmEngine) {
-      ATH_MSG_ERROR("Could not find RndmEngine : " << m_rndmEngineName);
-      return StatusCode::FAILURE;
-    }
-    else {
-      ATH_MSG_DEBUG("Found RndmEngine : " << m_rndmEngineName);
-    }
-
-    CHECK( m_TRT_LocalOccupancyTool.retrieve() );
-
-  } 
-  return StatusCode::SUCCESS;
-}
-
-//================================================================
-StatusCode InDetOverlay::overlayFinalize()
-{
-  ATH_MSG_INFO("InDetOverlay finalized");
-  return StatusCode::SUCCESS;
-}
-
-//================================================================
-StatusCode InDetOverlay::overlayExecute() {
-  ATH_MSG_DEBUG("InDetOverlay::execute() begin");
-
-  //----------------------------------------------------------------
-  if(m_do_TRT) {
-    ATH_MSG_VERBOSE("Retrieving data input TRT container");
-    const TRT_RDO_Container* dataContainer = SG::get(m_mainInputTRTKey);
-    if(!dataContainer) {   
-      ATH_MSG_WARNING("Could not get data TRT container \"" << m_mainInputTRTKey.key() << "\" in " << m_mainInputTRTKey.storeHandle().name());
-    }
-
-    ATH_MSG_INFO("TRT Data   = "<<shortPrint(dataContainer));
-
-    ATH_MSG_VERBOSE("Retrieving MC  input TRT container");
-    const TRT_RDO_Container* mcContainer = SG::get(m_overlayInputTRTKey);
-    if(!mcContainer) {
-      ATH_MSG_WARNING("Could not get MC TRT container \"" << m_overlayInputTRTKey.key() << "\" in " << m_overlayInputTRTKey.storeHandle().name());
-    }
-    ATH_MSG_INFO("TRT MC     = "<<shortPrint(mcContainer));
-   
-    SG::WriteHandle<TRT_RDO_Container> outputContainer(m_mainOutputTRTKey);
-    outputContainer = CxxUtils::make_unique<TRT_RDO_Container>(mcContainer->size());
-
-    if(dataContainer && mcContainer && outputContainer.isValid()) {
-      if (m_do_TRT_background ){ 
-        const InDetSimDataCollection* sdoContainer=SG::get(m_TRTinputSDO_Key);
-
-        // Calculate occupancy here
-        std::map<int, double> occupancy = m_TRT_LocalOccupancyTool->getDetectorOccupancy( dataContainer );
-        //Merge containers
-        overlayTRTContainers(dataContainer, mcContainer, outputContainer.ptr(), occupancy, *sdoContainer);
-      } else if(!m_do_TRT_background){
-        TRT_RDO_Container* nobkg = nullptr;
-        overlayContainerNew( nobkg , mcContainer , outputContainer.ptr());
-      }
-      ATH_MSG_INFO("TRT Result = "<<shortPrint(outputContainer.cptr()));
-    }
-  }
-  
-  //----------------------------------------------------------------
-  if(m_do_SCT) {
-    ATH_MSG_VERBOSE("Retrieving data input SCT container");
-    const SCT_RDO_Container* dataContainer = SG::get(m_mainInputSCTKey);
-    if(!dataContainer) {
-      ATH_MSG_WARNING("Could not get data SCT container \"" << m_mainInputSCTKey.key() << "\" in " << m_mainInputSCTKey.storeHandle().name());
-    }
-    ATH_MSG_INFO("SCT Data   = "<<shortPrint(dataContainer, 50));
-
-    ATH_MSG_VERBOSE("Retrieving MC  input SCT container");
-    const SCT_RDO_Container* mcContainer = SG::get(m_overlayInputSCTKey);
-    if(!mcContainer) {
-      ATH_MSG_WARNING("Could not get MC SCT container \"" << m_overlayInputSCTKey.key() << "\" in " << m_overlayInputSCTKey.storeHandle().name());
-    }
-    ATH_MSG_INFO("SCT MC     = "<<shortPrint(mcContainer, 50));
-   
-    SG::WriteHandle<SCT_RDO_Container> outputContainer(m_mainOutputSCTKey);
-    outputContainer = CxxUtils::make_unique<SCT_RDO_Container>(mcContainer->size());
-    
-    if(dataContainer && mcContainer && outputContainer.isValid()) {
-      if(m_do_SCT_background) overlayContainerNew(dataContainer, mcContainer, outputContainer.ptr());
-      else if(!m_do_SCT_background){
-        SCT_RDO_Container *nobkg = nullptr;
-	overlayContainerNew(nobkg , mcContainer , outputContainer.ptr());
-       }
-      ATH_MSG_INFO("SCT Result = "<<shortPrint(outputContainer.ptr(), 50));   
-    }
-  }
-
-  //----------------------------------------------------------------
-  if(m_do_Pixel) {
-    ATH_MSG_VERBOSE("Retrieving data input Pixel container");
-    const PixelRDO_Container* dataContainer = SG::get(m_mainInputPixelKey);
-    if(!dataContainer) {
-      ATH_MSG_WARNING("Could not get data Pixel container \"" << m_mainInputPixelKey.key() << "\" in " << m_mainInputPixelKey.storeHandle().name());
-    }
-    ATH_MSG_INFO("Pixel Data   = "<<shortPrint(dataContainer));
-
-    ATH_MSG_VERBOSE("Retrieving MC  input Pixel container");
-    const PixelRDO_Container* mcContainer = SG::get(m_overlayInputPixelKey);
-    if(!mcContainer) {
-      ATH_MSG_WARNING("Could not get MC Pixel container \"" << m_overlayInputPixelKey.key() << "\" in " << m_overlayInputPixelKey.storeHandle().name());
-    }
-    ATH_MSG_INFO("Pixel MC     = "<<shortPrint(mcContainer));
-
-/*
-// Get geo model manager
-const InDetDD::PixelDetectorManager* geo;
-if ( detStore()->retrieve(geo, "Pixel").isFailure()) {
-   ATH_MSG_ERROR("Could not get Pixel GeoModel Manager!");
-   return StatusCode::RECOVERABLE;
-}
-//Loop over pixel RDO container
-PixelRDO_Container::const_iterator containerItr;
-for (containerItr=mcContainer->begin(); containerItr!=mcContainer->end(); ++containerItr) {
-  const DataVector<PixelRDORawData>* rdoCollection = *containerItr;
-  DataVector<PixelRDORawData>::const_iterator collectionItr;
-  double avgx=0; int nx=0;
-  for (collectionItr=rdoCollection->begin(); collectionItr!=rdoCollection->end(); ++collectionItr) {
-    PixelRDORawData *rdoData = *collectionItr;
-    const Identifier id = rdoData->identify();
-    const InDetDD::SiDetectorElement *element = geo->getDetectorElement(id);
-    if (!element->isInnermostPixelLayer()) {//only keep IBL
-      //rdoCollection->remove(collectionItr);
-      continue;
-    }
-    Amg::Vector2D localPos = element->localPositionOfCell(id);
-    Amg::Vector2D rawlocalPos = element->rawLocalPositionOfCell(id);
-    Amg::Vector3D globalPos = element->globalPosition(localPos);
-    Amg::Vector3D rawglobalPos = element->globalPosition(rawlocalPos);
-    //ATH_MSG_INFO("localPos: "<<localPos.x()<<" "<<localPos.y());
-    //ATH_MSG_INFO("rawlocalPos: "<<rawlocalPos.x()<<" "<<rawlocalPos.y());
-    //ATH_MSG_INFO("globalPos: "<<globalPos.x()<<" "<<globalPos.y()<<" "<<globalPos.z());
-    //ATH_MSG_INFO("rawglobalPos: "<<rawglobalPos.x()<<" "<<rawglobalPos.y()<<" "<<rawglobalPos.z());
-    avgx+=globalPos.x(); nx++;
-  }
-  if (nx>0){ATH_MSG_INFO("avgx ="<<avgx/(double)nx);}
-}
-*/
-    SG::WriteHandle<PixelRDO_Container> outputContainer(m_mainOutputPixelKey);
-    outputContainer = CxxUtils::make_unique<PixelRDO_Container>(mcContainer->size());
-    
-    if(dataContainer && mcContainer&&outputContainer.isValid()) {  
-      if(m_do_Pixel_background) overlayContainerNew(dataContainer, mcContainer, outputContainer.ptr());
-      else if(!m_do_Pixel_background){
-        PixelRDO_Container *nobkg = nullptr;
-	overlayContainerNew(nobkg, mcContainer , outputContainer.ptr());
-       }
-      ATH_MSG_INFO("Pixel Result = "<<shortPrint(outputContainer.ptr()));
-    }
-  }
-
-  //----------------------------------------------------------------
-  ATH_MSG_DEBUG("InDetOverlay::execute() end");
-  return StatusCode::SUCCESS;
-}
-
-void InDetOverlay::overlayTRTContainers(const TRT_RDO_Container *pileupContainer,
-                                        const TRT_RDO_Container *signalContainer,
-                                        TRT_RDO_Container *outputContainer,
-                                        std::map<int,double>&  occupancyMap,
-                                        const InDetSimDataCollection& SDO_Map) 
-{
-
-   //There are some use cases where this is empty
-   if(pileupContainer != nullptr){
-   /** Add data from the data container to the output one */
-     TRT_RDO_Container::const_iterator p_data = pileupContainer->begin();
-     TRT_RDO_Container::const_iterator p_data_end = pileupContainer->end();
-
-     for(; p_data != p_data_end; ++p_data) {
-       IdentifierHash hashId = p_data.hashId();
-       auto coll_data = std::make_unique<TRT_RDO_Collection>(hashId); 
-       Overlay::copyCollection( *p_data, coll_data.get());
-
-       if ( outputContainer->addCollection(coll_data.release(), p_data.hashId() ).isFailure() ) {
-         ATH_MSG_WARNING( "add data Collection failed for output "<< p_data.hashId   () ); // 
-       } 
-     }
-   }
-
-   /** Add data from the ovl container to the output one */
-   TRT_RDO_Container::const_iterator p_ovl = signalContainer->begin(); 
-   TRT_RDO_Container::const_iterator p_ovl_end = signalContainer->end();
-
-   for(; p_ovl != p_ovl_end; ++p_ovl) {
- 
-      IdentifierHash coll_id = p_ovl.hashId();
-      auto coll_ovl = std::make_unique<TRT_RDO_Collection>(coll_id);    
-      Overlay::copyCollection( *p_ovl, coll_ovl.get() ) ;
-
-      /** The newly created stuff will go to the output EventStore SG */
-      auto coll_out = std::make_unique<TRT_RDO_Collection>(coll_id);
-      coll_out->setIdentifier((*p_ovl)->identify());
-
-      /** Look for the same ID in the main StoreGate EventStore */ 
-      auto q = outputContainer->indexFind( coll_id );
-      if( q != outputContainer->end() ) {
-      /**Need to merge the collections
-         Retrieve q */
-         std::unique_ptr <TRT_RDO_Collection> coll_data ((TRT_RDO_Collection *) *q );
-         int det =  m_trt_id->barrel_ec( (*p_ovl)->identify() );
-         mergeTRTCollections(coll_data.get(),coll_ovl.get(),coll_out.get(), occupancyMap[det], SDO_Map);
-         
-         outputContainer->removeCollection(p_ovl.hashId());
-         if (outputContainer->addCollection(coll_out.release(), p_ovl.hashId()).isFailure() ) {
-            ATH_MSG_WARNING( "overlay addCollection failed "  ); 
-         }
-      }
-      else {
-       /** Copy the complete collection from ovl to output, 
-           hopefully preserving the "most derived" type of its raw data */ 
-       if ( outputContainer->addCollection(coll_ovl.release(), coll_id).isFailure() ) {
-          ATH_MSG_WARNING(  "add mc Collection failed " ); 
-      }
-    }   
-  }                               
-}
-
-
-
-//================================================================
-void InDetOverlay::mergeTRTCollections(TRT_RDO_Collection *mc_coll, 
-                                       TRT_RDO_Collection *data_coll, 
-                                       TRT_RDO_Collection *out_coll, 
-                                       double occupancy,
-                                       const InDetSimDataCollection& SDO_Map) 
-{
-   
-  if(mc_coll->identify() != data_coll->identify()) {
-    std::ostringstream os;
-    os<<"mergeCollectionsNew<generic>(): collection Id mismatch";
-    ATH_MSG_FATAL(os.str());
-    throw std::runtime_error(os.str());
-  }
-
-  const Identifier idColl = mc_coll->identify();
-
-  // ----------------------------------------------------------------
-  // debug
-  static bool first_time = true;
-  if(first_time) {
-    first_time = false;
-    ATH_MSG_INFO( "mergeTRTCollections():  code is called ");
-  }
-
-  // ----------------------------------------------------------------
-
-  TRT_RDO_Collection data(data_coll->identifyHash());
-  data.setIdentifier(idColl);
-  data_coll->swap(data);
-
-  TRT_RDO_Collection mc(mc_coll->identifyHash());
-  mc.setIdentifier(idColl);
-  mc_coll->swap(mc);
-
-  //################################################################
-  // Merge by copying ptrs from data and mc to mc_coll
-
-  unsigned int idata = 0;
-  unsigned int imc   = 0;
- 
-  while( (idata < data.size()) || (imc < mc.size())) {
-
-    // The RDO that goes to the output at the end of this step.
-    TRT_RDORawData *p_rdo(0);
-  
-    if(imc == mc.size()) {
-      // just copy the remaining data inputs
-      data.swapElement(idata++, 0, p_rdo);
-    }
-    else if(idata == data.size()) {
-      //just copy the remaining MC digits
-      mc.swapElement(imc++, 0, p_rdo);
-    }
-    else {
-      // Need to decide which one goes first.  
-      // See comments in TRTDigitization.cxx about the assumption that id1<id2 <=> hash1<hash2
-      if( mc[imc]->identify() < data[idata]->identify() ) {
-        mc.swapElement(imc++, 0, p_rdo);
-      }
-      else if(data[idata]->identify() < mc[imc]->identify()) {
-        data.swapElement(idata++, 0, p_rdo);
-      }
-      else {
-        // The hits are on the same channel.
-        TRT_RDORawData *p2(0);
-        data.swapElement(idata++, 0, p2);
-        mc.swapElement(imc++, 0, p_rdo);
-
-        TRT_LoLumRawData *pr1 = dynamic_cast<TRT_LoLumRawData*>(p_rdo);
-        const TRT_LoLumRawData *pr2 = dynamic_cast<const TRT_LoLumRawData*>(p2);
-
-        if(pr1 && pr2) {
-          // the actual merging
-          pr1->merge(*pr2);
-        
-          //If the hit is not already a high level hit 
-          if( !(pr1->getWord() & 0x04020100) ) {
-            
-            //Determine if the hit is from an electron or not
-            bool isElectron = false;
-            Identifier rdoId = p_rdo->identify();
-            InDetSimDataCollection::const_iterator sdoIter(SDO_Map.find(rdoId));
-            if( sdoIter != SDO_Map.end() ){
-              const std::vector< InDetSimData::Deposit >& deposits = sdoIter->second.getdeposits();
-              for ( const auto& deposit: deposits ){
-                const auto& particleLink = deposit.first;
-                if( particleLink.isValid() ){
-                  if( abs( particleLink->pdg_id() ) == 11 ){
-                    isElectron = true;
-                  }
-                }
-              }
-            }
-
-            
-            unsigned int newword = 0;
-            //Get random number 
-            int det =  m_trt_id->barrel_ec( pr1->identify() );
-            float HTOccupancyCorrection = 0;
-            if(isElectron){ 
-              HTOccupancyCorrection = abs(det) > 1 ? m_HTOccupancyCorrectionEC : m_HTOccupancyCorrectionB;  
-            } else { 
-              HTOccupancyCorrection = abs(det) > 1 ? m_HTOccupancyCorrectionEC_noE : m_HTOccupancyCorrectionB_noE; 
-            }
-
-            if( occupancy * HTOccupancyCorrection > CLHEP::RandFlat::shoot( m_rndmEngine, 0, 1) ) 
-              newword += 1 << (26-9);
-            //
-            TRT_LoLumRawData newrdo( pr1->identify(), newword); 
-            pr1->merge(newrdo);
-          }  
-        } else {
-          ATH_MSG_WARNING("TRT RDO is the wrong format");
-        }
-      
-        Overlay::mergeChannelData(*p_rdo, *p2, this);
-        delete p2;
-      }
-    }
-
-    out_coll->push_back(p_rdo);
-  } // <= while
-}
-
-
-
-
-
-
-//================================================================
-//EOF
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/PixelOverlay.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/PixelOverlay.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..3764e37f2d570721cf7fd6fa2725e3af0454ef8d
--- /dev/null
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/PixelOverlay.cxx
@@ -0,0 +1,96 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "InDetOverlay/PixelOverlay.h"
+
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/WriteHandle.h"
+
+namespace Overlay
+{
+  // Specialize copyCollection() for the Pixel
+  template<> void copyCollection(const InDetRawDataCollection<PixelRDORawData> *input_coll, InDetRawDataCollection<PixelRDORawData> *copy_coll)
+  {
+    copy_coll->setIdentifier(input_coll->identify());
+    InDetRawDataCollection<PixelRDORawData>::const_iterator firstData = input_coll->begin();
+    InDetRawDataCollection<PixelRDORawData>::const_iterator lastData = input_coll->end();	
+    for ( ; firstData != lastData; ++firstData)
+    {	
+      const Identifier ident = (*firstData)->identify();
+      const unsigned int word = (*firstData)->getWord();
+      Pixel1RawData *newData = new Pixel1RawData(ident, word);
+      copy_coll->push_back(newData);
+    }
+  }
+} // namespace Overlay
+
+
+PixelOverlay::PixelOverlay(const std::string &name, ISvcLocator *pSvcLocator)
+  : IDC_OverlayBase(name, pSvcLocator)
+{
+  
+}
+
+StatusCode PixelOverlay::initialize()
+{
+  ATH_MSG_DEBUG("Initializing...");
+
+  if (!m_includeBkg) {
+    ATH_MSG_DEBUG("Disabling use of background RDOs...");
+    ATH_CHECK( m_bkgInputKey.assign("") );
+  }
+
+  // Check and initialize keys
+  ATH_CHECK( m_bkgInputKey.initialize(!m_bkgInputKey.key().empty()) );
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_bkgInputKey);
+  ATH_CHECK( m_signalInputKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_signalInputKey);
+  ATH_CHECK( m_outputKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputKey);
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode PixelOverlay::execute()
+{
+  ATH_MSG_DEBUG("execute() begin");
+
+  // Reading the input RDOs
+  ATH_MSG_VERBOSE("Retrieving input RDO containers");
+
+  const PixelRDO_Container *bkgContainerPtr = nullptr;
+  if (m_includeBkg) {
+    SG::ReadHandle<PixelRDO_Container> bkgContainer(m_bkgInputKey);
+    if (!bkgContainer.isValid()) {
+      ATH_MSG_ERROR("Could not get background Pixel RDO container " << bkgContainer.name() << " from store " << bkgContainer.store());
+      return StatusCode::FAILURE;
+    }
+    bkgContainerPtr = bkgContainer.cptr();
+
+    ATH_MSG_DEBUG("Found background Pixel RDO container " << bkgContainer.name() << " in store " << bkgContainer.store());
+    ATH_MSG_DEBUG("Pixel Background = " << shortPrint(bkgContainer.cptr()));
+  }
+
+  SG::ReadHandle<PixelRDO_Container> signalContainer(m_signalInputKey);
+  if (!signalContainer.isValid()) {
+    ATH_MSG_ERROR("Could not get signal Pixel RDO container " << signalContainer.name() << " from store " << signalContainer.store());
+    return StatusCode::FAILURE;
+  }
+  ATH_MSG_DEBUG("Found signal Pixel RDO container " << signalContainer.name() << " in store " << signalContainer.store());
+  ATH_MSG_DEBUG("Pixel Signal     = " << shortPrint(signalContainer.cptr()));
+
+  // Creating output RDO container
+  SG::WriteHandle<PixelRDO_Container> outputContainer(m_outputKey);
+  ATH_CHECK(outputContainer.record(std::make_unique<PixelRDO_Container>(signalContainer->size())));
+  ATH_MSG_DEBUG("Recorded output Pixel RDO container " << outputContainer.name() << " in store " << outputContainer.store());
+
+  if (outputContainer.isValid()) {
+    overlayContainerNew(bkgContainerPtr, signalContainer.cptr(), outputContainer.ptr());
+
+    ATH_MSG_DEBUG("Pixel Result   = " << shortPrint(outputContainer.ptr()));
+  }
+
+  ATH_MSG_DEBUG("execute() end");
+  return StatusCode::SUCCESS;
+}
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/SCTOverlay.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/SCTOverlay.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..07e5c0052e63a043059da315bc8b9da3a0ac600e
--- /dev/null
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/SCTOverlay.cxx
@@ -0,0 +1,252 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "InDetIdentifier/SCT_ID.h"
+#include "InDetOverlay/SCTOverlay.h"
+
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/WriteHandle.h"
+
+namespace Overlay
+{
+  // Specialize copyCollection() for the SCT
+  template<> void copyCollection(const InDetRawDataCollection<SCT_RDORawData> *input_coll, InDetRawDataCollection<SCT_RDORawData> *copy_coll)
+  {  
+    copy_coll->setIdentifier(input_coll->identify());
+    InDetRawDataCollection<SCT_RDORawData>::const_iterator firstData = input_coll->begin();
+    InDetRawDataCollection<SCT_RDORawData>::const_iterator lastData = input_coll->end();	
+    for ( ; firstData != lastData; ++firstData)
+    {	
+      const Identifier ident = (*firstData)->identify();
+      const unsigned int word = (*firstData)->getWord();
+      const SCT3_RawData* oldData = dynamic_cast<const SCT3_RawData*>(*firstData);	
+      std::vector<int> errorHit=oldData->getErrorCondensedHit();
+      SCT3_RawData *newData=new SCT3_RawData(ident, word, &errorHit);
+      copy_coll->push_back(newData);
+    }
+  }
+
+  // Specialize mergeCollectionsNew() for the SCT
+  template<> void mergeCollectionsNew(InDetRawDataCollection<SCT_RDORawData> *bkgCollection,
+                                      InDetRawDataCollection<SCT_RDORawData> *signalCollection,
+                                      InDetRawDataCollection<SCT_RDORawData> *outputCollection,
+                                      IDC_OverlayBase *tmp)
+  {
+    // We want to use the SCT_ID helper provided by SCTOverlay, thus the constraint
+    SCTOverlay *parent = dynamic_cast<SCTOverlay*>(tmp);
+    if (!parent) {
+      std::ostringstream os;
+      os << "mergeCollectionsNew<SCT_RDORawData>() called by a wrong parent algorithm?  Must be SCTOverlay.";
+      throw std::runtime_error(os.str());
+    }
+
+    // ----------------------------------------------------------------
+    // debug
+    static bool first_time = true;
+    if (first_time) {
+      first_time = false;
+      parent->msg(MSG::INFO) << "SCTOverlay::mergeCollectionsNew(): "
+                             << " SCT specific code is called for "
+                             << typeid(*bkgCollection).name()
+                             << endmsg;
+    }
+
+    // ----------------------------------------------------------------
+    // Useful reading:
+    //
+    // Real data are handled like this:
+    //
+    // https://svnweb.cern.ch/trac/atlasoff/browser/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/trunk/src/SCT_RodDecoder.cxx?rev=332542
+    //
+    // Note that SCT3 is hardcoded (no chance to get SCT1 from real data).
+    // The SCT3 format is also the default in digitization:
+    //
+    // https://svnweb.cern.ch/trac/atlasoff/browser/InnerDetector/InDetDigitization/SCT_Digitization/trunk/src/SCT_Digitization.cxx?rev=355953
+
+    // So we'll just go with SCT3.
+    //
+    // The client code that consumes SCT RDOs:
+    //
+    // http://alxr.usatlas.bnl.gov/lxr/source/atlas/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx
+
+
+    // ----------------------------------------------------------------
+    if (bkgCollection->identify() != signalCollection->identify()) {
+      std::ostringstream os;
+      os << "mergeCollectionsNew<SCT_RDORawData>(): collection Id mismatch";
+      parent->msg(MSG::FATAL) << os.str() << endmsg;
+      throw std::runtime_error(os.str());
+    }
+
+    const Identifier idColl = parent->get_sct_id()->wafer_id(signalCollection->identifyHash());
+
+    // Empty the input collections and move RDOs to local vectors.
+    InDetRawDataCollection<SCT_RDORawData> bkg(bkgCollection->identifyHash());
+    bkg.setIdentifier(idColl);
+    bkgCollection->swap(bkg);
+
+    InDetRawDataCollection<SCT_RDORawData> sig(signalCollection->identifyHash());
+    sig.setIdentifier(idColl);
+    signalCollection->swap(sig);
+
+    // Strip hit timing information for Next, Current, Previous and Any BCs
+    // Prepare one more strip to create the last one. The additional strip has no hits.
+    std::bitset<SCTOverlay::NumberOfStrips+1> stripInfo[SCTOverlay::NumberOfBitSets];
+    // Process background and signal in the wafer
+    for (unsigned source = SCTOverlay::BkgSource; source < SCTOverlay::NumberOfSources; source++) {
+      InDetRawDataCollection<SCT_RDORawData>::const_iterator rdo;
+      InDetRawDataCollection<SCT_RDORawData>::const_iterator rdoEnd;
+      if (source == SCTOverlay::BkgSource) { // background
+        rdo = bkg.begin();
+        rdoEnd = bkg.end();
+      } else { // signal
+        rdo = sig.begin();
+        rdoEnd = sig.end();
+      } 
+      // Loop over all RDOs in the wafer
+      for (; rdo!=rdoEnd; ++rdo) {
+        const SCT3_RawData* rdo3 = dynamic_cast<const SCT3_RawData*>(*rdo);
+        if (!rdo3) {
+          std::ostringstream os;
+          const auto& elt = **rdo;
+          os << "mergeCollectionNew<SCT_RDORawData>(): wrong datum format. Only SCT3_RawData are produced by SCT_RodDecoder and supported by overlay."
+             << "For the supplied datum  typeid(datum).name() = " << typeid(elt).name();
+          throw std::runtime_error(os.str());
+        }
+        int strip = parent->get_sct_id()->strip(rdo3->identify());
+        int stripEnd = strip + rdo3->getGroupSize();
+        int timeBin = rdo3->getTimeBin();
+        for (; strip < stripEnd && strip < SCTOverlay::NumberOfStrips; strip++) {
+          // Fill timing information for each strips, loop over 3 BCs
+          for (unsigned int bc = SCTOverlay::NextBC; bc < SCTOverlay::NumberOfBCs; bc++) {
+            if (timeBin & (1 << bc)) stripInfo[bc].set(strip);
+          }
+        }
+      }
+    }
+    // Get OR for AnyBC, loop over 3 BCs
+    for (unsigned int bc = SCTOverlay::NextBC; bc < SCTOverlay::NumberOfBCs; bc++) {
+      stripInfo[SCTOverlay::AnyBC] |= stripInfo[bc];
+    }
+    // Check if we need to use Expanded mode by checking if there is at least one hit in Next BC or Previous BC
+    bool anyNextBCHits = stripInfo[SCTOverlay::NextBC].any();
+    bool anyPreivousBCHits = stripInfo[SCTOverlay::PreviousBC].any();
+    bool isExpandedMode = (anyNextBCHits or anyPreivousBCHits);
+    // No error information is recorded because this information is not filled in data and no errors are assumed in MC.
+    const int ERRORS = 0;
+    const std::vector<int> errvec{};
+    if (isExpandedMode) {
+      // Expanded mode (record strip one by one)
+      const int groupSize = 1;
+      int tbin = 0;
+      for (unsigned int strip = 0; strip < SCTOverlay::NumberOfStrips; strip++) {
+        if (stripInfo[SCTOverlay::AnyBC][strip]) {
+          tbin = 0;
+          for (unsigned int bc = SCTOverlay::NextBC; bc < SCTOverlay::NumberOfBCs; bc++) {
+            if (stripInfo[bc][strip]) {
+              tbin |= (1 << bc);
+            }
+          }
+          unsigned int SCT_Word = (groupSize | (strip << 11) | (tbin <<22) | (ERRORS << 25));
+          Identifier rdoId = parent->get_sct_id()->strip_id(idColl, strip) ;
+          outputCollection->push_back(new SCT3_RawData(rdoId, SCT_Word, &errvec));
+        }
+      }
+    } else {
+      // We can record consecutive hits into one RDO if all hits have timeBin of 010.
+      unsigned int groupSize = 0;
+      const int tbin = (1 << SCTOverlay::CurrentBC);
+      for (unsigned int strip=0; strip<SCTOverlay::NumberOfStrips+1; strip++) { // Loop over one more strip to create the last one if any
+        if (stripInfo[SCTOverlay::AnyBC][strip]) {
+          groupSize++;
+        } else {
+          if (groupSize>0) {
+            unsigned int firstStrip = strip - groupSize;
+            unsigned int SCT_Word = (groupSize | (firstStrip << 11) | (tbin <<22) | (ERRORS << 25));
+            Identifier rdoId = parent->get_sct_id()->strip_id(idColl, firstStrip) ;
+            outputCollection->push_back(new SCT3_RawData(rdoId, SCT_Word, &errvec));
+            groupSize = 0;
+          }
+        }
+      }
+    }
+  } // mergeCollectionsNew()
+} // namespace Overlay
+
+
+SCTOverlay::SCTOverlay(const std::string &name, ISvcLocator *pSvcLocator)
+  : IDC_OverlayBase(name, pSvcLocator),
+    m_sctId(nullptr)
+{
+  
+}
+
+StatusCode SCTOverlay::initialize()
+{
+  ATH_MSG_DEBUG("Initializing...");
+
+  if (!m_includeBkg) {
+    ATH_MSG_DEBUG("Disabling use of background RDOs...");
+    ATH_CHECK( m_bkgInputKey.assign("") );
+  }
+
+  // Check and initialize keys
+  ATH_CHECK( m_bkgInputKey.initialize(!m_bkgInputKey.key().empty()) );
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_bkgInputKey);
+  ATH_CHECK( m_signalInputKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_signalInputKey);
+  ATH_CHECK( m_outputKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputKey);
+
+  // Retrieve SCT ID helper
+  if (!detStore()->retrieve(m_sctId, "SCT_ID").isSuccess() || !m_sctId) {
+    ATH_MSG_FATAL("Cannot retrieve SCT ID helper");
+    return StatusCode::FAILURE;
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode SCTOverlay::execute()
+{
+  ATH_MSG_DEBUG("execute() begin");
+  
+  // Reading the input RDOs
+  ATH_MSG_VERBOSE("Retrieving input RDO containers");
+
+  const SCT_RDO_Container *bkgContainerPtr = nullptr;
+  if (m_includeBkg) {
+    SG::ReadHandle<SCT_RDO_Container> bkgContainer(m_bkgInputKey);
+    if (!bkgContainer.isValid()) {
+      ATH_MSG_ERROR("Could not get background SCT RDO container " << bkgContainer.name() << " from store " << bkgContainer.store());
+      return StatusCode::FAILURE;
+    }
+    bkgContainerPtr = bkgContainer.cptr();
+
+    ATH_MSG_DEBUG("Found background SCT RDO container " << bkgContainer.name() << " in store " << bkgContainer.store());
+    ATH_MSG_DEBUG("SCT Background = " << shortPrint(bkgContainer.cptr(), 50));
+  }
+
+  SG::ReadHandle<SCT_RDO_Container> signalContainer(m_signalInputKey);
+  if (!signalContainer.isValid()) {
+    ATH_MSG_ERROR("Could not get signal SCT RDO container " << signalContainer.name() << " from store " << signalContainer.store());
+    return StatusCode::FAILURE;
+  }
+  ATH_MSG_DEBUG("Found signal SCT RDO container " << signalContainer.name() << " in store " << signalContainer.store());
+  ATH_MSG_DEBUG("SCT Signal     = " << shortPrint(signalContainer.cptr(), 50));
+
+  // Creating output RDO container
+  SG::WriteHandle<SCT_RDO_Container> outputContainer(m_outputKey);
+  ATH_CHECK(outputContainer.record(std::make_unique<SCT_RDO_Container>(signalContainer->size())));
+  ATH_MSG_DEBUG("Recorded output SCT RDO container " << outputContainer.name() << " in store " << outputContainer.store());
+
+  if (outputContainer.isValid()) {
+    overlayContainerNew(bkgContainerPtr, signalContainer.cptr(), outputContainer.ptr());
+
+    ATH_MSG_DEBUG("SCT Result   = " << shortPrint(outputContainer.ptr(), 50));
+  }
+
+  ATH_MSG_DEBUG("execute() end");
+  return StatusCode::SUCCESS;
+}
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..edd963f9abc12b18d2dcb36c3a010284657a2925
--- /dev/null
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx
@@ -0,0 +1,366 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "AthenaKernel/IAtRndmGenSvc.h"
+#include "CLHEP/Random/RandomEngine.h"
+#include "CLHEP/Random/RandFlat.h"
+#include "CLHEP/Units/SystemOfUnits.h"
+#include "GeneratorObjects/McEventCollection.h"
+
+#include "InDetIdentifier/TRT_ID.h"
+#include "InDetOverlay/TRTOverlay.h"
+#include "InDetRawData/InDetRawData.h"
+#include "InDetRawData/TRT_LoLumRawData.h"
+#include "InDetRawData/TRT_RDORawData.h"
+#include "InDetSimData/InDetSimDataCollection.h"
+
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/WriteHandle.h"
+
+namespace Overlay
+{
+  // Specialize mergeChannelData() for the TRT
+  template<> void mergeChannelData(TRT_RDORawData &r1, const TRT_RDORawData &r2, IDC_OverlayBase *parent)
+  {
+
+    // ----------------------------------------------------------------
+    // debug
+    static bool first_time = true;
+    if (first_time) {
+      first_time = false;
+      parent->msg(MSG::INFO) << "Overlay::mergeChannelData(): "
+                             << "TRT specific code is called for "
+                             << typeid(TRT_RDORawData).name()
+                             << endmsg;
+    }
+
+    // ----------------------------------------------------------------
+    // FIXME: That should really be a call to r1.merge(r2);
+
+    TRT_LoLumRawData *pr1 = dynamic_cast<TRT_LoLumRawData*>(&r1);
+    const TRT_LoLumRawData *pr2 = dynamic_cast<const TRT_LoLumRawData*>(&r2);
+
+    if (pr1 && pr2) {
+      // the actual merging
+      pr1->merge(*pr2);
+    }
+  } // mergeChannelData()
+
+  // Specialize copyCollection() for the TRT
+  template<> void copyCollection(const InDetRawDataCollection<TRT_RDORawData> *input_coll, InDetRawDataCollection<TRT_RDORawData> *copy_coll)
+  {
+    copy_coll->setIdentifier(input_coll->identify());
+    InDetRawDataCollection<TRT_RDORawData>::const_iterator firstData = input_coll->begin();
+    InDetRawDataCollection<TRT_RDORawData>::const_iterator lastData = input_coll->end();
+    for ( ; firstData != lastData; ++firstData)
+    {
+	    const Identifier ident = (*firstData)->identify();
+	    const unsigned int word = (*firstData)->getWord();
+	    TRT_LoLumRawData *newData = new TRT_LoLumRawData(ident, word);
+	    copy_coll->push_back(newData);
+    }
+  }
+} // namespace Overlay
+
+
+TRTOverlay::TRTOverlay(const std::string &name, ISvcLocator *pSvcLocator)
+  : IDC_OverlayBase(name, pSvcLocator),
+    m_trtId(nullptr),
+    m_rndmSvc("AtRndmGenSvc",name),
+    m_rndmEngineName("TRTOverlay"),
+    m_rndmEngine(nullptr),
+    m_TRT_LocalOccupancyTool("TRT_LocalOccupancy")
+{
+  declareProperty("RndmSvc", m_rndmSvc, "Random Number Service");
+  declareProperty("RndmEngine", m_rndmEngineName, "Random engine name");
+
+  declareProperty("TRT_LocalOccupancyTool", m_TRT_LocalOccupancyTool);
+
+  declareProperty("TRT_HT_OccupancyCorrectionBarrel", m_HTOccupancyCorrectionB=0.160);
+  declareProperty("TRT_HT_OccupancyCorrectionEndcap", m_HTOccupancyCorrectionEC=0.130);
+  declareProperty("TRT_HT_OccupancyCorrectionBarrelNoE", m_HTOccupancyCorrectionB_noE=0.105);
+  declareProperty("TRT_HT_OccupancyCorrectionEndcapNoE", m_HTOccupancyCorrectionEC_noE=0.080);
+}
+
+StatusCode TRTOverlay::initialize()
+{
+  ATH_MSG_DEBUG("Initializing...");
+
+  if (!m_includeBkg) {
+    ATH_MSG_DEBUG("Disabling use of background RDOs...");
+    ATH_CHECK( m_bkgInputKey.assign("") );
+  }
+
+  // Check and initialize keys
+  ATH_CHECK( m_bkgInputKey.initialize(!m_bkgInputKey.key().empty()) );
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_bkgInputKey);
+  ATH_CHECK( m_signalInputKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_signalInputKey);
+  ATH_CHECK( m_outputKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputKey);
+  ATH_CHECK( m_signalInputSDOKey.initialize() );
+  ATH_MSG_VERBOSE("Initialized ReadHandleKey for SDO: " << m_signalInputSDOKey);
+
+  // Retrieve TRT ID helper
+  if (!detStore()->retrieve(m_trtId, "TRT_ID").isSuccess() || !m_trtId) {
+    ATH_MSG_FATAL("Cannot retrieve TRT ID helper");
+    return StatusCode::FAILURE;
+  }
+
+  // Initialize random number generator
+  CHECK(m_rndmSvc.retrieve());
+  m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName);
+  if (!m_rndmEngine) {
+    ATH_MSG_ERROR("Could not find RndmEngine : " << m_rndmEngineName);
+    return StatusCode::FAILURE;
+  } else {
+    ATH_MSG_DEBUG("Found RndmEngine : " << m_rndmEngineName);
+  }
+
+  // Retrieve TRT local occupancy tool
+  CHECK(m_TRT_LocalOccupancyTool.retrieve());
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TRTOverlay::execute() {
+  ATH_MSG_DEBUG("execute() begin");
+
+  // Reading the input RDOs
+  ATH_MSG_VERBOSE("Retrieving input RDO containers");
+
+  const TRT_RDO_Container *bkgContainerPtr = nullptr;
+  if (m_includeBkg) {
+    SG::ReadHandle<TRT_RDO_Container> bkgContainer(m_bkgInputKey);
+    if (!bkgContainer.isValid()) {
+      ATH_MSG_ERROR("Could not get background TRT RDO container " << bkgContainer.name() << " from store " << bkgContainer.store());
+      return StatusCode::FAILURE;
+    }
+    bkgContainerPtr = bkgContainer.cptr();
+
+    ATH_MSG_DEBUG("Found background TRT RDO container " << bkgContainer.name() << " in store " << bkgContainer.store());
+    ATH_MSG_DEBUG("TRT Background = " << shortPrint(bkgContainer.cptr()));
+  }
+
+  SG::ReadHandle<TRT_RDO_Container> signalContainer(m_signalInputKey);
+  if (!signalContainer.isValid()) {
+    ATH_MSG_ERROR("Could not get signal TRT RDO container " << signalContainer.name() << " from store " << signalContainer.store());
+    return StatusCode::FAILURE;
+  }
+  ATH_MSG_DEBUG("Found signal TRT RDO container " << signalContainer.name() << " in store " << signalContainer.store());
+  ATH_MSG_DEBUG("TRT Signal     = " << shortPrint(signalContainer.cptr()));
+
+  SG::ReadHandle<InDetSimDataCollection> signalSDOContainer(m_signalInputSDOKey);
+  if (!signalSDOContainer.isValid()) {
+    ATH_MSG_ERROR("Could not get signal TRT SDO map container " << signalSDOContainer.name() << " from store " << signalSDOContainer.store());
+    return StatusCode::FAILURE;
+  }
+  ATH_MSG_DEBUG("Found signal TRT SDO map container " << signalSDOContainer.name() << " in store " << signalSDOContainer.store());
+
+  // Creating output RDO container
+  SG::WriteHandle<TRT_RDO_Container> outputContainer(m_outputKey);
+  ATH_CHECK(outputContainer.record(std::make_unique<TRT_RDO_Container>(signalContainer->size())));
+  ATH_MSG_DEBUG("Recorded output TRT RDO container " << outputContainer.name() << " in store " << outputContainer.store());
+
+  if (outputContainer.isValid()) {
+    // Calculate occupancy here
+    if (m_includeBkg) {
+      std::map<int, double> occupancy = m_TRT_LocalOccupancyTool->getDetectorOccupancy(bkgContainerPtr);
+
+      //Merge containers
+      overlayTRTContainers(bkgContainerPtr, signalContainer.cptr(), outputContainer.ptr(), occupancy, *signalSDOContainer);
+    } else {
+      overlayContainerNew(bkgContainerPtr, signalContainer.cptr(), outputContainer.ptr());
+    }
+
+    ATH_MSG_DEBUG("TRT Result   = " << shortPrint(outputContainer.ptr()));
+  }
+
+  ATH_MSG_DEBUG("execute() end");
+  return StatusCode::SUCCESS;
+}
+
+void TRTOverlay::overlayTRTContainers(const TRT_RDO_Container *bkgContainer,
+                                      const TRT_RDO_Container *signalContainer,
+                                      TRT_RDO_Container *outputContainer,
+                                      std::map<int, double> &occupancyMap,
+                                      const InDetSimDataCollection &SDO_Map)
+{
+   /** Add data from the background container to the output one */
+   if (bkgContainer) {
+     TRT_RDO_Container::const_iterator p_bkg = bkgContainer->begin();
+     TRT_RDO_Container::const_iterator p_bkg_end = bkgContainer->end();
+
+     for(; p_bkg != p_bkg_end; ++p_bkg) {
+       IdentifierHash hashId = p_bkg.hashId();
+       auto coll_bkg = std::make_unique<TRT_RDO_Collection>(hashId);
+       Overlay::copyCollection(*p_bkg, coll_bkg.get());
+
+       if (outputContainer->addCollection(coll_bkg.release(), p_bkg.hashId() ).isFailure()) {
+         ATH_MSG_WARNING("add background Collection failed for output " << p_bkg.hashId());
+       }
+     }
+   }
+
+   /** Add data from the signal container to the output one */
+   TRT_RDO_Container::const_iterator p_signal = signalContainer->begin();
+   TRT_RDO_Container::const_iterator p_signal_end = signalContainer->end();
+
+   for (; p_signal != p_signal_end; ++p_signal) {
+
+      IdentifierHash coll_id = p_signal.hashId();
+      auto coll_signal = std::make_unique<TRT_RDO_Collection>(coll_id);
+      Overlay::copyCollection( *p_signal, coll_signal.get() ) ;
+
+      /** The newly created stuff will go to the output EventStore SG */
+      auto coll_out = std::make_unique<TRT_RDO_Collection>(coll_id);
+      coll_out->setIdentifier((*p_signal)->identify());
+
+      /** Look for the same ID in the main StoreGate EventStore */
+      auto q = outputContainer->indexFind( coll_id );
+      if ( q != outputContainer->end() ) {
+      /**Need to merge the collections
+         Retrieve q */
+         std::unique_ptr <TRT_RDO_Collection> coll_bkg ((TRT_RDO_Collection *) *q);
+         int det =  m_trtId->barrel_ec( (*p_signal)->identify() );
+         mergeTRTCollections(coll_bkg.get(), coll_signal.get(), coll_out.get(), occupancyMap[det], SDO_Map);
+
+         outputContainer->removeCollection(p_signal.hashId());
+         if (outputContainer->addCollection(coll_out.release(), coll_id).isFailure() ) {
+            ATH_MSG_WARNING( "overlay addCollection failed " );
+         }
+      }
+      else {
+       /** Copy the complete collection from signal to output,
+           hopefully preserving the "most derived" type of its raw data */
+       if ( outputContainer->addCollection(coll_signal.release(), coll_id).isFailure() ) {
+          ATH_MSG_WARNING("add signal Collection failed for output " << coll_id);
+      }
+    }
+  }
+}
+
+void TRTOverlay::mergeTRTCollections(TRT_RDO_Collection *bkgCollection,
+                                     TRT_RDO_Collection *signalCollection,
+                                     TRT_RDO_Collection *outputCollection,
+                                     double occupancy,
+                                     const InDetSimDataCollection& SDO_Map)
+{
+
+  if (bkgCollection->identify() != signalCollection->identify()) {
+    std::ostringstream os;
+    os << "mergeTRTCollections<generic>(): collection Id mismatch";
+    ATH_MSG_FATAL(os.str());
+    throw std::runtime_error(os.str());
+  }
+
+  const Identifier idColl = bkgCollection->identify();
+
+  // ----------------------------------------------------------------
+  // debug
+  static bool first_time = true;
+  if (first_time) {
+    first_time = false;
+    ATH_MSG_INFO( "mergeTRTCollections():  code is called ");
+  }
+
+  // ----------------------------------------------------------------
+
+  TRT_RDO_Collection bkg(bkgCollection->identifyHash());
+  bkg.setIdentifier(idColl);
+  bkgCollection->swap(bkg);
+
+  TRT_RDO_Collection sig(signalCollection->identifyHash());
+  sig.setIdentifier(idColl);
+  signalCollection->swap(sig);
+
+  //################################################################
+  // Merge by copying ptrs from background and signal to signalCollection
+
+  unsigned int ibkg = 0;
+  unsigned int isig = 0;
+
+  while( (ibkg < bkg.size()) || (isig < sig.size())) {
+
+    // The RDO that goes to the output at the end of this step.
+    TRT_RDORawData *p_rdo(0);
+
+    if(isig == sig.size()) {
+      // just copy the remaining data inputs
+      bkg.swapElement(ibkg++, 0, p_rdo);
+    }
+    else if(ibkg == bkg.size()) {
+      //just copy the remaining MC digits
+      sig.swapElement(isig++, 0, p_rdo);
+    }
+    else {
+      // Need to decide which one goes first.
+      // See comments in TRTDigitization.cxx about the assumption that id1<id2 <=> hash1<hash2
+      if( sig[isig]->identify() < bkg[ibkg]->identify() ) {
+        sig.swapElement(isig++, 0, p_rdo);
+      }
+      else if(bkg[ibkg]->identify() < sig[isig]->identify()) {
+        bkg.swapElement(ibkg++, 0, p_rdo);
+      }
+      else {
+        // The hits are on the same channel.
+        TRT_RDORawData *p2(0);
+        bkg.swapElement(ibkg++, 0, p2);
+        sig.swapElement(isig++, 0, p_rdo);
+
+        TRT_LoLumRawData *pr1 = dynamic_cast<TRT_LoLumRawData*>(p_rdo);
+        const TRT_LoLumRawData *pr2 = dynamic_cast<const TRT_LoLumRawData*>(p2);
+
+        if(pr1 && pr2) {
+          // the actual merging
+          pr1->merge(*pr2);
+
+          //If the hit is not already a high level hit
+          if( !(pr1->getWord() & 0x04020100) ) {
+
+            //Determine if the hit is from an electron or not
+            bool isElectron = false;
+            Identifier rdoId = p_rdo->identify();
+            InDetSimDataCollection::const_iterator sdoIter(SDO_Map.find(rdoId));
+            if( sdoIter != SDO_Map.end() ){
+              const std::vector< InDetSimData::Deposit >& deposits = sdoIter->second.getdeposits();
+              for ( const auto& deposit: deposits ){
+                const auto& particleLink = deposit.first;
+                if( particleLink.isValid() ){
+                  if( abs( particleLink->pdg_id() ) == 11 ){
+                    isElectron = true;
+                  }
+                }
+              }
+            }
+
+
+            unsigned int newword = 0;
+            //Get random number
+            int det =  m_trtId->barrel_ec( pr1->identify() );
+            float HTOccupancyCorrection = 0;
+            if(isElectron){
+              HTOccupancyCorrection = abs(det) > 1 ? m_HTOccupancyCorrectionEC : m_HTOccupancyCorrectionB;
+            } else {
+              HTOccupancyCorrection = abs(det) > 1 ? m_HTOccupancyCorrectionEC_noE : m_HTOccupancyCorrectionB_noE;
+            }
+
+            if( occupancy * HTOccupancyCorrection > CLHEP::RandFlat::shoot( m_rndmEngine, 0, 1) )
+              newword += 1 << (26-9);
+            //
+            TRT_LoLumRawData newrdo( pr1->identify(), newword);
+            pr1->merge(newrdo);
+          }
+        } else {
+          ATH_MSG_WARNING("TRT RDO is the wrong format");
+        }
+
+        Overlay::mergeChannelData(*p_rdo, *p2, this);
+        delete p2;
+      }
+    }
+
+    outputCollection->push_back(p_rdo);
+  } // <= while
+}
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/components/InDetOverlay_entries.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/components/InDetOverlay_entries.cxx
index de4d431be4a20cca5eb242779cd19715eb926912..581212fbb98709a4a5613ca18e9abec53cef663a 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/src/components/InDetOverlay_entries.cxx
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/components/InDetOverlay_entries.cxx
@@ -1,7 +1,12 @@
-#include "InDetOverlay/InDetOverlay.h"
+#include "InDetOverlay/PixelOverlay.h"
+#include "InDetOverlay/SCTOverlay.h"
+#include "InDetOverlay/TRTOverlay.h"
+
 #include "InDetOverlay/InDetSDOOverlay.h"
 
-DECLARE_COMPONENT( InDetOverlay )
 DECLARE_COMPONENT( InDetSDOOverlay )
   
+DECLARE_COMPONENT( PixelOverlay )
+DECLARE_COMPONENT( SCTOverlay )
+DECLARE_COMPONENT( TRTOverlay )
 
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h
index e0c8b46a4add02b59e4daddaccce1dea10aa7425..12bdcede03a1c998f7383a4ea6e4c374797525bb 100755
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h
@@ -142,8 +142,8 @@ private:
   bool m_calibrateCharge;
   ServiceHandle<IPixelCalibSvc> m_calibSvc;
   ServiceHandle<IPixelOfflineCalibSvc> m_offlineCalibSvc;
-  ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool{this, "PixelLorentzAngleTool", "PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"};
-  ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"};
+  ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool{this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"};
+  ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"};
 
   // Parametrization of the Pixel errors
   // now moved in PixelConditionsData, except for CTB parametrization
diff --git a/InnerDetector/InDetValidation/InDetGeometryValidation/share/ReadSiDetectorElements_jobOptions.py b/InnerDetector/InDetValidation/InDetGeometryValidation/share/ReadSiDetectorElements_jobOptions.py
index 04285cec4cdec9e0375cd604c02938ee6d523050..4cc37dacaa7efb9e0ef65b705968b3b302f27252 100755
--- a/InnerDetector/InDetValidation/InDetGeometryValidation/share/ReadSiDetectorElements_jobOptions.py
+++ b/InnerDetector/InDetValidation/InDetGeometryValidation/share/ReadSiDetectorElements_jobOptions.py
@@ -83,7 +83,7 @@ pixelSiPropertiesSvc = SiPropertiesSvc(name = "PixelSiPropertiesSvc",
                                      SiConditionsServices = pixelSiliconConditionsSvc)
 ServiceMgr += pixelSiPropertiesSvc
 
-ReadPixelElements.SiLorentzAngleSvc = lorentzAngleSvc.pixel
+ReadPixelElements.SiLorentzAngleTool = lorentzAngleSvc.pixel
 ReadPixelElements.SiPropertiesSvc   = pixelSiPropertiesSvc
 ReadPixelElements.SiConditionsSvc   = pixelSiliconConditionsSvc
 # ReadPixelElements.DetEleCollKey = "PixelDetectorElementCollection"
diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/share/InDetPerformanceRTT_jobOptions.py b/InnerDetector/InDetValidation/InDetPerformanceRTT/share/InDetPerformanceRTT_jobOptions.py
index b6a013c80c30de34e0e42dfbde6cf609a7c0c068..c4300ceadd5af454f681b3ba225a9d99f6350627 100755
--- a/InnerDetector/InDetValidation/InDetPerformanceRTT/share/InDetPerformanceRTT_jobOptions.py
+++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/share/InDetPerformanceRTT_jobOptions.py
@@ -17,13 +17,6 @@ from RecExConfig.RecFlags import rec
 from RecExConfig.RecAlgsFlags import recAlgs
 import MagFieldServices.SetupField
 
-#--------------------------------------------------------------
-# Hack to run over samples Digitized with 20.1 see: https://its.cern.ch/jira/browse/ATLASRECTS-2982
-#--------------------------------------------------------------
-from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SiLorentzAngleSvc;
-SiLorentzAngleSvc.usePixelDefaults=True;
-
-
 #--------------------------------------------------------------
 # Event related parameters and input files
 #--------------------------------------------------------------
diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/share/InDetPerformanceRTT_jobOptions_LowPtTracking.py b/InnerDetector/InDetValidation/InDetPerformanceRTT/share/InDetPerformanceRTT_jobOptions_LowPtTracking.py
index de5b6439213fae7b231bcbed68486eb90dbf0c5d..502a03f552fe7a7b4ae0c9f4c45d9dd077742c9e 100755
--- a/InnerDetector/InDetValidation/InDetPerformanceRTT/share/InDetPerformanceRTT_jobOptions_LowPtTracking.py
+++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/share/InDetPerformanceRTT_jobOptions_LowPtTracking.py
@@ -17,13 +17,6 @@ from RecExConfig.RecFlags import rec
 from RecExConfig.RecAlgsFlags import recAlgs
 import MagFieldServices.SetupField
 
-#--------------------------------------------------------------
-# Hack to run over samples Digitized with 20.1 see: https://its.cern.ch/jira/browse/ATLASRECTS-2982
-#--------------------------------------------------------------
-from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SiLorentzAngleSvc;
-SiLorentzAngleSvc.usePixelDefaults=True;
-
-
 #--------------------------------------------------------------
 # Event related parameters and input files
 #--------------------------------------------------------------
diff --git a/LArCalorimeter/LArCellRec/CMakeLists.txt b/LArCalorimeter/LArCellRec/CMakeLists.txt
index 24ffa1eed644ce7718e97ed239000694226b0d35..8f726c1feee887e9e30bc672539bb1299a79b7a4 100644
--- a/LArCalorimeter/LArCellRec/CMakeLists.txt
+++ b/LArCalorimeter/LArCellRec/CMakeLists.txt
@@ -58,3 +58,15 @@ atlas_add_test( LArBadFebMaskingTool_test
   SCRIPT test/LArBadFebMaskingTool_test.sh
   PROPERTIES TIMEOUT 600
   EXTRA_PATTERNS "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore" )
+
+
+atlas_add_test( LArCellDeadOTXCorr_test
+  SCRIPT test/LArCellDeadOTXCorr_test.sh
+  PROPERTIES TIMEOUT 600
+  EXTRA_PATTERNS "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore" )
+
+
+atlas_add_test( LArCellBuilderFromLArHitTool_test
+  SCRIPT test/LArCellBuilderFromLArHitTool_test.sh
+  PROPERTIES TIMEOUT 600
+  EXTRA_PATTERNS "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore" )
diff --git a/LArCalorimeter/LArCellRec/share/LArBadFebMaskingTool_test.py b/LArCalorimeter/LArCellRec/share/LArBadFebMaskingTool_test.py
index 944249bc8d386ee0077ae6520c04a8fa96c24246..1d0bd762bdcb0e6aeeaa45ccbcaf299f8c7a3fe5 100644
--- a/LArCalorimeter/LArCellRec/share/LArBadFebMaskingTool_test.py
+++ b/LArCalorimeter/LArCellRec/share/LArBadFebMaskingTool_test.py
@@ -8,10 +8,6 @@
 #
 
 
-import os
-os.environ['FRONTIER_SERVER'] = ''
-
-
 from AthenaCommon.DetFlags      import DetFlags
 DetFlags.detdescr.LAr_setOn()
 
diff --git a/LArCalorimeter/LArCellRec/share/LArBadFebMaskingTool_test.ref b/LArCalorimeter/LArCellRec/share/LArBadFebMaskingTool_test.ref
index abc847ab64de8f935facfbd6194e77e7d41ca360..8c332050eafd02c7cac1ba0dee40f4d1ebb2804d 100644
--- a/LArCalorimeter/LArCellRec/share/LArBadFebMaskingTool_test.ref
+++ b/LArCalorimeter/LArCellRec/share/LArBadFebMaskingTool_test.ref
@@ -1,14 +1,14 @@
-Fri Aug 24 22:18:56 CEST 2018
+Mon Sep 10 20:22:17 CEST 2018
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [AthenaWorkDir-22.0.1] [x86_64-slc6-gcc62-opt] [atlas-work3/62743ef4d17] -- built on [2018-08-24T1729]
+Py:Athena            INFO using release [AthenaWorkDir-22.0.1] [x86_64-slc6-gcc7-dbg] [atlas-work3/7a8cc912e78] -- built on [2018-09-10T1501]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "LArCellRec/LArBadFebMaskingTool_test.py"
 SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5508 configurables from 48 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5511 configurables from 52 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 EventInfoMgtInit: Got release version  Athena-22.0.1
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
@@ -29,7 +29,7 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v30r3)
-                                          running on lxplus087.cern.ch on Fri Aug 24 22:19:15 2018
+                                          running on lxplus027.cern.ch on Mon Sep 10 20:22:47 2018
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -37,7 +37,7 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ClassIDSvc           INFO  getRegistryEntries: read 6168 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3191 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
@@ -45,8 +45,9 @@ AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version Athena
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-08-23T2056/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 8 servers found for host lxplus087.cern.ch [ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ]
+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-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus027.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -57,6 +58,7 @@ DbSession            INFO     Open     DbSession
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
+IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
 IOVDbSvc             INFO Folder /LAR/Identifier/OnOffIdMap, adding new key tag with value LARIdentifierOnOffIdMap-012
 IOVDbSvc             INFO Folder /LAR/Identifier/CalibIdMap, adding new key tag with value LARIdentifierCalibIdMap-012
@@ -68,7 +70,7 @@ IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvcTool           INFO IOVRanges will be checked at every Event
-ClassIDSvc           INFO  getRegistryEntries: read 1537 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2098 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_CALO/OFLP200
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
 IOVDbSvc             INFO Disconnecting from COOLOFL_CALO/OFLP200
@@ -95,9 +97,9 @@ IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/Shape
 IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/LArTTCellMapAtlas
 IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/fSampl
 IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/uA2MeV
-ClassIDSvc           INFO  getRegistryEntries: read 17 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 4298 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 9 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 22 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4896 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 18 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -156,7 +158,7 @@ BarrelConstruction   INFO   Use sagging in geometry  ? 0
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EventPersistenc...   INFO Added successfully Conversion service:DetDescrCnvSvc
-ClassIDSvc           INFO  getRegistryEntries: read 1931 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3150 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileTBID helper object in the detector store
 IdDictDetDescrCnv    INFO in initialize
 IdDictDetDescrCnv    INFO in createObj: creating a IdDictManager object in the detector store
@@ -185,11 +187,11 @@ EndcapDMConstru...   INFO Start building EC electronics geometry
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EndcapDMConstru...   INFO Start building EC electronics geometry
-GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 21180Kb 	 Time = 1.07S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 28484Kb 	 Time = 4.37S
 ClassIDSvc           INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 65 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 5974 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6709 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 670 CLIDRegistry entries for module ALL
 CondInputLoader      INFO Initializing CondInputLoader...
 CondInputLoader      INFO Adding base classes:
@@ -250,7 +252,7 @@ xAODMaker::Even...   INFO Will take information from the EventInfo object
 ClassIDSvc           INFO  getRegistryEntries: read 319 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 testalg1             INFO Initializing testalg1...
-ClassIDSvc           INFO  getRegistryEntries: read 310 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 323 CLIDRegistry entries for module ALL
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 ClassIDSvc           INFO  getRegistryEntries: read 186 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloCell_ID helper object in the detector store
@@ -260,15 +262,15 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-08-23T2056/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-08-23T2056/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-08-23T2056/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
 CaloIDHelper_ID...   INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-08-23T2056/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/TileNeighbour_reduced.txt
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
@@ -287,12 +289,12 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_SuperCell_ID helper ob
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-08-23T2056/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-08-23T2056/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-08-23T2056/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_ID...   INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-08-23T2056/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/TileSuperCellNeighbour.txt
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDes...   INFO  Finished 
 CaloIdMgrDetDes...   INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -305,10 +307,10 @@ LArOnlineID          INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 ClassIDSvc           INFO  getRegistryEntries: read 283 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 65 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 3862 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3917 CLIDRegistry entries for module ALL
 ToolSvc.tool1        INFO  bit mask for errors to mask 16381
 ClassIDSvc           INFO  getRegistryEntries: read 64 CLIDRegistry entries for module ALL
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for LArCablingService[0x2e6caa00]+7fe569dbb9f0 bound to AthenaAttributeList[/LAR/Identifier/OnOffIdMap]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for LArCablingService[0x3fda6800]+7f9ad354fca4 bound to AthenaAttributeList[/LAR/Identifier/OnOffIdMap]
 ToolSvc.LArCabl...   INFO Successfully installed callback on folder/LAR/Identifier/OnOffIdMap
 ToolSvc.LArCabl...   INFO Successfully installed callback on folder/LAR/Identifier/CalibIdMap
 ToolSvc.LArCabl...   INFO Successfully installed callback on folder/LAR/Identifier/FebRodMap
@@ -557,16 +559,16 @@ AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 6 events pr
 /cvmfs/atlas-co...   INFO Database being retired...
 /cvmfs/atlas-co...   INFO Database being retired...
 /cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] D27D07D4-C135-E011-84A9-003048F0E01E
 /cvmfs/atlas-co...   INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] F4885664-6C4D-DF11-A94A-00304867340C
 /cvmfs/atlas-co...   INFO Database being retired...
 /cvmfs/atlas-co...   INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 445FAD9A-5DB3-E14A-81DB-BA6244602734
 /cvmfs/atlas-co...   INFO Database being retired...
 /cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] F4885664-6C4D-DF11-A94A-00304867340C
 /cvmfs/atlas-co...   INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] D27D07D4-C135-E011-84A9-003048F0E01E
 /cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 445FAD9A-5DB3-E14A-81DB-BA6244602734
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
@@ -575,33 +577,33 @@ testalg1             INFO Finalizing testalg1...
 IncidentProcAlg2     INFO Finalize
 PyComponentMgr       INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv    INFO in finalize
-IOVDbSvc             INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.31 ))s
-IOVDbSvc             INFO Folder /LAR/BadChannels/BadChannels (AttrListColl) db-read 1/1 objs/chan/bytes 0/8/0 ((     0.07 ))s
-IOVDbSvc             INFO Folder /LAR/BadChannels/MissingFEBs (AttrList) db-read 1/1 objs/chan/bytes 1/1/16 ((     0.07 ))s
-IOVDbSvc             INFO Folder /LAR/Identifier/CalibIdMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/1520148 ((     0.08 ))s
-IOVDbSvc             INFO Folder /LAR/Identifier/FebRodMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/6100 ((     0.04 ))s
-IOVDbSvc             INFO Folder /LAR/Identifier/OnOffIdMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/780292 ((     0.06 ))s
+IOVDbSvc             INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     2.53 ))s
+IOVDbSvc             INFO Folder /LAR/BadChannels/BadChannels (AttrListColl) db-read 1/1 objs/chan/bytes 0/8/0 ((     2.44 ))s
+IOVDbSvc             INFO Folder /LAR/BadChannels/MissingFEBs (AttrList) db-read 1/1 objs/chan/bytes 1/1/16 ((     2.48 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/CalibIdMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/1520148 ((     1.83 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/FebRodMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/6100 ((     0.58 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/OnOffIdMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/780292 ((     1.53 ))s
 IOVDbSvc             INFO Folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
 IOVDbSvc             INFO Folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
 IOVDbSvc             INFO Folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
-IOVDbSvc             INFO Folder /LAR/ElecCalibMC/AutoCorr (PoolColl) db-read 1/1 objs/chan/bytes 3/3/486 ((     0.09 ))s
-IOVDbSvc             INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.06 ))s
-IOVDbSvc             INFO Folder /LAR/ElecCalibMC/DAC2uA (PoolColl) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.09 ))s
-IOVDbSvc             INFO Folder /LAR/ElecCalibMC/HVScaleCorr (PoolColl) db-read 1/1 objs/chan/bytes 12/12/1980 ((     0.07 ))s
-IOVDbSvc             INFO Folder /LAR/ElecCalibMC/MinBias (PoolColl) db-read 1/1 objs/chan/bytes 1/1/174 ((     0.07 ))s
-IOVDbSvc             INFO Folder /LAR/ElecCalibMC/MinBiasAverage (PoolColl) db-read 1/1 objs/chan/bytes 1/1/181 ((     0.07 ))s
-IOVDbSvc             INFO Folder /LAR/ElecCalibMC/MphysOverMcal (PoolColl) db-read 1/1 objs/chan/bytes 3/3/516 ((     0.07 ))s
-IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Noise (PoolColl) db-read 1/1 objs/chan/bytes 3/3/516 ((     0.07 ))s
-IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Pedestal (PoolRef) db-read 1/1 objs/chan/bytes 1/1/167 ((     0.07 ))s
-IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Ramp (PoolColl) db-read 1/1 objs/chan/bytes 3/3/489 ((     0.07 ))s
-IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Shape (PoolColl) db-read 1/1 objs/chan/bytes 3/3/477 ((     0.07 ))s
-IOVDbSvc             INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 ((     0.07 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/AutoCorr (PoolColl) db-read 1/1 objs/chan/bytes 3/3/486 ((     0.05 ))s
+IOVDbSvc             INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.03 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/DAC2uA (PoolColl) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.03 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/HVScaleCorr (PoolColl) db-read 1/1 objs/chan/bytes 12/12/1980 ((     0.04 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/MinBias (PoolColl) db-read 1/1 objs/chan/bytes 1/1/174 ((     0.03 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/MinBiasAverage (PoolColl) db-read 1/1 objs/chan/bytes 1/1/181 ((     0.06 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/MphysOverMcal (PoolColl) db-read 1/1 objs/chan/bytes 3/3/516 ((     0.05 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Noise (PoolColl) db-read 1/1 objs/chan/bytes 3/3/516 ((     0.04 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Pedestal (PoolRef) db-read 1/1 objs/chan/bytes 1/1/167 ((     0.03 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Ramp (PoolColl) db-read 1/1 objs/chan/bytes 3/3/489 ((     0.03 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Shape (PoolColl) db-read 1/1 objs/chan/bytes 3/3/477 ((     0.04 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 ((     0.03 ))s
 IOVDbSvc          WARNING Folder /LAR/Identifier/LArTTCellMapAtlas is requested but no data retrieved
-IOVDbSvc             INFO Folder /LAR/ElecCalibMC/fSampl (PoolColl) db-read 1/1 objs/chan/bytes 1/1/194 ((     0.07 ))s
-IOVDbSvc             INFO Folder /LAR/ElecCalibMC/uA2MeV (PoolColl) db-read 1/1 objs/chan/bytes 1/1/165 ((     0.07 ))s
-IOVDbSvc             INFO Total payload read from COOL: 2312609 bytes in ((      1.64 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/fSampl (PoolColl) db-read 1/1 objs/chan/bytes 1/1/194 ((     0.03 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/uA2MeV (PoolColl) db-read 1/1 objs/chan/bytes 1/1/165 ((     0.03 ))s
+IOVDbSvc             INFO Total payload read from COOL: 2312609 bytes in ((     11.90 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 20 ReadTime: ((     1.64 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 20 ReadTime: ((    11.90 ))s
 IOVDbSvc             INFO Connection COOLOFL_CALO/OFLP200 : nConnect: 1 nFolders: 3 ReadTime: ((     0.00 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
@@ -620,9 +622,9 @@ ToolSvc.tool1        INFO    Number of masked Feb per event 0.333333
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot= 0.54  [s] Ave/Min/Max=0.0154(+-0.0565)/    0/ 0.33  [s] #= 35
-cObj_ALL             INFO Time User   : Tot=  0.9  [s] Ave/Min/Max=0.045(+-0.0966)/    0/ 0.38  [s] #= 20
-ChronoStatSvc        INFO Time User   : Tot=   62  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot= 1.37  [s] Ave/Min/Max=0.0391(+-0.135)/    0/ 0.78  [s] #= 35
+cObj_ALL             INFO Time User   : Tot=  3.1  [s] Ave/Min/Max=0.155(+- 0.33)/    0/ 1.29  [s] #= 20
+ChronoStatSvc        INFO Time User   : Tot=  137  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/LArCalorimeter/LArCellRec/share/LArCellBuilderFromLArHitTool_test.py b/LArCalorimeter/LArCellRec/share/LArCellBuilderFromLArHitTool_test.py
new file mode 100644
index 0000000000000000000000000000000000000000..5ac30ff57c8f08e102f61ebfbbb06323a28c26ea
--- /dev/null
+++ b/LArCalorimeter/LArCellRec/share/LArCellBuilderFromLArHitTool_test.py
@@ -0,0 +1,358 @@
+#
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+#
+# File: LArCellRec/share/LArCellBuilderFromLArHitTool_test.py
+# Author: sss
+# Date: Aug, 2018
+# Brief: Unit test for LArCellBuilderFromLArHitTool.
+#
+
+
+import ROOT
+ROOT.TH1F
+
+from AthenaCommon.DetFlags      import DetFlags
+DetFlags.detdescr.LAr_setOn()
+
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+athenaCommonFlags.isOnline.set_Value(True)
+
+GeV = 1000
+
+import sys
+import string
+import ROOT
+import math
+from AtlasGeoModel import SetGeometryVersion
+from AtlasGeoModel import GeoModelInit
+from AtlasGeoModel import SetupRecoGeometry
+include( "CaloIdCnv/CaloIdCnv_joboptions.py" )
+
+from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
+ServiceMgr += GeoModelSvc()
+theApp.CreateSvc += [ "GeoModelSvc"]
+from AtlasGeoModel import LArGM
+
+from IOVDbSvc.IOVDbSvcConf import IOVDbSvc
+IOVDbSvc().GlobalTag = 'OFLCOND-RUN12-SDR-35'
+
+include('LArConditionsCommon/LArConditionsCommon_MC_jobOptions.py')
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+theApp.EvtMax=5
+
+
+import ROOT
+from LArCellRec.LArCellDeadOTXCorrToolDefault import LArCellDeadOTXCorrToolDefault
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+
+###########################################################################
+
+
+class CaloCell_ID:
+    LAREM = 0
+    LARHEC = 1
+    LARFCAL = 2
+    
+
+# barec, samp, reg, ieta, iphi, e, time, exp0
+hits = [
+    ['LArHitEMB', CaloCell_ID.LAREM,
+     [[( 1, 1, 0, 10,  23), 10.0*GeV, 123, ( 10899.3018,  10889.9756,        None,        None)],
+      [(-1, 2, 1,  0, 123),  0.1*GeV,  31, (    93.1610,     87.4583,     93.1610,     81.2640)],
+      [( 1, 3, 0, 12,  41),   99*GeV,  12, (107903.0859, 107907.3828,        None,        None)],
+      [(-1, 0, 0, 54,   9),    2*GeV,  14, (  8000.0,      7995.4590,        None,        None)],
+      ]],
+    ['LArHitEMEC', CaloCell_ID.LAREM,
+     [[( 2, 0, 0,  3,  24),    5*GeV,  16, ( 59998.8047,  60255.3203,  59998.8047,  59740.0078)],
+      [(-2, 1, 2, 42,  27),   50*GeV,  24, (105214.4219, 105043.5859, 105214.4219, 105389.3906)],
+      [( 2, 2, 1, 17,  37),  100*GeV,  27, (201278.1094, 201201.7656,        None,        None)],
+      [(-2, 3, 0, 12,  42),   75*GeV,  46, (144681.5156, 144661.8906,        None,        None)],
+      [( 3, 1, 0,  3,  21),   25*GeV,  53, ( 60467.5352,  60441.5586,        None,        None)],
+      [(-3, 2, 0,  5,  13),  125*GeV,  44, (273080.7813, 272520.4063,        None,        None)]
+      ]],
+    ['LArHitHEC', CaloCell_ID.LARHEC,
+     [[( 2, 0, 0,  3,  54),   23*GeV,  54, (102908.2734, 102822.9531,        None,        None)],
+      [(-2, 1, 1,  1,  15),  157*GeV,  87, (702460.8125, 703196.75,   702460.8125, 701666.6875)],
+      [( 2, 2, 0,  6,  37),   87*GeV,  65, (778523.5,    778306.9375,        None,        None)],
+      [(-2, 3, 1,  2,  14),   97*GeV,  63, (868008.9375, 867043.5625, 868008.9375, 868216.4375)],
+      ]],
+    ['LArHitFCAL', CaloCell_ID.LARFCAL,
+     [[( 2, 1, 0, 33,  13),   34*GeV,  51, (421496.34375, 422000.4688,       None,        None)],
+      [(-2, 2, 0, 16,  11),   26*GeV,  45, (439932.34375, 439158.3125,       None,        None)],
+      [( 2, 3, 0,  9,   3),   21*GeV,  41, (288026.34375, 288254.5313,       None,        None)],
+      ]],
+    ]
+
+
+from AthenaPython.PyAthenaComps import Alg, StatusCode
+class Tools:
+    def __init__ (self, name):
+        self.em = ROOT.ToolHandle(ROOT.ICaloCellMakerTool)('LArCellBuilderFromLArHitTool/' + name + 'em')
+        self.hec = ROOT.ToolHandle(ROOT.ICaloCellMakerTool)('LArCellBuilderFromLArHitTool/' + name + 'hec')
+        self.fcal = ROOT.ToolHandle(ROOT.ICaloCellMakerTool)('LArCellBuilderFromLArHitTool/' + name + 'fcal')
+        return
+
+
+    def initialize (self):
+        if not self.em.retrieve():
+            return StatusCode.Failure
+        if not self.hec.retrieve():
+            return StatusCode.Failure
+        if not self.fcal.retrieve():
+            return StatusCode.Failure
+        return StatusCode.Success
+
+
+    def process (self, ccc):
+        if not self.em.process (ccc):
+            return StatusCode.Failure
+        if not self.hec.process (ccc):
+            return StatusCode.Failure
+        if not self.fcal.process (ccc):
+            return StatusCode.Failure
+        return StatusCode.Success
+
+
+class TestAlg (Alg):
+    def __init__ (self, name):
+        Alg.__init__ (self, name)
+        return
+
+    def initialize (self):
+        ROOT.ICaloCellMakerTool
+        print 'mgr', self.detStore['CaloMgr']
+        self.tools1 = Tools ('tool1')
+        self.tools2 = Tools ('tool2')
+        self.tools3 = Tools ('tool3')
+        self.tools4 = Tools ('tool4')
+        self.tools5 = Tools ('tool5')
+
+        if not self.tools1.initialize():
+            return StatusCode.Failure
+        if not self.tools2.initialize():
+            return StatusCode.Failure
+        if not self.tools3.initialize():
+            return StatusCode.Failure
+        if not self.tools4.initialize():
+            return StatusCode.Failure
+        if not self.tools5.initialize():
+            return StatusCode.Failure
+
+        self.idhelper  = self.detStore['CaloCell_ID']
+        return StatusCode.Success
+
+
+    def execute (self):
+        iev = self.getContext().evt()
+
+        self.record_hits()
+
+        exp_n_noise = 0
+        if iev == 0:
+            # Event 0: no noise, no windowing, no internal map.
+            tools = self.tools1
+            def exp_e_fn (exp): return exp[0]
+
+        elif iev == 1:
+            # Event 1: no noise, no windowing, internal map (+thresh)
+            tools = self.tools2
+            def exp_e_fn (exp):
+                if exp[0] < 1*GeV: return None
+                return exp[0]
+
+        elif iev == 2:
+            # Event 2: noise, no windowing, internal map
+            tools = self.tools3
+            exp_n_noise = 182451
+            def exp_e_fn (exp): return exp[1]
+
+        elif iev == 3:
+            # Event 3: no noise, windowing
+            self.record_mc()
+            tools = self.tools4
+            def exp_e_fn (exp): return exp[2]
+
+        else:
+            # Event 4: noise + windowing
+            self.record_mc()
+            tools = self.tools5
+            exp_n_noise = 2210
+            def exp_e_fn (exp): return exp[3]
+
+        exp_cells = {}
+        for name, subcal, l in hits:
+            c = ROOT.LArHitContainer (name)
+            for addr, e, t, exp in l:
+                fulladdr = (subcal,) + addr
+                exp_e = exp_e_fn(exp)
+                if exp_e == None: continue
+                exp_cells[fulladdr] = [exp_e, t]
+        ccc = ROOT.CaloCellContainer()
+        if not tools.process (ccc):
+            return StatusCode.Failure
+
+        self.check_ccc (ccc, exp_cells, exp_n_noise)
+
+        #self.print_cells()
+
+        return StatusCode.Success
+
+
+    def region (self, cid):
+        if self.idhelper.sub_calo(cid) == ROOT.CaloCell_ID.LARFCAL:
+            return 0
+        return self.idhelper.region(cid)
+
+
+    def check_ccc (self, ccc, exp_cells, exp_n_noise):
+        exp_cells = exp_cells.copy()
+        n_noise = 0
+
+        for c in ccc:
+            cid = c.ID()
+            addr = (self.idhelper.sub_calo(cid),
+                    self.idhelper.pos_neg(cid),
+                    self.idhelper.sampling(cid),
+                    self.region(cid),
+                    self.idhelper.eta(cid),
+                    self.idhelper.phi(cid))
+            l = exp_cells.get (addr)
+            if l:
+                if abs (c.e() - l[0]) > 1e-3:
+                    print 'xxx energy mismatch: ', addr, c.e(), l[0]
+                    assert 0
+                if abs (c.time() - l[1]) > 1e-3:
+                    print 'xxx time mismatch', addr, c.time(), l[1]
+                    assert 0
+                del exp_cells[addr]
+            elif c.e() < 2*GeV:
+                n_noise += 1
+            else:
+                print 'xxx unexpected cell', addr, c.e(), c.time()
+                assert 0
+
+        if n_noise != exp_n_noise:
+            print 'xxx n_noise', n_noise, exp_n_noise
+            assert 0
+        for extra in exp_cells:
+            print 'xxx unfound cell', extra
+            assert 0
+        return
+
+
+    def record_hits (self):
+        samp = 0.2 # dummy sampling factor
+        for name, subcal, l in hits:
+            c = ROOT.LArHitContainer (name)
+            for addr, e, t, exp in l:
+                sys.stdout.flush()
+                cellid = self.idhelper.cell_id (subcal,
+                                                addr[0],
+                                                addr[1],
+                                                addr[2],
+                                                addr[3],
+                                                addr[4])
+                h = ROOT.LArHit (cellid, e * samp, t)
+                h.finalize()
+                c.push_back (h)
+            self.evtStore.record (c, name, False)
+        return
+
+
+    def add_particle (self, vtx, pdgid, pt, eta, phi, status=2000):
+        e = pt * math.cosh(eta)
+        pz= pt * math.sinh(eta)
+        v = ROOT.HepMC.FourVector (pt*math.cos(phi), pt*math.sin(phi), pz, e)
+        p = ROOT.HepMC.GenParticle (v, pdgid, status)
+        vtx.add_particle_out (p)
+        return
+
+
+    def record_mc (self):
+        vtx = ROOT.HepMC.GenVertex()
+        self.add_particle (vtx,  22, 10*GeV, -1.5, 2.8)
+        self.add_particle (vtx,  11, 15*GeV, -2.9, 2.9)
+        self.add_particle (vtx, -11, 20*GeV,  1.5, 2.5)
+
+        self.add_particle (vtx,  21, 30*GeV,  2.2, -2.6)
+        self.add_particle (vtx,  22,  1*GeV,  0.1,  2.4)
+        self.add_particle (vtx,  22, 40*GeV,  3.6,  1.5, 100)
+
+        evt = ROOT.HepMC.GenEvent()
+        evt.add_vertex (vtx)
+        mccoll = ROOT.McEventCollection()
+        mccoll.push_back (evt)
+        self.evtStore.record (mccoll, 'GEN_EVENT', False)
+        return
+
+
+    def print_cells (self):
+        mgr = self.detStore['CaloMgr']
+        for name, subcal, l in hits:
+            for addr, e, t, exp in l:
+                cellid = self.idhelper.cell_id (subcal,
+                                                addr[0],
+                                                addr[1],
+                                                addr[2],
+                                                addr[3],
+                                                addr[4])
+                dde = mgr.get_element (cellid)
+                print 'cell', subcal, addr, dde.eta(), dde.phi()
+        return
+        
+
+
+from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault
+noisetool = CaloNoiseToolDefault('tool')
+noisetool.UseTile = False
+ToolSvc += noisetool
+
+from LArCellRec.LArCellRecConf import LArCellBuilderFromLArHitTool
+
+def make_tools (name, WithNoise = False, **kw):
+    noisetool = 'CaloNoiseTool/CaloNoiseToolDefault'
+    tool_em = LArCellBuilderFromLArHitTool (name + 'em',
+                                            LArRegion = 'LAr_EM',
+                                            NoiseTool = noisetool,
+                                            BeginRunPriority = 100,
+                                            WithNoise = WithNoise,
+                                            **kw)
+
+
+    tool_hec = LArCellBuilderFromLArHitTool (name + 'hec',
+                                             LArRegion = 'LAr_HEC',
+                                             NoiseTool = noisetool,
+                                             BeginRunPriority = 100,
+                                             WithNoise = WithNoise,
+                                             **kw)
+
+    tool_fcal = LArCellBuilderFromLArHitTool (name + 'fcal',
+                                              LArRegion = 'LAr_FCal',
+                                              NoiseTool = noisetool,
+                                              BeginRunPriority = 100,
+                                              WithNoise = WithNoise,
+                                              **kw)
+    global ToolSvc
+    ToolSvc += tool_em
+    ToolSvc += tool_hec
+    ToolSvc += tool_fcal
+    return
+
+
+make_tools ('tool1')
+make_tools ('tool2', ThresholdOnE = 1*GeV)
+make_tools ('tool3', WithNoise = True)
+make_tools ('tool4', Windows = True, ThresholdOnE = 0*GeV)
+make_tools ('tool5', Windows = True, WithNoise = True)
+
+from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoCnvAlg
+topSequence += xAODMaker__EventInfoCnvAlg()
+
+testalg1 = TestAlg ('testalg1')
+topSequence += testalg1
diff --git a/LArCalorimeter/LArCellRec/share/LArCellBuilderFromLArHitTool_test.ref b/LArCalorimeter/LArCellRec/share/LArCellBuilderFromLArHitTool_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..72fcf5d1f6eff9c8497206a36d337dd181dad363
--- /dev/null
+++ b/LArCalorimeter/LArCellRec/share/LArCellBuilderFromLArHitTool_test.ref
@@ -0,0 +1,781 @@
+Sat Sep  8 00:57:07 CEST 2018
+Preloading tcmalloc_minimal.so
+Py:Athena            INFO including file "AthenaCommon/Preparation.py"
+Py:Athena            INFO using release [AthenaWorkDir-22.0.1] [x86_64-slc6-gcc7-dbg] [atlas-work3/594567d675b] -- built on [2018-09-07T1739]
+Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
+Py:Athena            INFO executing ROOT6Setup
+Py:Athena            INFO including file "AthenaCommon/Execution.py"
+Py:Athena            INFO including file "LArCellRec/LArCellBuilderFromLArHitTool_test.py"
+[?1034hSetGeometryVersion.py obtained major release version 22
+Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
+Py:ConfigurableDb    INFO Read module info for 5509 configurables from 51 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
+EventInfoMgtInit: Got release version  Athena-22.0.1
+Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
+Py:Athena            INFO including file "CaloIdCnv/CaloIdCnv_joboptions.py"
+Py:Athena            INFO including file "CaloConditions/CaloConditions_jobOptions.py"
+Py:Athena            INFO including file "CaloConditions/LArTTCellMap_ATLAS_jobOptions.py"
+Py:Athena            INFO including file "CaloConditions/CaloTTIdMap_ATLAS_jobOptions.py"
+Py:Athena            INFO including file "LArConditionsCommon/LArConditionsCommon_MC_jobOptions.py"
+ATLAS-R2-2016-01-00-01
+Py:JobPropertyContainer::    INFO  use global tag for all LArElecCalibMC constants 
+Py:Athena            INFO including file "LArConditionsCommon/LArIdMap_MC_jobOptions.py"
+Py:JobPropertyContainer::    INFO  setting folder /LAR/Identifier/OnOffIdMap with tag LARIdentifierOnOffIdMap-012
+Py:JobPropertyContainer::    INFO  setting folder /LAR/Identifier/CalibIdMap with tag LARIdentifierCalibIdMap-012
+Py:JobPropertyContainer::    INFO  setting folder /LAR/Identifier/FebRodMap with tag LARIdentifierFebRodMap-005
+Py:CaloNoiseToolDefault    INFO Using CaloNoiseTool
+Py:LArADC2MeVToolDefault::__init__     INFO entering
+Py:LArADC2MeVToolDefault::__init__     INFO in MC case
+Py:LArADC2MeVToolDefault::__init__     INFO MphysOverMcal found
+Py:LArADC2MeVToolDefault::__init__     INFO HVScaleCorr found
+Py:LArOFCToolDefault::__init__     INFO entering
+Py:LArOFCToolDefault::__init__     INFO   Standard OFC optimization computation
+Py:LArAutoCorrTotalToolDefault::__init__     INFO entering
+Py:LArAutoCorrTotalToolDefault::__init__     INFO   setup for computing total noise autocorrelation without pileup
+Py:LArADC2MeVToolDefault::__init__     INFO LArADC2MeV Tool with nameLArADC2MeVToolDefaultalready known to ToolSvc
+Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr    SUCCESS 
+====================================================================================================================================
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r3)
+                                          running on lxplus027.cern.ch on Sat Sep  8 00:57:33 2018
+====================================================================================================================================
+ApplicationMgr       INFO Successfully loaded modules : AthenaServices
+ApplicationMgr       INFO Application Manager Configured successfully
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+StatusCodeSvc        INFO initialize
+AthDictLoaderSvc     INFO in initialize...
+AthDictLoaderSvc     INFO acquired Dso-registry
+ClassIDSvc           INFO  getRegistryEntries: read 6897 CLIDRegistry entries for module ALL
+CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
+CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
+AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
+PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
+PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
+PoolSvc              INFO Frontier compression level set to 5
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-06T2111/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus027.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+PoolSvc              INFO Successfully setup replica sorting algorithm
+PoolSvc              INFO Setting up APR FileCatalog and Streams
+PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc           WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc              INFO Resolved path (via ATLAS_POOLCOND_PATH) is /cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml
+PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
+DbSession            INFO     Open     DbSession    
+Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
+IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
+IOVDbSvc             INFO Cache alignment will be done in 3 slices
+IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
+IOVDbSvc             INFO Folder /LAR/Identifier/OnOffIdMap, adding new key tag with value LARIdentifierOnOffIdMap-012
+IOVDbSvc             INFO Folder /LAR/Identifier/CalibIdMap, adding new key tag with value LARIdentifierCalibIdMap-012
+IOVDbSvc             INFO Folder /LAR/Identifier/FebRodMap, adding new key tag with value LARIdentifierFebRodMap-005
+IOVDbSvc             INFO Read from meta data only for folder /TagInfo
+IOVDbSvc             INFO Initialised with 3 connections and 24 folders
+IOVDbSvc             INFO Service IOVDbSvc initialised successfully
+IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
+IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
+IOVSvcTool           INFO IOVRanges will be checked at every Event
+ClassIDSvc           INFO  getRegistryEntries: read 1537 CLIDRegistry entries for module ALL
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_CALO/OFLP200
+IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Disconnecting from COOLOFL_CALO/OFLP200
+IOVDbSvc             INFO Added taginfo remove for /LAR/Align
+IOVDbSvc             INFO Added taginfo remove for /LAR/BadChannels/BadChannels
+IOVDbSvc             INFO Added taginfo remove for /LAR/BadChannels/MissingFEBs
+IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/CalibIdMap
+IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/FebRodMap
+IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/OnOffIdMap
+IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas
+IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas
+IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/AutoCorr
+IOVDbSvc             INFO Added taginfo remove for /LAR/LArCellPositionShift
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/DAC2uA
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/HVScaleCorr
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/MinBias
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/MinBiasAverage
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/MphysOverMcal
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/Noise
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/Pedestal
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/Ramp
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/Shape
+IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/LArTTCellMapAtlas
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/fSampl
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/uA2MeV
+ClassIDSvc           INFO  getRegistryEntries: read 17 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4298 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9 CLIDRegistry entries for module ALL
+DetDescrCnvSvc       INFO  initializing 
+DetDescrCnvSvc       INFO Found DetectorStore service
+DetDescrCnvSvc       INFO  filling proxies for detector managers 
+DetDescrCnvSvc       INFO  filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for IdDict with CLID 2411 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for AtlasID with CLID 164875623 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for PixelID with CLID 2516 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for SCT_ID with CLID 2517 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TRT_ID with CLID 2518 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for SiliconID with CLID 129452393 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TileID with CLID 2901 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TileHWID with CLID 2902 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TileTBID with CLID 2903 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for ZdcID with CLID 190591643 and storage type 68 to detector store 
+GeoModelSvc::RD...WARNING  Getting PixTBMatComponents with default tag
+GeoModelSvc::RD...WARNING  Getting PixTBMaterials with default tag
+GeoModelSvc::RD...WARNING  Getting InDetMatComponents with default tag
+GeoModelSvc::RD...WARNING  Getting InDetMaterials with default tag
+GeoModelSvc.LAr...   INFO Keys for LAr are ATLAS-R2-2016-01-00-01  ATLAS
+GeoModelSvc.LAr...   INFO Building LAr version LAr-Revised-17-01 while ATLAS version is ATLAS-R2-2016-01-00-01
+GeoModelSvc.LAr...   INFO LAr Geometry Options:
+GeoModelSvc.LAr...   INFO   Sagging           = false
+GeoModelSvc.LAr...   INFO   Barrel            = ON
+GeoModelSvc.LAr...   INFO   Endcap            = ON
+BarrelConstruction   INFO Getting primary numbers for ATLAS, ATLAS-R2-2016-01-00-01
+BarrelConstruction   INFO   Makes detailed absorber sandwich  ? 1 1
+BarrelConstruction   INFO   Use sagging in geometry  ? 0
+============== EMEC Construction ===============
+  multi-layered version of absorbers activated, mlabs == 1
+================================================
+EventPersistenc...   INFO Added successfully Conversion service:DetDescrCnvSvc
+ClassIDSvc           INFO  getRegistryEntries: read 1931 CLIDRegistry entries for module ALL
+CaloIDHelper_ID...   INFO in createObj: creating a TileTBID helper object in the detector store
+IdDictDetDescrCnv    INFO in initialize
+IdDictDetDescrCnv    INFO in createObj: creating a IdDictManager object in the detector store
+IdDictDetDescrCnv    INFO IdDictName:  IdDictParser/ATLAS_IDS.xml
+IdDictDetDescrCnv    INFO Reading InnerDetector    IdDict file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml
+IdDictDetDescrCnv    INFO Reading LArCalorimeter   IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml
+IdDictDetDescrCnv    INFO Reading TileCalorimeter  IdDict file IdDictParser/IdDictTileCalorimeter.xml
+IdDictDetDescrCnv    INFO Reading Calorimeter      IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml
+IdDictDetDescrCnv    INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.03.xml
+IdDictDetDescrCnv    INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors_2010.xml
+IdDictDetDescrCnv    INFO Found id dicts:
+IdDictDetDescrCnv    INFO Using dictionary tag: null
+IdDictDetDescrCnv    INFO Dictionary ATLAS                version default              DetDescr tag (using default) file 
+IdDictDetDescrCnv    INFO Dictionary Calorimeter          version default              DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml
+IdDictDetDescrCnv    INFO Dictionary ForwardDetectors     version default              DetDescr tag ForDetIdentifier-01       file IdDictParser/IdDictForwardDetectors_2010.xml
+IdDictDetDescrCnv    INFO Dictionary InnerDetector        version IBL-DBM              DetDescr tag InDetIdentifier-IBL3D25-02 file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml
+IdDictDetDescrCnv    INFO Dictionary LArCalorimeter       version fullAtlas            DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml
+IdDictDetDescrCnv    INFO Dictionary LArElectrode         version fullAtlas            DetDescr tag (using default) file 
+IdDictDetDescrCnv    INFO Dictionary LArHighVoltage       version fullAtlas            DetDescr tag (using default) file 
+IdDictDetDescrCnv    INFO Dictionary MuonSpectrometer     version R.03                 DetDescr tag MuonIdentifier-08         file IdDictParser/IdDictMuonSpectrometer_R.03.xml
+IdDictDetDescrCnv    INFO Dictionary TileCalorimeter      version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00         file IdDictParser/IdDictTileCalorimeter.xml
+TileTBID             INFO initialize_from_dictionary 
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+EndcapDMConstru...   INFO Start building EC electronics geometry
+============== EMEC Construction ===============
+  multi-layered version of absorbers activated, mlabs == 1
+================================================
+EndcapDMConstru...   INFO Start building EC electronics geometry
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 29508Kb 	 Time = 1.77S
+ClassIDSvc           INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 65 CLIDRegistry entries for module ALL
+AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
+ClassIDSvc           INFO  getRegistryEntries: read 6709 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 670 CLIDRegistry entries for module ALL
+CondInputLoader      INFO Initializing CondInputLoader...
+CondInputLoader      INFO Adding base classes:
+  +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/BadChannels/MissingFEBs' )   ->
+  +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' )   ->
+  +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/FebRodMap' )   ->
+  +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/OnOffIdMap' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/LAR/BadChannels/BadChannels' )   ->
+  +  ( 'LArAutoCorrMC' , 'ConditionStore+LArAutoCorr' )   -> ILArAutoCorr (8124)
+  +  ( 'LArDAC2uAMC' , 'ConditionStore+LArDAC2uA' )   -> ILArDAC2uA (579584)
+  +  ( 'LArHVScaleCorrComplete' , 'ConditionStore+LArHVScaleCorr' )   -> ILArHVScaleCorr (93397263)
+  +  ( 'LArMinBiasAverageMC' , 'ConditionStore+LArMinBiasAverage' )   -> ILArMinBiasAverage (112216056)
+  +  ( 'LArMinBiasMC' , 'ConditionStore+LArMinBias' )   -> ILArMinBias (197482938)
+  +  ( 'LArMphysOverMcalMC' , 'ConditionStore+LArMphysOverMcal' )   -> ILArMphysOverMcal (128308807)
+  +  ( 'LArNoiseMC' , 'ConditionStore+LArNoise' )   -> ILArNoise (8125)
+  +  ( 'LArPedestalMC' , 'ConditionStore+LArPedestal' )   -> ILArPedestal (8122)
+  +  ( 'LArRampMC' , 'ConditionStore+LArRamp' )   -> ILArRamp (8123)
+  +  ( 'LArShape32MC' , 'ConditionStore+LArShape' )   -> ILArShape (245731716)
+  +  ( 'LArfSamplMC' , 'ConditionStore+LArfSampl' )   -> ILArfSampl (128126607)
+  +  ( 'LAruA2MeVMC' , 'ConditionStore+LAruA2MeV' )   -> ILAruA2MeV (154639332)
+CondInputLoader      INFO Will create WriteCondHandle dependencies for the following DataObjects:
+    +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/BadChannels/MissingFEBs' ) 
+    +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' ) 
+    +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/FebRodMap' ) 
+    +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/OnOffIdMap' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/LAR/BadChannels/BadChannels' ) 
+    +  ( 'ILArAutoCorr' , 'ConditionStore+LArAutoCorr' ) 
+    +  ( 'ILArDAC2uA' , 'ConditionStore+LArDAC2uA' ) 
+    +  ( 'ILArHVScaleCorr' , 'ConditionStore+LArHVScaleCorr' ) 
+    +  ( 'ILArMinBias' , 'ConditionStore+LArMinBias' ) 
+    +  ( 'ILArMinBiasAverage' , 'ConditionStore+LArMinBiasAverage' ) 
+    +  ( 'ILArMphysOverMcal' , 'ConditionStore+LArMphysOverMcal' ) 
+    +  ( 'ILArNoise' , 'ConditionStore+LArNoise' ) 
+    +  ( 'ILArPedestal' , 'ConditionStore+LArPedestal' ) 
+    +  ( 'ILArRamp' , 'ConditionStore+LArRamp' ) 
+    +  ( 'ILArShape' , 'ConditionStore+LArShape' ) 
+    +  ( 'ILArfSampl' , 'ConditionStore+LArfSampl' ) 
+    +  ( 'ILAruA2MeV' , 'ConditionStore+LAruA2MeV' ) 
+    +  ( 'LArAutoCorrMC' , 'ConditionStore+LArAutoCorr' ) 
+    +  ( 'LArDAC2uAMC' , 'ConditionStore+LArDAC2uA' ) 
+    +  ( 'LArHVScaleCorrComplete' , 'ConditionStore+LArHVScaleCorr' ) 
+    +  ( 'LArMinBiasAverageMC' , 'ConditionStore+LArMinBiasAverage' ) 
+    +  ( 'LArMinBiasMC' , 'ConditionStore+LArMinBias' ) 
+    +  ( 'LArMphysOverMcalMC' , 'ConditionStore+LArMphysOverMcal' ) 
+    +  ( 'LArNoiseMC' , 'ConditionStore+LArNoise' ) 
+    +  ( 'LArPedestalMC' , 'ConditionStore+LArPedestal' ) 
+    +  ( 'LArRampMC' , 'ConditionStore+LArRamp' ) 
+    +  ( 'LArShape32MC' , 'ConditionStore+LArShape' ) 
+    +  ( 'LArfSamplMC' , 'ConditionStore+LArfSampl' ) 
+    +  ( 'LAruA2MeVMC' , 'ConditionStore+LAruA2MeV' ) 
+ClassIDSvc           INFO  getRegistryEntries: read 504 CLIDRegistry entries for module ALL
+xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
+xAODMaker::Even...   INFO Initializing - Package version: xAODEventInfoCnv-00-00-00
+xAODMaker::Even...WARNING Beam conditions service not available
+xAODMaker::Even...WARNING Will not fill beam spot information into xAOD::EventInfo
+xAODMaker::Even...   INFO Luminosity information not available
+xAODMaker::Even...   INFO Will take information from the EventInfo object
+ClassIDSvc           INFO  getRegistryEntries: read 319 CLIDRegistry entries for module ALL
+PyComponentMgr       INFO Initializing PyComponentMgr...
+testalg1             INFO Initializing testalg1...
+mgrClassIDSvc           INFO  getRegistryEntries: read 323 CLIDRegistry entries for module ALL
+CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
+ClassIDSvc           INFO  getRegistryEntries: read 159 CLIDRegistry entries for module ALL
+CaloIDHelper_ID...   INFO in createObj: creating a CaloCell_ID helper object in the detector store
+CaloIDHelper_ID...   INFO in createObj: creating a LArEM_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-06T2111/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-06T2111/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-06T2111/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCal3DNeighborsPrev-April2011.txt
+CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
+CaloIDHelper_ID...   INFO in createObj: creating a TileID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-06T2111/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/TileNeighbour_reduced.txt
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
+CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
+CaloDM_ID            INFO initialize_from_dictionary
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
+CaloLVL1_ID          INFO initialize_from_dictionary
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a TTOnlineID helper object in the detector store
+TTOnlineID           INFO initialize_from_dictionary
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a CaloCell_SuperCell_ID helper object in the detector store
+CaloIDHelper_ID...   INFO in createObj: creating a LArEM_SuperCell_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_SuperCell_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-06T2111/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-06T2111/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-06T2111/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+CaloIDHelper_ID...   INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-06T2111/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/TileSuperCellNeighbour.txt
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIdMgrDetDes...   INFO  Finished 
+CaloIdMgrDetDes...   INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
+DetectorStore_ImplWARNING retrieve(default): No valid proxy for default object 
+ of type TileDetDescrManager(CLID 2941)
+CaloMgrDetDescrCnvWARNING Could not get the TileDetectorManager. No Calo Elements will be built for Tile
+ <ROOT.CaloDetDescrManager object at 0x28a7e680>
+ClassIDSvc           INFO  getRegistryEntries: read 3940 CLIDRegistry entries for module ALL
+ToolSvc.tool1em      INFO  No threshold on hit energy 
+ToolSvc.tool1em      INFO THRESHOLD CHOICE : No Threshold !
+ToolSvc.CaloNoi...   INFO CaloNoiseTool called ToolSvc.CaloNoiseToolDefault initialize() begin
+LArOnlineIDDetD...   INFO in createObj: creating a LArOnlineID helper object in the detector store
+LArOnlineID          INFO initialize_from_dictionary
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+ClassIDSvc           INFO  getRegistryEntries: read 1076 CLIDRegistry entries for module ALL
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for LArCablingService[0x2e7f6a00]+7f71dfeadca4 bound to AthenaAttributeList[/LAR/Identifier/OnOffIdMap]
+ToolSvc.LArCabl...   INFO Successfully installed callback on folder/LAR/Identifier/OnOffIdMap
+ToolSvc.LArCabl...   INFO Successfully installed callback on folder/LAR/Identifier/CalibIdMap
+ToolSvc.LArCabl...   INFO Successfully installed callback on folder/LAR/Identifier/FebRodMap
+ToolSvc.LArCabl...   INFO Sucessfully initialized LArCablingService with 3 callbacks.
+ToolSvc.LArADC2...   INFO Registered callback for key: LArRamp
+ToolSvc.LArADC2...   INFO Registered callback for key: LArDAC2uA
+ToolSvc.LArADC2...   INFO Registered callback for key: LAruA2MeV
+ToolSvc.LArADC2...   INFO Registered callback for key: LArMphysOverMcal
+ToolSvc.LArADC2...   INFO Registered callback for key: LArHVScaleCorr
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for LArMCSymTool[0x2e7f9200]+189 bound to /LAR/Identifier/OnOffIdMap
+ClassIDSvc           INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
+ToolSvc.LArAuto...   INFO Registered callback for key: LArShape
+ToolSvc.LArAuto...   INFO Registered callback for key: LArAutoCorr
+ToolSvc.LArOFCT...   INFO Registered callback for key: LArShape
+ToolSvc.LArOFCT...   INFO Registered callback for key: LArNoise
+ToolSvc.LArOFCT...   INFO Registered callback for LArOFCTool/LArAutoCorrTotalTool
+ToolSvc.CaloNoi...   INFO Will cache electronic noise
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for CaloNoiseTool[0x3014ff18]+191 bound to LArNoiseMC[LArNoise]
+ToolSvc.CaloNoi...   INFO Registered callback for key: LArNoise
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for CaloNoiseTool[0x3014ff18]+191 bound to LArAutoCorrMC[LArAutoCorr]
+ToolSvc.CaloNoi...   INFO Registered callback for key: LArAutoCorr
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for CaloNoiseTool[0x3014ff18]+191 bound to LArShape32MC[LArShape]
+ToolSvc.CaloNoi...   INFO Registered callback for key: LArShape
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for CaloNoiseTool[0x3014ff18]+191 bound to LArfSamplMC[LArfSampl]
+ToolSvc.CaloNoi...   INFO Registered callback for key: LArfSampl
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for CaloNoiseTool[0x3014ff18]+191 bound to LArMinBiasMC[LArMinBias]
+ToolSvc.CaloNoi...   INFO Registered callback for key: LArMinBias
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for CaloNoiseTool[0x3014ff18]+191 bound to LAruA2MeV
+ToolSvc.CaloNoi...   INFO Registered callbacks for LArADC2MeVTool -> CaloNoiseTool
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for CaloNoiseTool[0x3014ff18]+191 bound to LArAutoCorr
+ToolSvc.CaloNoi...   INFO Registered callbacks for LArOFCTool -> CaloNoiseTool
+ToolSvc.CaloNoi...   INFO CaloNoiseTool initialize() end
+ToolSvc.tool1em      INFO  no noise selected 
+ToolSvc.tool1hec     INFO  No threshold on hit energy 
+ToolSvc.tool1hec     INFO THRESHOLD CHOICE : No Threshold !
+ToolSvc.tool1hec     INFO  no noise selected 
+ToolSvc.tool1fcal    INFO  No threshold on hit energy 
+ToolSvc.tool1fcal    INFO THRESHOLD CHOICE : No Threshold !
+ToolSvc.tool1fcal    INFO  no noise selected 
+ToolSvc.tool2em      INFO  No threshold on hit energy 
+ToolSvc.tool2em      INFO THRESHOLD CHOICE : ThresholdOnE=1000
+ToolSvc.tool2em      INFO  One threshold selected: use internal map
+ToolSvc.tool2em      INFO  no noise selected 
+ToolSvc.tool2hec     INFO  No threshold on hit energy 
+ToolSvc.tool2hec     INFO THRESHOLD CHOICE : ThresholdOnE=1000
+ToolSvc.tool2hec     INFO  One threshold selected: use internal map
+ToolSvc.tool2hec     INFO  no noise selected 
+ToolSvc.tool2fcal    INFO  No threshold on hit energy 
+ToolSvc.tool2fcal    INFO THRESHOLD CHOICE : ThresholdOnE=1000
+ToolSvc.tool2fcal    INFO  One threshold selected: use internal map
+ToolSvc.tool2fcal    INFO  no noise selected 
+ToolSvc.tool3em      INFO  No threshold on hit energy 
+ToolSvc.tool3em      INFO THRESHOLD CHOICE : No Threshold !
+ToolSvc.tool3em      INFO  Noise selected (1 0)
+AtRndmGenSvc         INFO Initializing AtRndmGenSvc - package version RngComps-00-00-00
+ INITIALISING RANDOM NUMBER STREAMS. 
+AtRndmGenSvc         INFO will be reseeded for every event
+ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
+ToolSvc.tool3hec     INFO  No threshold on hit energy 
+ToolSvc.tool3hec     INFO THRESHOLD CHOICE : No Threshold !
+ToolSvc.tool3hec     INFO  Noise selected (1 0)
+ToolSvc.tool3fcal    INFO  No threshold on hit energy 
+ToolSvc.tool3fcal    INFO THRESHOLD CHOICE : No Threshold !
+ToolSvc.tool3fcal    INFO  Noise selected (1 0)
+ToolSvc.tool4em      INFO  No threshold on hit energy 
+ToolSvc.tool4em      INFO THRESHOLD CHOICE : ThresholdOnE=0
+ToolSvc.tool4em      INFO  One threshold selected: use internal map
+ToolSvc.tool4em      INFO  no noise selected 
+ToolSvc.tool4hec     INFO  No threshold on hit energy 
+ToolSvc.tool4hec     INFO THRESHOLD CHOICE : ThresholdOnE=0
+ToolSvc.tool4hec     INFO  One threshold selected: use internal map
+ToolSvc.tool4hec     INFO  no noise selected 
+ToolSvc.tool4fcal    INFO  No threshold on hit energy 
+ToolSvc.tool4fcal    INFO THRESHOLD CHOICE : ThresholdOnE=0
+ToolSvc.tool4fcal    INFO  One threshold selected: use internal map
+ToolSvc.tool4fcal    INFO  no noise selected 
+ToolSvc.tool5em      INFO  No threshold on hit energy 
+ToolSvc.tool5em      INFO THRESHOLD CHOICE : No Threshold !
+ToolSvc.tool5em      INFO  Noise selected (1 0)
+ToolSvc.tool5hec     INFO  No threshold on hit energy 
+ToolSvc.tool5hec     INFO THRESHOLD CHOICE : No Threshold !
+ToolSvc.tool5hec     INFO  Noise selected (1 0)
+ToolSvc.tool5fcal    INFO  No threshold on hit energy 
+ToolSvc.tool5fcal    INFO THRESHOLD CHOICE : No Threshold !
+ToolSvc.tool5fcal    INFO  Noise selected (1 0)
+HistogramPersis...WARNING Histograms saving not required.
+ApplicationMgr       INFO Application Manager Initialized successfully
+ClassIDSvc           INFO  getRegistryEntries: read 70 CLIDRegistry entries for module ALL
+CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/LAR/BadChannels/MissingFEBs'
+CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/LAR/Identifier/CalibIdMap'
+CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/LAR/Identifier/FebRodMap'
+CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/LAR/Identifier/OnOffIdMap'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/LAR/BadChannels/BadChannels'
+CondInputLoader      INFO created CondCont<LArAutoCorrMC> with key 'ConditionStore+LArAutoCorr'
+CondInputLoader      INFO created CondCont<LArDAC2uAMC> with key 'ConditionStore+LArDAC2uA'
+CondInputLoader      INFO created CondCont<LArHVScaleCorrComplete> with key 'ConditionStore+LArHVScaleCorr'
+CondInputLoader      INFO created CondCont<LArMinBiasAverageMC> with key 'ConditionStore+LArMinBiasAverage'
+CondInputLoader      INFO created CondCont<LArMinBiasMC> with key 'ConditionStore+LArMinBias'
+CondInputLoader      INFO created CondCont<LArMphysOverMcalMC> with key 'ConditionStore+LArMphysOverMcal'
+CondInputLoader      INFO created CondCont<LArNoiseMC> with key 'ConditionStore+LArNoise'
+CondInputLoader      INFO created CondCont<LArPedestalMC> with key 'ConditionStore+LArPedestal'
+CondInputLoader      INFO created CondCont<LArRampMC> with key 'ConditionStore+LArRamp'
+CondInputLoader      INFO created CondCont<LArShape32MC> with key 'ConditionStore+LArShape'
+CondInputLoader      INFO created CondCont<LArfSamplMC> with key 'ConditionStore+LArfSampl'
+CondInputLoader      INFO created CondCont<LAruA2MeVMC> with key 'ConditionStore+LAruA2MeV'
+ApplicationMgr       INFO Application Manager Started successfully
+AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
+EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
+EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
+ClassIDSvc           INFO  getRegistryEntries: read 109 CLIDRegistry entries for module ALL
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArBadChannelsBadChannels-IOVDEP-06 for folder /LAR/BadChannels/BadChannels
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArBadChannelsMissingFEBs-IOVDEP-04 for folder /LAR/BadChannels/MissingFEBs
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCAutoCorr-Apr2010 for folder /LAR/ElecCalibMC/AutoCorr
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCDAC2uA-CSC02-J for folder /LAR/ElecCalibMC/DAC2uA
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCHVScaleCorr-IOVDEP-00 for folder /LAR/ElecCalibMC/HVScaleCorr
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCMinBias-IOVDEP-01 for folder /LAR/ElecCalibMC/MinBias
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCMinBiasAverage-IOVDEP-01 for folder /LAR/ElecCalibMC/MinBiasAverage
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCMphysOverMcal-CSC02-I for folder /LAR/ElecCalibMC/MphysOverMcal
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCNoise-Apr2010 for folder /LAR/ElecCalibMC/Noise
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCPedestal-DC3-B-IdFix7 for folder /LAR/ElecCalibMC/Pedestal
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCRamp-CSC02-K for folder /LAR/ElecCalibMC/Ramp
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCShape-Apr2010 for folder /LAR/ElecCalibMC/Shape
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARIdentifierLArTTCellMapAtlas-HadFcalFix2 for folder /LAR/Identifier/LArTTCellMapAtlas
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCfSampl-G496-19213-FTFP_BERT_BIRK for folder /LAR/ElecCalibMC/fSampl
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARuA2MeV-Feb2011 for folder /LAR/ElecCalibMC/uA2MeV
+IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+DbSession            INFO     Open     DbSession    
+Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] EACFEBD4-9BD2-E211-848A-02163E006B20
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root File version:52200
+ToolSvc.LArCabl...   INFO  ====> iovCallBack 
+ToolSvc.LArCabl...   INFO Done reading online/offline identifier mapping
+ToolSvc.LArCabl...   INFO Found 195072 online identifier and 182468 offline identifier. 12604 disconnected channels.
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root File version:52200
+ToolSvc.LArMCSy...   INFO IOV callback
+ToolSvc.CaloNoi...   INFO Callback invoked for 13 keys 
+ToolSvc.CaloNoi...   INFO initContainers() begin 
+ToolSvc.CaloNoi...   INFO initContainers() end :  size of containers = 1833
+ToolSvc.CaloNoi...   INFO initAdc2MeV() begin 
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 64ADE389-CABD-DD11-8D4C-000423D950B0
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000001.gen.COND/cond08_mc.000001.gen.COND._0053.pool.root
+Warning in <TClass::Init>: no dictionary for class DataHeader_p2 is available
+Warning in <TClass::Init>: no dictionary for class DataHeaderElement_p2 is available
+Warning in <TClass::Init>: no dictionary for class PoolToken_p1 is available
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000001.gen.COND/cond08_mc.000001.gen.COND._0053.pool.root File version:51800
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] D27D07D4-C135-E011-84A9-003048F0E01E
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000027.gen.COND/cond09_mc.000027.gen.COND._0001.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000027.gen.COND/cond09_mc.000027.gen.COND._0001.pool.root File version:52600
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 7C42BC12-BD96-E011-B8EC-003048F0E01C
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000032.gen.COND/cond09_mc.000032.gen.COND._0001.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000032.gen.COND/cond09_mc.000032.gen.COND._0001.pool.root File version:52600
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 303FCBD8-653E-DD11-ABBD-000423D99862
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/oflcond/oflcond.000003.conditions.simul.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0061.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/oflcond/oflcond.000003.conditions.simul.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0061.pool.root File version:51800
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 64ADE389-CABD-DD11-8D4C-000423D950B0
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 3CE29BA7-A6DC-DC11-BF61-000423D65662
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/comcond/comcond.000004.lar_conditions.recon.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0044.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/comcond/comcond.000004.lar_conditions.recon.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0044.pool.root File version:51400
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] D27D07D4-C135-E011-84A9-003048F0E01E
+ToolSvc.LArADC2...   INFO Ntotal = 195072
+ToolSvc.LArADC2...   INFO Nconnected = 182468
+ToolSvc.LArADC2...   INFO Channels without DAC2uA = 0
+ToolSvc.LArADC2...   INFO Channels without uA2MeV = 0
+ToolSvc.LArADC2...   INFO Channels with medium gain threshold set to zero = 0
+ToolSvc.LArADC2...   INFO Channels without MphysMcal = 0
+ToolSvc.LArADC2...   INFO Channels without HVScaleCorr = 0
+ToolSvc.LArADC2...   INFO High Gain: Channels without Ramp = 0
+ToolSvc.LArADC2...   INFO Med Gain: Channels without Ramp = 0
+ToolSvc.LArADC2...   INFO Low Gain: Channels without Ramp = 0
+ToolSvc.CaloNoi...   INFO initAdc2MeV() end 
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 9229AE70-AC4C-DF11-A934-003048D2BC4A
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000009.gen.COND/cond09_mc.000009.gen.COND._0011.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000009.gen.COND/cond09_mc.000009.gen.COND._0011.pool.root File version:52200
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 7C42BC12-BD96-E011-B8EC-003048F0E01C
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] F4885664-6C4D-DF11-A94A-00304867340C
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000009.gen.COND/cond09_mc.000009.gen.COND._0013.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000009.gen.COND/cond09_mc.000009.gen.COND._0013.pool.root File version:52200
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 303FCBD8-653E-DD11-ABBD-000423D99862
+ToolSvc.LArOFCT...   INFO  noise valid 
+ToolSvc.LArAuto...   INFO   Bunch spacing (25 ns units ) 1
+ToolSvc.LArAuto...   INFO   N(MB)/bunch crossing 0
+ToolSvc.LArAuto...   INFO LArAutoCorrTotal Ncell 195072
+ToolSvc.LArAuto...   INFO LArAutoCorrTotal Nsymcell 1833
+ToolSvc.LArOFCT...   INFO LArOFCTool: number of cells   195072
+ToolSvc.LArOFCT...   INFO LArOFCTool: number of cells after sym 1833
+ToolSvc.CaloNoi...   INFO 
+ToolSvc.CaloNoi...   INFO ===== Diagnostic for  gain 0 =====
+ToolSvc.CaloNoi...   INFO 
+ToolSvc.CaloNoi...   INFO N cells with problem(s) = 0
+ToolSvc.CaloNoi...   INFO 
+ToolSvc.CaloNoi...   INFO ===== Diagnostic for  gain 1 =====
+ToolSvc.CaloNoi...   INFO 
+ToolSvc.CaloNoi...   INFO N cells with problem(s) = 0
+ToolSvc.CaloNoi...   INFO 
+ToolSvc.CaloNoi...   INFO ===== Diagnostic for  gain 2 =====
+ToolSvc.CaloNoi...   INFO 
+ToolSvc.CaloNoi...   INFO N cells with problem(s) = 0
+ToolSvc.CaloNoi...   INFO N events of Minimum Bias per bunch crossing =  0
+ToolSvc.tool2em      INFO permanent cell collection size = 173312 Filled : 173312
+ToolSvc.tool2em      INFO  Build permament cell collection with size 173312
+ToolSvc.tool2hec     INFO permanent cell collection size = 5632 Filled : 5632
+ToolSvc.tool2hec     INFO  Build permament cell collection with size 5632
+ToolSvc.tool2fcal    INFO permanent cell collection size = 3524 Filled : 3524
+ToolSvc.tool2fcal    INFO  Build permament cell collection with size 3524
+ToolSvc.tool3em      INFO permanent cell collection size = 173312 Filled : 173312
+ToolSvc.tool3em      INFO  Build permament cell collection with size 173312
+ToolSvc.tool3hec     INFO permanent cell collection size = 5632 Filled : 5632
+ToolSvc.tool3hec     INFO  Build permament cell collection with size 5632
+ToolSvc.tool3fcal    INFO permanent cell collection size = 3524 Filled : 3524
+ToolSvc.tool3fcal    INFO  Build permament cell collection with size 3524
+ToolSvc.tool4em      INFO permanent cell collection size = 173312 Filled : 173312
+ToolSvc.tool4em      INFO  Build permament cell collection with size 173312
+ToolSvc.tool4hec     INFO permanent cell collection size = 5632 Filled : 5632
+ToolSvc.tool4hec     INFO  Build permament cell collection with size 5632
+ToolSvc.tool4fcal    INFO permanent cell collection size = 3524 Filled : 3524
+ToolSvc.tool4fcal    INFO  Build permament cell collection with size 3524
+ToolSvc.tool5em      INFO permanent cell collection size = 173312 Filled : 173312
+ToolSvc.tool5em      INFO  Build permament cell collection with size 173312
+ToolSvc.tool5hec     INFO permanent cell collection size = 5632 Filled : 5632
+ToolSvc.tool5hec     INFO  Build permament cell collection with size 5632
+ToolSvc.tool5fcal    INFO permanent cell collection size = 3524 Filled : 3524
+ToolSvc.tool5fcal    INFO  Build permament cell collection with size 3524
+xAODMaker::Even...WARNING Algorithm::BeginRun is deprecated. Use Start instead
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #1 0 events processed so far  <<<===
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000001.gen.COND/cond08_mc.000001.gen.COND._0053.pool.root File version:51800
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 3CE29BA7-A6DC-DC11-BF61-000423D65662
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000032.gen.COND/cond09_mc.000032.gen.COND._0001.pool.root File version:52600
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 687EA080-E4B6-DD11-A149-000423D9907C
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000001.gen.COND/cond08_mc.000001.gen.COND._0067.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000001.gen.COND/cond08_mc.000001.gen.COND._0067.pool.root File version:51800
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 9229AE70-AC4C-DF11-A934-003048D2BC4A
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] F4885664-6C4D-DF11-A94A-00304867340C
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] FE8535CE-AD50-DC11-952F-000423D67862
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/oflcond/oflcond.000003.conditions.simul.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0040.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/oflcond/oflcond.000003.conditions.simul.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0040.pool.root File version:51400
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 64ADE389-CABD-DD11-8D4C-000423D950B0
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/comcond/comcond.000004.lar_conditions.recon.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0044.pool.root File version:51400
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 7C42BC12-BD96-E011-B8EC-003048F0E01C
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000009.gen.COND/cond09_mc.000009.gen.COND._0011.pool.root File version:52200
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 687EA080-E4B6-DD11-A149-000423D9907C
+LArPedestalMCCnv     INFO Reading LArPedestalMC (original)
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 180A4AF2-F47E-DB11-9E8F-000E0C4DEA2D
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cmccond/cmccond.000001.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0053.pool.root__DQ2-1250193473
+Warning in <TClass::Init>: no dictionary for class DataHeader_p1 is available
+Warning in <TClass::Init>: no dictionary for class DataHeaderElement_p1 is available
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cmccond/cmccond.000001.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0053.pool.root__DQ2-1250193473 File version:51000
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/oflcond/oflcond.000003.conditions.simul.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0061.pool.root File version:51800
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] FE8535CE-AD50-DC11-952F-000423D67862
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000009.gen.COND/cond09_mc.000009.gen.COND._0013.pool.root File version:52200
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 3CE29BA7-A6DC-DC11-BF61-000423D65662
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 445FAD9A-5DB3-E14A-81DB-BA6244602734
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000084.gen.COND/cond09_mc.000084.gen.COND._0001.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000084.gen.COND/cond09_mc.000084.gen.COND._0001.pool.root File version:53413
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 9229AE70-AC4C-DF11-A934-003048D2BC4A
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000027.gen.COND/cond09_mc.000027.gen.COND._0001.pool.root File version:52600
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 303FCBD8-653E-DD11-ABBD-000423D99862
+LArOnOffMappingAlg   INFO Done reading online/offline identifier mapping
+LArOnOffMappingAlg   INFO Found 195072 online identifier and 182468 offline identifier. 12604 disconnected channels.
+LArOnOffMappingAlg   INFO recorded new LArOnOffIdMap with range {[0,l:0] - [INVALID]} into Conditions Store
+LArCalibLineMap...   INFO Done reading readout/calibration line mapping.
+LArCalibLineMap...   INFO recorded new LArCalibLineMap with range {[0,l:0] - [INVALID]} into Conditions Store
+LArFebRodMappin...   INFO Done reading Feb/Rod mapping. Found 1524 Febs and 762 Rods
+LArFebRodMappin...   INFO recorded new LArFebRodMap with range {[0,l:0] - [INVALID]} into Conditions Store
+LArBadChannelCo...   INFO Read a total of 0 problematic channels from database
+LArBadFebCondAlg     INFO Read a total of 0 problematic febs from database
+xAODMaker::Even...WARNING xAOD::EventInfo with key "EventInfo" is already in StoreGate; EventInfoCnvAlg should not be scheduled.
+ClassIDSvc           INFO  getRegistryEntries: read 2261 CLIDRegistry entries for module ALL
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 1 events processed so far  <<<===
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] EACFEBD4-9BD2-E211-848A-02163E006B20
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 180A4AF2-F47E-DB11-9E8F-000E0C4DEA2D
+Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #1 1 events processed so far  <<<===
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/BadChannels/MissingFEBs' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/FebRodMap' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/OnOffIdMap' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'CondAttrListCollection' , 'ConditionStore+/LAR/BadChannels/BadChannels' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArAutoCorrMC' , 'ConditionStore+LArAutoCorr' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArDAC2uAMC' , 'ConditionStore+LArDAC2uA' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArHVScaleCorrComplete' , 'ConditionStore+LArHVScaleCorr' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMinBiasAverageMC' , 'ConditionStore+LArMinBiasAverage' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMinBiasMC' , 'ConditionStore+LArMinBias' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMphysOverMcalMC' , 'ConditionStore+LArMphysOverMcal' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArNoiseMC' , 'ConditionStore+LArNoise' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArPedestalMC' , 'ConditionStore+LArPedestal' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArRampMC' , 'ConditionStore+LArRamp' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArShape32MC' , 'ConditionStore+LArShape' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArfSamplMC' , 'ConditionStore+LArfSampl' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LAruA2MeVMC' , 'ConditionStore+LAruA2MeV' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+LArCalibLineMap...WARNING Found valid write handle
+ClassIDSvc           INFO  getRegistryEntries: read 690 CLIDRegistry entries for module ALL
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 2 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #3, run #1 2 events processed so far  <<<===
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/BadChannels/MissingFEBs' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/FebRodMap' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/OnOffIdMap' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'CondAttrListCollection' , 'ConditionStore+/LAR/BadChannels/BadChannels' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArAutoCorrMC' , 'ConditionStore+LArAutoCorr' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArDAC2uAMC' , 'ConditionStore+LArDAC2uA' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArHVScaleCorrComplete' , 'ConditionStore+LArHVScaleCorr' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMinBiasAverageMC' , 'ConditionStore+LArMinBiasAverage' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMinBiasMC' , 'ConditionStore+LArMinBias' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMphysOverMcalMC' , 'ConditionStore+LArMphysOverMcal' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArNoiseMC' , 'ConditionStore+LArNoise' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArPedestalMC' , 'ConditionStore+LArPedestal' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArRampMC' , 'ConditionStore+LArRamp' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArShape32MC' , 'ConditionStore+LArShape' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArfSamplMC' , 'ConditionStore+LArfSampl' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LAruA2MeVMC' , 'ConditionStore+LAruA2MeV' )  is still valid at [1,3,t:4294967295,l:3,b:4294967295]
+LArCalibLineMap...WARNING Found valid write handle
+AtRndmGenSvc         INFO  Stream =  ToolSvc.tool3em, Seed1 =  871957575, Seed2 = 1941611386
+AtRndmGenSvc         INFO  Stream =  ToolSvc.tool3fcal, Seed1 =  1039951719, Seed2 = 1349891211
+AtRndmGenSvc         INFO  Stream =  ToolSvc.tool3hec, Seed1 =  627311549, Seed2 = 472566319
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 3 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #1 3 events processed so far  <<<===
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/BadChannels/MissingFEBs' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/FebRodMap' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/OnOffIdMap' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'CondAttrListCollection' , 'ConditionStore+/LAR/BadChannels/BadChannels' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArAutoCorrMC' , 'ConditionStore+LArAutoCorr' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArDAC2uAMC' , 'ConditionStore+LArDAC2uA' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArHVScaleCorrComplete' , 'ConditionStore+LArHVScaleCorr' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMinBiasAverageMC' , 'ConditionStore+LArMinBiasAverage' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMinBiasMC' , 'ConditionStore+LArMinBias' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMphysOverMcalMC' , 'ConditionStore+LArMphysOverMcal' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArNoiseMC' , 'ConditionStore+LArNoise' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArPedestalMC' , 'ConditionStore+LArPedestal' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArRampMC' , 'ConditionStore+LArRamp' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArShape32MC' , 'ConditionStore+LArShape' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArfSamplMC' , 'ConditionStore+LArfSampl' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LAruA2MeVMC' , 'ConditionStore+LAruA2MeV' )  is still valid at [1,4,t:4294967295,l:4,b:4294967295]
+LArCalibLineMap...WARNING Found valid write handle
+ClassIDSvc           INFO  getRegistryEntries: read 65 CLIDRegistry entries for module ALL
+ToolSvc.tool4em   WARNING  windows not reimplemented yet
+ToolSvc.tool4hec  WARNING  windows not reimplemented yet
+ToolSvc.tool4fcal WARNING  windows not reimplemented yet
+AtRndmGenSvc         INFO  Stream =  ToolSvc.tool3em, Seed1 =  816824393, Seed2 = 1152411412
+AtRndmGenSvc         INFO  Stream =  ToolSvc.tool3fcal, Seed1 =  1031946339, Seed2 = 791083656
+AtRndmGenSvc         INFO  Stream =  ToolSvc.tool3hec, Seed1 =  517234067, Seed2 = 668203729
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 4 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #5, run #1 4 events processed so far  <<<===
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/BadChannels/MissingFEBs' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/FebRodMap' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/OnOffIdMap' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'CondAttrListCollection' , 'ConditionStore+/LAR/BadChannels/BadChannels' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArAutoCorrMC' , 'ConditionStore+LArAutoCorr' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArDAC2uAMC' , 'ConditionStore+LArDAC2uA' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArHVScaleCorrComplete' , 'ConditionStore+LArHVScaleCorr' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMinBiasAverageMC' , 'ConditionStore+LArMinBiasAverage' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMinBiasMC' , 'ConditionStore+LArMinBias' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMphysOverMcalMC' , 'ConditionStore+LArMphysOverMcal' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArNoiseMC' , 'ConditionStore+LArNoise' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArPedestalMC' , 'ConditionStore+LArPedestal' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArRampMC' , 'ConditionStore+LArRamp' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArShape32MC' , 'ConditionStore+LArShape' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArfSamplMC' , 'ConditionStore+LArfSampl' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LAruA2MeVMC' , 'ConditionStore+LAruA2MeV' )  is still valid at [1,5,t:4294967295,l:5,b:4294967295]
+LArCalibLineMap...WARNING Found valid write handle
+ToolSvc.tool5em   WARNING  windows not reimplemented yet
+ToolSvc.tool5hec  WARNING  windows not reimplemented yet
+ToolSvc.tool5fcal WARNING  windows not reimplemented yet
+AtRndmGenSvc         INFO  Stream =  ToolSvc.tool3em, Seed1 =  1340142741, Seed2 = 1416978076
+AtRndmGenSvc         INFO  Stream =  ToolSvc.tool3fcal, Seed1 =  1751137712, Seed2 = 914837991
+AtRndmGenSvc         INFO  Stream =  ToolSvc.tool3hec, Seed1 =  1846905953, Seed2 = 861268491
+AtRndmGenSvc         INFO  Stream =  ToolSvc.tool5em, Seed1 =  1400257506, Seed2 = 441023122
+AtRndmGenSvc         INFO  Stream =  ToolSvc.tool5fcal, Seed1 =  1155227556, Seed2 = 1661577989
+AtRndmGenSvc         INFO  Stream =  ToolSvc.tool5hec, Seed1 =  449972764, Seed2 = 2120794177
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 5 events processed so far  <<<===
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] D27D07D4-C135-E011-84A9-003048F0E01E
+/cvmfs/atlas-co...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 445FAD9A-5DB3-E14A-81DB-BA6244602734
+/cvmfs/atlas-co...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] F4885664-6C4D-DF11-A94A-00304867340C
+Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+ApplicationMgr       INFO Application Manager Stopped successfully
+IncidentProcAlg1     INFO Finalize
+CondInputLoader      INFO Finalizing CondInputLoader...
+testalg1             INFO Finalizing testalg1...
+IncidentProcAlg2     INFO Finalize
+AtRndmGenSvc         INFO  FINALISING 
+PyComponentMgr       INFO Finalizing PyComponentMgr...
+IdDictDetDescrCnv    INFO in finalize
+IOVDbSvc             INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.23 ))s
+IOVDbSvc             INFO Folder /LAR/BadChannels/BadChannels (AttrListColl) db-read 1/1 objs/chan/bytes 0/8/0 ((     0.07 ))s
+IOVDbSvc             INFO Folder /LAR/BadChannels/MissingFEBs (AttrList) db-read 1/1 objs/chan/bytes 1/1/16 ((     0.05 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/CalibIdMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/1520148 ((     0.17 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/FebRodMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/6100 ((     0.18 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/OnOffIdMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/780292 ((     0.47 ))s
+IOVDbSvc             INFO Folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
+IOVDbSvc             INFO Folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
+IOVDbSvc             INFO Folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/AutoCorr (PoolColl) db-read 1/2 objs/chan/bytes 3/3/486 ((     0.59 ))s
+IOVDbSvc             INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.46 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/DAC2uA (PoolColl) db-read 1/2 objs/chan/bytes 1/1/170 ((     0.51 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/HVScaleCorr (PoolColl) db-read 1/2 objs/chan/bytes 12/12/1980 ((     0.60 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/MinBias (PoolColl) db-read 1/2 objs/chan/bytes 1/1/174 ((     0.58 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/MinBiasAverage (PoolColl) db-read 1/1 objs/chan/bytes 1/1/181 ((     0.53 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/MphysOverMcal (PoolColl) db-read 1/2 objs/chan/bytes 3/3/516 ((     0.43 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Noise (PoolColl) db-read 1/2 objs/chan/bytes 3/3/516 ((     0.50 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Pedestal (PoolRef) db-read 1/1 objs/chan/bytes 1/1/167 ((     0.44 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Ramp (PoolColl) db-read 1/2 objs/chan/bytes 3/3/489 ((     0.54 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Shape (PoolColl) db-read 1/2 objs/chan/bytes 3/3/477 ((     0.55 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 ((     0.48 ))s
+IOVDbSvc          WARNING Folder /LAR/Identifier/LArTTCellMapAtlas is requested but no data retrieved
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/fSampl (PoolColl) db-read 1/2 objs/chan/bytes 1/1/194 ((     0.50 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/uA2MeV (PoolColl) db-read 1/2 objs/chan/bytes 1/1/165 ((     0.63 ))s
+IOVDbSvc             INFO Total payload read from COOL: 2312609 bytes in ((      8.50 ))s
+IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 20 ReadTime: ((     8.50 ))s
+IOVDbSvc             INFO Connection COOLOFL_CALO/OFLP200 : nConnect: 1 nFolders: 3 ReadTime: ((     0.00 ))s
+AthDictLoaderSvc     INFO in finalize...
+ToolSvc              INFO Removing all tools created by ToolSvc
+*****Chrono*****     INFO ****************************************************************************************************
+*****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
+*****Chrono*****     INFO ****************************************************************************************************
+cObjR_ALL            INFO Time User   : Tot= 1.41  [s] Ave/Min/Max=0.0217(+-0.0905)/    0/ 0.68  [s] #= 65
+cObj_ALL             INFO Time User   : Tot= 2.56  [s] Ave/Min/Max=0.0883(+-0.196)/    0/ 0.79  [s] #= 29
+ChronoStatSvc        INFO Time User   : Tot= 95.8  [s]                                             #=  1
+*****Chrono*****     INFO ****************************************************************************************************
+ChronoStatSvc.f...   INFO  Service finalized successfully 
+ApplicationMgr       INFO Application Manager Finalized successfully
+ApplicationMgr       INFO Application Manager Terminated successfully
+Py:Athena            INFO leaving with code 0: "successful run"
diff --git a/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.py b/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.py
new file mode 100644
index 0000000000000000000000000000000000000000..fa46ac6f49d1e67eaeb1b40668924a21407dced2
--- /dev/null
+++ b/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.py
@@ -0,0 +1,434 @@
+#
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
+#
+# File: LArCellRec/share/LArCellDeadOTXCorr_test.py
+# Author: sss
+# Date: Aug, 2018
+# Brief: Unit test for LArCellDeadOTXCorr.
+#
+
+
+import ROOT
+ROOT.TH1F
+
+from AthenaCommon.DetFlags      import DetFlags
+DetFlags.detdescr.LAr_setOn()
+
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+athenaCommonFlags.isOnline.set_Value(True)
+
+
+import sys
+import string
+import ROOT
+import math
+from AtlasGeoModel import SetGeometryVersion
+from AtlasGeoModel import GeoModelInit
+from AtlasGeoModel import SetupRecoGeometry
+include( "CaloIdCnv/CaloIdCnv_joboptions.py" )
+
+from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
+ServiceMgr += GeoModelSvc()
+theApp.CreateSvc += [ "GeoModelSvc"]
+from AtlasGeoModel import LArGM
+
+from IOVDbSvc.IOVDbSvcConf import IOVDbSvc
+IOVDbSvc().GlobalTag = 'OFLCOND-RUN12-SDR-35'
+
+include('LArConditionsCommon/LArConditionsCommon_MC_jobOptions.py')
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+theApp.EvtMax=2
+
+
+import ROOT
+from LArCellRec.LArCellDeadOTXCorrToolDefault import LArCellDeadOTXCorrToolDefault
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+
+# barrel_ec, pos_neg, feedthrough, slot
+BADFEBS2 = [[(0, 1, 12,  3), 'deadReadout'],  # tt  0.2 2.5 (below noise)
+            [(1, 0,  3,  2), 'deadReadout'],  # tt -2.8 2.8
+            [(0, 0, 10,  1), 'deadReadout'],  # tt -1.0 1.1
+            ]
+
+
+###########################################################################
+
+
+# feb file format:
+# barrel_ec pos_neg feedthrough slot flags
+#  0       1       12      4  deadAll
+#  1       0       16      9 deadReadout deadAll
+# badfebs is a list of (barrel_ec, pos_neg, feedthrough, slot) tuples
+def make_bad_channel_tool (name, badfebs = []):
+    from LArBadChannelTool.LArBadChannelToolConf import LArBadChanTool
+    febfile = ''
+    if badfebs:
+        febfile = name + '.badfebs'
+        f = open (febfile, 'w')
+        for (feb, err) in badfebs:
+            print >> f, feb[0], feb[1], feb[2], feb[3], err
+        f.close()
+    return LArBadChanTool (name,
+                           ReadFromASCII = True,
+                           WriteEmptyFolders = True,
+                           CoolFolder = '',
+                           ComplementaryCoolFolder = '',
+                           CoolMissingFEBsFolder = '',
+                           FEBfile = febfile)
+
+
+###########################################################################
+
+
+def make_calo_cells (detStore):
+    mgr = detStore['CaloMgr']
+    ccc = ROOT.CaloCellContainer()
+    for i in range (mgr.element_size()):
+        elt = mgr.get_element (ROOT.IdentifierHash (i))
+        if not elt: break
+        cc = ROOT.CaloCell (elt, i%1000, i+0.5, 10, 11, 1)
+        ccc.push_back (cc)
+        ROOT.SetOwnership (cc, False)
+    ccc.order()
+    ccc.updateCaloIterators()
+    return ccc
+
+
+# Data from xAODTriggerTowers dumped from an example MC event.
+tt_table = [
+  [ -0.1 , 1.4 , [32, 30, 35, 36, 33, 32, 32] ],
+  [ -0.2 , 3.9 , [35, 31, 34, 38, 38, 35, 36] ],
+  [ -0.2 , 5.0 , [31, 31, 32, 36, 38, 31, 33] ],
+  [ -0.2 , 5.3 , [32, 31, 31, 35, 33, 30, 30] ],
+  [ -0.2 , 6.2 , [35, 30, 33, 38, 30, 32, 32] ],
+  [ -0.2 , 2.9 , [29, 34, 46, 59, 44, 33, 29] ],
+  [ -0.2 , 4.8 , [31, 30, 34, 36, 31, 29, 29] ],
+  [ -0.2 , 6.1 , [36, 35, 42, 53, 43, 37, 29] ],
+  [ -0.3 , 3.3 , [32, 33, 35, 38, 37, 30, 30] ],
+  [ -0.3 , 5.9 , [31, 32, 35, 41, 37, 31, 30] ],
+  [ -0.3 , 6.0 , [32, 35, 44, 54, 44, 33, 27] ],
+  [ -0.3 , 6.1 , [39, 45, 82, 131, 91, 45, 22] ],
+  [ -0.3 , 6.2 , [33, 35, 43, 59, 47, 36, 27] ],
+  [ -0.6 , 0.9 , [31, 26, 32, 36, 32, 32, 33] ],
+  [ -0.6 , 2.9 , [32, 32, 32, 36, 32, 29, 33] ],
+  [ -0.9 , 1.2 , [34, 33, 35, 41, 32, 31, 31] ],
+  [ -0.9 , 1.0 , [34, 34, 37, 44, 40, 33, 32] ],
+  [ -0.9 , 1.1 , [32, 32, 33, 36, 36, 33, 31] ],
+  [ -0.9 , 1.6 , [35, 32, 34, 38, 36, 33, 33] ],
+  [ -0.9 , 4.4 , [29, 28, 31, 35, 32, 27, 28] ],
+  [ -1.0 , 0.6 , [31, 32, 34, 37, 36, 31, 28] ],
+  [ -1.0 , 0.8 , [31, 33, 35, 37, 35, 33, 28] ],
+  [ -1.0 , 0.9 , [34, 37, 38, 43, 37, 31, 29] ],
+  [ -1.0 , 1.0 , [39, 44, 76, 123, 88, 42, 22] ],
+  [ -1.0 , 1.1 , [44, 52, 129, 239, 157, 57, 7] ],  # USED
+  [ -1.0 , 1.2 , [33, 30, 32, 38, 39, 33, 36] ],
+  [ -1.1 , 1.0 , [31, 33, 36, 44, 39, 35, 31] ],
+  [ -1.1 , 1.1 , [31, 28, 33, 41, 37, 34, 30] ],
+  [ -1.1 , 1.8 , [32, 33, 34, 37, 35, 32, 31] ],
+  [ -1.2 , 1.1 , [36, 33, 35, 37, 35, 33, 33] ],
+  [ -1.4 , 0.8 , [34, 31, 32, 35, 30, 30, 32] ],
+  [ -1.5 , 0.5 , [32, 29, 30, 36, 33, 30, 29] ],
+  [ -1.5 , 4.5 , [33, 34, 36, 44, 40, 34, 30] ],
+  [ -1.5 , 3.2 , [30, 33, 34, 36, 34, 31, 32] ],
+  [ -1.5 , 4.3 , [35, 35, 36, 41, 37, 33, 29] ],
+  [ -1.6 , 4.3 , [33, 33, 34, 36, 35, 31, 33] ],
+  [ -1.8 , 0.0 , [31, 34, 36, 39, 35, 32, 30] ],
+  [ -1.8 , 4.3 , [31, 31, 35, 37, 35, 31, 31] ],
+  [ -1.8 , 5.1 , [32, 33, 35, 40, 37, 33, 33] ],
+  [ -1.9 , 0.0 , [33, 33, 36, 37, 35, 32, 31] ],
+  [ -1.9 , 4.4 , [33, 34, 36, 37, 36, 32, 30] ],
+  [ -1.9 , 5.5 , [33, 35, 40, 51, 44, 34, 29] ],
+  [ -1.9 , 6.2 , [32, 34, 37, 41, 37, 31, 32] ],
+  [ -2.2 , 6.0 , [32, 31, 33, 37, 32, 30, 30] ],
+  [ -2.3 , 2.2 , [35, 37, 59, 88, 66, 38, 25] ],
+  [ -2.3 , 2.3 , [32, 36, 47, 62, 51, 34, 28] ],
+  [ -2.5 , 2.1 , [33, 33, 34, 36, 33, 33, 30] ],
+  [ -2.5 , 2.9 , [34, 35, 36, 41, 37, 35, 32] ],
+  [ -2.5 , 3.2 , [30, 34, 39, 50, 43, 35, 29] ],
+  [ -2.6 , 2.3 , [36, 37, 36, 37, 33, 31, 29] ],
+  [ -2.6 , 2.5 , [32, 35, 38, 40, 36, 31, 29] ],
+  [ -2.6 , 2.8 , [33, 37, 39, 49, 40, 33, 29] ],
+  [ -2.6 , 3.0 , [37, 37, 40, 47, 44, 36, 32] ],
+  [ -2.6 , 3.2 , [35, 34, 35, 37, 34, 32, 32] ],
+  [ -2.6 , 3.4 , [33, 36, 34, 37, 34, 32, 30] ],
+  [ -2.8 , 2.8 , [40, 44, 64, 95, 71, 39, 25] ],  # USED
+  [ -2.8 , 3.0 , [35, 39, 52, 69, 53, 34, 27] ],
+  [ -3.8 , 0.2 , [33, 37, 32, 31, 31, 33, 35] ],
+  [ -3.8 , 1.8 , [33, 38, 35, 35, 29, 24, 30] ],
+  [ -3.8 , 3.3 , [30, 35, 33, 32, 31, 31, 33] ],
+  [ 0.1 , 0.9 , [33, 33, 33, 38, 39, 32, 32] ],
+  [ 0.1 , 4.9 , [32, 33, 34, 37, 34, 31, 27] ],
+  [ 0.1 , 5.6 , [31, 33, 35, 41, 37, 32, 33] ],
+  [ 0.2 , 0.9 , [30, 30, 31, 37, 32, 29, 29] ],
+  [ 0.2 , 2.5 , [35, 31, 31, 36, 31, 29, 30] ], # USED
+  [ 0.2 , 3.3 , [32, 28, 34, 36, 31, 30, 32] ],
+  [ 0.3 , 1.7 , [35, 32, 35, 37, 34, 32, 33] ],
+  [ 0.3 , 5.6 , [34, 29, 31, 35, 34, 30, 32] ],
+  [ 0.4 , 0.8 , [34, 32, 33, 37, 32, 29, 27] ],
+  [ 0.4 , 1.2 , [30, 29, 29, 35, 30, 28, 30] ],
+  [ 0.6 , 1.8 , [31, 33, 34, 38, 35, 33, 31] ],
+  [ 0.6 , 3.6 , [31, 30, 33, 35, 31, 30, 32] ],
+  [ 0.9 , 1.6 , [33, 33, 34, 37, 36, 31, 30] ],
+  [ 0.9 , 5.4 , [31, 31, 36, 36, 34, 31, 31] ],
+  [ 0.9 , 1.8 , [32, 34, 31, 35, 33, 29, 31] ],
+  [ 0.9 , 3.0 , [32, 35, 32, 38, 34, 31, 29] ],
+  [ 0.9 , 5.0 , [32, 33, 35, 37, 38, 33, 32] ],
+  [ 1.0 , 5.6 , [34, 33, 37, 38, 33, 32, 30] ],
+  [ 1.1 , 4.5 , [33, 31, 33, 37, 34, 31, 31] ],
+  [ 1.4 , 1.4 , [33, 33, 36, 39, 37, 34, 31] ],
+  [ 1.4 , 1.5 , [31, 32, 34, 38, 36, 33, 32] ],
+  [ 1.5 , 1.8 , [33, 36, 38, 39, 38, 32, 31] ],
+  [ 1.5 , 4.8 , [31, 30, 34, 37, 36, 33, 32] ],
+  [ 2.0 , 1.6 , [31, 33, 37, 40, 37, 32, 30] ],
+  [ 2.6 , 2.8 , [36, 35, 35, 38, 38, 33, 33] ],
+  [ 2.6 , 5.2 , [31, 34, 36, 36, 31, 29, 31] ],
+  [ 3.8 , 4.1 , [33, 36, 35, 34, 29, 25, 26] ],
+  [ 4.3 , 5.3 , [34, 44, 44, 51, 27, 5, 10] ],
+  [ -1.6 , 1.6 , [30, 30, 32, 33, 33, 30, 31] ],
+  [ -1.8 , 4.2 , [33, 31, 36, 41, 39, 36, 34] ],
+  [ -1.8 , 4.3 , [32, 33, 38, 40, 37, 35, 33] ],
+  [ -1.9 , 4.4 , [31, 33, 46, 53, 49, 42, 35] ],
+  [ -1.9 , 4.5 , [31, 32, 34, 36, 34, 33, 32] ],
+  [ -2.0 , 4.1 , [32, 32, 34, 35, 34, 33, 32] ],
+  [ -2.0 , 6.2 , [32, 31, 47, 56, 51, 42, 35] ],
+  [ -2.2 , 3.2 , [30, 30, 32, 33, 33, 31, 31] ],
+  [ -2.2 , 3.5 , [33, 31, 33, 35, 32, 32, 32] ],
+  [ -2.3 , 2.7 , [32, 31, 32, 34, 32, 32, 33] ],
+  [ -2.5 , 2.9 , [33, 31, 33, 34, 34, 33, 31] ],
+  [ -2.5 , 3.0 , [33, 33, 33, 36, 36, 33, 34] ],
+  [ -2.6 , 2.8 , [32, 31, 38, 45, 43, 39, 35] ],
+  [ -2.6 , 3.0 , [31, 34, 41, 45, 42, 38, 33] ],
+  [ -2.6 , 3.2 , [35, 35, 38, 41, 38, 37, 36] ],
+  [ -2.8 , 2.8 , [36, 35, 42, 48, 43, 38, 33] ],
+  [ -2.8 , 3.0 , [35, 35, 47, 55, 48, 41, 36] ],
+  [ -3.0 , 2.8 , [32, 35, 37, 40, 38, 37, 37] ],
+  [ -3.0 , 3.0 , [33, 34, 38, 40, 38, 37, 35] ],
+  [ -4.7 , 2.9 , [34, 38, 36, 37, 32, 32, 31] ],
+  [ 1.8 , 4.3 , [31, 30, 34, 34, 33, 31, 31] ],
+  [ 0.8 , 4.9 , [32, 31, 34, 37, 35, 34, 34] ],
+  [ -0.6 , 2.8 , [33, 31, 35, 38, 33, 34, 31] ],
+  [ -0.9 , 2.9 , [32, 31, 36, 40, 39, 34, 33] ],
+  [ -0.3 , 6.1 , [30, 29, 33, 36, 34, 34, 28] ],
+  [ -0.3 , 6.2 , [33, 31, 36, 37, 38, 32, 34] ],
+  [ -0.4 , 6.2 , [30, 33, 35, 38, 39, 34, 33] ],
+  [ 1.4 , 4.7 , [31, 33, 32, 37, 33, 32, 31] ],
+  [ -1.0 , 1.1 , [34, 34, 38, 39, 36, 34, 33] ],
+  [ -1.2 , 4.1 , [33, 32, 34, 35, 35, 34, 32] ],
+  [ -0.1 , 0.0 , [28, 31, 35, 38, 34, 32, 34] ],
+]
+
+def make_TriggerTowerContainer():
+    ttc = ROOT.xAOD.TriggerTowerContainer_v2()
+    aux = ROOT.xAOD.TriggerTowerAuxContainer_v2()
+    ttc.setNonConstStore (aux)
+
+    veccls = getattr (ROOT, 'std::vector<unsigned short>')
+    for tt_data in tt_table:
+        tt = ROOT.xAOD.TriggerTower_v2()
+        ttc.push_back (tt)
+        ROOT.SetOwnership (tt, False)
+        tt.setEta (tt_data[0])
+        tt.setPhi (tt_data[1])
+        v = veccls()
+        v.reserve (len(tt_data[2]))
+        for adc in tt_data[2]:
+            v.push_back (adc)
+        tt.setAdc (v)
+    return (ttc, aux)
+
+
+###########################################################################
+
+from AthenaPython.PyAthenaComps import Alg, StatusCode
+class TestAlg (Alg):
+    def __init__ (self, name):
+        Alg.__init__ (self, name)
+        return
+
+    def initialize (self):
+        ROOT.ICaloCellMakerTool
+        self.tool1 = ROOT.ToolHandle(ROOT.ICaloCellMakerTool)('LArCellDeadOTXCorr/tool1')
+        self.tool2 = ROOT.ToolHandle(ROOT.ICaloCellMakerTool)('LArCellDeadOTXCorr/tool2')
+
+        self.idmgr = self.detStore['CaloIdManager']
+        self.onlineID = self.detStore['LArOnlineID']
+        self.offlineID  = self.detStore['CaloCell_ID']
+        self.ccc = make_calo_cells (self.detStore)
+        if not self.tool1.retrieve():
+            return StatusCode.Failure
+        if not self.tool2.retrieve():
+            return StatusCode.Failure
+
+        self.cabling = ROOT.ToolHandle(ROOT.LArCablingService)('LArCablingService')
+        if not self.cabling.retrieve():
+            return StatusCode.Failure
+
+        self.ttsvc = ROOT.ToolHandle(ROOT.CaloTriggerTowerService)('CaloTriggerTowerService')
+        if not self.ttsvc.retrieve():
+            return StatusCode.Failure
+
+        return StatusCode.Success
+
+    def execute (self):
+        iev = self.getContext().evt()
+
+        (t, a) = make_TriggerTowerContainer()
+        if not self.evtStore.record (t, 'xAODTriggerTowers', False):
+            return StatusCode.Failure
+        if not self.evtStore.record (a, 'xAODTriggerTowersAux.', False):
+            return StatusCode.Failure
+
+        if iev == 0:
+            # Event 0: no errors
+            tool = self.tool1
+            exp_diffs = []
+
+        else:
+            # Event 1: Some dead FEBs
+            tool = self.tool2
+            exp_diffs = [
+                # -2.8, 2.8
+                ([604, 605, 668, 669], 31469.2148438),
+                ([472, 473, 536, 537], 3315.55249023),
+                ([476, 477, 540, 541], 3067.95507812),
+                ([478, 479, 542, 543], 6195.74316406),
+                ([606, 607, 670, 671], 18408.6542969),
+                ([732, 733], 4353.24609375),
+                ([734, 735, 798, 799], 4605.72900391),
+                ([796, 797], 4353.24609375),
+                # -1.0, 1.1
+                ([34443, 34507, 34571, 34635], 12576.5966797),
+                ([34442, 34506, 34570, 34634], 1314.39941406),
+                ]
+
+        if not tool.process (self.ccc):
+            return StatusCode.Failure
+ 
+        self.check_and_reset_cells (exp_diffs)
+
+        #self.print_tt_febs()
+
+        return StatusCode.Success
+    
+
+    def check_and_reset_cells (self, exp_diffs):
+        cell_diffs = {}
+        for ids, e in exp_diffs:
+            for xid in ids:
+                cell_diffs[xid] = e
+
+        for c in self.ccc:
+            i = c.caloDDE().calo_hash().value()
+            exp_e = cell_diffs.get (i)
+            if exp_e != None:
+                assert abs (c.energy() - exp_e) < 1e-6
+            else:
+                assert c.energy() == i%1000
+
+            assert c.time() == i+0.5
+            assert c.quality() == 10
+            assert c.provenance() == 11
+        return
+
+
+    #####
+
+
+    # Print list of FEBS corresponding to each entry in tt_table.
+    def print_tt_febs (self):
+        for tt in tt_table:
+            emid, hadid, febs = self.tt_to_febs (tt[0], tt[1])
+            print 'tt ', tt[0], tt[1], hex(emid), hex(hadid),
+            for feb, idv in febs.items():
+                print feb, hex(idv),
+            print
+        return
+        
+    def tt_to_febs (self, eta, phi):
+        lvl1Helper = self.idmgr.getLVL1_ID()
+        pos_neg_z = self.pos_neg_z (eta)
+        region = self.region_index (eta)
+        ieta = self.eta_index (eta)
+        iphi = self.phi_index (eta, phi)
+        emid = lvl1Helper.tower_id (pos_neg_z, 0, region, ieta, iphi)
+        hadid = lvl1Helper.tower_id (pos_neg_z, 1, region, ieta, iphi)
+        febs = {}
+        for ttid in (emid, hadid):
+            for cellid in self.ttsvc.createCellIDvecTT (ttid):
+                febid = self.cabling.createSignalChannelID (cellid)
+                barrel_ec = self.onlineID.barrel_ec (febid)
+                pos_neg = self.onlineID.pos_neg (febid)
+                feedthrough = self.onlineID.feedthrough (febid)
+                slot = self.onlineID.slot (febid)
+                febs[(barrel_ec, pos_neg, feedthrough, slot)] = febid.get_compact()
+        return (emid.get_compact(), hadid.get_compact(), febs)
+
+
+    def pos_neg_z (self, eta):
+        return 1 if eta >=0 else -1
+
+
+    # min, max, etawidth, phiwidth
+    ETA_REGIONS = [[0.0, 2.5,  0.1,    math.pi/32],
+                   [2.5, 3.1,  0.2,    math.pi/32*2],
+                   [3.1, 3.2,  0.1,    math.pi/32*2],
+                   [3.2, 4.9,  0.425,  math.pi/32*4],
+                    ]
+
+    def find_region (self, eta):
+        aeta = abs(eta)
+        for i, r in enumerate (TestAlg.ETA_REGIONS):
+            if aeta < r[1]: return (i, r)
+        return (-1, None)
+        
+    def region_index (self, eta):
+        return self.find_region (eta)[0]
+
+    def eta_index (self, eta):
+        r = self.find_region (eta)[1]
+        if r:
+            return int((abs(eta) - r[0]) / r[2])
+        return -1
+
+    def phi_index (self, eta, phi):
+        r = self.find_region (eta)[1]
+        if r:
+            return int (phi / r[3])
+        return -1
+
+
+badchan_empty = make_bad_channel_tool ('deadotx_badchan_empty')
+ToolSvc += badchan_empty
+
+badchan2 = make_bad_channel_tool ('deadotx_badchan2', BADFEBS2)
+ToolSvc += badchan2
+
+tool1 = LArCellDeadOTXCorrToolDefault ('tool1')
+tool1.badChannelTool = badchan_empty
+ToolSvc += tool1
+
+tool2 = LArCellDeadOTXCorrToolDefault ('tool2')
+tool2.badChannelTool = badchan2
+ToolSvc += tool2
+#tool2.useL1CaloDB = True
+
+#############################
+# L1CaloDbTag = "<tag>HEAD</tag>"
+# l1calofolder = "/TRIGGER/L1Calo/V1/Calibration/Physics/PprChanCalib"
+
+# from IOVDbSvc.CondDB import conddb
+# conddb.dbname= 'CONDBR2'
+# if not conddb.folderRequested(l1calofolder):
+#     conddb.addFolder('TRIGGER_ONL', l1calofolder + L1CaloDbTag)
+
+#############################
+
+
+testalg1 = TestAlg ('testalg1')
+topSequence += testalg1
diff --git a/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.ref b/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..4017ce4de9e24c062b5c3318f0c1cb1aeea4c8e8
--- /dev/null
+++ b/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.ref
@@ -0,0 +1,587 @@
+Mon Sep 10 20:30:36 CEST 2018
+Preloading tcmalloc_minimal.so
+Py:Athena            INFO including file "AthenaCommon/Preparation.py"
+Py:Athena            INFO using release [AthenaWorkDir-22.0.1] [x86_64-slc6-gcc7-dbg] [atlas-work3/7a8cc912e78] -- built on [2018-09-10T1501]
+Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
+Py:Athena            INFO executing ROOT6Setup
+Py:Athena            INFO including file "AthenaCommon/Execution.py"
+Py:Athena            INFO including file "LArCellRec/LArCellDeadOTXCorr_test.py"
+[?1034hSetGeometryVersion.py obtained major release version 22
+Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
+Py:ConfigurableDb    INFO Read module info for 5511 configurables from 52 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
+EventInfoMgtInit: Got release version  Athena-22.0.1
+Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
+Py:Athena            INFO including file "CaloIdCnv/CaloIdCnv_joboptions.py"
+Py:Athena            INFO including file "CaloConditions/CaloConditions_jobOptions.py"
+Py:Athena            INFO including file "CaloConditions/LArTTCellMap_ATLAS_jobOptions.py"
+Py:Athena            INFO including file "CaloConditions/CaloTTIdMap_ATLAS_jobOptions.py"
+Py:Athena            INFO including file "LArConditionsCommon/LArConditionsCommon_MC_jobOptions.py"
+ATLAS-R2-2016-01-00-01
+Py:JobPropertyContainer::    INFO  use global tag for all LArElecCalibMC constants 
+Py:Athena            INFO including file "LArConditionsCommon/LArIdMap_MC_jobOptions.py"
+Py:JobPropertyContainer::    INFO  setting folder /LAR/Identifier/OnOffIdMap with tag LARIdentifierOnOffIdMap-012
+Py:JobPropertyContainer::    INFO  setting folder /LAR/Identifier/CalibIdMap with tag LARIdentifierCalibIdMap-012
+Py:JobPropertyContainer::    INFO  setting folder /LAR/Identifier/FebRodMap with tag LARIdentifierFebRodMap-005
+Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr    SUCCESS 
+====================================================================================================================================
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r3)
+                                          running on lxplus027.cern.ch on Mon Sep 10 20:31:03 2018
+====================================================================================================================================
+ApplicationMgr       INFO Successfully loaded modules : AthenaServices
+ApplicationMgr       INFO Application Manager Configured successfully
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+StatusCodeSvc        INFO initialize
+AthDictLoaderSvc     INFO in initialize...
+AthDictLoaderSvc     INFO acquired Dso-registry
+ClassIDSvc           INFO  getRegistryEntries: read 6897 CLIDRegistry entries for module ALL
+CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
+CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
+AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
+PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
+PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
+PoolSvc              INFO Frontier compression level set to 5
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus027.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+PoolSvc              INFO Successfully setup replica sorting algorithm
+PoolSvc              INFO Setting up APR FileCatalog and Streams
+PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc           WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc              INFO Resolved path (via ATLAS_POOLCOND_PATH) is /cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml
+PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
+DbSession            INFO     Open     DbSession    
+Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
+IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
+IOVDbSvc             INFO Cache alignment will be done in 3 slices
+IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
+IOVDbSvc             INFO Folder /LAR/Identifier/OnOffIdMap, adding new key tag with value LARIdentifierOnOffIdMap-012
+IOVDbSvc             INFO Folder /LAR/Identifier/CalibIdMap, adding new key tag with value LARIdentifierCalibIdMap-012
+IOVDbSvc             INFO Folder /LAR/Identifier/FebRodMap, adding new key tag with value LARIdentifierFebRodMap-005
+IOVDbSvc             INFO Read from meta data only for folder /TagInfo
+IOVDbSvc             INFO Initialised with 3 connections and 25 folders
+IOVDbSvc             INFO Service IOVDbSvc initialised successfully
+IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
+IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
+IOVSvcTool           INFO IOVRanges will be checked at every Event
+ClassIDSvc           INFO  getRegistryEntries: read 1537 CLIDRegistry entries for module ALL
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_CALO/OFLP200
+IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Disconnecting from COOLOFL_CALO/OFLP200
+IOVDbSvc             INFO Added taginfo remove for /LAR/Align
+IOVDbSvc             INFO Added taginfo remove for /LAR/BadChannels/BadChannels
+IOVDbSvc             INFO Added taginfo remove for /LAR/BadChannels/MissingFEBs
+IOVDbSvc             INFO Added taginfo remove for /LAR/CellCorrOfl/deadOTX
+IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/CalibIdMap
+IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/FebRodMap
+IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/OnOffIdMap
+IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas
+IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas
+IOVDbSvc             INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/AutoCorr
+IOVDbSvc             INFO Added taginfo remove for /LAR/LArCellPositionShift
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/DAC2uA
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/HVScaleCorr
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/MinBias
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/MinBiasAverage
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/MphysOverMcal
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/Noise
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/Pedestal
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/Ramp
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/Shape
+IOVDbSvc             INFO Added taginfo remove for /LAR/Identifier/LArTTCellMapAtlas
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/fSampl
+IOVDbSvc             INFO Added taginfo remove for /LAR/ElecCalibMC/uA2MeV
+ClassIDSvc           INFO  getRegistryEntries: read 17 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4298 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9 CLIDRegistry entries for module ALL
+DetDescrCnvSvc       INFO  initializing 
+DetDescrCnvSvc       INFO Found DetectorStore service
+DetDescrCnvSvc       INFO  filling proxies for detector managers 
+DetDescrCnvSvc       INFO  filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for IdDict with CLID 2411 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for AtlasID with CLID 164875623 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for PixelID with CLID 2516 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for SCT_ID with CLID 2517 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TRT_ID with CLID 2518 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for SiliconID with CLID 129452393 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TileID with CLID 2901 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TileHWID with CLID 2902 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TileTBID with CLID 2903 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for ZdcID with CLID 190591643 and storage type 68 to detector store 
+GeoModelSvc::RD...WARNING  Getting PixTBMatComponents with default tag
+GeoModelSvc::RD...WARNING  Getting PixTBMaterials with default tag
+GeoModelSvc::RD...WARNING  Getting InDetMatComponents with default tag
+GeoModelSvc::RD...WARNING  Getting InDetMaterials with default tag
+GeoModelSvc.LAr...   INFO Keys for LAr are ATLAS-R2-2016-01-00-01  ATLAS
+GeoModelSvc.LAr...   INFO Building LAr version LAr-Revised-17-01 while ATLAS version is ATLAS-R2-2016-01-00-01
+GeoModelSvc.LAr...   INFO LAr Geometry Options:
+GeoModelSvc.LAr...   INFO   Sagging           = false
+GeoModelSvc.LAr...   INFO   Barrel            = ON
+GeoModelSvc.LAr...   INFO   Endcap            = ON
+BarrelConstruction   INFO Getting primary numbers for ATLAS, ATLAS-R2-2016-01-00-01
+BarrelConstruction   INFO   Makes detailed absorber sandwich  ? 1 1
+BarrelConstruction   INFO   Use sagging in geometry  ? 0
+============== EMEC Construction ===============
+  multi-layered version of absorbers activated, mlabs == 1
+================================================
+EventPersistenc...   INFO Added successfully Conversion service:DetDescrCnvSvc
+ClassIDSvc           INFO  getRegistryEntries: read 1931 CLIDRegistry entries for module ALL
+CaloIDHelper_ID...   INFO in createObj: creating a TileTBID helper object in the detector store
+IdDictDetDescrCnv    INFO in initialize
+IdDictDetDescrCnv    INFO in createObj: creating a IdDictManager object in the detector store
+IdDictDetDescrCnv    INFO IdDictName:  IdDictParser/ATLAS_IDS.xml
+IdDictDetDescrCnv    INFO Reading InnerDetector    IdDict file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml
+IdDictDetDescrCnv    INFO Reading LArCalorimeter   IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml
+IdDictDetDescrCnv    INFO Reading TileCalorimeter  IdDict file IdDictParser/IdDictTileCalorimeter.xml
+IdDictDetDescrCnv    INFO Reading Calorimeter      IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml
+IdDictDetDescrCnv    INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.03.xml
+IdDictDetDescrCnv    INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors_2010.xml
+IdDictDetDescrCnv    INFO Found id dicts:
+IdDictDetDescrCnv    INFO Using dictionary tag: null
+IdDictDetDescrCnv    INFO Dictionary ATLAS                version default              DetDescr tag (using default) file 
+IdDictDetDescrCnv    INFO Dictionary Calorimeter          version default              DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml
+IdDictDetDescrCnv    INFO Dictionary ForwardDetectors     version default              DetDescr tag ForDetIdentifier-01       file IdDictParser/IdDictForwardDetectors_2010.xml
+IdDictDetDescrCnv    INFO Dictionary InnerDetector        version IBL-DBM              DetDescr tag InDetIdentifier-IBL3D25-02 file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml
+IdDictDetDescrCnv    INFO Dictionary LArCalorimeter       version fullAtlas            DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml
+IdDictDetDescrCnv    INFO Dictionary LArElectrode         version fullAtlas            DetDescr tag (using default) file 
+IdDictDetDescrCnv    INFO Dictionary LArHighVoltage       version fullAtlas            DetDescr tag (using default) file 
+IdDictDetDescrCnv    INFO Dictionary MuonSpectrometer     version R.03                 DetDescr tag MuonIdentifier-08         file IdDictParser/IdDictMuonSpectrometer_R.03.xml
+IdDictDetDescrCnv    INFO Dictionary TileCalorimeter      version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00         file IdDictParser/IdDictTileCalorimeter.xml
+TileTBID             INFO initialize_from_dictionary 
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+EndcapDMConstru...   INFO Start building EC electronics geometry
+============== EMEC Construction ===============
+  multi-layered version of absorbers activated, mlabs == 1
+================================================
+EndcapDMConstru...   INFO Start building EC electronics geometry
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 29508Kb 	 Time = 1.74S
+ClassIDSvc           INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 65 CLIDRegistry entries for module ALL
+AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
+ClassIDSvc           INFO  getRegistryEntries: read 6709 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 670 CLIDRegistry entries for module ALL
+CondInputLoader      INFO Initializing CondInputLoader...
+CondInputLoader      INFO Adding base classes:
+  +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/BadChannels/MissingFEBs' )   ->
+  +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' )   ->
+  +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/FebRodMap' )   ->
+  +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/OnOffIdMap' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/LAR/BadChannels/BadChannels' )   ->
+  +  ( 'LArAutoCorrMC' , 'ConditionStore+LArAutoCorr' )   -> ILArAutoCorr (8124)
+  +  ( 'LArDAC2uAMC' , 'ConditionStore+LArDAC2uA' )   -> ILArDAC2uA (579584)
+  +  ( 'LArHVScaleCorrComplete' , 'ConditionStore+LArHVScaleCorr' )   -> ILArHVScaleCorr (93397263)
+  +  ( 'LArMinBiasAverageMC' , 'ConditionStore+LArMinBiasAverage' )   -> ILArMinBiasAverage (112216056)
+  +  ( 'LArMinBiasMC' , 'ConditionStore+LArMinBias' )   -> ILArMinBias (197482938)
+  +  ( 'LArMphysOverMcalMC' , 'ConditionStore+LArMphysOverMcal' )   -> ILArMphysOverMcal (128308807)
+  +  ( 'LArNoiseMC' , 'ConditionStore+LArNoise' )   -> ILArNoise (8125)
+  +  ( 'LArPedestalMC' , 'ConditionStore+LArPedestal' )   -> ILArPedestal (8122)
+  +  ( 'LArRampMC' , 'ConditionStore+LArRamp' )   -> ILArRamp (8123)
+  +  ( 'LArShape32MC' , 'ConditionStore+LArShape' )   -> ILArShape (245731716)
+  +  ( 'LArfSamplMC' , 'ConditionStore+LArfSampl' )   -> ILArfSampl (128126607)
+  +  ( 'LAruA2MeVMC' , 'ConditionStore+LAruA2MeV' )   -> ILAruA2MeV (154639332)
+CondInputLoader      INFO Will create WriteCondHandle dependencies for the following DataObjects:
+    +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/BadChannels/MissingFEBs' ) 
+    +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' ) 
+    +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/FebRodMap' ) 
+    +  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/OnOffIdMap' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/LAR/BadChannels/BadChannels' ) 
+    +  ( 'ILArAutoCorr' , 'ConditionStore+LArAutoCorr' ) 
+    +  ( 'ILArDAC2uA' , 'ConditionStore+LArDAC2uA' ) 
+    +  ( 'ILArHVScaleCorr' , 'ConditionStore+LArHVScaleCorr' ) 
+    +  ( 'ILArMinBias' , 'ConditionStore+LArMinBias' ) 
+    +  ( 'ILArMinBiasAverage' , 'ConditionStore+LArMinBiasAverage' ) 
+    +  ( 'ILArMphysOverMcal' , 'ConditionStore+LArMphysOverMcal' ) 
+    +  ( 'ILArNoise' , 'ConditionStore+LArNoise' ) 
+    +  ( 'ILArPedestal' , 'ConditionStore+LArPedestal' ) 
+    +  ( 'ILArRamp' , 'ConditionStore+LArRamp' ) 
+    +  ( 'ILArShape' , 'ConditionStore+LArShape' ) 
+    +  ( 'ILArfSampl' , 'ConditionStore+LArfSampl' ) 
+    +  ( 'ILAruA2MeV' , 'ConditionStore+LAruA2MeV' ) 
+    +  ( 'LArAutoCorrMC' , 'ConditionStore+LArAutoCorr' ) 
+    +  ( 'LArDAC2uAMC' , 'ConditionStore+LArDAC2uA' ) 
+    +  ( 'LArHVScaleCorrComplete' , 'ConditionStore+LArHVScaleCorr' ) 
+    +  ( 'LArMinBiasAverageMC' , 'ConditionStore+LArMinBiasAverage' ) 
+    +  ( 'LArMinBiasMC' , 'ConditionStore+LArMinBias' ) 
+    +  ( 'LArMphysOverMcalMC' , 'ConditionStore+LArMphysOverMcal' ) 
+    +  ( 'LArNoiseMC' , 'ConditionStore+LArNoise' ) 
+    +  ( 'LArPedestalMC' , 'ConditionStore+LArPedestal' ) 
+    +  ( 'LArRampMC' , 'ConditionStore+LArRamp' ) 
+    +  ( 'LArShape32MC' , 'ConditionStore+LArShape' ) 
+    +  ( 'LArfSamplMC' , 'ConditionStore+LArfSampl' ) 
+    +  ( 'LAruA2MeVMC' , 'ConditionStore+LAruA2MeV' ) 
+PyComponentMgr       INFO Initializing PyComponentMgr...
+testalg1             INFO Initializing testalg1...
+ClassIDSvc           INFO  getRegistryEntries: read 642 CLIDRegistry entries for module ALL
+CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
+CaloIDHelper_ID...   INFO in createObj: creating a CaloCell_ID helper object in the detector store
+CaloIDHelper_ID...   INFO in createObj: creating a LArEM_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCal3DNeighborsPrev-April2011.txt
+CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
+CaloIDHelper_ID...   INFO in createObj: creating a TileID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/TileNeighbour_reduced.txt
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
+CaloDM_ID            INFO initialize_from_dictionary
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
+CaloLVL1_ID          INFO initialize_from_dictionary
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a TTOnlineID helper object in the detector store
+TTOnlineID           INFO initialize_from_dictionary
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a CaloCell_SuperCell_ID helper object in the detector store
+CaloIDHelper_ID...   INFO in createObj: creating a LArEM_SuperCell_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_SuperCell_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+CaloIDHelper_ID...   INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-09-09T2116/Athena/22.0.1/InstallArea/x86_64-slc6-gcc7-dbg/share/TileSuperCellNeighbour.txt
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+CaloIdMgrDetDes...   INFO  Finished 
+CaloIdMgrDetDes...   INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
+ClassIDSvc           INFO  getRegistryEntries: read 39 CLIDRegistry entries for module ALL
+LArOnlineIDDetD...   INFO in createObj: creating a LArOnlineID helper object in the detector store
+LArOnlineID          INFO initialize_from_dictionary
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+ClassIDSvc           INFO  getRegistryEntries: read 283 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 64 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 39 CLIDRegistry entries for module ALL
+CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
+DetectorStore_ImplWARNING retrieve(default): No valid proxy for default object 
+ of type TileDetDescrManager(CLID 2941)
+CaloMgrDetDescrCnvWARNING Could not get the TileDetectorManager. No Calo Elements will be built for Tile
+ClassIDSvc           INFO  getRegistryEntries: read 159 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3938 CLIDRegistry entries for module ALL
+ToolSvc.tool1        INFO Initializing LArCellDeadOTXCorr
+ClassIDSvc           INFO  getRegistryEntries: read 86 CLIDRegistry entries for module ALL
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for Blob2ToolConstants[0x43264d00]+7f47cf5707d8 bound to CondAttrListCollection[/LAR/CellCorrOfl/deadOTX]
+ToolSvc.Blob2To...   INFO Successfully registered callback for CondAttributeListCollection object with key /LAR/CellCorrOfl/deadOTX
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for LArCellDeadOTXCorr[0x41e78820]+89 bound to /LAR/CellCorrOfl/deadOTX
+ToolSvc.tool1        INFO L1Calo database won't be used. Pedestal values will be constant and equal to 32.
+ClassIDSvc           INFO  getRegistryEntries: read 64 CLIDRegistry entries for module ALL
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for LArCablingService[0x4484f400]+7f48025ceca4 bound to AthenaAttributeList[/LAR/Identifier/OnOffIdMap]
+ToolSvc.LArCabl...   INFO Successfully installed callback on folder/LAR/Identifier/OnOffIdMap
+ToolSvc.LArCabl...   INFO Successfully installed callback on folder/LAR/Identifier/CalibIdMap
+ToolSvc.LArCabl...   INFO Successfully installed callback on folder/LAR/Identifier/FebRodMap
+ToolSvc.LArCabl...   INFO Sucessfully initialized LArCablingService with 3 callbacks.
+ToolSvc.CaloTri...   INFO  => CaloTriggerTowerService::initialize() 
+LArIdMgrDetDesc...   INFO in createObj: creating a LArDescrManager object in the detector store
+LArIdMgrDetDesc...   INFO Set LArOnlineID helper in LArIdMgr 
+LArHVLineIDDetD...   INFO in createObj: creating a LArHVLineID helper object in the detector store
+LArHVLineID          INFO  => initialize_from_dictionary()
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+LArHVLineID          INFO  => initialize_from_dictionary(dict_mgr) =0
+LArHVLineID          INFO Register_dict_tag of LArHighVoltage is OK
+LArHVLineID          INFO setDictVersion of LArHighVoltage is OK
+LArHVLineID          INFO [initLevelsFromDict] m_dict OK ... 
+LArHVLineID          INFO [initialize_from_dictionary] >  HV line range -> 11/1/48:79/0:15 | 11/1/148:179/0:15 | 11/1/80:93/0:7 | 11/1/180:193/0:7 | 11/1/200:231/0:15 | 11/1/232:263/0:15 | 11/1/296,297,306,307/0:15 | 11/1/299,304,305,308,309/0:15 | 11/1/264:279/0:15 | 11/1/280:295/0:15 | 11/1/0:47/0:15 | 11/1/320:322/0:15 | 11/1/100:147/0:15 | 11/1/324,325/0:15 | 11/1/312:315/0:15 | 11/1/316:319/0:15 | 11/1/300:303/0:15 | 11/1/310,311/0:15 | 11/1/323/0:15 | 11/1/326,327/0:15 | 11/1/94:99/0:15 | 11/1/194:199/0:15
+LArHVLineID          INFO [init_hashes()] > Hvline_size= 5008
+LArIdMgrDetDesc...   INFO Set LArHVLineID helper in LArIdMgr 
+LArElectrodeIDD...   INFO in createObj: creating a LArElectrodeID helper object in the detector store
+LArElectrodeID       INFO  => initialize_from_dictionary()
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+AtlasDetectorID      INFO initialize_from_dictionary - OK
+LArIdMgrDetDesc...   INFO Set LArElectrodeID helper in LArIdMgr 
+LArIdMgrDetDesc...   INFO Set CaloCell_ID helper in LArIdMgr 
+LArIdMgrDetDesc...   INFO Initializing LArIdMgr from values in LArIdMgrDetDescrCnv 
+ClassIDSvc           INFO  getRegistryEntries: read 59 CLIDRegistry entries for module ALL
+ToolSvc.CaloTri...   INFO  ====> ...CaloTriggerTowerService::init() OK 
+ToolSvc.deadotx...   INFO Read 0 lines in total (for all COOL channels and missing FEBs together) 
+ToolSvc.tool2        INFO Initializing LArCellDeadOTXCorr
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for LArCellDeadOTXCorr[0x4594a820]+89 bound to /LAR/CellCorrOfl/deadOTX
+ToolSvc.tool2        INFO L1Calo database won't be used. Pedestal values will be constant and equal to 32.
+ToolSvc.deadotx...   INFO Decoded 3 lines from FEB file deadotx_badchan2.badfebs
+ToolSvc.deadotx...   INFO Read 3 lines in total (for all COOL channels and missing FEBs together) 
+HistogramPersis...WARNING Histograms saving not required.
+ApplicationMgr       INFO Application Manager Initialized successfully
+ClassIDSvc           INFO  getRegistryEntries: read 127 CLIDRegistry entries for module ALL
+CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/LAR/BadChannels/MissingFEBs'
+CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/LAR/Identifier/CalibIdMap'
+CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/LAR/Identifier/FebRodMap'
+CondInputLoader      INFO created CondCont<AthenaAttributeList> with key 'ConditionStore+/LAR/Identifier/OnOffIdMap'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/LAR/BadChannels/BadChannels'
+CondInputLoader      INFO created CondCont<LArAutoCorrMC> with key 'ConditionStore+LArAutoCorr'
+CondInputLoader      INFO created CondCont<LArDAC2uAMC> with key 'ConditionStore+LArDAC2uA'
+CondInputLoader      INFO created CondCont<LArHVScaleCorrComplete> with key 'ConditionStore+LArHVScaleCorr'
+CondInputLoader      INFO created CondCont<LArMinBiasAverageMC> with key 'ConditionStore+LArMinBiasAverage'
+CondInputLoader      INFO created CondCont<LArMinBiasMC> with key 'ConditionStore+LArMinBias'
+CondInputLoader      INFO created CondCont<LArMphysOverMcalMC> with key 'ConditionStore+LArMphysOverMcal'
+CondInputLoader      INFO created CondCont<LArNoiseMC> with key 'ConditionStore+LArNoise'
+CondInputLoader      INFO created CondCont<LArPedestalMC> with key 'ConditionStore+LArPedestal'
+CondInputLoader      INFO created CondCont<LArRampMC> with key 'ConditionStore+LArRamp'
+CondInputLoader      INFO created CondCont<LArShape32MC> with key 'ConditionStore+LArShape'
+CondInputLoader      INFO created CondCont<LArfSamplMC> with key 'ConditionStore+LArfSampl'
+CondInputLoader      INFO created CondCont<LAruA2MeVMC> with key 'ConditionStore+LAruA2MeV'
+ApplicationMgr       INFO Application Manager Started successfully
+AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
+EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
+EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
+ClassIDSvc           INFO  getRegistryEntries: read 109 CLIDRegistry entries for module ALL
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVDEP-00 for folder /LAR/Align
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArBadChannelsBadChannels-IOVDEP-06 for folder /LAR/BadChannels/BadChannels
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArBadChannelsMissingFEBs-IOVDEP-04 for folder /LAR/BadChannels/MissingFEBs
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARCellCorrOflDeadOTX-000-00 for folder /LAR/CellCorrOfl/deadOTX
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCAutoCorr-Apr2010 for folder /LAR/ElecCalibMC/AutoCorr
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCDAC2uA-CSC02-J for folder /LAR/ElecCalibMC/DAC2uA
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCHVScaleCorr-IOVDEP-00 for folder /LAR/ElecCalibMC/HVScaleCorr
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCMinBias-IOVDEP-01 for folder /LAR/ElecCalibMC/MinBias
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCMinBiasAverage-IOVDEP-01 for folder /LAR/ElecCalibMC/MinBiasAverage
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCMphysOverMcal-CSC02-I for folder /LAR/ElecCalibMC/MphysOverMcal
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCNoise-Apr2010 for folder /LAR/ElecCalibMC/Noise
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCPedestal-DC3-B-IdFix7 for folder /LAR/ElecCalibMC/Pedestal
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCRamp-CSC02-K for folder /LAR/ElecCalibMC/Ramp
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCShape-Apr2010 for folder /LAR/ElecCalibMC/Shape
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARIdentifierLArTTCellMapAtlas-HadFcalFix2 for folder /LAR/Identifier/LArTTCellMapAtlas
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARElecCalibMCfSampl-G496-19213-FTFP_BERT_BIRK for folder /LAR/ElecCalibMC/fSampl
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARuA2MeV-Feb2011 for folder /LAR/ElecCalibMC/uA2MeV
+IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_CALO/OFLP200
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to CALOOflIdentifierCaloTTOnAttrIdMapAtlas-0001 for folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to CALOOflIdentifierCaloTTOnOffIdMapAtlas-0002 for folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas
+IOVDbSvc             INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to CALOOflIdentifierCaloTTPpmRxIdMapAtlas-0000 for folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas
+IOVDbSvc             INFO Disconnecting from COOLOFL_CALO/OFLP200
+DbSession            INFO     Open     DbSession    
+Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] EACFEBD4-9BD2-E211-848A-02163E006B20
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root File version:52200
+ToolSvc.LArCabl...   INFO  ====> iovCallBack 
+ToolSvc.LArCabl...   INFO Done reading online/offline identifier mapping
+ToolSvc.LArCabl...   INFO Found 195072 online identifier and 182468 offline identifier. 12604 disconnected channels.
+ToolSvc.CaloTri...   INFO  ====> iovCallBack 
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root File version:52200
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #1 0 events processed so far  <<<===
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 9229AE70-AC4C-DF11-A934-003048D2BC4A
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000009.gen.COND/cond09_mc.000009.gen.COND._0011.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000009.gen.COND/cond09_mc.000009.gen.COND._0011.pool.root File version:52200
+ToolSvc.LArMCSy...   INFO IOV callback
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 64ADE389-CABD-DD11-8D4C-000423D950B0
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000001.gen.COND/cond08_mc.000001.gen.COND._0053.pool.root
+Warning in <TClass::Init>: no dictionary for class DataHeader_p2 is available
+Warning in <TClass::Init>: no dictionary for class DataHeaderElement_p2 is available
+Warning in <TClass::Init>: no dictionary for class PoolToken_p1 is available
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000001.gen.COND/cond08_mc.000001.gen.COND._0053.pool.root File version:51800
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 7C42BC12-BD96-E011-B8EC-003048F0E01C
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000032.gen.COND/cond09_mc.000032.gen.COND._0001.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000032.gen.COND/cond09_mc.000032.gen.COND._0001.pool.root File version:52600
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 687EA080-E4B6-DD11-A149-000423D9907C
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000001.gen.COND/cond08_mc.000001.gen.COND._0067.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000001.gen.COND/cond08_mc.000001.gen.COND._0067.pool.root File version:51800
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 9229AE70-AC4C-DF11-A934-003048D2BC4A
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] FE8535CE-AD50-DC11-952F-000423D67862
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/oflcond/oflcond.000003.conditions.simul.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0040.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/oflcond/oflcond.000003.conditions.simul.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0040.pool.root File version:51400
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 64ADE389-CABD-DD11-8D4C-000423D950B0
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 3CE29BA7-A6DC-DC11-BF61-000423D65662
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/comcond/comcond.000004.lar_conditions.recon.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0044.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/comcond/comcond.000004.lar_conditions.recon.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0044.pool.root File version:51400
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 7C42BC12-BD96-E011-B8EC-003048F0E01C
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000009.gen.COND/cond09_mc.000009.gen.COND._0011.pool.root File version:52200
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 687EA080-E4B6-DD11-A149-000423D9907C
+LArPedestalMCCnv     INFO Reading LArPedestalMC (original)
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 180A4AF2-F47E-DB11-9E8F-000E0C4DEA2D
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cmccond/cmccond.000001.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0053.pool.root__DQ2-1250193473
+Warning in <TClass::Init>: no dictionary for class DataHeader_p1 is available
+Warning in <TClass::Init>: no dictionary for class DataHeaderElement_p1 is available
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cmccond/cmccond.000001.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0053.pool.root__DQ2-1250193473 File version:51000
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 303FCBD8-653E-DD11-ABBD-000423D99862
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/oflcond/oflcond.000003.conditions.simul.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0061.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/oflcond/oflcond.000003.conditions.simul.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0061.pool.root File version:51800
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] FE8535CE-AD50-DC11-952F-000423D67862
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] F4885664-6C4D-DF11-A94A-00304867340C
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000009.gen.COND/cond09_mc.000009.gen.COND._0013.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000009.gen.COND/cond09_mc.000009.gen.COND._0013.pool.root File version:52200
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 3CE29BA7-A6DC-DC11-BF61-000423D65662
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 445FAD9A-5DB3-E14A-81DB-BA6244602734
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000084.gen.COND/cond09_mc.000084.gen.COND._0001.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000084.gen.COND/cond09_mc.000084.gen.COND._0001.pool.root File version:53413
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 9229AE70-AC4C-DF11-A934-003048D2BC4A
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] D27D07D4-C135-E011-84A9-003048F0E01E
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000027.gen.COND/cond09_mc.000027.gen.COND._0001.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000027.gen.COND/cond09_mc.000027.gen.COND._0001.pool.root File version:52600
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 303FCBD8-653E-DD11-ABBD-000423D99862
+LArOnOffMappingAlg   INFO Done reading online/offline identifier mapping
+LArOnOffMappingAlg   INFO Found 195072 online identifier and 182468 offline identifier. 12604 disconnected channels.
+LArOnOffMappingAlg   INFO recorded new LArOnOffIdMap with range {[0,l:0] - [INVALID]} into Conditions Store
+LArCalibLineMap...   INFO Done reading readout/calibration line mapping.
+LArCalibLineMap...   INFO recorded new LArCalibLineMap with range {[0,l:0] - [INVALID]} into Conditions Store
+LArFebRodMappin...   INFO Done reading Feb/Rod mapping. Found 1524 Febs and 762 Rods
+LArFebRodMappin...   INFO recorded new LArFebRodMap with range {[0,l:0] - [INVALID]} into Conditions Store
+LArBadChannelCo...   INFO Read a total of 0 problematic channels from database
+LArBadFebCondAlg     INFO Read a total of 0 problematic febs from database
+ClassIDSvc           INFO  getRegistryEntries: read 2360 CLIDRegistry entries for module ALL
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 1 events processed so far  <<<===
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] EACFEBD4-9BD2-E211-848A-02163E006B20
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 180A4AF2-F47E-DB11-9E8F-000E0C4DEA2D
+Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #1 1 events processed so far  <<<===
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/BadChannels/MissingFEBs' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/CalibIdMap' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/FebRodMap' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'AthenaAttributeList' , 'ConditionStore+/LAR/Identifier/OnOffIdMap' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'CondAttrListCollection' , 'ConditionStore+/LAR/BadChannels/BadChannels' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArAutoCorrMC' , 'ConditionStore+LArAutoCorr' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArDAC2uAMC' , 'ConditionStore+LArDAC2uA' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArHVScaleCorrComplete' , 'ConditionStore+LArHVScaleCorr' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMinBiasAverageMC' , 'ConditionStore+LArMinBiasAverage' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMinBiasMC' , 'ConditionStore+LArMinBias' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArMphysOverMcalMC' , 'ConditionStore+LArMphysOverMcal' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArNoiseMC' , 'ConditionStore+LArNoise' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArPedestalMC' , 'ConditionStore+LArPedestal' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArRampMC' , 'ConditionStore+LArRamp' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArShape32MC' , 'ConditionStore+LArShape' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LArfSamplMC' , 'ConditionStore+LArfSampl' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj  ( 'LAruA2MeVMC' , 'ConditionStore+LAruA2MeV' )  is still valid at [1,2,t:4294967295,l:2,b:4294967295]
+LArCalibLineMap...WARNING Found valid write handle
+LArTTCellMapCnv      INFO initialize()
+DbSession            INFO     Open     DbSession    
+Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] B2E3B2B6-B76C-DF11-A505-000423D5ADDA
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000013.gen.COND/cond09_mc.000013.gen.COND._0001.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000013.gen.COND/cond09_mc.000013.gen.COND._0001.pool.root File version:52200
+CaloTTOnOffIdMa...   INFO initialize()
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] EC2448FE-EFE2-DD11-80D3-000423D98B8C
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0004.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0004.pool.root File version:51800
+CaloTTOnAttrIdM...   INFO initialize()
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] CE5211E9-F51F-DC11-87A7-000423D6460E
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cmccond/comcond.000001.conditions.recon.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0026.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cmccond/comcond.000001.conditions.recon.pool.v0000/oflcond.000003.conditions.simul.pool.v0000._0026.pool.root File version:51400
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 2 events processed so far  <<<===
+/cvmfs/atlas-co...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] D27D07D4-C135-E011-84A9-003048F0E01E
+/cvmfs/atlas-co...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] F4885664-6C4D-DF11-A94A-00304867340C
+/cvmfs/atlas-co...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 445FAD9A-5DB3-E14A-81DB-BA6244602734
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] EC2448FE-EFE2-DD11-80D3-000423D98B8C
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] CE5211E9-F51F-DC11-87A7-000423D6460E
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] B2E3B2B6-B76C-DF11-A505-000423D5ADDA
+Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+ApplicationMgr       INFO Application Manager Stopped successfully
+IncidentProcAlg1     INFO Finalize
+CondInputLoader      INFO Finalizing CondInputLoader...
+testalg1             INFO Finalizing testalg1...
+IncidentProcAlg2     INFO Finalize
+PyComponentMgr       INFO Finalizing PyComponentMgr...
+IdDictDetDescrCnv    INFO in finalize
+IOVDbSvc             INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     3.46 ))s
+IOVDbSvc             INFO Folder /LAR/BadChannels/BadChannels (AttrListColl) db-read 1/1 objs/chan/bytes 0/8/0 ((     1.65 ))s
+IOVDbSvc             INFO Folder /LAR/BadChannels/MissingFEBs (AttrList) db-read 1/1 objs/chan/bytes 1/1/16 ((     2.49 ))s
+IOVDbSvc             INFO Folder /LAR/CellCorrOfl/deadOTX (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/705 ((     4.56 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/CalibIdMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/1520148 ((     0.86 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/FebRodMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/6100 ((     0.01 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/OnOffIdMap (AttrList) db-read 1/2 objs/chan/bytes 1/1/780292 ((    14.60 ))s
+IOVDbSvc             INFO Folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 ((     9.86 ))s
+IOVDbSvc             INFO Folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas (PoolRef) db-read 1/1 objs/chan/bytes 1/1/181 ((     2.46 ))s
+IOVDbSvc             INFO Folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas (PoolRef) db-read 1/1 objs/chan/bytes 1/1/181 ((     4.33 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/AutoCorr (PoolColl) db-read 1/1 objs/chan/bytes 3/3/486 ((     3.38 ))s
+IOVDbSvc             INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     3.74 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/DAC2uA (PoolColl) db-read 1/1 objs/chan/bytes 1/1/170 ((     4.04 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/HVScaleCorr (PoolColl) db-read 1/1 objs/chan/bytes 12/12/1980 ((     2.27 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/MinBias (PoolColl) db-read 1/1 objs/chan/bytes 1/1/174 ((     1.68 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/MinBiasAverage (PoolColl) db-read 1/1 objs/chan/bytes 1/1/181 ((     1.38 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/MphysOverMcal (PoolColl) db-read 1/1 objs/chan/bytes 3/3/516 ((     1.94 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Noise (PoolColl) db-read 1/1 objs/chan/bytes 3/3/516 ((     1.64 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Pedestal (PoolRef) db-read 1/1 objs/chan/bytes 1/1/167 ((     3.75 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Ramp (PoolColl) db-read 1/1 objs/chan/bytes 3/3/489 ((     2.04 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/Shape (PoolColl) db-read 1/1 objs/chan/bytes 3/3/477 ((     3.96 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/1 objs/chan/bytes 1/1/173 ((     1.74 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/fSampl (PoolColl) db-read 1/1 objs/chan/bytes 1/1/194 ((     3.76 ))s
+IOVDbSvc             INFO Folder /LAR/ElecCalibMC/uA2MeV (PoolColl) db-read 1/1 objs/chan/bytes 1/1/165 ((     2.18 ))s
+IOVDbSvc             INFO Total payload read from COOL: 2313859 bytes in ((     81.79 ))s
+IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 21 ReadTime: ((    65.14 ))s
+IOVDbSvc             INFO Connection COOLOFL_CALO/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: ((    16.65 ))s
+AthDictLoaderSvc     INFO in finalize...
+ToolSvc              INFO Removing all tools created by ToolSvc
+ToolSvc.CaloTri...   INFO  => CaloTriggerTowerService::finalize() 
+*****Chrono*****     INFO ****************************************************************************************************
+*****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
+*****Chrono*****     INFO ****************************************************************************************************
+cObjR_ALL            INFO Time User   : Tot= 1.33  [s] Ave/Min/Max=0.035(+- 0.12)/    0/ 0.73  [s] #= 38
+cObj_ALL             INFO Time User   : Tot= 3.91  [s] Ave/Min/Max=0.163(+-0.343)/    0/ 1.31  [s] #= 24
+ChronoStatSvc        INFO Time User   : Tot=  105  [s]                                             #=  1
+*****Chrono*****     INFO ****************************************************************************************************
+ChronoStatSvc.f...   INFO  Service finalized successfully 
+ApplicationMgr       INFO Application Manager Finalized successfully
+ApplicationMgr       INFO Application Manager Terminated successfully
+Py:Athena            INFO leaving with code 0: "successful run"
diff --git a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.cxx b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.cxx
index a1b3cfe064ce943a93e309be0dc41f978d72c607..cff1568ff83b1c0637f9382b002a1efe209b0c30 100644
--- a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.cxx
+++ b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.cxx
@@ -324,6 +324,8 @@ StatusCode LArCellBuilderFromLArHitTool::initialize()
   else {
     ATH_MSG_VERBOSE (" Internal map will not be used ");
   }
+
+  ATH_CHECK( m_eventInfoKey.initialize() );
   return StatusCode::SUCCESS;
 }
 
@@ -604,12 +606,7 @@ StatusCode LArCellBuilderFromLArHitTool::process( CaloCellContainer * theCellCon
   }
 
   //specify that a given calorimeter has been filled
-  if (theCellContainer->hasCalo(m_caloNum) )
-  {
-    ATH_MSG_WARNING ("CaloCellContainer has already been filled with calo " 
-                     << m_caloNum);
-  }
-      
+  theCellContainer->resetLookUpTable();
   theCellContainer->setHasCalo(m_caloNum);
   
   
@@ -632,7 +629,7 @@ LArCellBuilderFromLArHitTool::MakeTheCell(CaloCellContainer * & cellcoll,
 				      const double & q,
 				      const CaloGain::CaloGain & g)
 {
-  cellcoll->push_back(new LArCell(caloDDE,e,t,q,g));
+  cellcoll->push_back_fast(new LArCell(caloDDE,e,t,q,g));
 }
 
 /////////////////////////////////////////////////////////////////// 
@@ -650,7 +647,7 @@ void LArCellBuilderFromLArHitTool::MakeTheCell(CaloCellContainer* & cellcoll,
   const CaloGain::CaloGain g=
     m_noisetool->estimatedGain(caloDDE,e,ICaloNoiseToolStep::RAWCHANNELS);  
   
-  cellcoll->push_back (new LArCell(caloDDE,e,t,q,g));
+  cellcoll->push_back_fast (new LArCell(caloDDE,e,t,q,g));
 
 }
 
diff --git a/LArCalorimeter/LArCellRec/test/LArCellBuilderFromLArHitTool_test.sh b/LArCalorimeter/LArCellRec/test/LArCellBuilderFromLArHitTool_test.sh
new file mode 100755
index 0000000000000000000000000000000000000000..686c2944628f175b37576190f0a77262f0899426
--- /dev/null
+++ b/LArCalorimeter/LArCellRec/test/LArCellBuilderFromLArHitTool_test.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+#
+# Script running the LArCellBuilderFromLArHitTool_test.py test with CTest.
+#
+
+# Run the job:
+athena.py LArCellRec/LArCellBuilderFromLArHitTool_test.py
diff --git a/LArCalorimeter/LArCellRec/test/LArCellDeadOTXCorr_test.sh b/LArCalorimeter/LArCellRec/test/LArCellDeadOTXCorr_test.sh
new file mode 100755
index 0000000000000000000000000000000000000000..6053db8cd41f67ad7540077c2bfba0a3a7a8af85
--- /dev/null
+++ b/LArCalorimeter/LArCellRec/test/LArCellDeadOTXCorr_test.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+#
+# Script running the LArCellDeadOTXCorr_test.py test with CTest.
+#
+
+# Run the job:
+athena.py LArCellRec/LArCellDeadOTXCorr_test.py
diff --git a/LArCalorimeter/LArG4/LArG4Barrel/python/LArG4BarrelConfig.py b/LArCalorimeter/LArG4/LArG4Barrel/python/LArG4BarrelConfig.py
index 152cadf708d14eb89629c6ba8f31c3c69ca227e4..9b0cd22a44e62c1814cb3dd369c438d0a543946c 100644
--- a/LArCalorimeter/LArG4/LArG4Barrel/python/LArG4BarrelConfig.py
+++ b/LArCalorimeter/LArG4/LArG4Barrel/python/LArG4BarrelConfig.py
@@ -3,33 +3,40 @@
 from AthenaCommon import CfgMgr
 
 def getBarrelCryostatCalibrationCalculator(name="BarrelCryostatCalibrationCalculator", **kwargs):
-       return CfgMgr.LArG4__BarrelCryostat__CalibrationCalculator(name, **kwargs)
+    return CfgMgr.LArG4__BarrelCryostat__CalibrationCalculator(name, **kwargs)
+
 
 def getBarrelCryostatCalibrationLArCalculator(name="BarrelCryostatCalibrationLArCalculator", **kwargs):
-       return CfgMgr.LArG4__BarrelCryostat__CalibrationLArCalculator(name, **kwargs)
+    return CfgMgr.LArG4__BarrelCryostat__CalibrationLArCalculator(name, **kwargs)
+
 
 def getBarrelCryostatCalibrationMixedCalculator(name="BarrelCryostatCalibrationMixedCalculator", **kwargs):
-       return CfgMgr.LArG4__BarrelCryostat__CalibrationMixedCalculator(name, **kwargs)
+    return CfgMgr.LArG4__BarrelCryostat__CalibrationMixedCalculator(name, **kwargs)
+
 
 def getDMCalibrationCalculator(name="DMCalibrationCalculator", **kwargs):
-       return CfgMgr.LArG4__DM__CalibrationCalculator(name, **kwargs)
+    return CfgMgr.LArG4__DM__CalibrationCalculator(name, **kwargs)
+
 
 def getBarrelCalibrationCalculator(name="BarrelCalibrationCalculator", **kwargs):
-       return CfgMgr.LArG4__Barrel__CalibrationCalculator(name, **kwargs)
+    return CfgMgr.LArG4__Barrel__CalibrationCalculator(name, **kwargs)
+
 
 def getBarrelPresamplerCalibrationCalculator(name="BarrelPresamplerCalibrationCalculator", **kwargs):
-       return CfgMgr.LArG4__BarrelPresampler__CalibrationCalculator(name, **kwargs)
+    return CfgMgr.LArG4__BarrelPresampler__CalibrationCalculator(name, **kwargs)
+
 
 def getEMBCalculator(name="EMBCalculator", **kwargs):
-       return CfgMgr.LArBarrelCalculator(name, **kwargs)
+    return CfgMgr.LArBarrelCalculator(name, **kwargs)
+
 
 def getEMBPresamplerCalculator(name="EMBPresamplerCalculator", **kwargs):
-       return CfgMgr.LArBarrelPresamplerCalculator(name, **kwargs)
+    return CfgMgr.LArBarrelPresamplerCalculator(name, **kwargs)
 
-def getLArBarrelGeometry(name="LArBarrelGeometry", **kwargs):
-       return CfgMgr.LArG4__Barrel__Geometry(name, **kwargs)
 
-def getLArBarrelPresamplerGeometry(name="LArBarrelPresamplerGeometry", **kwargs):
-       return CfgMgr.LArG4__BarrelPresampler__Geometry(name, **kwargs)
+def getLArBarrelGeometry(name="LArBarrelGeometry", **kwargs):
+    return CfgMgr.LArG4__Barrel__Geometry(name, **kwargs)
 
 
+def getLArBarrelPresamplerGeometry(name="LArBarrelPresamplerGeometry", **kwargs):
+    return CfgMgr.LArG4__BarrelPresampler__Geometry(name, **kwargs)
diff --git a/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfig.py b/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfig.py
index a99d808c32b38652950925cc6afe079c94ac2c16..576e904d8cbb84688f631fd55846d3f40f7567cd 100644
--- a/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfig.py
+++ b/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfig.py
@@ -9,31 +9,36 @@ def getFCAL1Calculator(name="FCAL1Calculator", **kwargs):
        kwargs.setdefault("FCALSampling",1);
        return CfgMgr.LArFCALCalculatorBase(name, **kwargs)
 
+
 def getFCAL2Calculator(name="FCAL2Calculator", **kwargs):
        kwargs.setdefault("OOTcut",2.5*ns)
        kwargs.setdefault("FCALSampling",2);
        return CfgMgr.LArFCALCalculatorBase(name, **kwargs)
 
+
 def getFCAL3Calculator(name="FCAL3Calculator", **kwargs):
        kwargs.setdefault("OOTcut",2.5*ns)
        kwargs.setdefault("FCALSampling",3);
        return CfgMgr.LArFCALCalculatorBase(name, **kwargs)
 
+
 def getFCAL1CalibCalculator(name="FCAL1CalibCalculator", **kwargs):
-       kwargs.setdefault("FCALdeltaX",7.5*mm);
-       kwargs.setdefault("FCALdeltaY",7.5*mm*math.sin(60*deg));
-       kwargs.setdefault("FCALSampling",1);
-       return CfgMgr.LArG4__FCAL__LArFCALCalibCalculatorBase(name, **kwargs)
+    kwargs.setdefault("FCALdeltaX",7.5*mm);
+    kwargs.setdefault("FCALdeltaY",7.5*mm*math.sin(60*deg));
+    kwargs.setdefault("FCALSampling",1);
+    return CfgMgr.LArG4__FCAL__LArFCALCalibCalculatorBase(name, **kwargs)
+
 
 def getFCAL2CalibCalculator(name="FCAL2CalibCalculator", **kwargs):
-       kwargs.setdefault("FCALdeltaX",8.179*mm);
-       kwargs.setdefault("FCALdeltaY",8.179*mm*math.sin(60*deg));
-       kwargs.setdefault("FCALSampling",2);
-       return CfgMgr.LArG4__FCAL__LArFCALCalibCalculatorBase(name, **kwargs)
+    kwargs.setdefault("FCALdeltaX",8.179*mm);
+    kwargs.setdefault("FCALdeltaY",8.179*mm*math.sin(60*deg));
+    kwargs.setdefault("FCALSampling",2);
+    return CfgMgr.LArG4__FCAL__LArFCALCalibCalculatorBase(name, **kwargs)
+
 
 def getFCAL3CalibCalculator(name="FCAL3CalibCalculator", **kwargs):
-       kwargs.setdefault("FCALdeltaX",9.0*mm);
-       kwargs.setdefault("FCALdeltaY",9.0*mm*math.sin(60*deg));
-       kwargs.setdefault("FCALSampling",3);
-       return CfgMgr.LArG4__FCAL__LArFCALCalibCalculatorBase(name, **kwargs)
+    kwargs.setdefault("FCALdeltaX",9.0*mm);
+    kwargs.setdefault("FCALdeltaY",9.0*mm*math.sin(60*deg));
+    kwargs.setdefault("FCALSampling",3);
+    return CfgMgr.LArG4__FCAL__LArFCALCalibCalculatorBase(name, **kwargs)
 
diff --git a/LArCalorimeter/LArG4/LArG4HEC/python/LArG4HECConfig.py b/LArCalorimeter/LArG4/LArG4HEC/python/LArG4HECConfig.py
index 803eab3382cf8ccfb2679e13b847faa62d5c944f..2793d596eb9ed48c4e6c397986495dbf2346712b 100644
--- a/LArCalorimeter/LArG4/LArG4HEC/python/LArG4HECConfig.py
+++ b/LArCalorimeter/LArG4/LArG4HEC/python/LArG4HECConfig.py
@@ -6,9 +6,11 @@ from LArG4HEC import HECGeometryType
 def getLArHECLocalCalculator(name="LArHECLocalCalculator", **kwargs):
     return CfgMgr.LArHECLocalCalculator(name, **kwargs)
 
+
 def getLocalCalibrationCalculator(name="LocalCalibrationCalculator", **kwargs):
     return CfgMgr.LArG4__HEC__LocalCalibrationCalculator(name, **kwargs)
 
+
 def getLocalHECGeometry(name="LocalHECGeometry", **kwargs):
     return CfgMgr.LArG4__HEC__LocalGeometry(name, **kwargs)
 
@@ -16,21 +18,26 @@ def getLocalHECGeometry(name="LocalHECGeometry", **kwargs):
 def getHECWheelCalculator(name="HECWheelCalculator", **kwargs):
     return CfgMgr.LArHECWheelCalculator(name, **kwargs)
 
+
 def getLArHECCalibrationWheelCalculator(name="LArHECCalibrationWheelCalculator", **kwargs):
     return CfgMgr.LArG4__HEC__LArHECCalibrationWheelCalculator(name, **kwargs)
 
+
 def getHECCalibrationWheelActiveCalculator(name="HECCalibrationWheelActiveCalculator", **kwargs):
     kwargs.setdefault("GeometryType", HECGeometryType.kWheelActive)
     return getLArHECCalibrationWheelCalculator(name, **kwargs)
 
+
 def getHECCalibrationWheelInactiveCalculator(name="HECCalibrationWheelInactiveCalculator", **kwargs):
     kwargs.setdefault("GeometryType", HECGeometryType.kWheelInactive)
     return getLArHECCalibrationWheelCalculator(name, **kwargs)
 
+
 def getHECCalibrationWheelDeadCalculator(name="HECCalibrationWheelDeadCalculator", **kwargs):
     kwargs.setdefault("GeometryType", HECGeometryType.kWheelDead)
     return getLArHECCalibrationWheelCalculator(name, **kwargs)
 
+
 def getHECGeometry(name="HECGeometry", **kwargs):
     return CfgMgr.LArG4__HEC__HECGeometry(name, **kwargs)
 
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h
index 8ba9c8a45de3c0b9f2a3fe5048d69ff2b71b0a98..74ac47149c300fa5f5addb6495d2d51760cf0308 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h
@@ -89,9 +89,6 @@ class MsgStream;
 class IMM_DigitizationTool;
 class MuonSimDataCollection;
 
-// class StripsResponse;
-// class ElectronicsResponse;
-
 class TTree;
 class TFile;
 
@@ -188,10 +185,6 @@ class MM_DigitizationTool : virtual public IMuonDigitizationTool, public PileUpT
 		double m_timeWindowUpperOffset;
 		double m_DiffMagSecondMuonHit;
 
-		//TDC ELECTRONICS
-		// double m_ns2TDC;
-		// double m_resTDC;
-
 		// StripsResponse stuff...
 		MM_StripsResponseSimulation *m_StripsResponseSimulation;
 		float m_qThreshold;
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_Electron.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_Electron.h
index 86f7645e2f10952918897a5ad7712195fbd50388..1027a4ba46787f6ea9d9c826105c4d8f0ecd5aa0 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_Electron.h
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_Electron.h
@@ -18,12 +18,6 @@
 
 class MM_Electron {
 
-  TVector2 m_initialPosition;
-  TVector2 m_offsetPosition;
-
-  float m_time;
-  float m_charge;
-
  public:
 
   MM_Electron();
@@ -44,6 +38,14 @@ class MM_Electron {
   float getInitialX() const;
   float getInitialY() const;
 
+ private:
+
+  TVector2 m_initialPosition;
+  TVector2 m_offsetPosition;
+
+  float m_time;
+  float m_charge;
+
 
 };
 
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_ElectronicsResponseSimulation.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_ElectronicsResponseSimulation.h
index 9028449d0132c6c5acf797f23bb2bffa2ac89651..7d7624c1e6850e10a3a410bfbe54f9aef1a1664c 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_ElectronicsResponseSimulation.h
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_ElectronicsResponseSimulation.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 MM_DIGITIZATION_MM_ELECTRONICSRESPONSESIMULATION_H
@@ -53,7 +53,6 @@
 #include "MM_Digitization/MM_ElectronicsToolInput.h"
 #include "MM_Digitization/MM_ElectronicsToolTriggerOutput.h"
 #include "MM_Digitization/MM_DigitToolOutput.h"
-// #include "MM_Digitization/StripsResponseSimulation.h"
 
 //VMM Mapping
 #include "MM_Digitization/MM_StripVmmMappingTool.h"
@@ -70,32 +69,11 @@ class TH2F;
 
 class MM_ElectronicsResponseSimulation {
 
-private:
-  /** power of responce function */
-  float m_peakTime;
-  float m_alpha;
-  float m_timeWindowLowerOffset;
-  float m_timeWindowUpperOffset;
-  float m_electronicsThreshold;
-  float m_stripDeadTime;
-  float m_artDeadTime;
-  float m_stripResponseQThreshold;
-  float m_stripResponseDriftGapWidth;
-  float m_stripResponseDriftVelocity;
-
-  int  m_decoupleShaperFunctionParamaters;
-
-  vector <float> m_tStripElectronicsAbThr;
-  vector <float> m_qStripElectronics;
-  vector <int>   m_nStripElectronics;
-
-  TF1 *m_h_intFn;
-  // StripsResponseSimulation* m_stripObject ;
-  MM_ElectronicsResponseSimulation & operator=(const MM_ElectronicsResponseSimulation &right);
-  MM_ElectronicsResponseSimulation(const MM_ElectronicsResponseSimulation&);
 public :
 
   MM_ElectronicsResponseSimulation();
+  MM_ElectronicsResponseSimulation(const MM_ElectronicsResponseSimulation&);
+  MM_ElectronicsResponseSimulation & operator=(const MM_ElectronicsResponseSimulation &right);
   virtual ~MM_ElectronicsResponseSimulation();
 
   void initialize();
@@ -139,6 +117,27 @@ public :
   vector <float>  getQStripElectronics      () const { return m_qStripElectronics;};
   vector <int>    getNStripElectronics      () const { return m_nStripElectronics;};
 
+private:
+
+  /** power of responce function */
+  float m_peakTime;
+  float m_alpha;
+  float m_timeWindowLowerOffset;
+  float m_timeWindowUpperOffset;
+  float m_electronicsThreshold;
+  float m_stripDeadTime;
+  float m_artDeadTime;
+  float m_stripResponseQThreshold;
+  float m_stripResponseDriftGapWidth;
+  float m_stripResponseDriftVelocity;
+
+  int  m_decoupleShaperFunctionParamaters;
+
+  vector <float> m_tStripElectronicsAbThr;
+  vector <float> m_qStripElectronics;
+  vector <int>   m_nStripElectronics;
+
+  TF1 *m_h_intFn;
 
 };
 
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_IonizationCluster.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_IonizationCluster.h
index 71f89d2eca973358668bf404edc3d0547b5e114e..ca9614c28fd7d6505fd40c288f006c2d471adf00 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_IonizationCluster.h
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_IonizationCluster.h
@@ -57,17 +57,10 @@ class MM_NelectronProb {
 
 class MM_IonizationCluster {
 
-
-  // Members supplied by user
-  std::vector<MM_Electron*> m_Electrons;
-  float m_HitX;
-  TVector2 m_IonizationStart;
-
   static MM_NelectronProb s_NelectronProb;
 
  public:
 
-
   MM_IonizationCluster ();
   MM_IonizationCluster (float HitX, float IonizationX, float IonizationY);
   MM_IonizationCluster (const MM_IonizationCluster& MM_IonizationCluster);
@@ -76,6 +69,14 @@ class MM_IonizationCluster {
   std::vector<MM_Electron*> getElectrons() const;
   float getHitX() const { return m_HitX; }
   TVector2 getIonizationStart() const { return m_IonizationStart; }
+
+ private:
+
+  // Members supplied by user
+  std::vector<MM_Electron*> m_Electrons;
+  float m_HitX;
+  TVector2 m_IonizationStart;
+
 };
 
 #endif
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripResponse.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripResponse.h
index 0969a3aedd1a3cb5cc1caaed59e50bb74329f6a7..a2bddb14e5d0fa125dd0ac83deb5c0abcd18e790 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripResponse.h
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripResponse.h
@@ -19,29 +19,6 @@
 
 class MM_StripResponse {
 
-  float m_timeResolution;
-  float m_stripPitch;
-  int m_stripID;
-  int m_maxstripID;
-
-  std::vector<MM_Electron*> m_Electrons;
-
-  // First argument is time bin, second argument is strip ID
-  std::map< int, std::map<int,float> > m_stripCharges;
-
-  // Useful info for clustering later
-  std::map<int, int> m_stripTimeThreshold;
-  std::map<int, float> m_stripTotalCharge;
-  std::map<int, float> m_stripMaxCharge;
-  std::map<int, int> m_stripTimeMaxCharge;
-
-  //using vector for the moment -- hopefully this has better access and is not so expensive on the memory
-  std::vector<int> m_v_strip;
-  std::vector < std::vector <float> > m_v_stripTimeThreshold;
-  std::vector < std::vector <float> > m_v_stripTotalCharge;
-  std::vector<float> m_v_stripMaxCharge;
-  std::vector<float> m_v_stripTimeMaxCharge;
-
  public:
 
   MM_StripResponse();
@@ -65,6 +42,30 @@ class MM_StripResponse {
   int getNElectrons();
   std::vector<MM_Electron*> getElectrons();
 
+ private:
+
+  float m_timeResolution;
+  float m_stripPitch;
+  int m_stripID;
+  int m_maxstripID;
+
+  std::vector<MM_Electron*> m_Electrons;
+
+  // First argument is time bin, second argument is strip ID
+  std::map< int, std::map<int,float> > m_stripCharges;
+
+  // Useful info for clustering later
+  std::map<int, int> m_stripTimeThreshold;
+  std::map<int, float> m_stripTotalCharge;
+  std::map<int, float> m_stripMaxCharge;
+  std::map<int, int> m_stripTimeMaxCharge;
+
+  //using vector for the moment -- hopefully this has better access and is not so expensive on the memory
+  std::vector<int> m_v_strip;
+  std::vector < std::vector <float> > m_v_stripTimeThreshold;
+  std::vector < std::vector <float> > m_v_stripTotalCharge;
+  std::vector<float> m_v_stripMaxCharge;
+  std::vector<float> m_v_stripTimeMaxCharge;
 };
 
 #endif
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripVmmMappingTool.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripVmmMappingTool.h
index 4e6b574a9cc337da3aa52689d9c5145ef906e838..f5c8f4bb0f9df879fbd4beb286d2e013b9b7ebb2 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripVmmMappingTool.h
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripVmmMappingTool.h
@@ -9,11 +9,10 @@
 #define MMSTRIPVMMMAPPINGTOOL_H
 #include <string>
 #include <tuple>
-using namespace std;
 
 class electronics{
 public:
-int elec(int stripNumber, string tech, int off_stationEta, int chMax);
+int elec(int stripNumber, std::string tech, int off_stationEta, int chMax);
 };
 
 
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripsResponseSimulation.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripsResponseSimulation.h
index 0e3faf75b35e0f55ba8cc23eb69c1a6de55979e8..4180e5a876930900544f4fd79a62100af28c83bd 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripsResponseSimulation.h
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripsResponseSimulation.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 MM_DIGITIZATION_STRIPRESPONSESIMULATION_H
@@ -27,6 +27,7 @@ Comments to be added here...
 #include "GaudiKernel/IToolSvc.h"
 #include "GaudiKernel/Service.h"
 #include "AthenaKernel/MsgStreamMember.h"
+#include "AthenaBaseComps/AthMsgStreamMacros.h"
 #include "GaudiKernel/StatusCode.h"
 
 /// ROOT
@@ -71,6 +72,46 @@ class MM_StripToolOutput;
 
 class MM_StripsResponseSimulation {
 
+public :
+
+
+  MM_StripsResponseSimulation();
+
+  virtual ~MM_StripsResponseSimulation();
+  MM_StripToolOutput GetResponseFrom(const MM_DigitToolInput & digiInput);
+
+  void initialize ();
+  void writeHistos();
+  void initHistos ();
+  void clearValues ();
+  void initFunctions ();
+  void whichStrips(const float & hitx, const int & stripOffest, const float & incidentAngleXZ, const float & incidentAngleYZ, const int & stripMaxID, const MM_DigitToolInput & digiInput);
+
+  inline void setQThreshold (float val) { m_qThreshold = val; };
+  inline void setTransverseDiffusionSigma (float val) { m_transverseDiffusionSigma = val; };
+  inline void setLongitudinalDiffusionSigma (float val) { m_longitudinalDiffusionSigma = val; };
+  inline void setDriftVelocity (float val) { m_driftVelocity = val; };
+  inline void setCrossTalk1 (float val) { m_crossTalk1 = val; };
+  inline void setCrossTalk2 (float val) { m_crossTalk2 = val; };
+  inline void setDriftGapWidth (float val) {m_driftGapWidth = val;};
+
+  float getQThreshold    () const { return m_qThreshold;      };
+  float getDriftGapWidth () const { return m_driftGapWidth;   };
+  float getDriftVelocity () const { return m_driftVelocity;   };
+
+  vector <float> getTStripElectronicsAbThr() const { return m_tStripElectronicsAbThr;};
+  vector <float> getQStripElectronics() const { return m_qStripElectronics;};
+  vector <float> getFinaltStripNoSlewing() const { return m_finaltStripNoSlewing;};
+  vector < vector <float> > getFinalqStrip() const { return m_finalqStrip;};
+  vector < vector <float> > getFinaltStrip() const { return m_finaltStrip;};
+  vector <int>   getNStripElectronics() const { return m_nStripElectronics;};
+  vector <int>   getFinalNumberofStrip() const { return m_finalNumberofStrip;};
+
+  //Declaring the Message method for further use
+  MsgStream& msg(const MSG::Level lvl) const { return m_msg << lvl ; }
+  bool msgLvl(const MSG::Level lvl) const { return m_msg.get().level() <= lvl ; }
+  void setMessageLevel(const MSG::Level lvl) const { m_msg.get().setLevel(lvl); return; }
+
 private:
 
   /** qThreshold=2e, we accept a good strip if the charge is >=2e */
@@ -86,8 +127,6 @@ private:
   float m_crossTalk1;//0.10; //
   /** // crosstalk of second neighbor strips, it's 6% */
   float m_crossTalk2;//0.03;
-  /** // (degrees) Magnetic Field 0.5 T */
-  // float Lorentz_Angle;
 
   float m_driftGapWidth;
 
@@ -102,81 +141,38 @@ private:
   float m_interactionDensityMean;
   float m_interactionDensitySigma;
 
+  vector <int>   m_finalNumberofStrip;
+  vector <int>   m_nStripElectronics;
+  vector < vector <float> > m_finalqStrip;
+  vector < vector <float> > m_finaltStrip;
+  vector <float> m_finaltStripNoSlewing;
+  vector <float> m_tStripElectronicsAbThr;
+  vector <float> m_qStripElectronics;
+
+  vector <int> m_stripNumber;
+  vector <int> m_firstq;
+  vector <float> m_qstrip;
+  vector <float> m_cntTimes;
+  vector <float> m_tStrip;
+  vector <float> m_qStrip;
+  vector <float> m_time;  //Drift velocity [mm/ns]
+  vector <int> m_numberofStrip;
+
+  vector <float> m_clusterelectrons;
+  vector <float> m_l;
+
   /// ToDo: random number from custom functions
   TF1 *m_polyaFunction;
-  // TF1 *conv_gaus;
   TF1 *m_lorentzAngleFunction;
   TF1 *m_longitudinalDiffusionFunction;
   TF1 *m_transverseDiffusionFunction;
   TF1 *m_interactionDensityFunction;
 
-  // GarfieldGas* gas;
-
   MM_StripsResponseSimulation & operator=(const MM_StripsResponseSimulation &right);
   MM_StripsResponseSimulation(const MM_StripsResponseSimulation&);
 
   std::vector<MM_IonizationCluster> m_IonizationClusters;
 
-public :
-
-
-  MM_StripsResponseSimulation();
-
-  virtual ~MM_StripsResponseSimulation();
-  MM_StripToolOutput GetResponseFrom(const MM_DigitToolInput & digiInput);
-
-  void initialize ();
-  void writeHistos();
-  void initHistos ();
-  void clearValues ();
-  void initFunctions ();
-  void whichStrips(const float & hitx, const int & stripOffest, const float & incidentAngleXZ, const float & incidentAngleYZ, const int & stripMaxID, const MM_DigitToolInput & digiInput);
-
-  inline void setQThreshold (float val) { m_qThreshold = val; };
-  inline void setTransverseDiffusionSigma (float val) { m_transverseDiffusionSigma = val; };
-  inline void setLongitudinalDiffusionSigma (float val) { m_longitudinalDiffusionSigma = val; };
-  inline void setDriftVelocity (float val) { m_driftVelocity = val; };
-  inline void setCrossTalk1 (float val) { m_crossTalk1 = val; };
-  inline void setCrossTalk2 (float val) { m_crossTalk2 = val; };
-  inline void setDriftGapWidth (float val) {m_driftGapWidth = val;};
-
-  // inline void setOutputFile( TFile& m_file ){  m_outputFile = &m_file; };
-
-  float getQThreshold    () const { return m_qThreshold;      };
-  float getDriftGapWidth () const { return m_driftGapWidth;   };
-  float getDriftVelocity () const { return m_driftVelocity;   };
-
-  vector <float> getTStripElectronicsAbThr() const { return tStripElectronicsAbThr;};
-  vector <float> getQStripElectronics() const { return qStripElectronics;};
-  vector <float> getFinaltStripNoSlewing() const { return finaltStripNoSlewing;};
-  vector < vector <float> > getFinalqStrip() const { return finalqStrip;};
-  vector < vector <float> > getFinaltStrip() const { return finaltStrip;};
-  vector <int>   getNStripElectronics() const { return nStripElectronics;};
-  vector <int>   getFinalNumberofStrip() const { return finalNumberofStrip;};
-
-  vector <int>   finalNumberofStrip;
-  vector <int>   nStripElectronics;
-  vector < vector <float> > finalqStrip;
-  vector < vector <float> > finaltStrip;
-  vector <float> finaltStripNoSlewing;
-  vector <float> tStripElectronicsAbThr;
-  vector <float> qStripElectronics;
-
-  vector <int> stripNumber;
-  vector <int> firstq;
-  vector <float> qstrip;
-  vector <float> cntTimes;
-  vector <float> tStrip;
-  vector <float> qStrip;
-  vector <float> time;  //Drift velocity [mm/ns]
-  vector <int> numberofStrip;
-
-  vector <float> clusterelectrons;
-  vector <float> l;
-
-
-private:
-
   std::map<TString, TH1F* > m_mapOfHistograms;
   std::map<TString, TH2F* > m_mapOf2DHistograms;
 
@@ -187,6 +183,9 @@ private:
   bool m_writeEventDisplays;
   TFile * m_outputFile;
 
+ protected:
+  //Declaring private message stream member.
+  mutable Athena::MsgStreamMember m_msg = Athena::MsgStreamMember("MMStripResponseSimulation");
 
 };
 #endif
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx
index 51080ba4fdc64ef3866d65308b989897a4b49522..76e98991e1c6d102e0dfd981bcaead6de9205a26 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.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
 */
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -95,25 +95,25 @@ MM_DigitizationTool::MM_DigitizationTool(const std::string& type, const std::str
 	// Services
 	m_storeGateService("StoreGateSvc", name),
 	m_magFieldSvc("AtlasFieldSvc",name) ,
-	m_mergeSvc(0),
+	m_mergeSvc(nullptr),
 	m_rndmSvc("AtRndmGenSvc", name ),
-	m_rndmEngine(0),
+	m_rndmEngine(nullptr),
 	m_rndmEngineName("MuonDigitization"),
 
 	// Containers
-	m_digitContainer(NULL),
-	m_sdoContainer(NULL),
+	m_digitContainer(nullptr),
+	m_sdoContainer(nullptr),
 
 	// Tools
 	m_digitTool("MM_Response_DigitTool", this),
-	m_file(0),
-	m_ntuple(0),
+	m_file(nullptr),
+	m_ntuple(nullptr),
 
 	// Settings
 	m_energyThreshold(50.),
 	m_maskMultiplet(0),
 	m_writeOutputFile(false),
-	m_timedHitCollection_MM(0),
+	m_timedHitCollection_MM(nullptr),
 
 	m_inputObjectName(""),
 	m_outputObjectName(""),
@@ -251,8 +251,8 @@ StatusCode MM_DigitizationTool::initialize() {
 	ATH_CHECK( service("ActiveStoreSvc", m_activeStore) );
 
 	// Initialize transient detector store and MuonGeoModel OR MuonDetDescrManager
-	StoreGateSvc* detStore=0;
-	m_MuonGeoMgr=0;
+	StoreGateSvc* detStore=nullptr;
+	m_MuonGeoMgr=nullptr;
 	ATH_CHECK( serviceLocator()->service("DetectorStore", detStore) );
 	if(detStore->contains<MuonGM::MuonDetectorManager>( "Muon" )){
 		ATH_CHECK( detStore->retrieve(m_MuonGeoMgr) );
@@ -273,7 +273,7 @@ StatusCode MM_DigitizationTool::initialize() {
 	// Random Engine from Random Service
 	ATH_MSG_DEBUG ( "Getting random number engine : <" << m_rndmEngineName << ">" );
 	m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName);
-	if (m_rndmEngine==0) {
+	if (m_rndmEngine == nullptr) {
 		ATH_MSG_ERROR("Could not find RndmEngine : " << m_rndmEngineName );
 		return StatusCode::FAILURE;
 	}
@@ -456,7 +456,6 @@ StatusCode MM_DigitizationTool::getNextEvent() {
 	}
 
 	// create a new hits collection - Define Hit Collection
-	// m_timedHitCollection_MM = new TimedHitCollection<GenericMuonSimHit>() ;
 	if(!m_timedHitCollection_MM) {
 		m_timedHitCollection_MM = new TimedHitCollection<GenericMuonSimHit>();
 	}else{
@@ -481,7 +480,7 @@ StatusCode MM_DigitizationTool::getNextEvent() {
 /*******************************************************************************/
 StatusCode MM_DigitizationTool::mergeEvent() {
 
-	// ATH_MSG_DEBUG ( "MM_DigitizationTool::in mergeEvent()" );
+	ATH_MSG_VERBOSE ( "MM_DigitizationTool::in mergeEvent()" );
 
 	// Cleanup and record the Digit container in StoreGate
 	ATH_CHECK( recordDigitAndSdoContainers() );
@@ -490,7 +489,7 @@ StatusCode MM_DigitizationTool::mergeEvent() {
 	// reset the pointer (delete null pointer should be safe)
 	if (m_timedHitCollection_MM){
 		delete m_timedHitCollection_MM;
-		m_timedHitCollection_MM = 0;
+		m_timedHitCollection_MM = nullptr;
 	}
 
 	// remove cloned one in processBunchXing......
@@ -516,14 +515,14 @@ StatusCode MM_DigitizationTool::processAllSubEvents() {
 
 	//merging of the hit collection in getNextEvent method
 
-	if (0 == m_timedHitCollection_MM ) ATH_CHECK( getNextEvent() );
+	if (m_timedHitCollection_MM == nullptr) ATH_CHECK( getNextEvent() );
 
 	ATH_CHECK( doDigitization() );
 
 	// reset the pointer (delete null pointer should be safe)
 	if (m_timedHitCollection_MM){
 		delete m_timedHitCollection_MM;
-		m_timedHitCollection_MM = 0;
+		m_timedHitCollection_MM = nullptr;
 	}
 	return StatusCode::SUCCESS;
 }
@@ -566,7 +565,7 @@ StatusCode MM_DigitizationTool::recordDigitAndSdoContainers() {
 StatusCode MM_DigitizationTool::doDigitization() {
 
 
-	GenericMuonSimHitCollection* inputSimHitColl=NULL;
+	GenericMuonSimHitCollection* inputSimHitColl=nullptr;
 
 	IdentifierHash detectorElementHash=0;
 
@@ -589,9 +588,8 @@ StatusCode MM_DigitizationTool::doDigitization() {
 
 	//iterate over hits and fill id-keyed drift time map
 	TimedHitCollection< GenericMuonSimHit >::const_iterator i, e;
-	const GenericMuonSimHit* previousHit = 0;
+	const GenericMuonSimHit* previousHit = nullptr;
 
-	// ATH_MSG_DEBUG("create PRD container of size " << m_idHelper->detectorElement_hash_max());
 	std::map<Identifier,int> hitsPerChannel;
 	int nhits = 0;
 
@@ -1147,7 +1145,7 @@ StatusCode MM_DigitizationTool::doDigitization() {
 		const Identifier elemId = m_idHelper->elementID( stripDigitOutputAllHits.digitID() );
 		m_idHelper->get_detectorElement_hash( elemId, detectorElementHash );
 
-		MmDigitCollection* digitCollection = 0;
+		MmDigitCollection* digitCollection = nullptr;
 		// put new collection in storegate
 		// Get the messaging service, print where you are
 		m_activeStore->setStore( &*m_storeGateService );
@@ -1178,7 +1176,7 @@ StatusCode MM_DigitizationTool::doDigitization() {
 
 	if (m_timedHitCollection_MM){
 		delete m_timedHitCollection_MM;
-		m_timedHitCollection_MM = 0;
+		m_timedHitCollection_MM = nullptr;
 	}
 
 	return StatusCode::SUCCESS;
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_ElectronicsResponseSimulation.cxx b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_ElectronicsResponseSimulation.cxx
index 5ccbbf3a71587bb943dd522291c078d5ba6a44c8..869b11dd17e41d4186a81a77c4b425be985596cc 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_ElectronicsResponseSimulation.cxx
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_ElectronicsResponseSimulation.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
 */
 
 /**
@@ -109,32 +109,24 @@ void MM_ElectronicsResponseSimulation::vmmPeakResponseFunction(const vector <int
 		double maxChargeLeftNeighbor = 0;
 		double maxChargeRightNeighbor = 0;
 
-		// Athena::MsgStreamMember log("MM_ElectronicsResponseSimulation::VMMResponseFunction");
 		// find the maximum charge:
 		if ( ii > 0 ) {
-			// log << MSG::DEBUG << "for Left neighbor:   tStrip.at(ii-1) "<< tStrip.at(ii-1) << " qStrip.at(ii-1) " << qStrip.at(ii-1) << endmsg;
 			shaperInputTime = tStrip.at(ii-1);
 			shaperInputCharge = qStrip.at(ii-1);
 			maxChargeLeftNeighbor = m_h_intFn->GetMaximum(m_timeWindowLowerOffset,m_timeWindowUpperOffset);
-			//  maxChargeLeftNeighbor = m_h_intFn->GetMaximum(0,3*(m_stripResponseDriftGap/m_stripResponseDriftVelocity));
 		}
 
 		if ( ii+1 < numberofStrip.size() ) {
-			// log << MSG::DEBUG << "for Right neighbor:   tStrip.at(ii+1) "<< tStrip.at(ii+1) << " qStrip.at(ii+1) " << qStrip.at(ii+1) << endmsg;
 			shaperInputTime = tStrip.at(ii+1);
 			shaperInputCharge = qStrip.at(ii+1);
 			maxChargeRightNeighbor = m_h_intFn->GetMaximum(m_timeWindowLowerOffset,m_timeWindowUpperOffset);
-			//  maxChargeRightNeighbor = m_h_intFn->GetMaximum(0,3*(m_stripResponseDriftGap/m_stripResponseDriftVelocity));
 		}
 
-		// log << MSG::DEBUG << "for This strip:    tStrip.at(ii) "<< tStrip.at(ii) << " qStrip.at(ii) " << qStrip.at(ii) << endmsg;
 		shaperInputTime = tStrip.at(ii);
 		shaperInputCharge = qStrip.at(ii);
 		maxChargeThisStrip = m_h_intFn->GetMaximum(m_timeWindowLowerOffset,m_timeWindowUpperOffset);
-		//	maxChargeThisStrip = m_h_intFn->GetMaximum(0,3*(m_stripResponseDriftGap/m_stripResponseDriftVelocity));
 
 
-		// log << MSG::DEBUG << "Check if a strip or its neighbors were above electronics threshold (" << m_electronicsThreshold << "):   maxChargeLeftNeighbor: " << maxChargeLeftNeighbor << ", maxChargeRightNeighbor: " << maxChargeRightNeighbor << ", maxChargeThisStrip: " << maxChargeThisStrip << endmsg;
 
 		// Look at strip if it or its neighbor was above threshold:
 		if ( maxChargeLeftNeighbor > m_electronicsThreshold || maxChargeRightNeighbor > m_electronicsThreshold || maxChargeThisStrip > m_electronicsThreshold ) {
@@ -147,23 +139,18 @@ void MM_ElectronicsResponseSimulation::vmmPeakResponseFunction(const vector <int
 			float stepSize = 0.1; //ns(?) step size corresponding to VMM discriminator
 
 			for (int jj = 0; jj < (m_timeWindowUpperOffset-m_timeWindowLowerOffset)/stepSize; jj++) {
-			//            for (int jj = 0; jj < (3*( m_stripResponseDriftGap/m_stripResponseDriftVelocity))/stepSize; jj++) {
 
 				float thisStep = m_timeWindowLowerOffset+jj*stepSize;
 				float nextStep = m_timeWindowLowerOffset+(jj+1)*stepSize;
 				float oneAfterStep = m_timeWindowLowerOffset+(jj+2)*stepSize;
 
-				//                if (localPeak == 0 ) {  //haven't found a local peak yet
 
 				//check if the charge for the next points is less than the current step and the derivative of the first point is positive or 0 and the next point is negative:
 				if ( ( m_h_intFn->Eval(thisStep,0,0) < m_h_intFn->Eval(nextStep,0,0) ) && ( m_h_intFn->Eval(nextStep,0,0) > m_h_intFn->Eval(oneAfterStep,0,0) ) && (m_h_intFn->Eval(thisStep+0.001)-m_h_intFn->Eval(thisStep-0.001))/0.001 > 0.0 && (m_h_intFn->Eval(oneAfterStep+0.001)-m_h_intFn->Eval(oneAfterStep-0.001))/0.001 < 0.0 ){ // m_h_intFn->Derivative() does not work. WHY? 2016/07/18
-					//	      if ( ( m_h_intFn->Eval(thisStep,0,0) < m_h_intFn->Eval(nextStep,0,0) ) && ( m_h_intFn->Eval(nextStep,0,0) > m_h_intFn->Eval(oneAfterStep,0,0) ) && (m_h_intFn->Derivative(thisStep,0,0.001) > 0 && m_h_intFn->Derivative(oneAfterStep,0,0.001) < 0 ) ) {
 
-					// localPeak = 1;
 					localPeakt = nextStep;
 					localPeakq = m_h_intFn->Eval(nextStep,0,0);
 
-							// log << MSG::DEBUG << "found a peak!    for strip number: " << numberofStrip.at(ii) << " at time: " << nextStep << " with charge: " << m_h_intFn->Eval(nextStep,0,0) << endmsg;
 					m_nStripElectronics.push_back(numberofStrip.at(ii));
 					m_tStripElectronicsAbThr.push_back(localPeakt);
 					m_qStripElectronics.push_back(localPeakq);
@@ -180,12 +167,9 @@ void MM_ElectronicsResponseSimulation::vmmPeakResponseFunction(const vector <int
 
 void MM_ElectronicsResponseSimulation::vmmThresholdResponseFunction(const vector <int> & numberofStrip, const vector<vector <float>> & qStrip, const vector<vector <float>> & tStrip){
 
-	//    float tmp_Stripq = 0;
-	//    float tmp_Stript = 9999.0;
 
 	for (unsigned int ii = 0; ii < numberofStrip.size(); ii++) {
 
-		// Athena::MsgStreamMember log("MM_ElectronicsResponseSimulation::VMMTriggerResponseFunction");
 
 		shaperInputTime = tStrip.at(ii);
 		shaperInputCharge = qStrip.at(ii);
@@ -196,7 +180,6 @@ void MM_ElectronicsResponseSimulation::vmmThresholdResponseFunction(const vector
 		float stepSize = 0.1; //ns(?) step size corresponding to VMM discriminator
 
 		for (int jj = 0; jj < (m_timeWindowUpperOffset-m_timeWindowLowerOffset)/stepSize; jj++) {
-		//      for (int jj = 0; jj < (3*( m_stripResponseDriftGap/m_stripResponseDriftVelocity))/stepSize; jj++) {
 
 			float thisStep = m_timeWindowLowerOffset+jj*stepSize;
 			float preStep = (jj>0) ? m_timeWindowLowerOffset+(jj-1)*stepSize: 0.0;
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_StripResponse.cxx b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_StripResponse.cxx
index 3210813ede32b553bd13059d8766104dffc2701e..2d4bcc80411b8dbb1ce71cf4cf971970abe55d04 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_StripResponse.cxx
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_StripResponse.cxx
@@ -44,8 +44,6 @@ void MM_StripResponse::calculateTimeSeries(float /*thetaD*/, int /*gasgap*/) {
 				stripVal = m_stripID + int( (Electron->getX()+m_stripPitch/2)/m_stripPitch ) - 1 ;
 		}
 		else stripVal = m_stripID;
-//    int stripVal = Electron->getX() < 0 ? m_stripID + Electron->getX()/m_stripPitch : m_stripID + Electron->getX()/m_stripPitch;
-//    int stripVal = Electron->getX() < 0 ? m_stripID + Electron->getX()/m_stripPitch - 1 : m_stripID + Electron->getX()/m_stripPitch;
 
 		if (stripVal < 0 || stripVal > m_maxstripID) stripVal = -1;
 		(m_stripCharges[timeBin])[stripVal] += Electron->getCharge();
@@ -87,7 +85,6 @@ void MM_StripResponse::simulateCrossTalk(float crossTalk1, float crossTalk2) {
 void MM_StripResponse::calculateSummaries(float chargeThreshold) {
 
 	for (auto& Electron : m_Electrons) {
-//    int stripVal      = Electron->getX() < 0 ? m_stripID + Electron->getX()/m_stripPitch - 1 : m_stripID + Electron->getX()/m_stripPitch;
 		int stripVal = 0;
 		if(fabs(Electron->getX())>m_stripPitch/2){
 			if(Electron->getX()>0.0)
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_StripVmmMappingTool.cxx b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_StripVmmMappingTool.cxx
index 1ffcc79833980c5b257e9d6b4315be1f0e0b90de..2802816ea5832b6da9063367d739ee75c2be7ef8 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_StripVmmMappingTool.cxx
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_StripVmmMappingTool.cxx
@@ -1,8 +1,7 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-//MMStripVmmMappingTool.cxx
 
 #include "MM_Digitization/MM_StripVmmMappingTool.h"
 #include <iostream>
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_StripsResponseSimulation.cxx b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_StripsResponseSimulation.cxx
index e80a64f739958fb47f1187ab3946d7db4a0cdd90..cc3293cddbf8d8a1dc64d0d5add833767259d805 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_StripsResponseSimulation.cxx
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_StripsResponseSimulation.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
 */
 
 /// PROJECTS
 #include "MM_Digitization/MM_StripsResponseSimulation.h"
-#include "GaudiKernel/MsgStream.h"
 #include "MM_Digitization/MM_IonizationCluster.h"
 #include "MM_Digitization/MM_StripResponse.h"
 #include "PathResolver/PathResolver.h"
@@ -116,8 +115,7 @@ void MM_StripsResponseSimulation::initFunctions()
 
 	m_random = new TRandom3(0);
 
-	Athena::MsgStreamMember log("MM_StripsResponseSimulation::initFunctions");
-	log << MSG::DEBUG << "MM_StripsResponseSimulation::initFunctions DONE" << endmsg;
+	ATH_MSG_DEBUG("MM_StripsResponseSimulation::initFunctions DONE");
 
 }
 /*******************************************************************************/
@@ -132,8 +130,7 @@ void MM_StripsResponseSimulation::initialize()
 	initHistos ();
 	initFunctions();
 
-	Athena::MsgStreamMember log("MM_StripsResponseSimulation::initializationFrom");
-	log << MSG::DEBUG << "MM_StripsResponseSimulation::initializationFrom set values" << endmsg;
+	ATH_MSG_DEBUG("MM_StripsResponseSimulation::initializationFrom set values");
 
 }
 
@@ -141,13 +138,12 @@ void MM_StripsResponseSimulation::initialize()
 MM_StripToolOutput MM_StripsResponseSimulation::GetResponseFrom(const MM_DigitToolInput & digiInput)
 {
 
-	Athena::MsgStreamMember log("MM_StripsResponseSimulation::GetResponseFrom");
-	log << MSG::DEBUG << "\t \t MM_StripsResponseSimulation::GetResponseFrom start " << endmsg;
+    ATH_MSG_DEBUG("Starting to get response from strips");
 
 	m_IonizationClusters.clear();
-	finalNumberofStrip.clear();
-	finalqStrip.clear();
-	finaltStrip.clear();
+	m_finalNumberofStrip.clear();
+	m_finalqStrip.clear();
+	m_finaltStrip.clear();
 
 	whichStrips(digiInput.positionWithinStrip(),
 		digiInput.stripIDLocal(),
@@ -157,9 +153,9 @@ MM_StripToolOutput MM_StripsResponseSimulation::GetResponseFrom(const MM_DigitTo
 		digiInput
 		);
 
-	log << MSG::DEBUG << "\t \t MM_StripsResponseSimulation::GetResponseFrom creating MmDigitToolOutput object " << endmsg;
+	ATH_MSG_DEBUG("Creating MmDigitToolOutput object");
 
-	MM_StripToolOutput tmpStripToolOutput(finalNumberofStrip, finalqStrip, finaltStrip);
+	MM_StripToolOutput tmpStripToolOutput(m_finalNumberofStrip, m_finalqStrip, m_finaltStrip);
 
 	return tmpStripToolOutput;
 
@@ -177,8 +173,7 @@ void MM_StripsResponseSimulation::whichStrips( const float & hitx,
 											const MM_DigitToolInput & digiInput)
 {
 
-	Athena::MsgStreamMember msglog("MM_StripsResponseSimulation::whichStrips");
-	msglog << MSG::DEBUG << "\t \t MM_StripsResponseSimulation::whichStrips start " << endmsg;
+	ATH_MSG_DEBUG("Starting to calculate strips that got fired");
 
 	float eventTime = digiInput.eventTime();
 	float theta = incidentAngleXZ * M_PI/180.0; // Important for path length and strip distribution
@@ -199,8 +194,8 @@ void MM_StripsResponseSimulation::whichStrips( const float & hitx,
 	m_mapOf2DHistograms["lorentzAngleVsBy"]->Fill(lorentzAngle,b.y());
 
 
-	msglog << MSG::DEBUG << "MM_StripsResponseSimulation::lorentzAngle vs theta: " << lorentzAngle << " " << theta << endmsg;
-	msglog << MSG::DEBUG << "MM_StripsResponseSimulation::function pointer points to " << m_interactionDensityFunction << endmsg;
+	ATH_MSG_DEBUG("LorentzAngle vs theta: " <<lorentzAngle <<" " <<theta);
+    ATH_MSG_DEBUG("Function pointer points to " << m_interactionDensityFunction);
 
 	float pathLengthTraveled = ( 1. / m_interactionDensityFunction->GetRandom() ) * -1. * log( m_random->Uniform() );
 
@@ -221,14 +216,13 @@ void MM_StripsResponseSimulation::whichStrips( const float & hitx,
 
 		TVector2 initialPosition = IonizationCluster.getIonizationStart();
 
-		msglog << MSG::DEBUG
-			<< "MM_StripsResponseSimulation:: New interaction starting at x,y, pathLengthTraveled: "
+		ATH_MSG_DEBUG("New interaction starting at x,y, pathLengthTraveled: "
 			<< initialPosition.X()
 			<< " "
 			<< initialPosition.Y()
 			<< " "
 			<< pathLengthTraveled
-			<< endmsg;
+			);
 
 		for (auto& Electron : IonizationCluster.getElectrons()){
 
@@ -259,10 +253,7 @@ void MM_StripsResponseSimulation::whichStrips( const float & hitx,
 
 			Electron->setCharge( effectiveCharge );
 
-			msglog << MSG::DEBUG
-				<< "MM_StripsResponseSimulation::Electron's effective charge is  "
-				<< effectiveCharge
-				<< endmsg;
+			ATH_MSG_DEBUG("Electron's effective charge is  "<< effectiveCharge);
 
 			m_mapOfHistograms["effectiveCharge"]->Fill( effectiveCharge );
 
@@ -281,7 +272,7 @@ void MM_StripsResponseSimulation::whichStrips( const float & hitx,
 
 		pathLengthTraveled +=  (1. / m_interactionDensityFunction->GetRandom() ) * -1. * log( m_random->Uniform() );
 
-		msglog << MSG::DEBUG << "MM_StripsResponseSimulation:: path length traveled: " << pathLengthTraveled << endmsg;
+		ATH_MSG_DEBUG("Path length traveled: " << pathLengthTraveled);
 
 		nPrimaryIons++;
 		if (nPrimaryIons >= m_maxPrimaryIons) break; //don't create more than "MaxPrimaryIons" along a track....
@@ -298,11 +289,11 @@ void MM_StripsResponseSimulation::whichStrips( const float & hitx,
 
 	//Connect the output with the rest of the existing code
 	//
-	finalNumberofStrip     = stripResponseObject.getStripVec();
-	finalqStrip            = stripResponseObject.getTotalChargeVec();
-	finaltStrip            = stripResponseObject.getTimeThresholdVec();
-	tStripElectronicsAbThr = stripResponseObject.getTimeMaxChargeVec();
-	qStripElectronics      = stripResponseObject.getMaxChargeVec();
+	m_finalNumberofStrip     = stripResponseObject.getStripVec();
+	m_finalqStrip            = stripResponseObject.getTotalChargeVec();
+	m_finaltStrip            = stripResponseObject.getTimeThresholdVec();
+	m_tStripElectronicsAbThr = stripResponseObject.getTimeMaxChargeVec();
+	m_qStripElectronics      = stripResponseObject.getMaxChargeVec();
 
 
 
diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/CMakeLists.txt b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/CMakeLists.txt
index 8fb6e02f8566e8462f9fc172418c1fd830d85b4b..bf57ddffe52ac93525b2eab7c5f0577613700324 100644
--- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/CMakeLists.txt
@@ -6,34 +6,37 @@
 atlas_subdir( AnalysisTriggerAlgs )
 
 # Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Event/EventInfo
-                          Event/xAOD/xAODTrigL1Calo
-                          Event/xAOD/xAODTrigger
-                          Event/xAOD/xAODTriggerCnv
-                          GaudiKernel
-                          PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEvent
-                          Trigger/TrigConfiguration/TrigConfInterfaces
-                          Trigger/TrigConfiguration/TrigConfL1Data
-                          Trigger/TrigT1/TrigT1CaloEvent
-                          Trigger/TrigT1/TrigT1CaloToolInterfaces
-                          Trigger/TrigT1/TrigT1Interfaces
-                          Trigger/TrigT1/TrigT1Result )
+atlas_depends_on_subdirs(
+   PRIVATE
+   Control/AthenaBaseComps
+   Control/AthenaKernel
+   Control/StoreGate
+   Event/EventInfo
+   Event/xAOD/xAODTrigL1Calo
+   Event/xAOD/xAODTrigger
+   Event/xAOD/xAODTriggerCnv
+   GaudiKernel
+   PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEvent
+   Trigger/TrigConfiguration/TrigConfInterfaces
+   Trigger/TrigConfiguration/TrigConfL1Data
+   Trigger/TrigT1/TrigT1CaloEvent
+   Trigger/TrigT1/TrigT1CaloToolInterfaces
+   Trigger/TrigT1/TrigT1Interfaces
+   Trigger/TrigT1/TrigT1Result )
 
 # External dependencies:
 find_package( CLHEP )
 
 # Component(s) in the package:
 atlas_add_component( AnalysisTriggerAlgs
-                     src/*.cxx
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests EventInfo xAODTrigL1Calo xAODTrigger GaudiKernel AnalysisTriggerEvent TrigConfL1Data TrigT1CaloEventLib TrigT1CaloToolInterfaces TrigT1Interfaces TrigT1Result )
+   src/*.h src/*.cxx src/components/*.cxx
+   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+   DEFINITIONS ${CLHEP_DEFINITIONS}
+   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib
+   EventInfo xAODTrigL1Calo xAODTrigger GaudiKernel AnalysisTriggerEvent
+   TrigConfL1Data TrigT1CaloEventLib TrigT1CaloToolInterfaces TrigT1Interfaces
+   TrigT1Result )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
-
diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsConfig.py b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsConfig.py
index 208e1e489fe571e69a9c005e0aad887d79a944bf..12f29133b071b0d3210014c41bbf0404e5eb6fed 100644
--- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsConfig.py
+++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsConfig.py
@@ -1,5 +1,7 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 
+# Athena import(s):
+import AthenaCommon.CfgMgr as CfgMgr
 
 # Import the genConf made configurable:
 from AnalysisTriggerAlgs.AnalysisTriggerAlgsConf import RoIBResultToxAOD as genConfRoIBResultToAOD
@@ -38,19 +40,13 @@ class DefaultRoIBResultToAOD( genConfRoIBResultToAOD ):
         #
         from AthenaCommon.AppMgr import ToolSvc
 
-        log.info( "will add L1EmTauTools instance to ToolSvc" )
-        from TrigT1CaloTools.TrigT1CaloToolsConf import LVL1__L1EmTauTools
-        theL1EmTauTools = LVL1__L1EmTauTools( "L1EmTauTools" )
-        theL1EmTauTools.LVL1ConfigSvc = lvl1ConfigSvc
-        ToolSvc += theL1EmTauTools
-        self.L1EmTauTools = ToolSvc.L1EmTauTools
-
-        log.info( "will add L1JetTools instance to ToolSvc" )
-        from TrigT1CaloTools.TrigT1CaloToolsConf import LVL1__L1JetTools
-        theL1JetTools = LVL1__L1JetTools( "L1JetTools" )
-        theL1JetTools.LVL1ConfigSvc = lvl1ConfigSvc
-        ToolSvc += theL1JetTools
-        self.L1JetTools = ToolSvc.L1JetTools
+        log.info( "will add L1CPMTools instance to the algorithm" )
+        self.L1CPMTools = CfgMgr.LVL1__L1CPMTools( 'L1CPMTools' )
+        self.L1CPMTools.LVL1ConfigSvc = lvl1ConfigSvc
+
+        log.info( "will add L1JEMJetTools instance to the algorithm" )
+        self.L1JEMJetTools = CfgMgr.LVL1__L1JEMJetTools( 'L1JEMJetTools' )
+        self.L1JEMJetTools.LVL1ConfigSvc = lvl1ConfigSvc
 
         #
         # Set up the muon RoI services:
diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.cxx b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.cxx
index a736c0153f3bfb90354c4585ba99ba72e9ab6c7e..531811e9bfba956738cf610cd98f700517c982b5 100644
--- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.cxx
+++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.cxx
@@ -1,8 +1,6 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// $Id: RoIBResultToxAOD.cxx 784984 2016-11-18 05:53:57Z ssnyder $
+//
+// Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+//
 
 // STL include(s):
 #include <algorithm>
@@ -12,131 +10,56 @@
 #include "RoIBResultToxAOD.h"
 
 // Gaudi/Athena include(s):
-#include "AthenaKernel/errorcheck.h"
-#include "CLHEP/Units/SystemOfUnits.h"
-#include "EventInfo/EventInfo.h"
-#include "EventInfo/EventID.h"
-#include "EventInfo/EventType.h"
-#include "EventInfo/TriggerInfo.h"
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/WriteHandle.h"
 
 // LVL1 trigger include(s):
-#include "TrigT1Interfaces/TriggerTypeWord.h"
 #include "TrigT1Interfaces/RecMuonRoI.h"
-#include "TrigT1Interfaces/RecMuonRoiSvc.h"
 #include "TrigT1Interfaces/RecEmTauRoI.h"
 #include "TrigT1Interfaces/RecJetRoI.h"
 #include "TrigT1Interfaces/RecEnergyRoI.h"
 #include "TrigT1Interfaces/JEPRoIDecoder.h"
-#include "TrigT1Result/RoIBResult.h"
-#include "TrigT1Result/CTPResult.h"
-#include "TrigT1CaloToolInterfaces/IL1CPMTools.h"
-#include "TrigT1CaloToolInterfaces/IL1JEMJetTools.h"
-#include "xAODTrigL1Calo/CPMTowerContainer.h"
-#include "xAODTrigL1Calo/JetElementContainer.h"
 #include "TrigT1CaloEvent/JetInput.h"
-#include "TrigConfL1Data/L1DataDef.h"
-#include "TrigConfL1Data/TriggerThreshold.h"
-#include "TrigT1Interfaces/TrigT1CaloDefs.h"
 
 // Trigger configuration interface includes:
 #include "TrigConfL1Data/CTPConfig.h"
 #include "TrigConfL1Data/Menu.h"
 #include "TrigConfL1Data/TriggerItem.h"
-
-// Include for the configuration service:
-#include "TrigConfInterfaces/ILVL1ConfigSvc.h"
-
-// LVL1 AOD event include(s):
-#include "AnalysisTriggerEvent/CTP_Decision.h"
-#include "AnalysisTriggerEvent/LVL1_ROI.h"
+#include "TrigConfL1Data/L1DataDef.h"
+#include "TrigConfL1Data/TriggerThreshold.h"
 
 // xAOD include(s):
-#include "xAODTrigger/MuonRoIContainer.h"
 #include "xAODTrigger/MuonRoIAuxContainer.h"
-#include "xAODTrigger/EmTauRoI.h"
-#include "xAODTrigger/EmTauRoIContainer.h"
 #include "xAODTrigger/EmTauRoIAuxContainer.h"
-#include "xAODTrigger/EnergySumRoI.h"
 #include "xAODTrigger/EnergySumRoIAuxInfo.h"
-#include "xAODTrigger/JetEtRoI.h"
 #include "xAODTrigger/JetEtRoIAuxInfo.h"
-#include "xAODTrigger/JetRoI.h"
-#include "xAODTrigger/JetRoIContainer.h"
 #include "xAODTrigger/JetRoIAuxContainer.h"
 
+namespace {
 
-// Local include(s):
-//#include "RoIBResultToxAOD.h"
-
-using namespace TrigConf;
-using namespace xAODMaker;
-using namespace LVL1;
-
-RoIBResultToxAOD::RoIBResultToxAOD( const std::string& name, ISvcLocator* pSvcLocator )
-  : AthAlgorithm( name, pSvcLocator ),
-    m_configSvc( "TrigConf::LVL1ConfigSvc/LVL1ConfigSvc", name ),
-    m_recRPCRoiSvc( LVL1::ID_RecRpcRoiSvc, name ),
-    m_recTGCRoiSvc( LVL1::ID_RecTgcRoiSvc, name ),
-    m_EmTauTool( "LVL1::L1CPMTools/L1CPMTools" ),
-    m_JetTool( "LVL1::L1JEMJetTools/L1JEMJetTools" ),
-    m_MuCnvTool( "xAODMaker::MuonRoICnvTool/MuonRoICnvTool", this )
- {
-
-   // services
-   declareProperty( "LVL1ConfigSvc", m_configSvc, "LVL1 Config Service");
-   declareProperty( "RecRpcRoiSvc", m_recRPCRoiSvc, "RPC Rec Roi Service");
-   declareProperty( "RecTgcRoiSvc", m_recTGCRoiSvc, "TGC Rec Roi Service");
-
-   // tools
-   declareProperty( "L1CPMTools", m_EmTauTool,
-                    "Tool for calculation of EmTau trigger sums per RoI");
-   declareProperty( "L1JEMJetTools", m_JetTool,
-                    "Tool for calculation of Jet cluster sums per RoI");
-
-   // Properties: input selection
-   declareProperty( "DoCalo", m_doCalo = true, "Use inputs from Calo system" );
-   declareProperty( "DoMuon", m_doMuon = true, "Use inputs from Muon system" );
-
-   // Properties: rebuilding trigger type
-   declareProperty( "EGammaItem", m_egammaItem,
-                    "List of LVL1 items for e/gamma trigger type" );
-   declareProperty( "TauHadItem", m_tauhadItem,
-                    "List of LVL1 items for tau trigger type" );
-   declareProperty( "JetItem", m_jetItem,
-                    "List of LVL1 items for jet trigger type" );
-   declareProperty( "ESumItem", m_esumItem,
-                    "List of LVL1 items for energy sum trigger type" );
-   declareProperty( "HighMuItem", m_highmuItem,
-                    "List of LVL1 items for high pt muon trigger type" );
-   declareProperty( "LowMuItem", m_lowmuItem,
-                    "List of LVL1 items for low pt muon trigger type" );
-
-   // Properties: StoreGate keys
-   m_CPMTowerLocation           = LVL1::TrigT1CaloDefs::CPMTowerLocation;
-   m_JetElementLocation         = LVL1::TrigT1CaloDefs::JetElementLocation;
-   declareProperty( "CPMTowerLocation", m_CPMTowerLocation ) ;
-   declareProperty( "JetElementLocation",   m_JetElementLocation ) ;
-   declareProperty( "RoIBResultInputKey", m_roibInputKey = "RoIBResult" );
-   declareProperty( "LVL1_ROIOutputKey", m_lvl1RoIOutputKey = "LVL1_ROI" );
-
-   declareProperty( "xAODKeyMu", m_xaodKeyMu = "LVL1MuonRoIs" );
-   declareProperty( "xAODKeyEmTau", m_xaodKeyEmTau = "LVL1EmTauRoIs" );
-   declareProperty( "xAODKeyEsum", m_xaodKeyEsum = "LVL1EnergySumRoI" );
-   declareProperty( "xAODKeyJetEt", m_xaodKeyJetEt = "LVL1JetEtRoI" );
-   declareProperty( "xAODKeyJet", m_xaodKeyJet = "LVL1JetRoIs" );
-
-   m_retrievedEmTauTool = false;
-   m_retrievedJetTool = false;
+   /// Giga-electronvolts
+   static const double GeV = 1000.0;
+
+   /// Multiplier when we want to divide by GeV
+   static const double InvGeV = 1 / GeV;
+
+} // private namespace
+
+/// Helper macro for initialising SG keys that are allowed to be missing
+#define INIT_SG_KEY(VAR)                                    \
+   do {                                                     \
+      ATH_CHECK( VAR.initialize( ! VAR.key().empty() ) );   \
+   } while( false )
+
+RoIBResultToxAOD::RoIBResultToxAOD( const std::string& name,
+                                    ISvcLocator* svcLoc )
+   : AthAlgorithm( name, svcLoc ) {
 
 }
 
-// Initialize
 StatusCode RoIBResultToxAOD::initialize() {
 
-   ATH_MSG_INFO( "initializing " << name()
-                 << " - package version " << PACKAGE_VERSION );
-
-   // Print system info
+   // Print system info.
    if( m_doCalo == false ) {
       ATH_MSG_WARNING( "Inputs from LVL1 Calo systems switched off" );
    }
@@ -144,304 +67,119 @@ StatusCode RoIBResultToxAOD::initialize() {
       ATH_MSG_WARNING( "Inputs from LVL1 Muon systems switched off" );
    }
 
-   // Connect to the LVL1ConfigSvc for the trigger configuration:
-   CHECK( m_configSvc.retrieve() );
+   // Connect to the LVL1ConfigSvc for the trigger configuration.
+   ATH_CHECK( m_configSvc.retrieve() );
    ATH_MSG_DEBUG( "Connected to " << m_configSvc.typeAndName() );
 
    if( m_doMuon ) {
-
       // Get the RPC RecRoI service
-      CHECK( m_recRPCRoiSvc.retrieve() );
+      ATH_CHECK( m_recRPCRoiSvc.retrieve() );
       ATH_MSG_DEBUG( "Connected to " << m_recRPCRoiSvc.typeAndName() );
 
       // Get the TGC RecRoI service
-      CHECK( m_recTGCRoiSvc.retrieve() );
+      ATH_CHECK( m_recTGCRoiSvc.retrieve() );
       ATH_MSG_DEBUG( "Connected to " << m_recTGCRoiSvc.typeAndName() );
-
-   } // if (m_doMuon)
+   }
 
    if( m_doCalo ) {
-
       // Get tools
-      CHECK( m_EmTauTool.retrieve() );
-      ATH_MSG_DEBUG( "Got " << m_EmTauTool.typeAndName() );
-      m_retrievedEmTauTool = true;
-
-      CHECK( m_JetTool.retrieve() );
-      ATH_MSG_DEBUG( "Got " << m_JetTool.typeAndName() );
-      m_retrievedJetTool = true;
-
-   } // if (m_doCalo)
-
-   return StatusCode::SUCCESS;
-}
-
-// finalize
-StatusCode RoIBResultToxAOD::finalize() {
-
-   ATH_MSG_INFO( "Finalizing " << name()
-                 << " - package version " << PACKAGE_VERSION );
-
-   return StatusCode::SUCCESS;
-}
-
-// execute
-StatusCode RoIBResultToxAOD::execute() {
-
-   ATH_MSG_DEBUG( "in execute()" );
-
-   ///////////////////////////////////////////////////////////////////////////
-   // Trigger Info
+      ATH_CHECK( m_emTauTool.retrieve() );
+      ATH_MSG_DEBUG( "Got " << m_emTauTool.typeAndName() );
 
-   // retrieve event info
-   const DataHandle< EventInfo > eventInfoBeg;
-   const DataHandle< EventInfo > eventInfoEnd;
-   CHECK( evtStore()->retrieve( eventInfoBeg, eventInfoEnd ) );
-   if( eventInfoBeg == eventInfoEnd ) {
-      ATH_MSG_ERROR( "No event info objects" );
-      return StatusCode::RECOVERABLE;
+      ATH_CHECK( m_jetTool.retrieve() );
+      ATH_MSG_DEBUG( "Got " << m_jetTool.typeAndName() );
    }
 
-   // get key
-   const std::string eventInfoKey = eventInfoBeg.key();
-
-   // build TriggerInfo
-   EventInfo* eventInfo = const_cast< EventInfo* >( eventInfoBeg.cptr() );
-   TriggerInfo* tInfo = eventInfo->trigger_info();
-   TriggerInfo* triggerInfo;
-   if( tInfo != 0 ) {
-      triggerInfo = new TriggerInfo( *tInfo );
-   } else {
-      triggerInfo = new TriggerInfo( 0, 0, 0,
-                                     std::vector< TriggerInfo::number_type>( 0 ),
-                                     std::vector< TriggerInfo::number_type>( 0 ),
-                                     std::vector< TriggerInfo::StreamTag>( 0 ) );
-   }
-
-   // set TriggerInfo
-   eventInfo->setTriggerInfo( triggerInfo );
-
-   // dump
-   ATH_MSG_DEBUG( MSG::dec << "EventInfo:" << eventInfoKey );
-   ATH_MSG_DEBUG( *( eventInfo->event_ID() ) );
-   ATH_MSG_DEBUG( "[TimeStamp] = " << eventInfo->event_ID()->time_stamp() );
-   ATH_MSG_DEBUG( "[Type] = " << eventInfo->event_type()->user_type() );
-   ATH_MSG_DEBUG( "[BitMask]" );
-   for( EventType::BitMaskIterator bitIt = eventInfo->event_type()->bit_mask_begin();
-        bitIt != eventInfo->event_type()->bit_mask_end(); ++bitIt ) {
-      ATH_MSG_DEBUG( *bitIt );
-   }
-
-   if( triggerInfo != 0 ) {
-      ATH_MSG_DEBUG( MSG::hex << "[L1ID] = "<< triggerInfo->extendedLevel1ID() );
-      ATH_MSG_DEBUG( "[TriggerType] = "<< triggerInfo->level1TriggerType() );
-      ATH_MSG_DEBUG( "[L1Info] = "<< triggerInfo->level1TriggerInfo() );
-      ATH_MSG_DEBUG( "[L2Info] = "<< triggerInfo->level2TriggerInfo() );
-      ATH_MSG_DEBUG( "[EFInfo]" );
-      const std::vector< TriggerInfo::number_type >& efInfo = triggerInfo->eventFilterInfo();
-      for( std::vector< TriggerInfo::number_type >::const_iterator itEF = efInfo.begin();
-           itEF != efInfo.end(); ++itEF ) {
-         ATH_MSG_DEBUG( *itEF );
-      }
+   // Initialise the keys.
+   ATH_CHECK( m_roibResultKey.initialize() );
+   INIT_SG_KEY( m_cpmTowerKey );
+   INIT_SG_KEY( m_jetElementKey );
+   if( m_doMuon ) {
+      ATH_CHECK( m_muonRoIKey.initialize() );
    }
-
-   ///////////////////////////////////////////////////////////////////////////
-   // build LVL1 ROI
-
-   LVL1_ROI *lvl1ROI = new LVL1_ROI;
-
-   ///////////////////////////////////////////////////////////////////////////
-   // retrive L1 result
-
-   const ROIB::RoIBResult *result = 0;
-   if( evtStore()->retrieve( result, m_roibInputKey ).isFailure() ) {
-      ATH_MSG_WARNING( "Could not retrieve RoIBResult. Building empty LVL1_ROI" );
-      result = 0;
+   if( m_doCalo ) {
+      ATH_CHECK( m_emtauRoIKey.initialize() );
+      ATH_CHECK( m_energysumRoIKey.initialize() );
+      ATH_CHECK( m_jetetRoIKey.initialize() );
+      ATH_CHECK( m_jetRoIKey.initialize() );
    }
 
-   ///////////////////////////////////////////////////////////////////////////
-   // Muon ROI
-
-   if( m_doMuon == true ) addMuonRoI( result, lvl1ROI );
-
-   ///////////////////////////////////////////////////////////////////////////
-   // EmTau ROI
-
-   if( m_doCalo == true ) CHECK( addEmTauRoI( result ) );
-
-   ///////////////////////////////////////////////////////////////////////////
-   // JetEnergy ROI
-
-   if( m_doCalo == true ) CHECK( addJetEnergyRoI( result ) );
-
-   ///////////////////////////////////////////////////////////////////////////
-   // record LVL1 ROI in xAOD format
-
-   CHECK( convertToxAOD(lvl1ROI) );
-
-   ///////////////////////////////////////////////////////////////////////////
-   // delete LVL1 ROI
-   delete lvl1ROI;
-
+   // Return gracefully.
    return StatusCode::SUCCESS;
 }
 
-StatusCode RoIBResultToxAOD::buildCTP_Decision() {
-
-   ATH_MSG_DEBUG( "building CTP decision" );
-
-   CTP_Decision* ctpDecision = new CTP_Decision;
-
-   // retrive L1 result
-   const ROIB::RoIBResult *result = 0;
-   if( evtStore()->retrieve( result, m_roibInputKey ).isSuccess() ) {
-
-      // Trigger Type Word
-      bool triggerTypeLegacyFlag = false;
-      uint32_t triggerTypeWord = result->cTPResult().header().triggerType();
+StatusCode RoIBResultToxAOD::execute() {
 
-      if( triggerTypeWord == 0 ) { // switch to legacy mode
-         ATH_MSG_DEBUG( "Building TriggerType word" );
-         triggerTypeWord = LVL1::TriggerTypeWord::Physics |
-            LVL1::TriggerTypeWord::PriorityLevel;
-         triggerTypeLegacyFlag = true;
-      }
+   // Tell the user what's happening.
+   ATH_MSG_DEBUG( "in execute()" );
 
-      // store TAV vector in CTP decision object
-      const std::vector< ROIB::CTPRoI > tav = result->cTPResult().TAV();
-      for( size_t i( 0 ); i < tav.size(); ++i ) {
-         ctpDecision->setWord( i, tav[ i ].roIWord() );
-      }
+   // Access the input object.
+   auto roibResult = SG::makeHandle( m_roibResultKey, getContext() );
 
-      // search for passed items in TAV vector from CTP result
-      const std::bitset< 512 > items = ROIB::convertToBitset( tav );
-
-      ATH_MSG_DEBUG( "Iterating Items on " << m_configSvc->ctpConfig() );
-      for(TrigConf::ItemContainer::const_iterator item = m_configSvc->ctpConfig()->menu().items().begin(); 
-          item != m_configSvc->ctpConfig()->menu().items().end(); ++item ) {
-	ATH_MSG_DEBUG( "try getting item name" );
-         if( items[ ( *item )->ctpId() ] ) {
-            // add item name to CTP_Decision
-            const std::string& itemName = ( *item )->name();
-            ctpDecision->setItem( itemName );
-            ATH_MSG_VERBOSE( "Item : " << itemName );
-
-            if( triggerTypeLegacyFlag ) {
-               ///////// compute Trigger Type Word
-               ///////// This is temporary implementation for DC2 and will be moved to
-               ///////// CTP simulation
-               // e/gamma
-               if( m_egammaItem.end() != std::find( m_egammaItem.begin(), m_egammaItem.end(),
-                                                    itemName ) )
-                  triggerTypeWord |= LVL1::TriggerTypeWord::Egamma;
-
-               // tau/hadron
-               if( m_tauhadItem.end() != std::find( m_tauhadItem.begin(), m_tauhadItem.end(),
-                                                    itemName ) )
-                  triggerTypeWord |= LVL1::TriggerTypeWord::TauHdr;
-
-               // jet
-               if( m_jetItem.end() != std::find( m_jetItem.begin(), m_jetItem.end(),
-                                                 itemName ) )
-                  triggerTypeWord |= LVL1::TriggerTypeWord::Jet;
-
-               // energy sum
-               if( m_esumItem.end() != std::find( m_esumItem.begin(), m_esumItem.end(),
-                                                  itemName ) )
-                  triggerTypeWord |= LVL1::TriggerTypeWord::EnergySum;
-
-               // high pT muon
-               if( m_highmuItem.end() != std::find( m_highmuItem.begin(), m_highmuItem.end(),
-                                                    itemName ) )
-                  triggerTypeWord |= LVL1::TriggerTypeWord::HighPtMuon;
-
-               // low pT muon
-               if( m_lowmuItem.end() != std::find( m_lowmuItem.begin(), m_lowmuItem.end(),
-                                                   itemName ) )
-                  triggerTypeWord |= LVL1::TriggerTypeWord::LowPtMuon;
-            } // if (triggerTypeLegacyFlag)
-         } // if (items[(*item)->ctpId()])
-      } // for
-
-      // set Trigger Type Word
-      ctpDecision->setTriggerTypeWord( triggerTypeWord );
-      ATH_MSG_DEBUG( "CTP_Decision: \n" + ctpDecision->dump() );
-
-   } else {
-      ATH_MSG_WARNING( "Could not retrieve RoIBResult, building empty CTP_Decision" );
+   // Create the muon RoIs:
+   if( m_doMuon ) {
+      ATH_CHECK( createMuonRoI( *roibResult, getContext() ) );
    }
 
-   // record CTP Decision
-   CHECK( evtStore()->record( ctpDecision, "CTP_Decision" ) );
-   CHECK( evtStore()->setConst( ctpDecision ) );
+   // Create the calo RoIs:
+   if( m_doCalo ) {
+      ATH_CHECK( createEmTauRoI( *roibResult, getContext() ) );
+      ATH_CHECK( createJetEnergyRoI( *roibResult, getContext() ) );
+   }
 
+   // Return gracefully.
    return StatusCode::SUCCESS;
 }
 
-StatusCode RoIBResultToxAOD::addEmTauRoI( const ROIB::RoIBResult* result ) {
+StatusCode RoIBResultToxAOD::createEmTauRoI( const ROIB::RoIBResult& result,
+                                             const EventContext& ctx ) {
 
+   // Tell the user what's happening.
    ATH_MSG_DEBUG( "building EmTauRoI" );
 
-   // empty input
-   if( result == 0 ) return StatusCode::SUCCESS;
-
-   /// Containers for xAOD
-   xAOD::EmTauRoIAuxContainer* emtau_aux = new xAOD::EmTauRoIAuxContainer();
-   xAOD::EmTauRoIContainer* emtau_xaod = new xAOD::EmTauRoIContainer();
-   emtau_xaod->setStore( emtau_aux );
+   /// Create the xAOD container.
+   auto emtau_xaod = std::make_unique< xAOD::EmTauRoIContainer >();
+   auto emtau_aux = std::make_unique< xAOD::EmTauRoIAuxContainer >();
+   emtau_xaod->setStore( emtau_aux.get() );
 
    /// Digit scale for calorimeter trigger
-   float caloTrigScale = CLHEP::GeV/m_configSvc->thresholdConfig()->caloInfo().globalEmScale();
+   const float caloTrigScale =
+      InvGeV * m_configSvc->thresholdConfig()->caloInfo().globalEmScale();
    ATH_MSG_DEBUG( "caloTrigScale = " << caloTrigScale );
 
    /** Get EmTau Thresholds from configSvc. Also fill a map of threshold names while
        we are here - will be useful later */
 
-   std::vector< TrigConf::TriggerThreshold* > thresholds =
+   const std::vector< TrigConf::TriggerThreshold* >& thresholds =
       m_configSvc->ctpConfig()->menu().thresholdVector();
    std::vector< TrigConf::TriggerThreshold* > caloThresholds;
    std::map< int, std::string > emThresholdNames;
    std::map< int, std::string > tauThresholdNames;
-   for( std::vector< TrigConf::TriggerThreshold* >::const_iterator it = thresholds.begin();
-        it != thresholds.end(); ++it ) {
-      if ( ( *it )->type() == L1DataDef::emType() ) {
-         caloThresholds.push_back( *it );
-         emThresholdNames.insert( std::map< int, std::string >::value_type( ( *it )->thresholdNumber(), ( *it )->name() ) );
+   for( TrigConf::TriggerThreshold* tt : thresholds ) {
+      if( tt->type() == TrigConf::L1DataDef::emType() ) {
+         caloThresholds.push_back( tt );
+         emThresholdNames[ tt->thresholdNumber() ] = tt->name();
       }
-      else if ( ( *it )->type() == L1DataDef::tauType() ) {
-         caloThresholds.push_back( *it );
-         tauThresholdNames.insert( std::map< int, std::string >::value_type( ( *it )->thresholdNumber(), ( *it )->name() ) );
+      else if( tt->type() == TrigConf::L1DataDef::tauType() ) {
+         caloThresholds.push_back( tt );
+         tauThresholdNames[ tt->thresholdNumber() ] = tt->name();
       }
    }
 
    // Tool to reconstruct EM/tau cluster & isolation sums
    //   - need to form tower map for RoI reconstruction
-   const DataVector< xAOD::CPMTower >* storedTTs;
    xAOD::CPMTowerMap_t cpmtowers;
-   if( m_retrievedEmTauTool ) {
-      if( evtStore()->contains< xAOD::CPMTowerContainer >( m_CPMTowerLocation ) ) {
-         StatusCode sc = evtStore()->retrieve( storedTTs, m_CPMTowerLocation );
-         if( sc.isSuccess() ) m_EmTauTool->mapTowers( storedTTs, &cpmtowers );
-         else ATH_MSG_WARNING( "Error retrieving CPMTowers" );
-      }
-      else ATH_MSG_DEBUG( "No CPMTowerCollection found at "
-                          << m_CPMTowerLocation );
+   if( m_emTauTool.isEnabled() && ( ! m_cpmTowerKey.key().empty() ) ) {
+      auto cpmTower = SG::makeHandle( m_cpmTowerKey, ctx );
+      m_emTauTool->mapTowers( cpmTower.cptr(), &cpmtowers );
    }
 
-   // get EmTau Result
-   const std::vector< ROIB::EMTauResult >& emtauResult = result->eMTauResult();
-
    // reconstruct ROI
    ATH_MSG_DEBUG( "EmTau ROI" );
-   std::vector< ROIB::EMTauResult >::const_iterator itEMR  = emtauResult.begin();
-   std::vector< ROIB::EMTauResult >::const_iterator itEMRe = emtauResult.end();
-   for( ; itEMR != itEMRe; ++itEMR ) {
-      const std::vector< ROIB::EMTauRoI >& emtauRoIV = itEMR->roIVec();
-      std::vector< ROIB::EMTauRoI >::const_iterator itEM  = emtauRoIV.begin();
-      std::vector< ROIB::EMTauRoI >::const_iterator itEMe = emtauRoIV.end();
-      for( ; itEM != itEMe; ++itEM ) {
-
-         uint32_t roIWord = itEM->roIWord();
+   for( const ROIB::EMTauResult& emtResult : result.eMTauResult() ) {
+      for( const ROIB::EMTauRoI& emtRoI : emtResult.roIVec() ) {
+
+         uint32_t roIWord = emtRoI.roIWord();
          ATH_MSG_DEBUG( "About to create RecEmTauRoI : " << MSG::hex
                         << std::setw( 8 ) << roIWord << MSG::dec );
 
@@ -457,74 +195,76 @@ StatusCode RoIBResultToxAOD::addEmTauRoI( const ROIB::RoIBResult* result ) {
          emtau_xaod->push_back( roi );
          roi->initialize( roIWord, recRoI.eta(), roiPhi );
          roi->setEtScale( caloTrigScale );
-         //roi->setET( recRoI.et() );
-         //roi->setIsol( recRoI.isolation() );
          roi->setThrPattern( recRoI.thresholdPattern() );
 
          // fired thresholds
-         std::vector< unsigned int >* thrV = recRoI.thresholdsPassed();
-         std::vector< unsigned int >::const_iterator itTh  = thrV->begin();
-         std::vector< unsigned int >::const_iterator itThE = thrV->end();
-         for( ; itTh != itThE; ++itTh ) {
-            float thrValue = recRoI.triggerThreshold(*itTh)* CLHEP::GeV;
+         std::unique_ptr< std::vector< unsigned int > > thrV(
+            recRoI.thresholdsPassed() );
+         for( unsigned int thr : *thrV ) {
+            const float thrValue = recRoI.triggerThreshold( thr ) * GeV;
+            auto thrType = recRoI.thresholdType( thr );
+            auto emNameItr = emThresholdNames.find( thr );
+            auto tauNameItr = tauThresholdNames.find( thr );
             std::string thrName = "NameNotFound";
-            if ( recRoI.thresholdType(*itTh) == TrigT1CaloDefs::EMAlg && emThresholdNames.find( *itTh ) != emThresholdNames.end() ) {
-               thrName = emThresholdNames[ *itTh ];
+            if( ( thrType == LVL1::TrigT1CaloDefs::EMAlg ) &&
+                ( emNameItr != emThresholdNames.end() ) ) {
+               thrName = emNameItr->second;
             }
-            else if ( recRoI.thresholdType(*itTh) == TrigT1CaloDefs::TauAlg && tauThresholdNames.find( *itTh ) != tauThresholdNames.end() ) {
-               thrName = tauThresholdNames[ *itTh ];
+            else if( ( thrType == LVL1::TrigT1CaloDefs::TauAlg ) &&
+                     ( tauNameItr != tauThresholdNames.end() ) ) {
+               thrName = tauNameItr->second;
             }
 
             roi->addThreshold( thrName, thrValue );
 
-            ATH_MSG_DEBUG( "EmTau Thr : " << *itTh << ", name = " << thrName
+            ATH_MSG_DEBUG( "EmTau Thr : " << thr << ", name = " << thrName
                            << ", value = "   << thrValue );
          }
-         delete thrV;
  
          // Cluster ET values, reconstructed from TriggerTowers
-         if( m_retrievedEmTauTool ) {
-            m_EmTauTool->formSums( roIWord, &cpmtowers );
-            roi->setCore( m_EmTauTool->Core() * caloTrigScale );
-            roi->setEmClus( m_EmTauTool->EMClus() * caloTrigScale );
-            roi->setTauClus( m_EmTauTool->TauClus() * caloTrigScale );
-            roi->setEmIsol( m_EmTauTool->EMIsol() * caloTrigScale );
-            roi->setHadIsol( m_EmTauTool->HadIsol() * caloTrigScale );
-            roi->setHadCore( m_EmTauTool->HadCore() * caloTrigScale );
+         if( m_emTauTool.isEnabled() ) {
+            m_emTauTool->formSums( roIWord, &cpmtowers );
+            roi->setCore( m_emTauTool->Core() * caloTrigScale );
+            roi->setEmClus( m_emTauTool->EMClus() * caloTrigScale );
+            roi->setTauClus( m_emTauTool->TauClus() * caloTrigScale );
+            roi->setEmIsol( m_emTauTool->EMIsol() * caloTrigScale );
+            roi->setHadIsol( m_emTauTool->HadIsol() * caloTrigScale );
+            roi->setHadCore( m_emTauTool->HadCore() * caloTrigScale );
          }
-        
       }
    }
 
-   /// Record the results
-  CHECK( evtStore()->record( emtau_aux, m_xaodKeyEmTau + "Aux." ) );
-  CHECK( evtStore()->record( emtau_xaod, m_xaodKeyEmTau ) );   
+   // Record the results.
+   auto emtauRoI = SG::makeHandle( m_emtauRoIKey, ctx );
+   ATH_CHECK( emtauRoI.record( std::move( emtau_xaod ),
+                               std::move( emtau_aux ) ) );
 
+   // Return gracefully.
    return StatusCode::SUCCESS;
 }
 
-StatusCode RoIBResultToxAOD::addJetEnergyRoI( const ROIB::RoIBResult* result ) {
+StatusCode
+RoIBResultToxAOD::createJetEnergyRoI( const ROIB::RoIBResult& result,
+                                      const EventContext& ctx ) {
 
    ATH_MSG_DEBUG( "building JetEnergyRoI" );
-
-   // empty input
-   if( result == 0 ) return StatusCode::SUCCESS;
    
    // Containers for xAOD
-   xAOD::JetRoIAuxContainer* jet_aux = new xAOD::JetRoIAuxContainer();
-   xAOD::JetRoIContainer* jet_xaod = new xAOD::JetRoIContainer();
-   jet_xaod->setStore( jet_aux );
-   
-   xAOD::EnergySumRoIAuxInfo* esum_aux = new xAOD::EnergySumRoIAuxInfo();
-   xAOD::EnergySumRoI* esum_xaod = new xAOD::EnergySumRoI();
-   esum_xaod->setStore( esum_aux );
-   
-   xAOD::JetEtRoIAuxInfo* jetet_aux = new xAOD::JetEtRoIAuxInfo();
-   xAOD::JetEtRoI* jetet_xaod = new xAOD::JetEtRoI();
-   jetet_xaod->setStore( jetet_aux );
+   auto jet_xaod = std::make_unique< xAOD::JetRoIContainer >();
+   auto jet_aux = std::make_unique< xAOD::JetRoIAuxContainer >();
+   jet_xaod->setStore( jet_aux.get() );
+
+   auto esum_xaod = std::make_unique< xAOD::EnergySumRoI >();
+   auto esum_aux = std::make_unique< xAOD::EnergySumRoIAuxInfo >();
+   esum_xaod->setStore( esum_aux.get() );
+
+   auto jetet_xaod = std::make_unique< xAOD::JetEtRoI >();
+   auto jetet_aux = std::make_unique< xAOD::JetEtRoIAuxInfo >();
+   jetet_xaod->setStore( jetet_aux.get() );
 
    // Digit scale for calorimeter trigger
-   float caloTrigScale = CLHEP::GeV/m_configSvc->thresholdConfig()->caloInfo().globalJetScale();
+   const float caloTrigScale =
+      InvGeV * m_configSvc->thresholdConfig()->caloInfo().globalJetScale();
    ATH_MSG_DEBUG( "caloTrigScale = " << caloTrigScale );
 
    /** Get Jet/Energy Thresholds from configSvc. Also fill maps of threshold names while
@@ -533,7 +273,7 @@ StatusCode RoIBResultToxAOD::addJetEnergyRoI( const ROIB::RoIBResult* result ) {
        Unfortunately there are 3 types of jet threshold and 3 types of ET trigger threshold,
        so this bit doesn't look very elegant */
 
-   std::vector< TrigConf::TriggerThreshold* > thresholds =
+   const std::vector< TrigConf::TriggerThreshold* >& thresholds =
       m_configSvc->ctpConfig()->menu().thresholdVector();
    std::vector<TrigConf::TriggerThreshold*> jetThresholds;
    std::vector<TrigConf::TriggerThreshold*> energyThresholds;
@@ -546,71 +286,63 @@ StatusCode RoIBResultToxAOD::addJetEnergyRoI( const ROIB::RoIBResult* result ) {
    std::map<int, std::string> xsNames;
    std::map<int, std::string> jeNames;
 
-   for( std::vector<TrigConf::TriggerThreshold*>::const_iterator it = thresholds.begin();
-        it != thresholds.end(); ++it ) {
-      if( ( *it )->type() == L1DataDef::jetType() ) {
-         jetThresholds.push_back( *it );
-         jetNames.insert(std::map<int, std::string>::value_type((*it)->thresholdNumber(),(*it)->name()));
+   for( TrigConf::TriggerThreshold* tt : thresholds ) {
+      if( tt->type() == TrigConf::L1DataDef::jetType() ) {
+         jetThresholds.push_back( tt );
+         jetNames[ tt->thresholdNumber() ] = tt->name();
       }
-      else if( ( *it )->type() == L1DataDef::jfType() ) {
-         jetThresholds.push_back( *it );
-         jfNames.insert(std::map<int, std::string>::value_type((*it)->thresholdNumber(),(*it)->name()));
+      else if( tt->type() == TrigConf::L1DataDef::jfType() ) {
+         jetThresholds.push_back( tt );
+         jfNames[ tt->thresholdNumber() ] = tt->name();
       }
-      else if( ( *it )->type() == L1DataDef::jbType() ) {
-         jetThresholds.push_back( *it );
-         jbNames.insert(std::map<int, std::string>::value_type((*it)->thresholdNumber(),(*it)->name()));
+      else if( tt->type() == TrigConf::L1DataDef::jbType() ) {
+         jetThresholds.push_back( tt );
+         jbNames[ tt->thresholdNumber() ] = tt->name();
       }
-      else if( ( *it )->type() == L1DataDef::xeType() ) {
-         energyThresholds.push_back( *it );
-         xeNames.insert(std::map<int, std::string>::value_type((*it)->thresholdNumber(),(*it)->name()));
+      else if( tt->type() == TrigConf::L1DataDef::xeType() ) {
+         energyThresholds.push_back( tt );
+         xeNames[ tt->thresholdNumber() ] = tt->name();
       }
-      else if( ( *it )->type() == L1DataDef::teType() ) {
-         energyThresholds.push_back( *it );
-         teNames.insert(std::map<int, std::string>::value_type((*it)->thresholdNumber(),(*it)->name()));
+      else if( tt->type() == TrigConf::L1DataDef::teType() ) {
+         energyThresholds.push_back( tt );
+         teNames[ tt->thresholdNumber() ] = tt->name();
       }
-      else if( ( *it )->type() == L1DataDef::xsType() ) {
-         energyThresholds.push_back( *it );
-         xsNames.insert(std::map<int, std::string>::value_type((*it)->thresholdNumber(),(*it)->name()));
+      else if( tt->type() == TrigConf::L1DataDef::xsType() ) {
+         energyThresholds.push_back( tt );
+         xsNames[ tt->thresholdNumber() ] = tt->name();
       }
-      else if( ( *it )->type() == L1DataDef::jeType() ) {
-         jetEnergyThresholds.push_back( *it );
-         jeNames.insert(std::map<int, std::string>::value_type((*it)->thresholdNumber(),(*it)->name()));
+      else if( tt->type() == TrigConf::L1DataDef::jeType() ) {
+         jetEnergyThresholds.push_back( tt );
+         jeNames[ tt->thresholdNumber() ] = tt->name();
       }
    }
 
    // Tool to reconstruct Jet cluster ET sums
    //   - form input map ready for analysis
-   const DataVector< xAOD::JetElement >* storedJEs;
    std::map< int, LVL1::JetInput* > jetInputs;
-   if( m_retrievedJetTool ) {
-      if( evtStore()->contains< xAOD::JetElementContainer >( m_JetElementLocation ) ) {
-         StatusCode sc = evtStore()->retrieve( storedJEs, m_JetElementLocation );
-         if( sc.isSuccess() ) m_JetTool->mapJetInputs( storedJEs, &jetInputs );
-         else ATH_MSG_WARNING( "Error retrieving JetElements" );
-      }
-      else ATH_MSG_DEBUG( "No JetElementContainer found at "
-                          << m_JetElementLocation );
+   if( m_jetTool.isEnabled() && ( ! m_jetElementKey.key().empty() ) ) {
+      auto jetElement = SG::makeHandle( m_jetElementKey, ctx );
+      m_jetTool->mapJetInputs( jetElement.cptr(), &jetInputs );
+   }
+   std::vector< std::unique_ptr< LVL1::JetInput > > jetInputsHolder;
+   for( auto pair : jetInputs ) {
+      jetInputsHolder.emplace_back( pair.second );
    }
-
-   // get JetEnergy Result
-   const std::vector< ROIB::JetEnergyResult >& jetenergyResult = result->jetEnergyResult();
 
    // reconstruct ROI
-   std::vector< ROIB::JetEnergyResult >::const_iterator itJETR  = jetenergyResult.begin();
-   std::vector< ROIB::JetEnergyResult >::const_iterator itJETRe = jetenergyResult.end();
-   for( ; itJETR != itJETRe; ++itJETR ) {
-      const std::vector< ROIB::JetEnergyRoI >& jetenergyRoIV = itJETR->roIVec();
-      std::vector< ROIB::JetEnergyRoI >::const_iterator itJET  = jetenergyRoIV.begin();
-      std::vector< ROIB::JetEnergyRoI >::const_iterator itJETe = jetenergyRoIV.end();
-      for( ; itJET != itJETe; ++itJET ) {
-         uint32_t roIWord = itJET->roIWord();
+   for( const ROIB::JetEnergyResult& jeteResult : result.jetEnergyResult() ) {
+      auto itJET = jeteResult.roIVec().begin();
+      auto endJET = jeteResult.roIVec().end();
+      for( ; itJET != endJET; ++itJET ) {
+
+         const uint32_t roIWord = itJET->roIWord();
 
          ATH_MSG_DEBUG( "Jet RoI, RoIWord = " << MSG::hex << std::setw( 8 )
                         << roIWord << MSG::dec );
 
          // RoI type
          LVL1::JEPRoIDecoder conv;
-         int roiType = conv.roiType( roIWord );
+         const int roiType = conv.roiType( roIWord );
 
          // Jet ROI
          if( roiType == LVL1::TrigT1CaloDefs::JetRoIWordType ) {
@@ -626,25 +358,32 @@ StatusCode RoIBResultToxAOD::addJetEnergyRoI( const ROIB::RoIBResult* result ) {
             jet_xaod->push_back( roi );
             roi->initialize( roIWord, recRoI.eta(), roiPhi );
             roi->setEtScale( caloTrigScale );
-            //roi->setEtLarge( recRoI.etLarge() );
-            //roi->setEtSmall( recRoI.etSmall() );
             roi->setThrPattern( recRoI.thresholdPattern() );
             
             // fired Jet thresholds
-            std::vector< unsigned int >* thrV = recRoI.thresholdsPassed();
-            std::vector< unsigned int >::const_iterator itTh  = thrV->begin();
-            std::vector< unsigned int >::const_iterator itThE = thrV->end();
-            for( ; itTh != itThE; ++itTh ) {
-               double thrValue = recRoI.triggerThreshold(*itTh)* CLHEP::GeV;
+            std::unique_ptr< std::vector< unsigned int > > thrV(
+               recRoI.thresholdsPassed() );
+            for( unsigned int thr : *thrV ) {
+
+               const double thrValue = recRoI.triggerThreshold( thr ) * GeV;
+               auto jetNameItr = jetNames.find( thr );
+               auto jfNameItr = jfNames.find( thr );
+               auto jbNameItr = jbNames.find( thr );
                std::string thrName = "NameNotFound";
-               if (!recRoI.isForwardJet()) {
-                  if (jetNames.find(*itTh) != jetNames.end()) thrName = jetNames[*itTh];
+               if( ! recRoI.isForwardJet() ) {
+                  if( jetNameItr != jetNames.end() ) {
+                     thrName = jetNameItr->second;
+                  }
                }
-               else if (recRoI.eta() > 0) {
-                  if (jfNames.find(*itTh) != jfNames.end()) thrName = jfNames[*itTh];
+               else if( recRoI.eta() > 0 ) {
+                  if( jfNameItr != jfNames.end() ) {
+                     thrName = jfNameItr->second;
+                  }
                }
                else {
-                  if (jbNames.find(*itTh) != jbNames.end()) thrName = jbNames[*itTh];
+                  if( jbNameItr != jbNames.end() ) {
+                     thrName = jbNameItr->second;
+                  }
                }
 
                roi->addThreshold( thrName, thrValue );
@@ -652,25 +391,25 @@ StatusCode RoIBResultToxAOD::addJetEnergyRoI( const ROIB::RoIBResult* result ) {
                ATH_MSG_DEBUG( "Jet Thr : " << thrName
                               << ", value = " << thrValue );
             }
-            delete thrV;
 
             // Jet Cluster ET sums
-            if (m_retrievedJetTool) {
-               m_JetTool->formSums(roIWord, &jetInputs);
-               roi->setEt4x4(m_JetTool->ET4x4() * caloTrigScale);
-               roi->setEt6x6(m_JetTool->ET6x6() * caloTrigScale);
-               roi->setEt8x8(m_JetTool->ET8x8() * caloTrigScale);
+            if( m_jetTool.isEnabled() ) {
+               m_jetTool->formSums( roIWord, &jetInputs );
+               roi->setEt4x4( m_jetTool->ET4x4() * caloTrigScale );
+               roi->setEt6x6( m_jetTool->ET6x6() * caloTrigScale );
+               roi->setEt8x8( m_jetTool->ET8x8() * caloTrigScale );
             }
 
          }
          // Jet ET ROI
          else if( roiType == LVL1::TrigT1CaloDefs::JetEtRoIWordType ) {
+
             // xAOD component
-            
             jetet_xaod->setRoIWord( roIWord );
 
             // fired Jet ET thresholds
-            for( unsigned int i = 0; i < TrigT1CaloDefs::numOfJetEtSumThresholds; ++i ) {
+            for( unsigned int i = 0;
+                 i < LVL1::TrigT1CaloDefs::numOfJetEtSumThresholds; ++i ) {
                if( ( roIWord >> i ) & 0x1 ) {
                   std::string thrName = "NameNotFound";
                   if (jeNames.find(i) != jeNames.end()) thrName = jeNames[i];
@@ -684,20 +423,21 @@ StatusCode RoIBResultToxAOD::addJetEnergyRoI( const ROIB::RoIBResult* result ) {
          else if ( roiType == LVL1::TrigT1CaloDefs::EnergyRoIWordType0 ) {
             
             // Extract information and fill EnergySumRoI
-            uint32_t roiWord0 = roIWord;
+            const uint32_t roiWord0 = roIWord;
             ATH_MSG_DEBUG( "ET RoIWord 0 : " << MSG::hex << std::setw( 8 )
                            << roiWord0 << MSG::dec );
             ++itJET;
-            uint32_t roiWord1 = itJET->roIWord();
+            const uint32_t roiWord1 = itJET->roIWord();
             ATH_MSG_DEBUG( "ET RoIWord 1 : " << MSG::hex << std::setw( 8 )
                            << roiWord1 << MSG::dec );
             ++itJET;
-            uint32_t roiWord2 = itJET->roIWord();
+            const uint32_t roiWord2 = itJET->roIWord();
             ATH_MSG_DEBUG( "ET RoIWord 2 : " << MSG::hex << std::setw( 8 )
                            << roiWord2 << MSG::dec );
 
             // RecRoI
-            LVL1::RecEnergyRoI recRoI( roiWord0, roiWord1, roiWord2, &energyThresholds );
+            LVL1::RecEnergyRoI recRoI( roiWord0, roiWord1, roiWord2,
+                                       &energyThresholds );
 
             // Overflow bits  
             unsigned int overflows = 0;  
@@ -710,143 +450,121 @@ StatusCode RoIBResultToxAOD::addJetEnergyRoI( const ROIB::RoIBResult* result ) {
                                    recRoI.energyX() * caloTrigScale,
                                    recRoI.energyY() * caloTrigScale,
                                    recRoI.energyT() * caloTrigScale );
-            
 
             // fired summed ET thresholds
-            std::vector< unsigned int >* thrEtMiss = recRoI.etMissThresholdsPassed();
-            std::vector< unsigned int >::const_iterator itThEtMiss  = thrEtMiss->begin();
-            for( ; itThEtMiss != thrEtMiss->end(); ++itThEtMiss ) {
-               std::string thrName = "NameNotFound";
-               if( xeNames.find( *itThEtMiss - 1 ) != xeNames.end() ) {
-                  thrName = xeNames[ *itThEtMiss - 1 ];
-               }
+            std::unique_ptr< std::vector< unsigned int > > thrEtMiss(
+               recRoI.etMissThresholdsPassed() );
+            for( unsigned int thr : *thrEtMiss ) {
+               auto xeNameItr = xeNames.find( thr - 1 );
+               const std::string thrName = ( xeNameItr != xeNames.end() ?
+                                             xeNameItr->second :
+                                             "NameNotFound" );
                esum_xaod->addThreshold( thrName );
                ATH_MSG_DEBUG( "ETmiss threshold : " << thrName );
             }
-            delete thrEtMiss;
 
             // fired missing ET thresholds
-            std::vector< unsigned int >* thrSumEt = recRoI.sumEtThresholdsPassed();
-            std::vector< unsigned int >::const_iterator itThSumEt  = thrSumEt->begin();
-            for( ; itThSumEt != thrSumEt->end(); ++itThSumEt ) {
-               std::string thrName = "NameNotFound";
-               if( teNames.find( *itThSumEt - 1 ) != teNames.end() ) {
-                  thrName = teNames[ *itThSumEt - 1 ];
-               }
+            std::unique_ptr< std::vector< unsigned int > > thrSumEt(
+               recRoI.sumEtThresholdsPassed() );
+            for( unsigned int thr : *thrSumEt ) {
+               auto teNameItr = teNames.find( thr - 1 );
+               const std::string thrName = ( teNameItr != teNames.end() ?
+                                             teNameItr->second :
+                                             "NameNotFound" );
                esum_xaod->addThreshold( thrName );
                ATH_MSG_DEBUG( "SumET threshold : " << thrName );
             }
-            delete thrSumEt;
 
             // fired missing ET  significance thresholds
-            std::vector< unsigned int >* thrMETSig = recRoI.mEtSigThresholdsPassed();
-            std::vector< unsigned int >::const_iterator itThMETSig  = thrMETSig->begin();
-            for( ; itThMETSig != thrMETSig->end(); ++itThMETSig ) {
-               std::string thrName = "NameNotFound";
-               if( xsNames.find( *itThMETSig - 1 ) != xsNames.end() ) {
-                  thrName = xsNames[ *itThMETSig - 1 ];
-               }
+            std::unique_ptr< std::vector< unsigned int > > thrMETSig(
+               recRoI.mEtSigThresholdsPassed() );
+            for( unsigned int thr : *thrMETSig ) {
+               auto xsNameItr = xsNames.find( thr - 1 );
+               const std::string thrName = ( xsNameItr != xsNames.end() ?
+                                             xsNameItr->second :
+                                             "NameNotFound" );
                esum_xaod->addThreshold( thrName );
                ATH_MSG_DEBUG( "METSig threshold : " << thrName );
             }
-            delete thrMETSig;
-
          }
       }
    }
 
    /// Record the results
-   CHECK( evtStore()->record( jet_aux, m_xaodKeyJet + "Aux." ) );
-   CHECK( evtStore()->record( jet_xaod, m_xaodKeyJet ) );
+   auto jetRoI = SG::makeHandle( m_jetRoIKey, ctx );
+   ATH_CHECK( jetRoI.record( std::move( jet_xaod ), std::move( jet_aux ) ) );
 
-   CHECK( evtStore()->record( jetet_aux, m_xaodKeyJetEt + "Aux." ) );
-   CHECK( evtStore()->record( jetet_xaod, m_xaodKeyJetEt ) );
+   auto jetetRoI = SG::makeHandle( m_jetetRoIKey, ctx );
+   ATH_CHECK( jetetRoI.record( std::move( jetet_xaod ),
+                               std::move( jetet_aux ) ) );
 
-   CHECK( evtStore()->record( esum_aux, m_xaodKeyEsum + "Aux." ) );
-   CHECK( evtStore()->record( esum_xaod, m_xaodKeyEsum ) );
+   auto energysumRoI = SG::makeHandle( m_energysumRoIKey, ctx );
+   ATH_CHECK( energysumRoI.record( std::move( esum_xaod ),
+                                   std::move( esum_aux ) ) );
 
-   /// Clean up
-   for ( std::map< int, LVL1::JetInput* >::iterator i = jetInputs.begin();
-         i != jetInputs.end(); ++i ) delete i->second;
-   
+   // Return gracefully.   
    return StatusCode::SUCCESS;
 }
 
-void RoIBResultToxAOD::addMuonRoI( const ROIB::RoIBResult* result, LVL1_ROI* lvl1ROI ) {
+StatusCode RoIBResultToxAOD::createMuonRoI( const ROIB::RoIBResult& result,
+                                            const EventContext& ctx ) const {
 
    ATH_MSG_DEBUG( "in buildMuonRoI()" );
 
-   // empty input
-   if( result == 0 ) return;
+   // Create the xAOD container.
+   auto mu_xaod = std::make_unique< xAOD::MuonRoIContainer >();
+   auto mu_aux = std::make_unique< xAOD::MuonRoIAuxContainer >();
+   mu_xaod->setStore( mu_aux.get() );
 
    /** Get Muon Thresholds from configSvc. Also fill a map of threshold names while
        we are here - will be useful later */
 
-   std::vector< TrigConf::TriggerThreshold* > thresholds =
+   const std::vector< TrigConf::TriggerThreshold* >& thresholds =
       m_configSvc->ctpConfig()->menu().thresholdVector();
    std::vector< TrigConf::TriggerThreshold* > muonThresholds;
    std::map< int, std::string > thresholdNames;
-   for( std::vector< TrigConf::TriggerThreshold* >::const_iterator it = thresholds.begin();
-        it != thresholds.end(); ++it ) {
-      if( ( *it )->type() == L1DataDef::muonType() ) {
-         muonThresholds.push_back( *it );
-         thresholdNames.insert(std::map<int, std::string>::value_type((*it)->thresholdNumber(),(*it)->name()));
+   for( TrigConf::TriggerThreshold* tt : thresholds ) {
+      if( tt->type() == TrigConf::L1DataDef::muonType() ) {
+         muonThresholds.push_back( tt );
+         thresholdNames[ tt->thresholdNumber() ] = tt->name();
       }
    }
 
    // get Muon ROI
-   const std::vector< ROIB::MuCTPIRoI >& muonRoIV = result->muCTPIResult().roIVec();
+   const std::vector< ROIB::MuCTPIRoI >& muonRoIV =
+      result.muCTPIResult().roIVec();
 
    // reconstruct ROI
    ATH_MSG_DEBUG( "Muon ROI" );
-   std::vector< ROIB::MuCTPIRoI >::const_iterator itMU  = muonRoIV.begin();
-   std::vector< ROIB::MuCTPIRoI >::const_iterator itMUe = muonRoIV.end();
-   for ( ; itMU != itMUe; ++itMU ) {
+   for( const ROIB::MuCTPIRoI& roi : muonRoIV ) {
 
-      uint32_t roIWord = itMU->roIWord();
+      uint32_t roIWord = roi.roIWord();
 
       ATH_MSG_DEBUG( MSG::hex << std::setw( 8 ) << roIWord );
 
-      if( ( m_recRPCRoiSvc == false ) || ( m_recTGCRoiSvc == false ) ) {
-         continue;
-      }
-
       // RecRoI
-      LVL1::RecMuonRoI recRoI( roIWord, m_recRPCRoiSvc.operator->(),
-                               m_recTGCRoiSvc.operator->(), &muonThresholds );
-
-      double thrValue = recRoI.getThresholdValue() * CLHEP::GeV;
-      int index = recRoI.getThresholdNumber() - 1;
-      std::string thrName = "NameNotFound";
-      if( thresholdNames.find(index) != thresholdNames.end() ) {
-         thrName = thresholdNames[ index ];
-      }
-
-      // AOD component
-      Muon_ROI roi( roIWord, recRoI.eta(), recRoI.phi(), thrName, thrValue );
-
-      lvl1ROI->addMuonROI( roi );
-      ATH_MSG_DEBUG( "Muon Thr : " << thrName << ", value = " << thrValue );
+      const LVL1::RecMuonRoI recRoI( roIWord, m_recRPCRoiSvc.get(),
+                                     m_recTGCRoiSvc.get(), &muonThresholds );
 
-   } // for ( ; itMU != itMUe; ++itMU )
+      const double thrValue = recRoI.getThresholdValue() * GeV;
+      const int index = recRoI.getThresholdNumber() - 1;
+      auto thrNameItr = thresholdNames.find( index );
+      const std::string thrName = ( thrNameItr != thresholdNames.end() ?
+                                    thrNameItr->second :
+                                    "NameNotFound" );
 
-   return;
-}
-
-StatusCode RoIBResultToxAOD::convertToxAOD(LVL1_ROI* aod){
-
-  ATH_MSG_DEBUG( "converting to xAOD" );
-  ATH_MSG_DEBUG( "number of Muon RoIs: " << aod->getMuonROIs().size() );
+      xAOD::MuonRoI* xaod_roi = new xAOD::MuonRoI();
+      mu_xaod->push_back( xaod_roi );
+      xaod_roi->initialize( roIWord, recRoI.eta(), recRoI.phi(), thrName,
+                            thrValue );
 
-  ////////////////////////////////
-  /// Muon RoIs
-  xAOD::MuonRoIAuxContainer* mu_aux = new xAOD::MuonRoIAuxContainer();
-  xAOD::MuonRoIContainer* mu_xaod = new xAOD::MuonRoIContainer();
-  mu_xaod->setStore( mu_aux );
+      ATH_MSG_DEBUG( "Muon Thr : " << thrName << ", value = " << thrValue );
+   }
 
-  CHECK( m_MuCnvTool->convert( aod, mu_xaod ) );
-  CHECK( evtStore()->record( mu_aux, m_xaodKeyMu + "Aux." ) );
-  CHECK( evtStore()->record( mu_xaod, m_xaodKeyMu ) );    
+   // Record the muon RoIs.
+   auto muonRoI = SG::makeHandle( m_muonRoIKey, ctx );
+   ATH_CHECK( muonRoI.record( std::move( mu_xaod ), std::move( mu_aux ) ) );
 
-  return StatusCode::SUCCESS;
+   // Return gracefully.
+   return StatusCode::SUCCESS;
 }
diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.h b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.h
index 02f1a810a1a2bccb24179f1b26a674b6d425ccb2..45163e7771d84ed8cca1cfe5ff8d8391d2242651 100644
--- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.h
+++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.h
@@ -1,10 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// $Id: RoIBResultToxAOD.h 679933 2015-07-02 21:37:29Z watsona $
+//
+// Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+//
 #ifndef ANALYSISTRIGGERALGS_ROIBRESULTTOXAOD_H
 #define ANALYSISTRIGGERALGS_ROIBRESULTTOXAOD_H
 
@@ -12,107 +9,178 @@
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "StoreGate/DataHandle.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
 
-// xAOD include(s):
-#include "xAODTriggerCnv/IMuonRoICnvTool.h"
-
-#include "TrigT1CaloToolInterfaces/IL1JEMJetTools.h"
+// Tool/service include(s):
+#include "TrigConfInterfaces/ILVL1ConfigSvc.h"
 #include "TrigT1Interfaces/RecMuonRoiSvc.h"
+#include "TrigT1Interfaces/TrigT1CaloDefs.h"
 #include "TrigT1CaloToolInterfaces/IL1CPMTools.h"
+#include "TrigT1CaloToolInterfaces/IL1JEMJetTools.h"
 
-// Forward declaration(s):
-class StoreGateSvc;
-class LVL1_ROI;
-namespace TrigConf {
-  class ILVL1ConfigSvc;
-}
-namespace ROIB {
-  class RoIBResult;
-}
+// EDM include(s):
+#include "TrigT1Result/RoIBResult.h"
+#include "xAODTrigL1Calo/CPMTowerContainer.h"
+#include "xAODTrigL1Calo/JetElementContainer.h"
+#include "xAODTrigger/MuonRoIContainer.h"
+#include "xAODTrigger/EmTauRoIContainer.h"
+#include "xAODTrigger/EnergySumRoI.h"
+#include "xAODTrigger/JetEtRoI.h"
+#include "xAODTrigger/JetRoIContainer.h"
 
 /**
  *  @short RoIB result to xAOD converter
  *
- *  This is a slightly adapted version of the original RoIBResultToAOD 
- *  algorithm. Going the route through the LVL1_ROI structure was 
- *  needed due to the interface of the AOD->xAOD ROI converters
- *
- *  The RoIBResultToxAOD algorithm builds the CTP_Decision and 
- *  LVL1_ROI objects from the LVL1 ROIB::RoIBResult object. 
- *  In addition the TriggerType of the CTP can be rebuild,
- *  when zero in the input object.
- *
- *  The CTP_Decision and LVL1_ROI objects are stored in ESD/AOD.
- *
- *    $Id: RoIBResultToxAOD.h 679933 2015-07-02 21:37:29Z watsona $
+ *  The RoIBResultToxAOD algorithm builds the xAOD analysis objects
+ *  from the LVL1 @c ROIB::RoIBResult object. 
  *
  * @author Tadashi Maeno <Tadashi.Maeno@cern.ch>
  * @author Attila Kraznahorkay Jr. <Attila.Krasznahorkay@cern.ch>
  * @author Alan Watson <Alan.Watson@cern.ch>
  * @author Wolfgang Ehrenfeld <Wolfgang.Menges@desy.de>
- * @author last commit \$Author: watsona $
- *
  */
 class RoIBResultToxAOD : public AthAlgorithm {
 
 public:
-   RoIBResultToxAOD( const std::string& name, ISvcLocator* pSvcLocator );
+   /// Algorithm constructor
+   RoIBResultToxAOD( const std::string& name, ISvcLocator* svcLoc );
+
+   /// @name Function(s) implementing the @c Algorithm interface
+   /// @{
+
+   /// Declare that the algorithm is clonable
+   virtual bool isClonable() const override { return true; }
+
+   /// Function initialising the algorithm
+   virtual StatusCode initialize() override;
+
+   /// Function executing the algorithm
+   virtual StatusCode execute() override;
 
-   StatusCode initialize();
-   StatusCode finalize();
-   StatusCode execute();
+   /// @}
 
 private:
-   /// build CTP_Decision from CTPResult stored in ROIB::RoIBResult
-   StatusCode buildCTP_Decision();
-   /// add EmTauRoi to LVL1_ROI from EmTauResult stored in ROIB::RoIBResult
-   StatusCode addEmTauRoI(const ROIB::RoIBResult*);
-   /// add JetEnergyRoi to LVL1_ROI from JetEnergyResult stored in ROIB::RoIBResult
-   StatusCode addJetEnergyRoI(const ROIB::RoIBResult*);
-   /// add MuonRoi to LVL1_ROI from MuCTPIResult stored in ROIB::RoIBResult
-   void addMuonRoI(const ROIB::RoIBResult*, LVL1_ROI*);
-   /// convert AOD ROI objects to xAOD objects
-   StatusCode convertToxAOD(LVL1_ROI*);
-
-   // services
-   ServiceHandle<TrigConf::ILVL1ConfigSvc> m_configSvc;               //!< property, see @link RoIBResultToxAOD::RoIBResultToxAOD @endlink
-
-   ServiceHandle<LVL1::RecMuonRoiSvc> m_recRPCRoiSvc;                 //!< property, see @link RoIBResultToxAOD::RoIBResultToxAOD @endlink
-   ServiceHandle<LVL1::RecMuonRoiSvc> m_recTGCRoiSvc;                 //!< property, see @link RoIBResultToxAOD::RoIBResultToxAOD @endlink
-
-   // tools
-   ToolHandle<LVL1::IL1CPMTools> m_EmTauTool;                          //!< property, see @link RoIBResultToxAOD::RoIBResultToxAOD @endlink
-   ToolHandle<LVL1::IL1JEMJetTools> m_JetTool;                           //!< property, see @link RoIBResultToxAOD::RoIBResultToxAOD @endlink
-   bool m_retrievedEmTauTool;
-   bool m_retrievedJetTool;
-
-   // xAOD conversion tools:
-   std::string m_xaodKeyMu;
-   std::string m_xaodKeyEmTau;
-   std::string m_xaodKeyEsum;
-   std::string m_xaodKeyJetEt;
-   std::string m_xaodKeyJet;
-
-   ToolHandle< xAODMaker::IMuonRoICnvTool > m_MuCnvTool;
-
-   // Data object StoreGate keys
-   std::string m_CPMTowerLocation;
-   std::string m_JetElementLocation;
-   std::string m_roibInputKey;
-   std::string m_lvl1RoIOutputKey;
-
-   // properties
-   bool        m_doCalo;                                              //!< property, see @link RoIBResultToxAOD::RoIBResultToxAOD @endlink
-   bool        m_doMuon;                                              //!< property, see @link RoIBResultToxAOD::RoIBResultToxAOD @endlink
-
-   // trigger items for each TTW bit
-   std::vector< std::string > m_egammaItem;                           //!< property, see @link RoIBResultToxAOD::RoIBResultToxAOD @endlink
-   std::vector< std::string > m_tauhadItem;                           //!< property, see @link RoIBResultToxAOD::RoIBResultToxAOD @endlink
-   std::vector< std::string > m_jetItem;                              //!< property, see @link RoIBResultToxAOD::RoIBResultToxAOD @endlink
-   std::vector< std::string > m_esumItem;                             //!< property, see @link RoIBResultToxAOD::RoIBResultToxAOD @endlink
-   std::vector< std::string > m_highmuItem;                           //!< property, see @link RoIBResultToxAOD::RoIBResultToxAOD @endlink
-   std::vector< std::string > m_lowmuItem;                            //!< property, see @link RoIBResultToxAOD::RoIBResultToxAOD @endlink
+   /// Create the EmTau RoI objects
+   StatusCode createEmTauRoI( const ROIB::RoIBResult& roib,
+                              const EventContext& ctx );
+   /// Create the JetEnergy RoI object
+   StatusCode createJetEnergyRoI( const ROIB::RoIBResult& roib,
+                                  const EventContext& ctx );
+   /// Create the Muon RoI objects
+   StatusCode createMuonRoI( const ROIB::RoIBResult& roib,
+                             const EventContext& ctx ) const;
+
+   /// @name Services
+   /// @{
+
+   /// The trigger configuration service
+   ServiceHandle< TrigConf::ILVL1ConfigSvc > m_configSvc {
+      this, "LVL1ConfigSvc", "TrigConf::LVL1ConfigSvc/LVL1ConfigSvc",
+      "Service providing the LVL1 trigger configuration" };
+
+   /// The RPC RoI reconstruction service
+   ServiceHandle< LVL1::RecMuonRoiSvc > m_recRPCRoiSvc {
+      this, "RecRpcRoiSvc", LVL1::ID_RecRpcRoiSvc,
+      "RPC RoI reconstruction service" };
+   /// The TGC RoI reconstruction service
+   ServiceHandle< LVL1::RecMuonRoiSvc > m_recTGCRoiSvc {
+      this, "RecTgcRoiSvc", LVL1::ID_RecTgcRoiSvc,
+      "TGC RoI reconstruction service" };
+
+   /// @}
+
+   /// @name Tools
+   /// @{
+
+   /// Tool for calculation of EmTau trigger sums per RoI
+   ToolHandle< LVL1::IL1CPMTools > m_emTauTool {
+      this, "L1CPMTools", "LVL1::L1CPMTools/L1CPMTools",
+      "Tool for calculation of EmTau trigger sums per RoI" };
+   /// Tool for calculation of Jet cluster sums per RoI
+   ToolHandle< LVL1::IL1JEMJetTools > m_jetTool {
+      this, "L1JEMJetTools", "LVL1::L1JEMJetTools/L1JEMJetTools",
+      "Tool for calculation of Jet cluster sums per RoI" };
+
+   /// @}
+
+   /// @name Read handle keys
+   /// @{
+
+   /// Read key for the ROIB::RoIBResult object
+   SG::ReadHandleKey< ROIB::RoIBResult > m_roibResultKey {
+      this, "RoIBResultInputKey", "RoIBResult",
+      "Key for the ROIB::RoIBResult input object" };
+
+   /// Read key for the xAOD::CPMTowerContainer object
+   SG::ReadHandleKey< xAOD::CPMTowerContainer > m_cpmTowerKey {
+      this, "CPMTowerLocation", LVL1::TrigT1CaloDefs::CPMTowerLocation,
+      "Key for the xAOD::CPMTowerContainer input object" };
+   /// Read key for the xAOD::JetElementContainer object
+   SG::ReadHandleKey< xAOD::JetElementContainer > m_jetElementKey {
+      this, "JetElementLocation", LVL1::TrigT1CaloDefs::JetElementLocation,
+      "Key for the xAOD::JetElementContainer input object" };
+
+   /// @}
+
+   /// @name Write handle keys
+   /// @{
+
+   /// Write key for the xAOD::MuonRoIContainer object
+   SG::WriteHandleKey< xAOD::MuonRoIContainer > m_muonRoIKey {
+      this, "xAODKeyMuon", "LVL1MuonRoIs",
+      "Key for the xAOD::MuonRoIContainer output object" };
+   /// Write key for the xAOD::EmTauRoIContainer object
+   SG::WriteHandleKey< xAOD::EmTauRoIContainer > m_emtauRoIKey {
+      this, "xAODKeyEmTau", "LVL1EmTauRoIs",
+      "Key for the xAOD::EmTauRoIContainer output object" };
+   /// Write key for the xAOD::EnergySumRoI object
+   SG::WriteHandleKey< xAOD::EnergySumRoI > m_energysumRoIKey {
+      this, "xAODKeyEsum", "LVL1EnergySumRoI",
+      "Key for the xAOD::EnergySumRoI output object" };
+   /// Write key for the xAOD::JetEtRoI object
+   SG::WriteHandleKey< xAOD::JetEtRoI > m_jetetRoIKey {
+      this, "xAODKeyJetEt", "LVL1JetEtRoI",
+      "Key for the xAOD::JetEtRoI output object" };
+   /// Write key for the xAOD::JetRoIContainer object
+   SG::WriteHandleKey< xAOD::JetRoIContainer > m_jetRoIKey {
+      this, "xAODKeyJet", "LVL1JetRoIs",
+      "Key for the xAOD::JetRoIContainer output object" };
+
+   /// @}
+
+   /// @name Other properties
+   /// @{
+
+   /// Use inputs from the Calo system
+   Gaudi::Property< bool > m_doCalo {
+      this, "DoCalo", true, "Use inputs from the Calo system" };
+   /// Use inputs from the Muon system
+   Gaudi::Property< bool > m_doMuon {
+      this, "DoMuon", true, "Use inputs from the Muon system" };
+
+   /// List of LVL1 items for e/gamma trigger type
+   Gaudi::Property< std::vector< std::string > > m_egammaItem {
+      this, "EGammaItem", {}, "List of LVL1 items for e/gamma trigger type" };
+   /// List of LVL1 items for tau trigger type
+   Gaudi::Property< std::vector< std::string > > m_tauhadItem {
+      this, "TauHadItem", {}, "List of LVL1 items for tau trigger type" };
+   /// List of LVL1 items for jet trigger type
+   Gaudi::Property< std::vector< std::string > > m_jetItem {
+      this, "JetItem", {}, "List of LVL1 items for jet trigger type" };
+   /// List of LVL1 items for energy sum trigger type
+   Gaudi::Property< std::vector< std::string > > m_esumItem {
+      this, "ESumItem", {}, "List of LVL1 items for energy sum trigger type" };
+   /// List of LVL1 items for high pt muon trigger type
+   Gaudi::Property< std::vector< std::string > > m_highmuItem {
+      this, "HighMuItem", {},
+      "List of LVL1 items for high pt muon trigger type" };
+   /// List of LVL1 items for low pt muon trigger type
+   Gaudi::Property< std::vector< std::string > > m_lowmuItem {
+      this, "LowMuItem", {},
+      "List of LVL1 items for low pt muon trigger type" };
+
+   /// @}
 
 }; // class RoIBResultToxAOD
 
diff --git a/PhysicsAnalysis/AthenaROOTAccess/python/dumpers.py b/PhysicsAnalysis/AthenaROOTAccess/python/dumpers.py
index bcc700830d76c2244edb6e466c0270a0027083c2..d9c80c85aa4af5df0ece94a9b545c499b04b949f 100644
--- a/PhysicsAnalysis/AthenaROOTAccess/python/dumpers.py
+++ b/PhysicsAnalysis/AthenaROOTAccess/python/dumpers.py
@@ -68,6 +68,7 @@ _skipTypes = ['DataVector<Trk::Segment>',
               'CaloCellLinkContainer',
               'CaloClusterCellLinkContainer',
               'CaloCompactCellContainer',
+              'BCM_RDO_Container',
               ]
 
 _skipBranches = []
@@ -279,6 +280,13 @@ class Evdump:
             token.find ('(DataHeader)') > 0 or
             token == 'POOLContainer_DataHeader'):
             return
+
+        # Skip _v1 types for HIEventShapeContainer.
+        # Persistency of these was fubar.
+        if (token.find ('FA2C3CB2-71A6-11E4-BB30-02163E010E29') >= 0 or
+            token.find ('06FA81A6-71A7-11E4-9A9D-02163E010E29') >= 0):
+            return
+
         cnt = token
         i1 = cnt.find("[CNT=")
         if i1 >= 0:
diff --git a/PhysicsAnalysis/AthenaROOTAccess/share/athena_dump.py b/PhysicsAnalysis/AthenaROOTAccess/share/athena_dump.py
index 77509773f8e6b0fe7cf414a1c5bac0be5d0aa7b2..60708e4d5de30edb7b3bcc6ef1b66b75a56f4fcc 100644
--- a/PhysicsAnalysis/AthenaROOTAccess/share/athena_dump.py
+++ b/PhysicsAnalysis/AthenaROOTAccess/share/athena_dump.py
@@ -97,6 +97,13 @@ class Dumper (PyAthena.Alg):
         dh = self.sg.retrieve ("DataHeader")
         dhes = []
         for dhe in dh.elements():
+            # Skip _v1 types for HIEventShapeContainer.
+            # Persistency of these was fubar.
+            tok = dhe.getToken().toString()
+            if (tok.find ('FA2C3CB2-71A6-11E4-BB30-02163E010E29') >= 0 or
+                tok.find ('06FA81A6-71A7-11E4-9A9D-02163E010E29') >= 0):
+                continue
+
             tname = self.cs.typename(dhe.getPrimaryClassID())
             if tname:
                 dhes.append ((dhe.getKey(), tname))
diff --git a/PhysicsAnalysis/AthenaROOTAccess/test/dodiff b/PhysicsAnalysis/AthenaROOTAccess/test/dodiff
index 6271f7d53006042afb5030136319ce340d632d0e..68a3d796c74e644ccd105fab6831248abc0d5fdf 100755
--- a/PhysicsAnalysis/AthenaROOTAccess/test/dodiff
+++ b/PhysicsAnalysis/AthenaROOTAccess/test/dodiff
@@ -1,8 +1,18 @@
 #!/bin/sh
 
+version=`cat VERSION`
+
 # Exclude some differences from taujet v2->v3 migration which are not
 # practical to implement in ARA.
-excludes="-InChargedTracks: -InIsolatedTracks: -ItauTrackLinks:"
+excludes="-InChargedTracks: -InIsolatedTracks: -ItauTrackLinks: -INUMTRACK: -INUMVERTICES: -INUMWIDETRACK:"
+
+case "$version" in
+  # In a few versions, the TrigPassBits was written incorrectly.
+  # This was worked around with a custom Athena converter,
+  # but is not implemented in ARA.
+  20.7.3.* | 20.7.4.* | 20.7.5.* )
+    excludes="$excludes -IcontainerClid: -IcontainerKey: -IpassBits: -Isize:";;
+esac
 
 echo "*** diff 1"
 bzdiff -u $excludes dump.out.bz2 dump1.out.bz2
diff --git a/PhysicsAnalysis/AthenaROOTAccess/test/dodump b/PhysicsAnalysis/AthenaROOTAccess/test/dodump
index 160dc9c630415ff38d3091205b9dda4ea39d2652..bb13cfb68db3ad7beee20a90bcde7960f7fb66ef 100755
--- a/PhysicsAnalysis/AthenaROOTAccess/test/dodump
+++ b/PhysicsAnalysis/AthenaROOTAccess/test/dodump
@@ -1,5 +1,6 @@
 #!/bin/sh
 
+echo $1 > VERSION
 athena.py -c 'vers="'$1'"' athena_dumper.py 2>&1 > dump-a.log &
 python ara_dumper1.py $1 2>&1 > dump-1.log &
 python ara_dumper2.py $1 2>&1 > dump-2.log &
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/CMakeLists.txt b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/CMakeLists.txt
index 2fc8c91f9f9107cfa756e6eafd2c96eec410da92..53e8bc68aac7d2f3f13284cc1a391dd7dcec3410 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/CMakeLists.txt
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/CMakeLists.txt
@@ -37,7 +37,7 @@ atlas_depends_on_subdirs(
 
 # External dependencies:
 find_package( Boost )
-find_package( ROOT COMPONENTS Core MathCore Hist RIO MathMore )
+find_package( ROOT COMPONENTS Core Hist MathCore)
 
 # Component(s) in the package:
 atlas_add_library( ElectronEfficiencyCorrectionLib
@@ -52,8 +52,7 @@ atlas_add_library( ElectronEfficiencyCorrectionLib
 if( NOT XAOD_STANDALONE )
    atlas_add_component( ElectronEfficiencyCorrection
       src/*.h src/*.cxx src/components/*.cxx
-      LINK_LIBRARIES xAODEgamma PATInterfaces AthenaBaseComps xAODCore
-      xAODEventInfo GaudiKernel ElectronEfficiencyCorrectionLib )
+      LINK_LIBRARIES  AthenaBaseComps GaudiKernel ElectronEfficiencyCorrectionLib )
 endif()
 
 atlas_add_dictionary( ElectronEfficiencyCorrectionDict
@@ -64,7 +63,7 @@ atlas_add_dictionary( ElectronEfficiencyCorrectionDict
 # Utilities provided by the package:
 atlas_add_executable( EgEfficiencyCorr_mem_check
    util/EgEfficiencyCorr_mem_check.cxx
-   LINK_LIBRARIES AsgTools ElectronEfficiencyCorrectionLib CxxUtils )
+   LINK_LIBRARIES AsgTools ElectronEfficiencyCorrectionLib CxxUtils)
 
 #Test
 atlas_add_test(ut_SimpleInitTest
@@ -78,6 +77,12 @@ if( XAOD_STANDALONE )
       LINK_LIBRARIES ${ROOT_LIBRARIES} xAODRootAccess xAODEventInfo xAODEgamma
       xAODCore ElectronEfficiencyCorrectionLib )
 
+   atlas_add_executable( EgEfficiencyCorr_testEgEfficiencyCorrFwd
+      util/testEgEfficiencyCorrFwd.cxx util/SFHelpers.cxx
+      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+      LINK_LIBRARIES ${ROOT_LIBRARIES} xAODRootAccess xAODEventInfo xAODEgamma
+      xAODCore ElectronEfficiencyCorrectionLib )
+    
    atlas_add_executable( EgEfficiencyCorr_testEgEfficiencyCorrWithoutFile
       util/testEgEfficiencyCorrWithoutFile.cxx 
       util/CreateDummyEl.cxx util/SFHelpers.cxx
@@ -99,7 +104,6 @@ if( XAOD_STANDALONE )
  
 endif()
 
-
 # Install files from the package:
 atlas_install_joboptions( share/*.py)
 atlas_install_data( data/*.root data/*.txt )
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/AsgElectronEfficiencyCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/AsgElectronEfficiencyCorrectionTool.h
index 3cd56ab3ed7bf9063364633d3c74963540a2d911..523dd353287e76f7c99b6e811006deccf8f3cc87 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/AsgElectronEfficiencyCorrectionTool.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/AsgElectronEfficiencyCorrectionTool.h
@@ -45,22 +45,15 @@ public:
         virtual ~AsgElectronEfficiencyCorrectionTool();
 
 
-public:
         /// Gaudi Service Interface method implementations
         virtual StatusCode initialize();
 
-        /// Gaudi Service Interface method implementations
-        virtual StatusCode finalize();
-
         /// Metadata methods
         virtual StatusCode beginInputFile();    
         virtual StatusCode beginEvent();
 
-public:
-
         int getNumberOfToys( ){return m_number_of_toys;} ;
 
-
         CP::CorrectionCode getEfficiencyScaleFactor(const xAOD::Electron& inputObject, double& efficiencyScaleFactor) const;
         CP::CorrectionCode applyEfficiencyScaleFactor(const xAOD::Electron& inputObject) const;
 
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/ElectronChargeEfficiencyCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/ElectronChargeEfficiencyCorrectionTool.h
index cf8b5ddd9176005cf541cced185970f5ebdcbd64..eadfd81d47bd135e99d1339f6bca102c280b39b8 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/ElectronChargeEfficiencyCorrectionTool.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/ElectronChargeEfficiencyCorrectionTool.h
@@ -7,7 +7,7 @@
 
 #include "AsgTools/AsgTool.h"
 //#include "ElectronChargeEfficiencyCorrectionTool/IElectronChargeEfficiencyCorrectionTool.h"
-#include "AsgAnalysisInterfaces/IEfficiencyScaleFactorTool.h"
+#include "EgammaAnalysisInterfaces/IAsgElectronEfficiencyCorrectionTool.h"
 #include "PATInterfaces/ISystematicsTool.h"
 #include "TH2.h"
 // #include "xAODTruth/TruthParticle.h"
@@ -28,10 +28,10 @@ namespace xAOD {
 namespace CP {
 
   class ElectronChargeEfficiencyCorrectionTool
-    : virtual public CP::IEfficiencyScaleFactorTool,
+    : virtual public IAsgElectronEfficiencyCorrectionTool,
     public asg::AsgTool
   {
-    ASG_TOOL_CLASS2(ElectronChargeEfficiencyCorrectionTool, CP::IEfficiencyScaleFactorTool, CP:: ISystematicsTool)
+    ASG_TOOL_CLASS(ElectronChargeEfficiencyCorrectionTool, IAsgElectronEfficiencyCorrectionTool)
 
   public:
 
@@ -57,10 +57,10 @@ namespace CP {
     virtual StatusCode finalize();
 
     /// Retrieve the Scale factor
-    virtual CP::CorrectionCode getEfficiencyScaleFactor(const xAOD::IParticle& part, double& sf) const;
+    virtual CP::CorrectionCode getEfficiencyScaleFactor(const xAOD::Electron& inputObject, double& sf) const;
 
     /// Decorate the electron
-    virtual CP::CorrectionCode applyEfficiencyScaleFactor(const xAOD::IParticle& part) const;
+    virtual CP::CorrectionCode applyEfficiencyScaleFactor(const xAOD::Electron& inputObject) const;
 
     /// Systematics
     //  void applySysVariation();
@@ -78,11 +78,15 @@ namespace CP {
 
     CP::SystematicCode registerSystematics();
 
- /// returns: the currently applied systematics
-  const CP::SystematicSet& appliedSystematics() const {
-       return *m_appliedSystematics;
+    /// returns: the currently applied systematics
+    const CP::SystematicSet& appliedSystematics() const {
+      return *m_appliedSystematics;
+    }
+
+    int systUncorrVariationIndex( const xAOD::Electron&) const {
+      ATH_MSG_WARNING("systUncorrVariationIndex is not implemented in ElectronChargeEfficiencyCorrectionTool");
+      return -999;
     }
- 
 
 
  //
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/TElectronEfficiencyCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/TElectronEfficiencyCorrectionTool.h
index a2b1d5383681b13d6a83fc47c632463061cd1af2..d24ab74ecbc9b32f583045d737ecb6e37e376555 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/TElectronEfficiencyCorrectionTool.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/TElectronEfficiencyCorrectionTool.h
@@ -1,6 +1,7 @@
+// Dear emacs, this is -*- c++ -*-
 /*
    Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
- */
+*/
 
 #ifndef __TELECTRONEFFICIENCYCORRECTIONTOOL__
 #define __TELECTRONEFFICIENCYCORRECTIONTOOL__
@@ -10,20 +11,21 @@
   @brief Calculate the egamma scale factors 
   Implementation class for the e/gamma Efficiency Scale Factors. This code implements
   the underlying logic of accessign the ROOT files containing the recommendations.
-
-  @author Kristin Lohwasser, Karsten Koeneke, Felix Buehrer
+  @authors Kristin Lohwasser, Karsten Koeneke, Felix Buehrer
   @date   January 2013
+  @updated by Christos Anastopoulos 2017-2018
   */
 
 // STL includes
 #include <vector>
 #include <string>
 #include <array>
+#include <unordered_map>
 #include <map>
 //Root fwd declares
 class TKey;
-class TH1D;
-class TH2D;
+class TH1;
+class TH2;
 // ROOT includes
 #include "TRandom3.h"
 #include "TObjArray.h"
@@ -32,157 +34,141 @@ class TH2D;
 #include "AsgTools/AsgMessaging.h"
 
 namespace Root {
-    class TElectronEfficiencyCorrectionTool : public asg::AsgMessaging
-    {
-    public: 
-        /**
-         * The position of each result
-         */
-        enum struct Position{
-            SF=0,
-            Total=1,
-            Stat=2,
-            NSys=3,
-            UnCorr=4,
-            GlobalBinNumber=5,
-            End=6
-        };
-
-        /** Standard constructor */
-        TElectronEfficiencyCorrectionTool( const char* name="TElectronEfficiencyCorrectionTool" );
-
-        /** Standard destructor */
-        ~TElectronEfficiencyCorrectionTool();
-
-        // Main methods
-        /** Initialize this class */
-        int initialize();
-
-        /** Finalize this class; everything that should be done after the event loop should go here */
-        inline int finalize() { return 1; }
-
-        /** The main salculate method: the actual cuts are applied here */
-        int calculate( const PATCore::ParticleDataType::DataType dataType,
-                const unsigned int runnumber,
-                const double cluster_eta,
-                const double et, /* in MeV */
-                std::vector<double>& result,
-                size_t& index_of_corr,
-                size_t& index_of_toys) const;
-
-        /// Add an input file
-        inline void addFileName ( const std::string& val ) { 
-            m_corrFileNameList.push_back(val); 
-        }
-        ///MC Toys Helper functions
-        inline void bookToyMCScaleFactors(const int nToyMC) {
-            m_doToyMC = true;
-            m_nToyMC = nToyMC;
-        }
-        inline void bookCombToyMCScaleFactors(const int nToyMC) {
-            m_doCombToyMC = true;
-            m_nToyMC = nToyMC;
-        }
-
-        ///Helpers to get the binning of the uncertainties
-        int getNbins(std::map<float, std::vector<float> >&) const; 
-        inline int getNSyst() const {
-            return m_nSysMax;
-        }
-        ///Detail Level
-        enum detailLevel{simple,medium,detailed,detailLevelEnd};
-        /// Set the detail level 
-        inline void setDetailLevel (const int input_detailLevel ) { 
-            m_detailLevel = input_detailLevel; 
-        }
-        ///Set the Random Seed
-        inline void setSeed( const unsigned long int seed) { 
-            m_seed = seed; 
-        }
-
-    private:
-        // Private methods
-        /// Load all histograms from the input file(s)
-        int getHistograms();
-
-        int setupHistogramsInFolder( const TObjArray& dirNameArray, 
-                int lastIdx );
-
-        void calcDetailLevels(const TH1D *eig,
-                std::array<int,detailLevelEnd>& sLevel,
-                int& nSys) const ;
-
-        std::vector<TObjArray> buildToyMCTable (const TObjArray &sf, 
-                const TObjArray &eig, 
-                const TObjArray& stat, 
-                const TObjArray& uncorr, 
-                const std::vector<TObjArray> &corr);
-
-        std::vector<TH2D*> buildSingleToyMC(const TH2D* sf, 
-                const TH2D* stat, 
-                const TH2D* uncorr, 
-                const TObjArray& corr,
-                const std::array<int,detailLevelEnd> sLevel,
-                int& randomCounter);
-
-        TH2D* buildSingleCombToyMC(const TH2D *sf, 
-                const TH2D* stat, 
-                const TH2D* uncorr, 
-                const TObjArray& corr,
-                const std::array<int,detailLevelEnd> sLevel,
-                const int nSys,
-                int& randomCounter);
-
-        /// Fill and interpret the setup, depending on which histograms are found in the input file(s)
-        int setup( const TObjArray& hist,
-                std::vector< TObjArray >& histList,
-                std::vector< unsigned int >& beginRunNumberList,
-                std::vector< unsigned int >& endRunNumberList,
-                const int runNumBegin,
-                const int runNumEnd) const ;
-
-    private :
-        ///Private data members
-        bool m_doToyMC;
-        bool m_doCombToyMC;
-        //// The detail level
-        int m_detailLevel;
-        //The number of toys
-        int m_nToyMC;
-        /// The Random seed
-        unsigned long int m_seed;
-        ///Maximum number of systematics
-        int m_nSysMax;
-        // The positions of the efficiency scale factor correlated sustematic uncertainties in the result
-        std::vector<int> m_position_corrSys; 
-        /// The positions of the toy MC scale factors
-        std::vector<int> m_position_uncorrToyMCSF; ///Uncorrelated toy systematics
-        ///The representation of the prepared toy SF tables
-        std::vector< std::vector<TObjArray>> m_uncorrToyMCSystFull;
-        std::vector< std::vector<TObjArray>> m_uncorrToyMCSystFast;
-        /// The list of file name(s)
-        std::vector< std::string > m_corrFileNameList;
-        /// List of run numbers where histograms become valid for full simulation
-        std::vector< unsigned int > m_begRunNumberList;
-        /// List of run numbers where histograms stop being valid for full simulation
-        std::vector< unsigned int > m_endRunNumberList;
-        /// List of run numbers where histograms become valid for fast simulation
-        std::vector< unsigned int > m_begRunNumberListFastSim;
-        /// List of run numbers where histograms stop being valid for fast simulation
-        std::vector< unsigned int > m_endRunNumberListFastSim;    
-        //The vector holding the keys
-        std::vector<int> m_keys;
-        /// List of histograms for full Geant4 simulation
-        std::map<int, std::vector< TObjArray > > m_histList;
-        std::vector< std::vector< TObjArray > > m_sysList;
-        /// List of histograms for fast simulation
-        std::map<int, std::vector< TObjArray > > m_fastHistList;
-        std::vector< std::vector< TObjArray > > m_fastSysList;
-        //The Random generator class   
-        TRandom3 m_Rndm;
-    }; // End: class definition
-
+class TElectronEfficiencyCorrectionTool : public asg::AsgMessaging
+{
+public: 
+  /**
+   * The position of each result
+   */
+  enum struct Position{
+    SF=0,
+    Total=1,
+    Stat=2,
+    NSys=3,
+    UnCorr=4,
+    GlobalBinNumber=5,
+    End=6
+  };
+
+  /** Standard constructor */
+  TElectronEfficiencyCorrectionTool( const char* name="TElectronEfficiencyCorrectionTool" );
+
+  /** Standard destructor */
+  ~TElectronEfficiencyCorrectionTool();
+
+  // Main methods
+  /** Initialize this class */
+  int initialize();
+
+  /** The main calculate method: the actual cuts are applied here */
+  int calculate( const PATCore::ParticleDataType::DataType dataType,
+                 const unsigned int runnumber,
+                 const double cluster_eta,
+                 const double et, /* in MeV */
+                 std::vector<double>& result,
+                 size_t& index_of_corr,
+                 size_t& index_of_toys) const;
+
+  /// Add an input file
+  inline void addFileName ( const std::string& val ) { 
+    m_corrFileNameList.push_back(val); 
+  }
+  ///MC Toys Helper functions
+  inline void bookToyMCScaleFactors(const int nToyMC) {
+    m_doToyMC = true;
+    m_nToyMC = nToyMC;
+  }
+  inline void bookCombToyMCScaleFactors(const int nToyMC) {
+    m_doCombToyMC = true;
+    m_nToyMC = nToyMC;
+  }
+
+  ///Helpers to get the binning of the uncertainties
+  int getNbins(std::map<float, std::vector<float> >&) const; 
+  inline int getNSyst() const {
+    return m_nSysMax;
+  }
+  
+  ///Set the Random Seed
+  inline void setSeed( const unsigned long int seed) { 
+    m_seed = seed; 
+  }
+
+private:
+  // Private methods
+  /// Load all histograms from the input file(s)
+  int getHistograms();
+
+  int setupHistogramsInFolder( const TObjArray& dirNameArray, 
+                               int lastIdx );
+
+  bool setupUncorrToySyst(std::unordered_map<int, TObjArray>& objs,
+                          std::vector<TObjArray>& sysObjs,
+                          std::vector< std::vector<TObjArray>>& uncorrToyMCSyst);
+
+   std::vector<TObjArray> buildToyMCTable (const TObjArray &sf, 
+                                          const TObjArray &eig, 
+                                          const TObjArray& stat, 
+                                          const TObjArray& uncorr, 
+                                          const std::vector<TObjArray> &corr);
+
+  std::vector<TH2*> buildSingleToyMC(const TH2* sf, 
+                                     const TH2* stat, 
+                                     const TH2* uncorr, 
+                                     const TObjArray& corr,
+                                     int& randomCounter);
+
+  TH2* buildSingleCombToyMC(const TH2 *sf, 
+                            const TH2* stat, 
+                            const TH2* uncorr, 
+                            const TObjArray& corr,
+                            const int nSys,
+                            int& randomCounter);
+
+  void setupTempMapsHelper(TObject* obj,
+                           std::unordered_map<int, TObjArray>& objs,
+                           std::vector<TObjArray >& sysObjs,int& seenSystematics) ;
+
+  /// Fill and interpret the setup, depending on which histograms are found in the input file(s)
+  int setup( const TObjArray& hist,
+             std::vector< TObjArray >& histList,
+             std::vector< unsigned int >& beginRunNumberList,
+             std::vector< unsigned int >& endRunNumberList,
+             const int runNumBegin,
+             const int runNumEnd) const ;
+
+private :
+  ///Flag to control Toys
+  bool m_doToyMC;
+  bool m_doCombToyMC;
+  ///The number of toys
+  int m_nToyMC;
+  /// The Random seed
+  unsigned long int m_seed;
+  ///Maximum number of systematics
+  int m_nSysMax;
+  //The representation of the prepared toy SF tables
+  std::vector< std::vector<TObjArray>> m_uncorrToyMCSystFull;
+  std::vector< std::vector<TObjArray>> m_uncorrToyMCSystFast;
+  /// The list of file name(s)
+  std::vector< std::string > m_corrFileNameList;
+  /// List of run numbers where histograms become valid for full simulation
+  std::vector< unsigned int > m_begRunNumberList;
+  /// List of run numbers where histograms stop being valid for full simulation
+  std::vector< unsigned int > m_endRunNumberList;
+  /// List of run numbers where histograms become valid for fast simulation
+  std::vector< unsigned int > m_begRunNumberListFastSim;
+  /// List of run numbers where histograms stop being valid for fast simulation
+  std::vector< unsigned int > m_endRunNumberListFastSim;    
+ /// List of histograms for full Geant4 simulation
+  std::unordered_map<int, std::vector< TObjArray > > m_histList;
+  std::vector< std::vector< TObjArray > > m_sysList;
+  /// List of histograms for fast simulation
+  std::unordered_map<int, std::vector< TObjArray > > m_fastHistList;
+  std::vector< std::vector< TObjArray > > m_fastSysList;
+  //The Random generator class   
+  TRandom3 m_Rndm;
+}; // End: class definition
 } // End: namespace Root
 
 #endif
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/AsgElectronEfficiencyCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/AsgElectronEfficiencyCorrectionTool.cxx
index 63053c2bfa7f142836d79308ff812a6afe249e01..3f00022264ddf4f515e2e6aad81a0ca21ccb26cd 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/AsgElectronEfficiencyCorrectionTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/AsgElectronEfficiencyCorrectionTool.cxx
@@ -58,7 +58,7 @@ AsgElectronEfficiencyCorrectionTool::AsgElectronEfficiencyCorrectionTool(std::st
         // Declare the needed properties
         declareProperty("CorrectionFileNameList", m_corrFileNameList,
                 "List of file names that store the correction factors for simulation.");
-        declareProperty("MapFilePath", m_mapFile = "ElectronEfficiencyCorrection/2015_2017/rel21.2/Moriond_February2018_v1/map0.txt" ,
+        declareProperty("MapFilePath", m_mapFile = "ElectronEfficiencyCorrection/2015_2017/rel21.2/Moriond_February2018_v2/map6.txt" ,
                 "Full path to the map file");
         declareProperty("RecoKey", m_recoKey = "" ,
                 "Key associated with reconstruction");
@@ -86,9 +86,6 @@ AsgElectronEfficiencyCorrectionTool::~AsgElectronEfficiencyCorrectionTool() {
     if (m_UncorrRegions) {
         delete m_UncorrRegions;
     }
-    if (finalize().isFailure()) {
-        ATH_MSG_ERROR("Failure in AsgElectronEfficiencyCorrectionTool finalize()");
-    }
     delete m_rootTool;
 }
 
@@ -148,6 +145,13 @@ AsgElectronEfficiencyCorrectionTool::initialize() {
         if (m_corrFileNameList.at(i).find("efficiencySF.offline.RecoTrk") != std::string::npos) {
             m_sysSubstring = "Reco_";
         }
+        if (m_corrFileNameList.at(i).find("efficiencySF.offline.Fwd") != std::string::npos) {
+            m_sysSubstring = "FwdID_";
+	    if ( m_correlation_model_name == "SIMPLIFIED" ) {
+	      ATH_MSG_ERROR("The SIMPLIFIED correlation model is not implemented for fwd electrons");
+	      return StatusCode::FAILURE;
+	    }
+        }
         if (m_corrFileNameList.at(i).find("efficiencySF.Isolation") != std::string::npos) {
             m_sysSubstring = "Iso_";
         }
@@ -241,18 +245,6 @@ AsgElectronEfficiencyCorrectionTool::initialize() {
     return StatusCode::SUCCESS;
 }
 
-/// =============================================================================
-// Athena finalize method
-// =============================================================================
-StatusCode
-AsgElectronEfficiencyCorrectionTool::finalize() {
-    if (!(m_rootTool->finalize())) {
-        ATH_MSG_ERROR("Something went wrong at finalize!");
-        return StatusCode::FAILURE;
-    }
-    return StatusCode::SUCCESS;
-}
-
 CP::CorrectionCode
 AsgElectronEfficiencyCorrectionTool::getEfficiencyScaleFactor(const xAOD::Electron &inputObject,
         double &efficiencyScaleFactor) const {
@@ -285,7 +277,14 @@ AsgElectronEfficiencyCorrectionTool::getEfficiencyScaleFactor(const xAOD::Electr
         ATH_MSG_ERROR("ERROR no cluster associated to the Electron \n"); 
         return CP::CorrectionCode::Error; 
     }
-    cluster_eta = cluster->etaBE(2);
+
+    // we need to use different variables for central and forward electrons
+    static const SG::AuxElement::ConstAccessor< uint16_t > accAuthor( "author" );
+    if( accAuthor.isAvailable(inputObject) && accAuthor(inputObject) == xAOD::EgammaParameters::AuthorFwdElectron ) { 
+      cluster_eta = cluster->eta();
+    } else {
+      cluster_eta = cluster->etaBE(2);
+    }
 
     size_t CorrIndex{0};
     size_t MCToysIndex{0};
@@ -628,9 +627,6 @@ StatusCode AsgElectronEfficiencyCorrectionTool::beginEvent(){
     return StatusCode::SUCCESS;
 }
 
-//===============================================================================
-// Get Simulation flavor (FastSim or FullSim) from METADATA
-//===============================================================================
 StatusCode
 AsgElectronEfficiencyCorrectionTool::get_simType_from_metadata(PATCore::ParticleDataType::DataType& result) const{
 
@@ -876,5 +872,3 @@ AsgElectronEfficiencyCorrectionTool::getValue(const std::string& strKey, std::st
     }
     return "";
 }
-
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/ElectronChargeEfficiencyCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/ElectronChargeEfficiencyCorrectionTool.cxx
index cda599834d4f5124751bd7152ea33cb662a9ad62..78a682333fdcbffbb7463e93e6f168786269eda1 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/ElectronChargeEfficiencyCorrectionTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/ElectronChargeEfficiencyCorrectionTool.cxx
@@ -328,13 +328,7 @@ StatusCode CP::ElectronChargeEfficiencyCorrectionTool::finalize()
 //
 
 CP::CorrectionCode
-CP::ElectronChargeEfficiencyCorrectionTool::getEfficiencyScaleFactor(const xAOD::IParticle& part, double& sf) const {
-  ATH_MSG_DEBUG("In CP::ElectronChargeEfficiencyCorrectionTool::getEfficiencyScaleFactor(const xAOD::IParticle& part, double& sf) const");
-  if ( part.type() != xAOD::Type::Electron ){
-    ATH_MSG_ERROR("This function requires an electron to be passed. Failing!");
-    return CP::CorrectionCode::Error;
-  }
-  const xAOD::Electron& ele = static_cast<const xAOD::Electron&>(part);
+CP::ElectronChargeEfficiencyCorrectionTool::getEfficiencyScaleFactor(const xAOD::Electron& ele, double& sf) const {
 
   // initialize the SF at 1
   sf = 1.0;
@@ -527,7 +521,7 @@ CP::ElectronChargeEfficiencyCorrectionTool::getEfficiencyScaleFactor(const xAOD:
 
 
 CP::CorrectionCode
-CP::ElectronChargeEfficiencyCorrectionTool::applyEfficiencyScaleFactor(const xAOD::IParticle& part) const {
+CP::ElectronChargeEfficiencyCorrectionTool::applyEfficiencyScaleFactor(const xAOD::Electron& part) const {
   ATH_MSG_DEBUG("In CP::ElectronChargeEfficiencyCorrectionTool::applyEfficiencyScaleFactor(const xAOD::IParticle& part) const");
   double sf = 0.0;
   CP::CorrectionCode result = this->getEfficiencyScaleFactor(part,sf);
@@ -537,62 +531,6 @@ CP::ElectronChargeEfficiencyCorrectionTool::applyEfficiencyScaleFactor(const xAO
 
 }
 
-
-//// Giulia: This one won't exist!! ################################################ Kristin: But ok to just comment out for the moment
-
-// //---------------------------------------------------------------------------------------
-// // Get the efficiency for data only
-// //---------------------------------------------------------------------------------------
-
-// CP::CorrectionCode CP::ElectronChargeEfficiencyCorrectionTool::getDataEfficiency(const xAOD::Electron& ele, float& rate) {
-
-//   const double ele_pt  = ele.pt()*m_gevmev;
-//   const double ele_eta = fabs(ele.eta());
-//   rate = 999.;
-
-//   float syst_err(-1.0);
-//   float stat_err(-1.0);
-//   float retVal(0.0);
-
-//   retVal= this->getChargeFlipRate(ele_eta, ele_pt, m_correctionRates_data[0], rate);
-//   if ( retVal != 0 ) return CP::CorrectionCode::OutOfValidityRange;
-
-//   //.......sys.......
-//   retVal = this->getChargeFlipRate( ele_eta, ele_pt, m_correctionRates_data[1], syst_err);
-//   if ( retVal != 0 )  return CP::CorrectionCode::OutOfValidityRange;
-
-//   //.......stat.......
-//   retVal = this->getChargeFlipRate( ele_eta, ele_pt, m_correctionRates_data[2], stat_err);
-//   if ( retVal != 0 )  return CP::CorrectionCode::OutOfValidityRange;
-
-//   float total=sqrt( syst_err*syst_err + stat_err*stat_err );
-
-//   ATH_MSG_VERBOSE("Rates---- data: " << rate);
-
-
-//   // Systematics ------------------------------------------------------------------------------------------------------
-//   if ( m_mySysConf.size() >1 )  ATH_MSG_ERROR("m_mySysConf.size() >1 !! By now just one systematic implemented!!");
-
-//   if ( m_mySysConf.empty() ) ATH_MSG_VERBOSE("mySysConf is empty. NOMINAL value for rate!!!--->" << rate);
-
-//   else if (*(m_mySysConf.begin()) == SystematicVariation ("ELE_ChargeMisID_STAT",  1)) {rate*=(1+(stat_err*0.01)); ATH_MSG_VERBOSE("Rate data after STATup = "   << rate); }
-//   else if (*(m_mySysConf.begin()) == SystematicVariation ("ELE_ChargeMisID_STAT", -1)) {rate*=(1-(stat_err*0.01)); ATH_MSG_VERBOSE("Rate data after STATdown = " << rate); }
-
-//   else if (*(m_mySysConf.begin()) == SystematicVariation ("ELE_ChargeMisID_SYS" ,  1)) {rate*=(1+(syst_err*0.01)); ATH_MSG_VERBOSE("Rate data after SYSup = "    << rate); }
-//   else if (*(m_mySysConf.begin()) == SystematicVariation ("ELE_ChargeMisID_SYS" , -1)) {rate*=(1-(syst_err*0.01)); ATH_MSG_VERBOSE("Rate data after SYSdown = "  << rate); }
-
-//   else if (*(m_mySysConf.begin()) == SystematicVariation ("ELE_ChargeMisID_TOT" ,  1)) {rate*=(1+(total*0.01)); ATH_MSG_VERBOSE("Rate data after TOTup = "    << rate); }
-//   else if (*(m_mySysConf.begin()) == SystematicVariation ("ELE_ChargeMisID_TOT" , -1)) {rate*=(1-(total*0.01)); ATH_MSG_VERBOSE("Rate data after TOTdown = "  << rate); }
-
-//   else ATH_MSG_ERROR("No systematic string found");
-
-
-//   return CP::CorrectionCode::Ok;
-// }
-
-
-
-
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Get the charge of the original electron
 // Giulia: not needed anymore!
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/TElectronEfficiencyCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/TElectronEfficiencyCorrectionTool.cxx
index 761ccfb56d843efcf73b7d7f92993801e9480e9b..1fd6b01d35555645e07fe4e336d98b76a5274c74 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/TElectronEfficiencyCorrectionTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/TElectronEfficiencyCorrectionTool.cxx
@@ -9,7 +9,6 @@
   @date   July 2012
   */
 
-
 // This class header
 #include "ElectronEfficiencyCorrection/TElectronEfficiencyCorrectionTool.h"
 // STL includes
@@ -29,1065 +28,922 @@
 #include "TObjString.h"
 #include "TMD5.h"
 
-namespace{
-    template <class T>
-        inline std::string toString(const T& in){
-            std::stringstream stream;
-            stream << in;
-            return stream.str();
-        }
-    const std::string LowPt_string("LowPt");
+namespace mapkey{
+enum key{ sf =1,
+  stat=2,
+  eig=3,
+  uncorr=4,	      
+  sys=5,
+  end=6
+};
+const char* keytostring (int input){
+  switch(input){
+  case(sf) : 
+    return "sf";
+  case(stat) : 
+    return "stat";
+  case(eig) : 
+    return "eig";
+  case(uncorr) : 
+    return "uncorr";
+  case(sys) : 
+    return "sys";
+  }
+  return "";
+}
 }
 
-namespace mapkey{
-    enum key{ sf =1,
-        stat=2,
-        eig=3,
-        uncorr=4,	      
-        sys=5,
-        end=6
-    };
-    const char* keytostring (int input){
-        switch(input){
-        case(sf) : 
-            return "sf";
-        case(stat) : 
-            return "stat";
-        case(eig) : 
-            return "eig";
-        case(uncorr) : 
-            return "uncorr";
-        case(sys) : 
-            return "sys";
-        }
-        return "";
-    }
+
+namespace{
+const std::string LowPt_string("LowPt");
+const std::vector<int> s_keys={mapkey::sf,mapkey::stat,mapkey::eig,mapkey::uncorr};
 }
 
+
 Root::TElectronEfficiencyCorrectionTool::TElectronEfficiencyCorrectionTool(const char *name) :
-    asg::AsgMessaging(std::string(name)),
-    m_doToyMC(false),
-    m_doCombToyMC(false),
-    m_detailLevel(2),
-    m_nToyMC(0),
-    m_seed(0),
-    m_nSysMax(0),
-    m_Rndm()
+  asg::AsgMessaging(std::string(name)),
+  m_doToyMC(false),
+  m_doCombToyMC(false),
+  m_nToyMC(0),
+  m_seed(0),
+  m_nSysMax(0),
+  m_Rndm()
 {
-    //Setup the keys
-    m_keys.push_back(mapkey::sf);
-    m_keys.push_back(mapkey::stat);
-    m_keys.push_back(mapkey::eig);
-    m_keys.push_back(mapkey::uncorr);
 }
 
 Root::TElectronEfficiencyCorrectionTool::~TElectronEfficiencyCorrectionTool() {
 
-    /*
-     * Need some gymnastic to make sure that the 
-     * TObjArray elements are owned and deleted ...
-     */
-    for (auto  &tempit : m_histList) {
-        for (unsigned int i = 0; i < tempit.second.size(); ++i) {
-            tempit.second.at(i).SetOwner(kTRUE);
-        }
-    }
-    for (auto  &tempit : m_fastHistList) {
-        for (unsigned int i = 0; i < tempit.second.size(); ++i) {
-            tempit.second.at(i).SetOwner(kTRUE);
-        }
-    }
-    for (auto  &tempit : m_sysList) {
-        for (auto  &i : tempit) {
-            i.SetOwner(kTRUE);
-        }
-    }
-    for (auto  &tempit :  m_fastSysList) {
-        for (auto  &i : tempit) {
-            i.SetOwner(kTRUE);
-        }
-    }
-    for (auto  &tempit : m_uncorrToyMCSystFull) {
-        for (auto & i : tempit) {
-            i.SetOwner(kTRUE);
-        }
-    }  
-    for (auto  &tempit : m_uncorrToyMCSystFast) {
-        for (auto & i : tempit) {
-            i.SetOwner(kTRUE);
-        }
-    }
+  /*
+   * Make sure that all TObjArray 
+   * elements are owned and deleted 
+   */
+  for (auto  &tempit : m_histList) {
+    for (unsigned int i = 0; i < tempit.second.size(); ++i) {
+      tempit.second.at(i).SetOwner(kTRUE);
+    }
+  }
+  for (auto  &tempit : m_fastHistList) {
+    for (unsigned int i = 0; i < tempit.second.size(); ++i) {
+      tempit.second.at(i).SetOwner(kTRUE);
+    }
+  }
+  for (auto  &tempit : m_sysList) {
+    for (auto  &i : tempit) {
+      i.SetOwner(kTRUE);
+    }
+  }
+  for (auto  &tempit :  m_fastSysList) {
+    for (auto  &i : tempit) {
+      i.SetOwner(kTRUE);
+    }
+  }
+  for (auto  &tempit : m_uncorrToyMCSystFull) {
+    for (auto & i : tempit) {
+      i.SetOwner(kTRUE);
+    }
+  }  
+  for (auto  &tempit : m_uncorrToyMCSystFast) {
+    for (auto & i : tempit) {
+      i.SetOwner(kTRUE);
+    }
+  }
 }
 
-// =============================================================================
-// Initialize this correction tool
-// =============================================================================
 int Root::TElectronEfficiencyCorrectionTool::initialize() {
-    // use an int as a StatusCode
-    int sc(1);
-
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: "
-            << __LINE__ << ") " << "Debug flag set. Printing verbose output!");
-
-    //Check if files are present
-    if (m_corrFileNameList.size() == 0) {
-        ATH_MSG_ERROR(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-                << " No file added!");
-        return 0;
-    }
-    ATH_MSG_DEBUG("Initializing tool with " << m_corrFileNameList.size() 
-            << " configuration file(s)");
-
-    // Check if the first file can be opened (needed for auto-setting of the seed based on the md5-sum of the file)
-    const std::unique_ptr<char> fname(gSystem->ExpandPathName(m_corrFileNameList[0].c_str()));
-    std::unique_ptr<TFile> rootFile_tmp = CxxUtils::make_unique<TFile> (fname.get(), "READ");
-    if (!rootFile_tmp) {
-        ATH_MSG_ERROR(
-                " (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-                << "No ROOT file found here: " << m_corrFileNameList[0]);
-        return 0;
-    }
-    rootFile_tmp->Close();
-    // close it back again
-    //
-    //invalid input requested
-    if (m_doToyMC && m_doCombToyMC) {
-        ATH_MSG_ERROR(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-                << " Both regular and combined toy MCs booked!" << " Only use one!");
-        return 0;
-    }
-    /*
-     * initialize the random number generator if toyMC propagation booked
-     * Use the 1st 4 bytes of the CheckSum of the reccomendation file
-     * as seed
-     */
-    if (m_doToyMC || m_doCombToyMC) {
-        if (m_seed == 0) {
-            std::unique_ptr<TMD5> tmd=CxxUtils::make_unique<TMD5>();
-            const char* tmd_as_string=tmd->FileChecksum(fname.get())->AsString();
-            m_seed = *(reinterpret_cast<const unsigned long int*>(tmd_as_string));
-            ATH_MSG_DEBUG("Seed (automatically) set to " << m_seed);
-        }else {
-            ATH_MSG_DEBUG("Seed set to " << m_seed);
-        }
-        m_Rndm= TRandom3(m_seed);
-    }
-    // Load the needed histograms
-    if (0 == getHistograms()) {
-        ATH_MSG_ERROR(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " << "! Problem when calling getHistograms()");
-        return 0;
-    }
-    const unsigned int nRunNumbersFull = m_begRunNumberList.size();
-    const unsigned int nRunNumbersFast = m_begRunNumberListFastSim.size();
-
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ") "
-            << "Found " << nRunNumbersFast << " run number ranges for fast sim with a total of " <<
-            m_fastHistList[mapkey::sf].size() << " scale factor histograms.");
-
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ") "
-            << "Found " << nRunNumbersFull << " run number ranges for full sim with a total of " <<
-            m_histList[mapkey::sf].size() << " scale factor histograms.");
-
-    /* 
-     * Set up the vector of the position of the corr syst 
-     * At this stage we should have the m_nSysMax and we know
-     * the beginning
-     * */
-    const size_t index_of_corr=static_cast<size_t> (Position::End);  
-    m_position_corrSys.resize(m_nSysMax);
-    for (int sys = 0; sys < m_nSysMax; ++sys) { 
-        m_position_corrSys[sys] = (index_of_corr + sys);
-    }  
-    /* 
-     * The same as above by now for the toys if applicable
-     */
-    const size_t index_of_toys=static_cast<size_t> (Position::End)+m_nSysMax;
-    m_position_uncorrToyMCSF.resize(m_nToyMC); 
-    for (int toy=0; toy < m_nToyMC; ++toy) {
-        m_position_uncorrToyMCSF[toy]=(index_of_toys+toy);
-    }
-
-    ATH_MSG_DEBUG("Tool succesfully initialized!");
-
-    return sc;
+  // use an int as a StatusCode
+  int sc(1);
+
+  ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: "
+                << __LINE__ << ")\n" << "Debug flag set. Printing verbose output!");
+
+  //Check if files are present
+  if (m_corrFileNameList.size() == 0) {
+    ATH_MSG_ERROR(" No file added!");
+    return 0;
+  }
+  ATH_MSG_DEBUG("Initializing tool with " << m_corrFileNameList.size() 
+                << " configuration file(s)");
+
+  /* 
+   * Check if the first file can be opened 
+   * It is needed for auto-setting of the seed based on the md5-sum of the file
+   */
+  const std::unique_ptr<char> fname(gSystem->ExpandPathName(m_corrFileNameList[0].c_str()));
+  std::unique_ptr<TFile> rootFile_tmp( TFile::Open(fname.get(), "READ") );
+  if (!rootFile_tmp) {
+    ATH_MSG_ERROR("No ROOT file found here: " << m_corrFileNameList[0]);
+    return 0;
+  }
+  rootFile_tmp->Close();
+  
+  if (m_doToyMC && m_doCombToyMC) {
+    ATH_MSG_ERROR(" Both regular and combined toy MCs booked!" << " Only use one!");
+    return 0;
+  }
+  /*
+   * initialize the random number generator if toyMC propagation booked
+   * Use the 1st 4 bytes of the CheckSum of the reccomendation file as seed
+   */
+  if (m_doToyMC || m_doCombToyMC) {
+    if (m_seed == 0) {
+      std::unique_ptr<TMD5> tmd=CxxUtils::make_unique<TMD5>();
+      const char* tmd_as_string=tmd->FileChecksum(fname.get())->AsString();
+      m_seed = *(reinterpret_cast<const unsigned long int*>(tmd_as_string));
+      ATH_MSG_DEBUG("Seed (automatically) set to " << m_seed);
+    }else {
+      ATH_MSG_DEBUG("Seed set to " << m_seed);
+    }
+    m_Rndm= TRandom3(m_seed);
+  }
+  /*
+   * Load the needed histograms
+   */
+  if (0 == getHistograms()) {
+    ATH_MSG_ERROR(" (file: " << __FILE__ << ", line: " << __LINE__ << ")\n" << "! Problem when calling getHistograms()");
+    return 0;
+  }
+  const unsigned int nRunNumbersFull = m_begRunNumberList.size();
+  const unsigned int nRunNumbersFast = m_begRunNumberListFastSim.size();
+
+  ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ")\n"
+                << "Found " << nRunNumbersFast << " run number ranges for fast sim with a total of " <<
+                m_fastHistList[mapkey::sf].size() << " scale factor histograms.");
+
+  ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ")\n"
+                << "Found " << nRunNumbersFull << " run number ranges for full sim with a total of " <<
+                m_histList[mapkey::sf].size() << " scale factor histograms.");
+
+   ATH_MSG_DEBUG("Tool succesfully initialized!");
+
+  return sc;
 }
 
 int 
 Root::TElectronEfficiencyCorrectionTool::calculate(const PATCore::ParticleDataType::DataType dataType,
-        const unsigned int runnumber,
-        const double cluster_eta,
-        const double et, /* in MeV */
-        std::vector<double>& result,
-        size_t& index_of_corr,
-        size_t& index_of_toys) const {
-
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-            << "  entering function calculate");
-    /* 
-     * At this point , since this is after initialize,
-     * we know the size of the vector we want to construct.
-     * it is :
-     * Position::End + m_nSysMax + m_nToyMC
-     * The starting index of the sys is Position::End 
-     * The starting point of the toys is Position::End+m_nSysMax
-     */
-    result.resize(static_cast<size_t> (Position::End)+m_nSysMax+m_nToyMC);
-    //Set up the non-0 defaults
-    result[static_cast<size_t> (Position::SF)]=-999;
-    result[static_cast<size_t> (Position::Total)]=1;
-
-    /*
-     * Set the known indices
-     */
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-            << "Set the indices"); 
-    if (m_nSysMax) {
-        index_of_corr=m_position_corrSys.at(0);
+                                                   const unsigned int runnumber,
+                                                   const double cluster_eta,
+                                                   const double et, /* in MeV */
+                                                   std::vector<double>& result,
+                                                   size_t& index_of_corr,
+                                                   size_t& index_of_toys) const {
+
+  /* 
+   * At this point, we know the size of the vector.
+   * Position::End + m_nSysMax + m_nToyMC
+   * The starting index of the sys is Position::End 
+   * The starting point of the toys is Position::End+m_nSysMax
+   */
+  ATH_MSG_DEBUG("Max number of systematics seen : " << m_nSysMax << " number of toys " <<m_nToyMC);
+  result.resize(static_cast<size_t> (Position::End)+m_nSysMax+m_nToyMC);
+  const size_t position_corrSys= static_cast<size_t> (Position::End);
+  const size_t position_uncorrToyMCSF=position_corrSys+m_nSysMax;
+  //Set up the non-0 defaults
+  result[static_cast<size_t> (Position::SF)]=-999;
+  result[static_cast<size_t> (Position::Total)]=1; 
+  if (m_nSysMax) {
+    index_of_corr=position_corrSys;
+  }
+  if (m_nToyMC) {
+    index_of_toys=position_uncorrToyMCSF;
+  } 
+  /* 
+   * Determine Simulation flavour and find the run period
+   */
+  const bool isFastSim=(dataType == PATCore::ParticleDataType::Fast) ? true: false;
+  int runnumberIndex = -1;
+  if (isFastSim) {
+    for (unsigned int i = 0; i < m_begRunNumberListFastSim.size(); ++i) {
+      if (m_begRunNumberListFastSim[i] <= runnumber && runnumber <= m_endRunNumberListFastSim[i]) {
+        runnumberIndex=i;
+        break;
+      }
+    }  
+  }else {
+    for (unsigned int i = 0; i < m_begRunNumberList.size(); ++i) {
+      if (m_begRunNumberList[i] <= runnumber && runnumber <= m_endRunNumberList[i]) {
+        runnumberIndex=i;
+        break;
+      }
+    }
+  }
+  if(runnumberIndex <0 ){  
+    ATH_MSG_DEBUG("(file: " << __FILE__ << ", line: " << __LINE__ << ")\n"<<
+                  "No valid run number period  found for the current run number: " 
+                  << runnumber <<" for simulation type: " << dataType); 
+    return 0;
+  }
+  /* What we have is a map :
+   * Key can be SF,Stat,Eigen,UnCorr
+   * Entry is a vector<TObArray> 
+   * Each vector<TObjArray>  has as many entries as supported Run periods.
+   * Each TObjjArray has 2D histos (could be standard, low-et, or forward electrons)
+   * The 2D Histo then has the number we want.
+   * What follows is the logic to get to this number.
+   */
+  const std::unordered_map<int, std::vector< TObjArray > >& currentmap = (isFastSim)? m_fastHistList : m_histList;
+  std::unordered_map<int, std::vector< TObjArray > >::const_iterator currentVector_itr = currentmap.find(mapkey::sf); 
+  /*
+   * See if we can find a  vector for key SF in the map 
+   * and then if we can get the  corresponding TObjArray 
+   * for the run period.
+   */
+  if (currentVector_itr == currentmap.end()) {
+    ATH_MSG_DEBUG("(file: " << __FILE__ << ", line: " << __LINE__ << ")\n"<<
+                  "No valid vector of sf ObjArray found for the current run number " 
+                  << runnumber<<" for simulation type: " << dataType);  
+    return 0;
+  } 
+  const std::vector<TObjArray>& currentVector=currentVector_itr->second;
+  if (currentVector.size()<=0 || runnumberIndex>= static_cast <int> (currentVector.size())) {
+    ATH_MSG_DEBUG("(file: " << __FILE__ << ", line: " << __LINE__ << ")\n"<<
+                  "No valid  sf ObjArray found for the current run number " 
+                  << runnumber<<" for simulation type: " << dataType);  
+    return 0;
+  }
+  /* 
+   * At this stage we have found the relevant TObjArray
+   * So we need to locate the right histogram.
+   */
+  const TObjArray& currentObjectArray = currentVector.at(runnumberIndex);  
+  const int entries = currentObjectArray.GetEntries();
+  /* 
+   * Now the logic of finding the histogram
+   * Some parts of the code can be perhaps improved ...
+   */
+  double xValue(et);
+  double yValue(cluster_eta);
+  int smallEt(0), etaCov(0), nSF(0);
+  bool invalid = false;
+  bool changedEt = false;
+  int index = -1;
+  TH2 *tmpHist(0);
+
+  for (int i = 0; i < entries ; ++i) {
+    invalid = false;
+
+    tmpHist = (TH2 *) (currentObjectArray.At(i));
+    //invalid if we are below minimum et 
+    if (et < tmpHist->GetXaxis()->GetXmin()) {
+      smallEt++;
+      invalid = true;
+    }
+    //invalid if we are above max eta 
+    if (std::abs(yValue) >= tmpHist->GetYaxis()->GetXmax()) {
+      etaCov++;
+      invalid=true;
+    }
+    // invalid if we are less than minimum eta (forward electrons)
+    if (std::abs(yValue) < tmpHist->GetYaxis()->GetXmin()) {
+      etaCov++;
+      invalid = true;
     }
-    if (m_nToyMC) {
-        index_of_toys=m_position_uncorrToyMCSF.at(0);
-    } 
     /* 
-     * Determine Simulation flavour
-     * And find the run period
+     * Invalid if above max et and is a low Et histogram.
+     * If not low Et histogram then change the xValue to the maximum
+     * availabe Et of ths histogram. As we assume that the  SF stays the same 
+     * for very high Et
      */
-    const bool isFastSim=(dataType == PATCore::ParticleDataType::Fast) ? true: false;
-    int runnumberIndex = -1;
-    if (isFastSim) {
-        for (unsigned int i = 0; i < m_begRunNumberListFastSim.size(); ++i) {
-            if (m_begRunNumberListFastSim[i] <= runnumber && runnumber <= m_endRunNumberListFastSim[i]) {
-                runnumberIndex=i;
-                break;
-            }
-        }  
-    }else {
-        for (unsigned int i = 0; i < m_begRunNumberList.size(); ++i) {
-            if (m_begRunNumberList[i] <= runnumber && runnumber <= m_endRunNumberList[i]) {
-                runnumberIndex=i;
-                break;
-            }
-        }
+    if (et > tmpHist->GetXaxis()->GetXmax()) {
+      if (TString(tmpHist->GetName()).Contains(LowPt_string)) {
+        invalid = true;
+      } else {
+        xValue = tmpHist->GetXaxis()->GetBinCenter(tmpHist->GetNbinsX());
+        changedEt = true;
+      }
     }
-    if(runnumberIndex <0 ){  
-        ATH_MSG_DEBUG("(file: " << __FILE__ << ", line: " << __LINE__ << ") "<<
-                "No valid run number period  found for the current run number: " 
-                << runnumber <<" for simulation type: " << dataType); 
-        return 0;
-    }
-    /* What we have is a map key:std::vector<TObjArray> 
-     * Key: sf,stat,eigen, uncorr
-     * The vector<TObArray> has as many entries as supported run periods
-     * The TobjArray has 2D histos for  high, low et, or forward electrons
-     * The 2D Histo then has the number we want.
-     * What follows is the logic to get to this number
-     */
-    const std::map<int, std::vector< TObjArray > >& currentmap = (isFastSim)? m_fastHistList : m_histList;
-    std::map<int, std::vector< TObjArray > >::const_iterator currentVector_itr = currentmap.find(mapkey::sf); //find the vector
-    //See if we can find a SF vector in the map and the corresponding TobjArray for this run period
-    if (currentVector_itr == currentmap.end()) {
-        ATH_MSG_DEBUG("(file: " << __FILE__ << ", line: " << __LINE__ << ") "<<
-                "No valid vector of sf ObjArray found for the current run number " 
-                << runnumber<<" for simulation type: " << dataType);  
-        return 0;
-    }
-    //Get a reference (synonym) to this vector 
-    const std::vector<TObjArray>& currentVector=currentVector_itr->second;
-    if (currentVector.size()<=0 || runnumberIndex>= static_cast <int> (currentVector.size())) {
-        ATH_MSG_DEBUG("(file: " << __FILE__ << ", line: " << __LINE__ << ") "<<
-                "No valid  sf ObjArray found for the current run number " 
-                << runnumber<<" for simulation type: " << dataType);  
-        return 0;
-    }
-    /* 
-     * At this stage we have found the relevant TobjArray
-     * So we need to locate the right histogram
-     */
-    const TObjArray& currentObjectArray = currentVector.at(runnumberIndex);  
-    const int entries = currentObjectArray.GetEntries();
-    /* 
-     * Now the logic of finding the histogram
-     * Perhaps one the points of the code that
-     * could be improved given some "feedback"
+    /*
+     * Get the histogram index in the TObjArray
+     * Also mark how many times we found something
+     * as SF should be unique
      */
-    double xValue(et);
-    double yValue(cluster_eta);
-    int smallEt(0), etaCov(0), nSF(0);
-    bool block = false;
-    bool changed = false;
-    int index = -1;
-    TH2 *tmpHist(0);
-    for (int i = 0; i < entries ; ++i) {
-        block = kFALSE;
-        tmpHist = (TH2 *) (currentObjectArray.At(i));
-        //block if we are below minimum et 
-        if (et < tmpHist->GetXaxis()->GetXmin()) {
-            smallEt++;
-            block = kTRUE;
-        }
-        //block if we are above max eta 
-        if (std::abs(yValue) >= tmpHist->GetYaxis()->GetXmax()) {
-            etaCov++;
-            block = kTRUE;
-        }
-        // Block if we are less than minimum (fwd electrons)
-        if (std::abs(yValue) < tmpHist->GetYaxis()->GetXmin()) {
-            etaCov++;
-            block = kTRUE;
-        }
-        //Block if above max et and is the low Et histo
-        if (et > tmpHist->GetXaxis()->GetXmax()) {
-            if (TString(tmpHist->GetName()).Contains(LowPt_string)) {
-                block = kTRUE;
-            } else {
-                xValue = tmpHist->GetXaxis()->GetBinCenter(tmpHist->GetNbinsX());
-                changed = kTRUE;
-            }
-        }
-        if (!block) {
-            index = i;
-            if (!changed) {
-                nSF++;
-            }
-        }
-    }
-    //We are out of bounds 
-    if (smallEt == entries) {
-        ATH_MSG_DEBUG("(file: " << __FILE__ << ", line: " << __LINE__ << ") "<<
-                "No correction factor provided for et " << xValue);  
-        return 0;
-    }
-    if (etaCov == entries) {
-        ATH_MSG_DEBUG("(file: " << __FILE__ << ", line: " << __LINE__ << ") "<<
-                "No correction factor provided for eta " << yValue);  
-        return 0;
-    }
-    if (nSF > 1) {
-        ATH_MSG_WARNING("More than 1 SF found for eta=" << yValue << " , et = " 
-                << et << " , run number = " << runnumber << ". Please check your input files!");
-    }
-    //Now we have the index of the histogram for this region in the TObjectarray 
-    TH2* currentHist(0);
-    if (index >= 0) {
-        currentHist = static_cast<TH2*> (currentObjectArray.At(index));
-    }
-    else {
-        ATH_MSG_DEBUG("(file: " << __FILE__ << ", line: " << __LINE__ << ") "<<
-                "No correction factor provided because of an invalid index" << yValue);
-        return 0;
-    }
-    // If SF is only given in Abs(eta) convert eta input to std::abs()
-    constexpr double epsilon = 1e-6;
-    if (currentHist->GetYaxis()->GetBinLowEdge(1) >= 0 - epsilon) {
-        if (yValue < 0) {
-            ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ") "
+    if (!invalid) {
+      index = i;
+      if (!changedEt) {
+        nSF++;
+      }
+    }
+  }
+  if (smallEt == entries) {
+    ATH_MSG_DEBUG("(file: " << __FILE__ << ", line: " << __LINE__ << ")\n"<<
+                  "No correction factor provided for et " << xValue);  
+    return 0;
+  }
+  if (etaCov == entries) {
+    ATH_MSG_DEBUG("(file: " << __FILE__ << ", line: " << __LINE__ << ")\n"<<
+                  "No correction factor provided for eta " << yValue);  
+    return 0;
+  }
+  if (nSF>1) {
+    ATH_MSG_WARNING("More than 1 SF found for eta=" << yValue << " , et = " 
+                    << et << " , run number = " << runnumber << ". Please check your input files!");
+  }
+  /*
+   * Now we have the index of the histogram 
+   * for this region in the TObjectArray
+   */
+  TH2* currentHist(0);
+  if (index >= 0) {
+    currentHist = static_cast<TH2*> (currentObjectArray.At(index));
+  }
+  else {
+    ATH_MSG_DEBUG("(file: " << __FILE__ << ", line: " << __LINE__ << ")\n"<<
+                  "No correction factor provided because of an invalid index" << yValue);
+    return 0;
+  }
+  /*
+   * If SF is only given in Abs(eta) convert eta input to std::abs()
+   */
+  constexpr double epsilon = 1e-6;
+  if (currentHist->GetYaxis()->GetBinLowEdge(1) >= 0 - epsilon) {
+    if (yValue < -1) {
+      ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ")\n"
                     << "Scale factor only measured in Abs(eta) changing eta from " 
                     << yValue << " to " << std::abs(yValue));
-        }
-        yValue = std::abs(yValue);
-    }
-    const int globalBinNumber = currentHist->FindFixBin(xValue, yValue);
-    const double scaleFactor = currentHist->GetBinContent(globalBinNumber);
-    const double scaleFactorErr = currentHist->GetBinError(globalBinNumber);
-    //
-    // Write the retrieved values into the return object
-    result[static_cast<size_t> (Position::SF)]=scaleFactor;
-    result[static_cast<size_t> (Position::Total)]=scaleFactorErr;
-    //DONE WITH THE SF
-    //
-    //DO the stat error using the available info from above i.e index etc
-    double statErr = -999;
-    currentVector_itr = currentmap.find(mapkey::stat); //find the vector
-    if (currentVector_itr != currentmap.end()) {
-        //itr at the location of the vector, .second get the vector, at(runnumberIndex is the TObjectArray 
-        // for the period , finaly get the hist at index (from above).
-        const TH1 *stat = static_cast<TH1*>(currentVector_itr->second.at(runnumberIndex).At(index));
-        statErr = stat->GetBinContent(globalBinNumber);
-        result[static_cast<size_t> (Position::Stat)]=statErr;
-    }
-    /*
-     * Check if the correlated reduced
-     * due to the detail level
-     */ 
-    std::array<int,detailLevelEnd> sLevel{};    
-    currentVector_itr = currentmap.find(mapkey::eig); //find the vector
-    if (currentVector_itr != currentmap.end()) {
-        //Check on the ObjArray
-        if (currentVector_itr->second.at(runnumberIndex).GetEntriesFast()> 0) {
-            //itr at the location of the vector, .second get the vector, at(runnumberIndex is the TObjectArray 
-            // for the period , finaly get the hist at index (from above).
-            const TH1D *eig = static_cast<const TH1D*>(currentVector_itr->second.at(runnumberIndex).At(index)); 
-            int nSys{};
-            calcDetailLevels(eig, sLevel,nSys);
-            nSys-=sLevel[m_detailLevel];
-            result[static_cast<size_t> (Position::NSys)]=nSys;
-        }
-    }
-    /*The issue now is that the previous setup is becoming cumbersome for the 10 systematic
-     * So we keep them in a vector of vector of TObjectArray
-     * The first vector index being the runnumber
-     * The second the systematic
-     * And the obj array for high low etc
-     * We need to see if we can do something better here ...
-     */
-    const std::vector< std::vector< TObjArray > > &sysList = (isFastSim) ? m_fastSysList : m_sysList;
-    std::vector<double> corrSys; 
-    corrSys.reserve(10); 
-    corrSys.clear();
-    if (sysList.size() > static_cast<unsigned int> (index)) {
-        if (sysList.at(index).size() > static_cast<unsigned int> (runnumberIndex)) {
-            const int sys_entries = sysList.at(index).at( runnumberIndex).GetEntries();
-            for (int sys = 0; sys < sys_entries; ++sys) {
-                tmpHist = (TH2 *) sysList.at(index).at(runnumberIndex).At(sys_entries - 1 - sys);
-                corrSys.push_back(tmpHist->GetBinContent(globalBinNumber));
-                result[m_position_corrSys[(sys_entries - 1 - sys)]] =corrSys[sys];
-            }
-            if (m_position_corrSys.size() > 0 && sys_entries<=1) {
-                if (result[m_position_corrSys[0]] == 0) {
-                    result[m_position_corrSys[0]]=scaleFactorErr;
-                }
-            }
-        }
-    }
-    //Do the uncorr error using the available info from above i.e index etc
-    //Get the statErr from above
-    double val = statErr;
-    currentVector_itr = currentmap.find(mapkey::uncorr); //find the vector
-    if (currentVector_itr != currentmap.end()) {
-        //Check on the ObjArray
-        if (currentVector_itr->second.at(runnumberIndex).GetEntriesFast()>0) {
-            TH1 *uncorr = static_cast<TH1*>(currentVector_itr->second.at(runnumberIndex).At(index));
-            const double valAdd = uncorr->GetBinContent(globalBinNumber);
-            val = sqrt(val * val + valAdd * valAdd);
-            for (int i = 0; i < sLevel[m_detailLevel]; ++i) {
-                const double valAdd1 = corrSys.at(corrSys.size() - 1 - i);
-                val = sqrt(val * val + valAdd1 * valAdd1);
-            }
-        }
-    }
-    if (val == -999) {
-        val = 0;
-    }
-    result[static_cast<size_t> (Position::UnCorr)]=val;
-    /* 
-     * Do the toys
-     */
-    if (m_doToyMC || m_doCombToyMC) {
-        const std::vector<std::vector<TObjArray > >& toyMCList = ((isFastSim) ? m_uncorrToyMCSystFast : m_uncorrToyMCSystFull);
-        if (toyMCList.size() > (unsigned int) runnumberIndex) {
-            for (int toy = 0; toy < m_nToyMC; toy++) {
-                if (toyMCList.at(runnumberIndex).at(toy).GetLast() >= index) {
-                    result[m_position_uncorrToyMCSF.at(toy)]=
-                        ((TH2 *) toyMCList.at(runnumberIndex).at(toy).At(index))->GetBinContent(globalBinNumber);
-                }
-            }
-        }
-    }
-    result[static_cast<size_t> (Position::GlobalBinNumber)]=globalBinNumber;
-    return 1;
-}
-
-/*
- *Calculate the detail levels for a given eigenvector histogram
- * Since the syst are in practice eigenvalues 
- * the smaller ones could be disgarded added to uncorrelated
- */
-void
-Root::TElectronEfficiencyCorrectionTool::calcDetailLevels(
-        const TH1D *eig, 
-        std::array<int,detailLevelEnd>& sLevel,
-        int& nSys) const {
-
-    sLevel[Root::TElectronEfficiencyCorrectionTool::simple] = 0;
-    sLevel[Root::TElectronEfficiencyCorrectionTool::medium] = 0;
-    sLevel[Root::TElectronEfficiencyCorrectionTool::detailed] = 0;
-    nSys = eig->GetNbinsX() - 1;
-    double sign = 0;
-    // Calculate detail level
-    for (int i = nSys + 1; i >= 2; i--) {
-        sign += eig->GetBinContent(i);
-        if (sign > 0.8 && sLevel[Root::TElectronEfficiencyCorrectionTool::simple] == 0) {
-            sLevel[Root::TElectronEfficiencyCorrectionTool::simple] = i - 2;
-        }
-        if (sign > 0.95 && sLevel[Root::TElectronEfficiencyCorrectionTool::medium] == 0) {
-            sLevel[Root::TElectronEfficiencyCorrectionTool::medium] = i - 2;
-        }
     }
+    yValue = std::abs(yValue);
+  }
+  const int globalBinNumber = currentHist->FindFixBin(xValue, yValue);
+  const double scaleFactor = currentHist->GetBinContent(globalBinNumber);
+  const double scaleFactorErr = currentHist->GetBinError(globalBinNumber);
+  /* 
+   * Write the retrieved values to the output
+   * */
+  result[static_cast<size_t> (Position::SF)]=scaleFactor;
+  result[static_cast<size_t> (Position::Total)]=scaleFactorErr;
+  /*
+   * Do the stat error using the available info from the above (SF)
+   */
+  double statErr = -999;
+  currentVector_itr = currentmap.find(mapkey::stat); 
+  if (currentVector_itr != currentmap.end()) {
+    const TH1 *stat = static_cast<TH1*>(currentVector_itr->second.at(runnumberIndex).At(index));
+    statErr = stat->GetBinContent(globalBinNumber);
+    result[static_cast<size_t> (Position::Stat)]=statErr;
+  }
+  /*
+   * Do the Uncorr  uncertainty
+   */
+  double val = statErr;
+  currentVector_itr = currentmap.find(mapkey::uncorr); 
+  if (currentVector_itr != currentmap.end()) {
+    if (currentVector_itr->second.at(runnumberIndex).GetEntriesFast()>0) {
+     TH1 *uncorr = static_cast<TH1*>(currentVector_itr->second.at(runnumberIndex).At(index));
+      const double valAdd = uncorr->GetBinContent(globalBinNumber);
+      val = sqrt(val * val + valAdd * valAdd);
+    }
+  }
+  result[static_cast<size_t> (Position::UnCorr)]=val; 
+  /* 
+   * The previous setup is becoming cumbersome 
+   * for the N~16 systematic variations.
+   * So we keep them in a vector of vector of TObjectArray
+   * The first vector index being the runnumber
+   * The second the systematic
+   * And them the TObjArray for high low etc.
+   * We invert the order in the output
+   */
+  const std::vector< std::vector< TObjArray > > &sysList = (isFastSim) ? m_fastSysList : m_sysList;
+  std::vector<double> corrSys; 
+  corrSys.reserve(16); 
+  corrSys.clear();
+  if (sysList.size() > static_cast<unsigned int> (index)) {
+    if (sysList.at(index).size() > static_cast<unsigned int> (runnumberIndex)) {
+      const int sys_entries = sysList.at(index).at( runnumberIndex).GetEntries();
+      for (int sys = 0; sys < sys_entries; ++sys) {
+        tmpHist = (TH2 *) sysList.at(index).at(runnumberIndex).At(sys_entries - 1 - sys);
+        corrSys.push_back(tmpHist->GetBinContent(globalBinNumber));
+        result[position_corrSys + sys_entries - 1 - sys] =corrSys[sys];
+        }
+      if (m_nSysMax > 0 && sys_entries<=1) {
+        if (result[position_corrSys] == 0) {
+            result[position_corrSys]=scaleFactorErr;
+        }
+      }
+    }
+  }
+  /* 
+   * Do the toys
+   */
+  if (m_doToyMC || m_doCombToyMC) {
+    const std::vector<std::vector<TObjArray > >& toyMCList = ((isFastSim) ? m_uncorrToyMCSystFast : m_uncorrToyMCSystFull);
+    if (toyMCList.size() > (unsigned int) runnumberIndex) {
+      for (int toy = 0; toy < m_nToyMC; toy++) {
+        if (toyMCList.at(runnumberIndex).at(toy).GetLast() >= index) {
+          result[position_uncorrToyMCSF+toy]=
+            ((TH2 *) toyMCList.at(runnumberIndex).at(toy).At(index))->GetBinContent(globalBinNumber);
+        }
+      }
+    }
+  }
+  result[static_cast<size_t> (Position::GlobalBinNumber)]=globalBinNumber;
+  return 1;
 }
 /*
  * Build the toyMC tables from inputs
  * Ownership should be tranfered to the map of the tables
  * and the proper delete happens in the dtor
  */
-std::vector<TH2D *>
-Root::TElectronEfficiencyCorrectionTool::buildSingleToyMC(
-        const TH2D *sf, 
-        const TH2D *stat, 
-        const TH2D *uncorr, 
-        const TObjArray& corr,
-        const std::array<int,detailLevelEnd> sLevel,
-        int& randomCounter) {
-
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ")! " 
-            << "entering function buildSingleToyMC");
-    std::vector<TH2D*> tmpHists;
-    int nBins = (stat->GetNbinsX() + 2) * (stat->GetNbinsY() + 2);
-    for (int toy = 0; toy < m_nToyMC; toy++) {
-        tmpHists.push_back((TH2D *) corr.At(0)->Clone());
+std::vector<TH2 *>
+Root::TElectronEfficiencyCorrectionTool::buildSingleToyMC(const TH2 *sf, 
+                                                          const TH2 *stat, 
+                                                          const TH2 *uncorr, 
+                                                          const TObjArray& corr,
+                                                          int& randomCounter) {
+
+  ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ")! " 
+                << "Entering function buildSingleToyMC");
+  std::vector<TH2*> tmpHists;
+  int nBins = (stat->GetNbinsX() + 2) * (stat->GetNbinsY() + 2);
+  for (int toy = 0; toy < m_nToyMC; toy++) {
+    tmpHists.push_back((TH2 *) corr.At(0)->Clone());
+  }
+  // Loop over all bins
+  for (int bin = 0; bin < nBins; bin++) {
+    double val = stat->GetBinContent(bin);
+
+    // Add uncorrelated systematics
+    if (uncorr != 0) {
+      double valAdd = uncorr->GetBinContent(bin);
+      val = sqrt(val * val + valAdd * valAdd);
     }
-    // Loop over all bins
-    for (int bin = 0; bin < nBins; bin++) {
-        double val = stat->GetBinContent(bin);
-
-        // Add uncorrelated systematics
-        if (uncorr != 0) {
-            double valAdd = uncorr->GetBinContent(bin);
-            val = sqrt(val * val + valAdd * valAdd);
-        }
-        // Add smaller correlated systematics as uncorrelated
-        for (int i = 0; i < sLevel[m_detailLevel]; ++i) {
-            if (corr.At(i) != 0) {
-                double valAdd = ((TH2D *) corr.At(i))->GetBinContent(bin);
-                val = sqrt(val * val + valAdd * valAdd);
-            }
-        }
-        for (int toy = 0; toy < m_nToyMC; toy++) {
-            tmpHists.at(toy)->SetBinContent(bin, (val * m_Rndm.Gaus(0, 1)) + sf->GetBinContent(bin));
-            randomCounter++;
-            tmpHists.at(toy)->SetDirectory(0);
-        }
+    for (int toy = 0; toy < m_nToyMC; toy++) {
+      tmpHists.at(toy)->SetBinContent(bin, (val * m_Rndm.Gaus(0, 1)) + sf->GetBinContent(bin));
+      randomCounter++;
+      tmpHists.at(toy)->SetDirectory(0);
     }
-    return tmpHists;
+  }
+  return tmpHists;
 }
 /*
  * Build the combined toyMC tables from inputs
  * Ownership should be tranfered to the map of the tables
  * and the proper delete happens in the dtor
  */
-TH2D*
-Root::TElectronEfficiencyCorrectionTool::buildSingleCombToyMC(
-        const TH2D *sf, 
-        const TH2D *stat, 
-        const TH2D *uncorr, 
-        const TObjArray& corr,
-        const std::array<int,detailLevelEnd> sLevel,
-        const int nSys,
-        int& randomCounter){
-
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-            << "entering function buildSingleCombToyMC");
-
-    TH2D *tmpHist;
-    const int nBins = (stat->GetNbinsX() + 2) * (stat->GetNbinsY() + 2);
-    tmpHist = (TH2D *) corr.At(0)->Clone();
-    // Create random numbers for the corr. uncertainties
-    std::vector<double> rnd (nSys,0);
+TH2*
+Root::TElectronEfficiencyCorrectionTool::buildSingleCombToyMC(const TH2 *sf, 
+                                                              const TH2 *stat, 
+                                                              const TH2 *uncorr, 
+                                                              const TObjArray& corr,
+                                                              const int nSys,
+                                                              int& randomCounter){
+
+  ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ")\n" 
+                << "Entering function buildSingleCombToyMC");
+
+  TH2 *tmpHist;
+  const int nBins = (stat->GetNbinsX() + 2) * (stat->GetNbinsY() + 2);
+  tmpHist = (TH2 *) corr.At(0)->Clone();
+  // Create random numbers for the corr. uncertainties
+  std::vector<double> rnd (nSys,0);
+  for (int s = 0; s < nSys; ++s) {
+    rnd[s] = m_Rndm.Gaus(0, 1);
+    randomCounter++;
+  }
+  // Loop over all bins
+  for (int bin = 0; bin < nBins; ++bin) {
+    double val = stat->GetBinContent(bin);
+
+    // Add uncorrelated systematics
+    if (uncorr != 0) {
+      double valAdd = uncorr->GetBinContent(bin);
+      val = sqrt(val * val + valAdd * valAdd);
+    }
+    val = val * m_Rndm.Gaus(0,1);
+    randomCounter++;
+    // Add larger correlated systematics
     for (int s = 0; s < nSys; ++s) {
-        rnd[s] = m_Rndm.Gaus(0, 1);
-        randomCounter++;
-    }
-    // Loop over all bins
-    for (int bin = 0; bin < nBins; ++bin) {
-        double val = stat->GetBinContent(bin);
-
-        // Add uncorrelated systematics
-        if (uncorr != 0) {
-            double valAdd = uncorr->GetBinContent(bin);
-            val = sqrt(val * val + valAdd * valAdd);
-        }
-        // Add smaller correlated systematics as uncorrelated
-        for (int s = 0; s < sLevel[m_detailLevel]; ++s) {
-            if (corr.At(s) != 0) {
-                double valAdd = ((TH2D *) corr.At(s))->GetBinContent(bin);
-                val = sqrt(val * val + valAdd * valAdd);
-            }
-        }
-        val = val * m_Rndm.Gaus(0,1);
-        randomCounter++;
-        // Add larger correlated systematics
-        for (int s = sLevel[m_detailLevel]; s < nSys; ++s) {
-            if (corr.At(s) != 0) {
-                val += ((TH2D *) corr.At(s))->GetBinContent(bin) * rnd[s];
-            }
-        }
-        tmpHist->SetBinContent(bin, val + sf->GetBinContent(bin));
-    }
-    tmpHist->SetDirectory(0);
-    return tmpHist;
+      if (corr.At(s) != 0) {
+        val += ((TH2 *) corr.At(s))->GetBinContent(bin) * rnd[s];
+      }
+    }
+    tmpHist->SetBinContent(bin, val + sf->GetBinContent(bin));
+  }
+  tmpHist->SetDirectory(0);
+  return tmpHist;
 }
 /*
  * Build the toyMC tables from inputs
  */
 std::vector<TObjArray>
 Root::TElectronEfficiencyCorrectionTool::buildToyMCTable(const TObjArray& sf, 
-        const TObjArray& eig, 
-        const TObjArray& stat,
-        const TObjArray& uncorr, 
-        const std::vector<TObjArray>& corr) {
-
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-            << "entering function buildToyMCTable");
-    
-    std::array<int,detailLevelEnd> sLevel{}; 
-    int nSys{};
-    int randomCounter(0);
-    std::vector<TObjArray> tmpVec;
-    const int stat_entries = stat.GetEntries();
-
-    if (m_doCombToyMC) {
-        for (int toyMC = 0; toyMC < m_nToyMC; toyMC++) {
-            TObjArray tmpArray;
-            for (int i = 0; i < stat_entries; ++i) {
-                if (eig.GetEntriesFast()>0 && uncorr.GetEntriesFast()>0) {
-                    std::array<int,detailLevelEnd> sLevel{};    
-                    int nSys{};
-                    calcDetailLevels((TH1D *) eig.At(i), sLevel,nSys);
-                    tmpArray.Add(buildSingleCombToyMC((TH2D *) sf.At(i), 
-                                (TH2D *) stat.At(i), 
-                                (TH2D *) uncorr.At(i), 
-                                corr.at(i),
-                                sLevel,
-                                nSys,
-                                randomCounter));
-                }else {
-                    tmpArray.Add(buildSingleCombToyMC((TH2D *) sf.At(i), 
-                                (TH2D *) stat.At(i), 
-                                0, 
-                                corr.at(i) ,
-                                sLevel,
-                                nSys,
-                                randomCounter));
-                }
-            }
-            tmpVec.push_back(tmpArray);
-        }
-    }else {
-        std::vector< std::vector<TH2D*> > tmpVec2 ;
-        for (int i = 0; i < stat_entries; ++i) {
-            calcDetailLevels((TH1D *) eig.At(i),sLevel,nSys);
-            tmpVec2.push_back(buildSingleToyMC((TH2D *) sf.At(i), 
-                        (TH2D *) stat.At(i), 
-                        (TH2D *) uncorr.At(i),
-                        corr.at(i),
-                        sLevel,
-                        randomCounter));
-        }
-        for (int toy = 0; toy < m_nToyMC; toy++) {
-            TObjArray tmpArray;
-            for (unsigned int i = 0; i < tmpVec2.size(); ++i) {
-                tmpArray.Add(tmpVec2.at(i).at(toy));
-            }
-            tmpVec.push_back(tmpArray);
-        }
+                                                         const TObjArray& eig, 
+                                                         const TObjArray& stat,
+                                                         const TObjArray& uncorr, 
+                                                         const std::vector<TObjArray>& corr) {
+
+  ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ")\n" 
+                << "Entering function buildToyMCTable");
+
+  int nSys{};
+  int randomCounter(0);
+  std::vector<TObjArray> tmpVec;
+  const int stat_entries = stat.GetEntries();
+  if (m_doCombToyMC) {
+    for (int toyMC = 0; toyMC < m_nToyMC; toyMC++) {
+      TObjArray tmpArray;
+      for (int i = 0; i < stat_entries; ++i) {
+        if (eig.GetEntriesFast()>0 && uncorr.GetEntriesFast()>0) { 
+          nSys = ((TH1*)eig.At(i))->GetNbinsX()-1;  
+          tmpArray.Add(buildSingleCombToyMC((TH2 *) sf.At(i), 
+                                            (TH2 *) stat.At(i), 
+                                            (TH2 *) uncorr.At(i), 
+                                            corr.at(i),
+                                            nSys,
+                                            randomCounter));
+        }else {
+          tmpArray.Add(buildSingleCombToyMC((TH2*) sf.At(i), 
+                                            (TH2*) stat.At(i), 
+                                            0, 
+                                            corr.at(i) ,
+                                            nSys,
+                                            randomCounter));
+        }
+      }
+      tmpVec.push_back(tmpArray);
+    }
+  }else {
+    std::vector< std::vector<TH2*> > tmpVec2 ;
+    for (int i = 0; i < stat_entries; ++i) {
+      nSys = ((TH1*)eig.At(i))->GetNbinsX()-1;
+      tmpVec2.push_back(buildSingleToyMC((TH2*) sf.At(i), 
+                                         (TH2*) stat.At(i), 
+                                         (TH2*) uncorr.At(i),
+                                         corr.at(i),
+                                         randomCounter));
     }
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-            << "m_Rndm->Uniform(0, 1) after throwing " << randomCounter
-            << " random numbers: " << m_Rndm.Uniform(0,1));
-
-    return tmpVec;
+    for (int toy = 0; toy < m_nToyMC; toy++) {
+      TObjArray tmpArray;
+      for (unsigned int i = 0; i < tmpVec2.size(); ++i) {
+        tmpArray.Add(tmpVec2.at(i).at(toy));
+      }
+      tmpVec.push_back(tmpArray);
+    }
+  }
+  ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ")\n" 
+                << "m_Rndm->Uniform(0, 1) after throwing " << randomCounter
+                << " random numbers: " << m_Rndm.Uniform(0,1));
+
+  return tmpVec;
 }
-// =============================================================================
-// Helper function to retrieve number of uncorrelated bins
-// =============================================================================
+/*
+ * Helper function to retrieve number of uncorrelated bins
+ */
 int
 Root::TElectronEfficiencyCorrectionTool::getNbins(std::map<float, std::vector<float> > &pt_eta1) const {
-    //Get sf histograms 
-    const std::vector<TObjArray >& tmpVec = m_histList.at(mapkey::sf);
-    int nbinsTotal = 0;
-    pt_eta1.clear();
-    std::vector<float>eta1;
-    eta1.clear();
-
-    //Loop over the different run ranges (one TObjeArray for each)
-    for (unsigned int ikey = 0; ikey < tmpVec.size(); ++ikey) {
-        //Loop over the histograms for a given run numbers
-        for (int entries = 0; entries < (tmpVec.at(ikey)).GetEntries(); ++entries) {
-            eta1.clear();
-            //Get number of bins
-            TH2D *h_tmp = ((TH2D * ) (tmpVec.at(ikey)).At(entries));
-            int nbinsX = h_tmp->GetNbinsX();
-            int nbinsY = h_tmp->GetNbinsY();
-            //fill in the eta pushing back
-            for (int biny = 1; biny <= nbinsY; ++biny) {
-                eta1.push_back(h_tmp->GetYaxis()->GetBinLowEdge(biny));
-            }
-            //associate each pt (bin) with the corresponding/available eta ones
-            for (int binx = 1; binx <=nbinsX; ++binx) {
-                pt_eta1[h_tmp->GetXaxis()->GetBinLowEdge(binx)] = eta1;
-            }
-        }
-    }
-    for (auto &i : pt_eta1) {
-        nbinsTotal += i.second.size();
-    }
-    return nbinsTotal;
+  //Get sf histograms 
+  const std::vector<TObjArray >& tmpVec = m_histList.at(mapkey::sf);
+  int nbinsTotal = 0;
+  pt_eta1.clear();
+  std::vector<float>eta1;
+  eta1.clear();
+
+  //Loop over the different Run range (one TObjeArray for each)
+  for (unsigned int ikey = 0; ikey < tmpVec.size(); ++ikey) {
+    //Loop over the histograms for a given run numbers
+    for (int entries = 0; entries < (tmpVec.at(ikey)).GetEntries(); ++entries) {
+      eta1.clear();
+      //Get number of bins
+      TH2 *h_tmp = ((TH2 * ) (tmpVec.at(ikey)).At(entries));
+      int nbinsX = h_tmp->GetNbinsX();
+      int nbinsY = h_tmp->GetNbinsY();
+      //fill in the eta pushing back
+      for (int biny = 1; biny <= nbinsY; ++biny) {
+        eta1.push_back(h_tmp->GetYaxis()->GetBinLowEdge(biny));
+      }
+      //associate each pt (bin) with the corresponding/available eta ones
+      for (int binx = 1; binx <=nbinsX; ++binx) {
+        pt_eta1[h_tmp->GetXaxis()->GetBinLowEdge(binx)] = eta1;
+      }
+    }
+  }
+  for (auto &i : pt_eta1) {
+    nbinsTotal += i.second.size();
+  }
+  return nbinsTotal;
 }
-// =============================================================================
-// Get the input histograms from the input files
-// =============================================================================
+/*
+ * Get the  histograms from the input files
+ */
 int Root::TElectronEfficiencyCorrectionTool::getHistograms() {
 
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-            << "entering function getHistograms");
-    // Cache the current directory in the root file
-    TDirectory *origDir = gDirectory;
-    // -------------------------------------------------------
-    // Get the name of the first input ROOT file and
-    // interpret from that what we have:
-    // efficiency vs. efficiencySF; offline vs. trigger; medium, loose,...
-    // -------------------------------------------------------
-    if (!m_corrFileNameList.empty()) {
-        TString firstFileNameAndPath = m_corrFileNameList[0].c_str();
-        std::unique_ptr<TObjArray> myStringList(firstFileNameAndPath.Tokenize("/"));
-        int lastIdx = myStringList->GetLast();
-        TString fileName = ((TObjString *) myStringList->At(lastIdx))->GetString();
-        std::unique_ptr<TObjArray> myFileNameTokensList(fileName.Tokenize("."));
-
-        if (myFileNameTokensList->GetLast() < 3) {
-            ATH_MSG_ERROR(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-                    << "input file name has wrong format!");
-            return 0;
-        }
-
-    }
-    // -------------------------------------------------------
-    // Get all ROOT files and histograms
-    // -------------------------------------------------------
-    for (unsigned int i = 0; i < m_corrFileNameList.size(); ++i) {
-        // Load the ROOT file
-        const std::unique_ptr<char> fname (gSystem->ExpandPathName(m_corrFileNameList[i].c_str()));
-        std::unique_ptr<TFile> rootFile = CxxUtils::make_unique<TFile> (fname.get(), "READ");
-        if (!rootFile) {
-            ATH_MSG_ERROR(
-                    " (file: " << __FILE__ << ", line: " << __LINE__ << ") " << "No ROOT file found here: " <<
-                    m_corrFileNameList[i]);
-            return 0;
-        }
-        // Loop over all directories inside the root file (correspond to the run number ranges
-        TIter nextdir(rootFile->GetListOfKeys());
-        TKey *dir;
-        TObject *obj;
-        while ((dir = (TKey *) nextdir())) {
-            obj = dir->ReadObj();
-            if (obj->IsA()->InheritsFrom("TDirectory")) {
-                // splits string by delimiter --> e.g RunNumber1_RunNumber2
-                TObjArray dirNameArray = *(TString(obj->GetName()).Tokenize("_"));
-                //// returns index of last string --> if one, the directory name does not contain any run numbers
-                int lastIdx = dirNameArray.GetLast();
-                if (lastIdx != 1) {
-                    ATH_MSG_ERROR(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-                            << "The folder name seems to have the wrong format! Directory name:"
-                            << obj->GetName());
-                    return 0;
-                }
-                rootFile->cd(obj->GetName());
-                if (0 == this->setupHistogramsInFolder(dirNameArray, lastIdx)) {
-                    ATH_MSG_ERROR(
-                            " (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-                            << "unable to setup the histograms in directory " << dir->GetName()
-                            << "in file " << m_corrFileNameList[i]);
-                    return 0;
-                }
-            }else {
-                ATH_MSG_ERROR(
-                        " (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-                        << "Wrong file content! Expected only Directories " <<
-                        gDirectory->cd());
-                return 0;
-            }
-            // Return to the original ROOT directory
-            gDirectory = origDir;
-        } // End: directory loop
-    } // End: file loop
-    return 1;
+  ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ")\n" 
+                << "Entering function getHistograms");
+  // Cache the current directory in the root file
+  TDirectory *origDir = gDirectory;
+  /*
+   * Get the name of the first input ROOT file and
+   * interpret from that what we have:
+   * efficiency vs. efficiencySF; offline vs. trigger; medium, loose,...
+   */
+  if (!m_corrFileNameList.empty()) {
+    TString firstFileNameAndPath = m_corrFileNameList[0].c_str();
+    std::unique_ptr<TObjArray> myStringList(firstFileNameAndPath.Tokenize("/"));
+    int lastIdx = myStringList->GetLast();
+    TString fileName = ((TObjString *) myStringList->At(lastIdx))->GetString();
+    std::unique_ptr<TObjArray> myFileNameTokensList(fileName.Tokenize("."));
+
+    if (myFileNameTokensList->GetLast() < 3) {
+      ATH_MSG_ERROR("input file name has wrong format!");
+      return 0;
+    }
+  }
+  /*
+   * Get all ROOT files and histograms
+   */
+
+  for (unsigned int i = 0; i < m_corrFileNameList.size(); ++i) {
+    // Load the ROOT file
+    const std::unique_ptr<char> fname (gSystem->ExpandPathName(m_corrFileNameList[i].c_str()));
+    std::unique_ptr<TFile> rootFile( TFile::Open(fname.get(), "READ") );
+    if (!rootFile) {
+      ATH_MSG_ERROR( "No ROOT file found here: " <<m_corrFileNameList[i]);
+      return 0;
+    }
+    // Loop over all directories inside the root file (correspond to the run number ranges
+    TIter nextdir(rootFile->GetListOfKeys());
+    TKey *dir;
+    TObject *obj;
+    while ((dir = (TKey *) nextdir())) {
+      obj = dir->ReadObj();
+      if (obj->IsA()->InheritsFrom("TDirectory")) {
+        // splits string by delimiter --> e.g RunNumber1_RunNumber2
+        TObjArray dirNameArray = *(TString(obj->GetName()).Tokenize("_"));
+        // returns index of last string --> if one, the directory name does not contain any run numbers
+        int lastIdx = dirNameArray.GetLast();
+        if (lastIdx != 1) {
+          ATH_MSG_ERROR("The folder name seems to have the wrong format! Directory name:"<< obj->GetName());
+          return 0;
+        }
+        rootFile->cd(obj->GetName());
+        if (0 == this->setupHistogramsInFolder(dirNameArray, lastIdx)) {
+          ATH_MSG_ERROR("Unable to setup the histograms in directory " << dir->GetName()
+                        << "in file " << m_corrFileNameList[i]);
+          return 0;
+        }
+      }else {
+        ATH_MSG_ERROR( "Wrong file content! Expected only Directories " <<
+                      gDirectory->cd());
+        return 0;
+      }
+      // Return to the original ROOT directory
+      gDirectory = origDir;
+    } // End: directory loop
+  } // End: file loop
+  return 1;
 }
-// =============================================================================
-// Get the input histograms from a given folder/run number range
-// =============================================================================
+/*
+ * Get the input histograms from a given folder/run number range
+ */
 int Root::TElectronEfficiencyCorrectionTool::setupHistogramsInFolder(const TObjArray& dirNameArray, int lastIdx) {
 
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-            << "entering funtion setupHistogramsInFolder");
-
-    int runNumBegin(-1);
-    TString myBegRunNumString = ((TObjString *) dirNameArray.At(lastIdx - 1))->GetString();
-    if (myBegRunNumString.IsDigit()) {
-        runNumBegin = myBegRunNumString.Atoi();
-    }
-    int runNumEnd(-1);
-    TString myEndRunNumString = ((TObjString *) dirNameArray.At(lastIdx))->GetString();
-    if (myEndRunNumString.IsDigit()) {
-        runNumEnd = myEndRunNumString.Atoi();
-    }
-    if (runNumBegin < 0 || runNumEnd < 0 || runNumEnd < runNumBegin) {
-        ATH_MSG_ERROR(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-                << "Could NOT interpret the run number range: " << runNumBegin
-                << " - " << runNumEnd);
+  ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ")\n" 
+                << "Entering funtion setupHistogramsInFolder");
+
+  int runNumBegin(-1);
+  TString myBegRunNumString = ( (TObjString*) dirNameArray.At(lastIdx - 1) )->GetString();
+  if (myBegRunNumString.IsDigit()) {
+    runNumBegin = myBegRunNumString.Atoi();
+  }
+  int runNumEnd(-1);
+  TString myEndRunNumString = ( (TObjString *) dirNameArray.At(lastIdx) )->GetString();
+  if (myEndRunNumString.IsDigit()) {
+    runNumEnd = myEndRunNumString.Atoi();
+  }
+  if (runNumBegin < 0 || runNumEnd < 0 || runNumEnd < runNumBegin) {
+    ATH_MSG_ERROR(" (file: " << __FILE__ << ", line: " << __LINE__ << ")\n" 
+                  << "Could NOT interpret the run number range: " << runNumBegin
+                  << " - " << runNumEnd);
+    return 0;
+  }
+  /// setup pairs of obj arrays and keys --> e.g. "sf", new Array to take all SF Histos
+  std::unordered_map<int, TObjArray> objsFull;
+  std::unordered_map<int, TObjArray > objsFast;
+  for (unsigned int ikey = 0; ikey < s_keys.size(); ++ikey) {
+    TObjArray dummyFull;
+    objsFull.insert(std::make_pair(s_keys.at(ikey),dummyFull));
+    TObjArray dummyFast;
+    objsFast.insert(std::make_pair(s_keys.at(ikey),dummyFast));
+  }  
+  TObjArray dummyFull;    
+  objsFull.insert(std::make_pair(mapkey::sys, dummyFull));
+  TObjArray dummyFast;
+  objsFast.insert(std::make_pair(mapkey::sys, dummyFast));
+
+  std::vector<TObjArray > sysObjsFull;
+  std::vector<TObjArray > sysObjsFast;
+
+  TIter nextkey(gDirectory->GetListOfKeys());
+  TKey *key;
+  TObject *obj(0);
+  int seenSystematics= 0;
+
+  //Loop of the keys 
+  while ((key = (TKey *) nextkey())) {
+    obj = key->ReadObj();
+    if (obj->IsA()->InheritsFrom("TH1")) {
+      // The histogram containing the scale factors need to end with _sf and need to contain either the string "FullSim"
+      // or "AtlFast2"!
+      if (TString(obj->GetName()).Contains("FullSim")) {
+        setupTempMapsHelper( obj,objsFull,sysObjsFull, seenSystematics); 
+      }
+      else if (TString(obj->GetName()).Contains("AtlFast2")) {
+        setupTempMapsHelper( obj,objsFast,sysObjsFast, seenSystematics); 
+      } else {
+        ATH_MSG_ERROR( "Could NOT interpret if the histogram: " << obj->GetName()
+                      << " is full or fast simulation!");
+        return 0;
+      }
+    }
+  }
+  ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ")\n" 
+                << "Setting up histograms for Run range  " <<
+                runNumEnd);
+  /*
+   * Copy from the temporaries to the actual member variables
+   * via the setup function
+   */
+  for (unsigned int ikey = 0; ikey < s_keys.size(); ++ikey) {
+    if (objsFull.find(s_keys.at(ikey))->second.GetEntries() != 0) {
+      if (0 == setup(objsFull.find(s_keys.at(ikey))->second, m_histList[s_keys.at(ikey)], 
+                     m_begRunNumberList,m_endRunNumberList,runNumBegin,runNumEnd)) {
+        ATH_MSG_ERROR("! Could NOT setup histogram " 
+                      << s_keys.at(ikey)<< " for full sim!");
         return 0;
+      }
     }
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-            << runNumBegin << "  " << runNumEnd);
-    //
-    /// setup pairs of obj arrays and keys --> e.g. "sf", new Array to take all SF Histos
-    std::map<int, TObjArray> objsFull;
-    std::map<int, TObjArray > objsFast;
-    for (unsigned int ikey = 0; ikey < m_keys.size(); ++ikey) {
-        TObjArray dummyFull;
-        objsFull.insert(std::make_pair(m_keys.at(ikey),dummyFull));
-        TObjArray dummyFast;
-        objsFast.insert(std::make_pair(m_keys.at(ikey),dummyFast));
-    }  
-    TObjArray dummyFull;    
-    objsFull.insert(std::make_pair(mapkey::sys, dummyFull));
-    TObjArray dummyFast;
-    objsFast.insert(std::make_pair(mapkey::sys, dummyFast));
-    //
-    std::vector<TObjArray > sysObjsFull;
-    std::vector<TObjArray > sysObjsFast;
-    //
-    TIter nextkey(gDirectory->GetListOfKeys());
-    TKey *key;
-    TObject *obj(0);
-    TString tmpName = "";
-    int tmpCounter = 0;
-    //Loop of the keys 
-    while ((key = (TKey *) nextkey())) {
-        obj = key->ReadObj();
-        if (obj->IsA()->InheritsFrom("TH1")) {
-            // The histogram containing the scale factors need to end with _sf and need to contain either the string "FullSim"
-            // or "AtlFast2"!
-            if (TString(obj->GetName()).Contains("FullSim")) {
-                //Add all except the correlated 
-                for (unsigned int ikey = 0; ikey < m_keys.size(); ++ikey) {
-                    if (TString(obj->GetName()).EndsWith("_" +  TString(mapkey::keytostring(m_keys.at(ikey))))) {
-                        objsFull.find(m_keys.at(ikey))->second.Add(obj);
-                    }
-                }
-                //
-                tmpName = TString(obj->GetName());
-                //Special treatment , this is only for photons 
-                if (tmpName.EndsWith("_sys")) {
-                    objsFull.find(mapkey::sys)->second.Add(obj);
-                    TObjArray tmpArrayFull;
-                    tmpArrayFull.Add(obj);
-                    sysObjsFull.push_back(tmpArrayFull);
-                    tmpCounter++;
-                }
-                //
-                //See if we are dealing with correlated
-                if (tmpName.Contains("_corr")) {
-                    if (tmpName.EndsWith("corr0")) {
-                        //This is the worse part ...
-                        //corr0 triggers a few thing
-                        //
-                        //1st create a TObjectArray
-                        //For high or low Pt (one for each ...)
-                        TObjArray tmpArrayFull;
-                        //Resgister it to the vector (so the vector has size 1 or 2)
-                        sysObjsFull.push_back(tmpArrayFull);
-                        //Reset the counter
-                        tmpCounter=0;
-                    }
-                    //Add to the current last element of the sysObject full
-                    //This will be Low Pt once and high Pt the other time
-                    sysObjsFull.back().Add(obj);
-                    //Now increase the counter
-                    tmpCounter++;
-                }
-                if (tmpCounter > m_nSysMax) {
-                    m_nSysMax = tmpCounter;
-                }
-            }
-            else if (TString(obj->GetName()).Contains("AtlFast2")) {
-                for (unsigned int ikey = 0; ikey < m_keys.size(); ++ikey) {
-                    if (TString(obj->GetName()).EndsWith("_" +  TString(mapkey::keytostring(m_keys.at(ikey))))) {
-                        objsFast.find(m_keys.at(ikey))->second.Add(obj);
-                    }
-                }
-                //See if we are dealing with correlated
-                tmpName = TString(obj->GetName());
-                //Special treatment , this is only for photons 
-                if (tmpName.EndsWith("_sys")) {
-                    objsFast.find(mapkey::sys)->second.Add(obj);
-                    TObjArray tmpArrayFast;
-                    tmpArrayFast.Add(obj);
-                    sysObjsFast.push_back(tmpArrayFast);
-                    tmpCounter++;
-                }
-                //
-                //See if we are dealing with correlated
-                if (tmpName.Contains("_corr")) {
-                    if (tmpName.EndsWith("corr0")) {
-                        //This is the worse part ...
-                        //corr0 triggers a few thing
-                        //1st create a TObjectArray
-                        TObjArray tmpArrayFast;
-                        //Resgister it
-                        sysObjsFast.push_back(tmpArrayFast);
-                        //Reset the counter
-                        tmpCounter=0;
-                    }
-                    //Add to the current last element of the sysObject full
-                    //This will be Low Pt once and high Pt the other time
-                    sysObjsFast.back().Add(obj);
-                    //Now increase the counter
-                    tmpCounter++;
-                }
-                if (tmpCounter > m_nSysMax) {
-                    m_nSysMax = tmpCounter;
-                }
-            } else {
-                ATH_MSG_ERROR(
-                        " (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-                        << "Could NOT interpret if the histogram: " << obj->GetName()
-                        << " is full or fast simulation!");
-                return 0;
-            }
-        }
+    if (objsFast.find(s_keys.at(ikey))->second.GetEntries() != 0) {
+      if (0 == setup(objsFast.find(s_keys.at(ikey))->second, m_fastHistList[s_keys.at(ikey)],
+                     m_begRunNumberListFastSim, m_endRunNumberListFastSim,runNumBegin,runNumEnd)) {
+        ATH_MSG_ERROR("! Could NOT setup histogram " << s_keys.at(ikey)
+                      << " for fast sim");
+        return 0;
+      }
+    }
+  }
+  for (unsigned int sys = 0; sys < sysObjsFast.size(); sys++) {
+    m_fastSysList.resize(sysObjsFast.size());
+    if (0 == setup(sysObjsFast.at(sys), m_fastSysList[sys], m_begRunNumberListFastSim, 
+                   m_endRunNumberListFastSim,runNumBegin,runNumEnd)) {
+      ATH_MSG_ERROR("! Could NOT setup systematic histograms for fast sim");
+      return 0;
+    }
+  }
+  for (unsigned int sys = 0; sys < sysObjsFull.size(); sys++) {
+    m_sysList.resize(sysObjsFull.size());
+    if (0 == setup(sysObjsFull.at(sys), m_sysList[sys], m_begRunNumberList, 
+                   m_endRunNumberList,runNumBegin,runNumEnd)) {
+      ATH_MSG_ERROR("! Could NOT setup systematic histograms for fast sim");
+      return 0;
+    }
+  }
+  //Toys
+  if (m_doToyMC || m_doCombToyMC) {
+    bool fullToysBooked = setupUncorrToySyst(objsFull,sysObjsFull,m_uncorrToyMCSystFull);
+    bool fastToysBooked = setupUncorrToySyst(objsFast,sysObjsFast,m_uncorrToyMCSystFast); 
+    if (fullToysBooked || fastToysBooked) {
+      if (m_doToyMC) {
+        ATH_MSG_DEBUG("Created tables for " << m_nToyMC << " ToyMC systematics ");
+      }
+      if (m_doCombToyMC) {
+        ATH_MSG_DEBUG("Created tables for " << m_nToyMC << " combined ToyMC systematics ");
+      }
+    }
+  }
+  return 1;
+}
+/*
+ * Helper for Setting up the temporary/intermediate maps to Key -> TObjecArray from the histos
+ */
+void Root::TElectronEfficiencyCorrectionTool::setupTempMapsHelper(TObject* obj, 
+                                                                  std::unordered_map<int, TObjArray>& objs,
+                                                                  std::vector<TObjArray >& sysObjs, 
+                                                                  int& seenSystematics)  {
+  //Add all except the correlated 
+  for (unsigned int ikey = 0; ikey < s_keys.size(); ++ikey) {
+    if (TString(obj->GetName()).EndsWith("_" +  TString(mapkey::keytostring(s_keys.at(ikey))))) {
+      objs.find(s_keys.at(ikey))->second.Add(obj);
+    }
+  }
+
+  const TString tmpName(obj->GetName());
+  //Special treatment , this is only for photons 
+  if (tmpName.EndsWith("_sys")) {
+    objs.find(mapkey::sys)->second.Add(obj);
+    TObjArray tmpArray;
+    tmpArray.Add(obj);
+    sysObjs.push_back(tmpArray);
+    seenSystematics++;
+  }
+
+  //See if we are dealing with correlated
+  if (tmpName.Contains("_corr")) {
+    /*
+     * This is the worse part ...
+     * corr0 triggers a few things
+     * We assume that 0 is the 1st
+     * histogram in a series of corr(i) that 
+     * we see for each of the vector entries that 
+     * can be one for LowPt,Standard,Forward etc
+     */
+    if (tmpName.EndsWith("corr0")) {
+      /*
+       * 1st create a TObjectArray
+       */
+      TObjArray tmpArray;
+      /* 
+       * Register it to the vector
+       */
+      sysObjs.push_back(tmpArray);
+      /*
+       * Reset the counter here
+       */
+      seenSystematics=0;
     }
+    /*
+     * Now we can add to the TObjeArray
+     * This can be Low Pt or high Pt
+     */
+    sysObjs.back().Add(obj);
+    /*Increase the counter*/
+    seenSystematics++;
+  }
+
+  if (seenSystematics > m_nSysMax) {
+    m_nSysMax = seenSystematics;
+  }
+}
+/*
+ * Helper for Setting up the uncorrelated syst for the toys
+ */
+bool Root::TElectronEfficiencyCorrectionTool::setupUncorrToySyst(std::unordered_map<int, TObjArray>& objs,
+                                                                 std::vector<TObjArray>& sysObjs,
+                                                                 std::vector< std::vector<TObjArray>>& uncorrToyMCSyst){
+  bool toysBooked = false;
+  if (m_histList[mapkey::sf].size() > 0) {
+    if (objs.find(mapkey::eig)->second.GetEntries() < 1 || objs.find(mapkey::stat)->second.GetEntries() < 1 ||
+        objs.find(mapkey::uncorr)->second.GetEntries() < 1) {
 
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-            << "setting up histograms for run ranges  " <<
-            runNumEnd);
-    //
-    //The setup here copies from the temporaties created in this function , 
-    //to the actual class member variables.
-    for (unsigned int ikey = 0; ikey < m_keys.size(); ++ikey) {
-        if (objsFull.find(m_keys.at(ikey))->second.GetEntries() != 0) {
-            if (0 == setup(objsFull.find(m_keys.at(ikey))->second, m_histList[m_keys.at(ikey)], 
-                        m_begRunNumberList,m_endRunNumberList,runNumBegin,runNumEnd)) {
-                ATH_MSG_ERROR(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-                        << "! Could NOT setup histogram " 
-                        << m_keys.at(ikey)<< " for full sim!");
-                return 0;
-            }
-        }
-        if (objsFast.find(m_keys.at(ikey))->second.GetEntries() != 0) {
-            if (0 == setup(objsFast.find(m_keys.at(ikey))->second, m_fastHistList[m_keys.at(ikey)],
-                        m_begRunNumberListFastSim, m_endRunNumberListFastSim,runNumBegin,runNumEnd)) {
-                ATH_MSG_ERROR(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-                        << "! Could NOT setup histogram " << m_keys.at(ikey)
-                        << " for fast sim");
-                return 0;
-            }
-        }
-    }
-    for (unsigned int sys = 0; sys < sysObjsFast.size(); sys++) {
-        m_fastSysList.resize(sysObjsFast.size());
-        if (0 == setup(sysObjsFast.at(sys), m_fastSysList[sys], m_begRunNumberListFastSim, 
-                    m_endRunNumberListFastSim,runNumBegin,runNumEnd)) {
-            ATH_MSG_ERROR(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " <<
-                    "! Could NOT setup systematic histograms for fast sim");
-            return 0;
-        }
-    }
-    for (unsigned int sys = 0; sys < sysObjsFull.size(); sys++) {
-        m_sysList.resize(sysObjsFull.size());
-        if (0 == setup(sysObjsFull.at(sys), m_sysList[sys], m_begRunNumberList, 
-                    m_endRunNumberList,runNumBegin,runNumEnd)) {
-            ATH_MSG_ERROR(
-                    " (file: " << __FILE__ << ", line: " << __LINE__ << ") " <<
-                    "! Could NOT setup systematic histograms for fast sim");
-            return 0;
-        }
-    }
-    //
-    //Toys
-    ATH_MSG_DEBUG(" (file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-            << "Checking for (m_doToyMC || m_doCombToyMC)");
+      if (objs.find(mapkey::stat)->second.GetEntries() > 1 || objs.find(mapkey::sys)->second.GetEntries() > 1) {
 
-    if (m_doToyMC || m_doCombToyMC) {
-        bool fullToysBooked = kFALSE;
-        bool fastToysBooked = kFALSE;
         TObjArray dummy;
-
-        if (m_histList[mapkey::sf].size() > 0) {
-            if (objsFull.find(mapkey::eig)->second.GetEntries() < 1 || objsFull.find(mapkey::stat)->second.GetEntries() < 1 ||
-                    objsFull.find(mapkey::uncorr)->second.GetEntries() < 1) {
-                if (objsFull.find(mapkey::stat)->second.GetEntries() > 1 || objsFull.find(mapkey::sys)->second.GetEntries() > 1) {
-                    m_uncorrToyMCSystFull.push_back(buildToyMCTable(objsFull.find(mapkey::sf)->second, dummy,
-                                objsFull.find(mapkey::stat)->second,
-                                dummy, sysObjsFull));
-                    fullToysBooked = kTRUE;
-                }else {
-                    ATH_MSG_DEBUG("! Toy MC error propagation booked, but not all needed" 
-                            <<"histograms found in the output (For full sim). Skipping toy creation!");
-                }
-            }else {
-                m_uncorrToyMCSystFull.push_back(buildToyMCTable(objsFull.find(mapkey::sf)->second, objsFull.find(mapkey::eig)->second,
-                            objsFull.find(mapkey::stat)->second,
-                            objsFull.find(mapkey::uncorr)->second, sysObjsFull));
-                fullToysBooked = kTRUE;
-            }
-        }
-        ///// AF2
-        if (m_fastHistList[mapkey::sf].size() > 0) {
-            if (objsFast.find(mapkey::eig)->second.GetEntries() < 1 || objsFast.find(mapkey::stat)->second.GetEntries() < 1 ||
-                    objsFast.find(mapkey::uncorr)->second.GetEntries() < 1) {
-                if (objsFast.find(mapkey::stat)->second.GetEntries() > 1 || objsFast.find(mapkey::sys)->second.GetEntries() > 1) {
-                    m_uncorrToyMCSystFast.push_back(buildToyMCTable(objsFast.find(mapkey::sf)->second, dummy,
-                                objsFast.find(mapkey::stat)->second,
-                                dummy, sysObjsFast));
-                    fastToysBooked = kTRUE;
-                }else {
-                    ATH_MSG_DEBUG("! Toy MC error propagation booked, but not all needed"
-                            << "histograms found in the output (For fast sim). Skipping toy creation!");
-                }
-            }else {
-                m_uncorrToyMCSystFast.push_back(buildToyMCTable(objsFast.find(mapkey::sf)->second, objsFast.find(mapkey::eig)->second,
-                            objsFast.find(mapkey::stat)->second,
-                            objsFast.find(mapkey::uncorr)->second, sysObjsFast));
-                fastToysBooked = kTRUE;
-            }
-        }
-
-        if (fullToysBooked || fastToysBooked) {
-            if (m_doToyMC) {
-                ATH_MSG_DEBUG("Created tables for " << m_nToyMC << " ToyMC systematics ");
-            }
-            if (m_doCombToyMC) {
-                ATH_MSG_DEBUG("Created tables for " << m_nToyMC << " combined ToyMC systematics ");
-            }
-        }
+        uncorrToyMCSyst.push_back(buildToyMCTable(objs.find(mapkey::sf)->second, 
+                                                  dummy,
+                                                  objs.find(mapkey::stat)->second,
+                                                  dummy, 
+                                                  sysObjs));
+        toysBooked = true;
+      }else {
+        ATH_MSG_DEBUG("! Toy MC error propagation booked, but not all needed" 
+                      <<"Histograms found in the output (For full sim). Skipping toy creation!");
+      }
+    }else {
+      uncorrToyMCSyst.push_back(buildToyMCTable(objs.find(mapkey::sf)->second, 
+                                                objs.find(mapkey::eig)->second,
+                                                objs.find(mapkey::stat)->second,
+                                                objs.find(mapkey::uncorr)->second, 
+                                                sysObjs));
+      toysBooked = true;
     }
-    return 1;
+  }
+
+  return toysBooked;
 }
+
 /*
  * Fill and interpret the setup, depending 
  * on which histograms are found in the input file(s)
  */
 int
 Root::TElectronEfficiencyCorrectionTool::setup(const TObjArray& hists,
-        std::vector< TObjArray> &histList,
-        std::vector< unsigned int > &beginRunNumberList,
-        std::vector< unsigned int > &endRunNumberList,
-        const int runNumBegin,
-        const int runNumEnd) const {
-    if (hists.GetEntriesFast()==0) {
-        ATH_MSG_ERROR(
-                "(file: " << __FILE__ << ", line: " << __LINE__ << ") " 
-                << "! Could NOT find histogram with name *_sf in folder");
-        return 0;
-    }
-    for (int i = 0; i < hists.GetEntries(); ++i) {
-        TH1* tmpHist = (TH1 *) hists.At(i);
-        tmpHist->SetDirectory(0);
-    }
-    // Now, we have all the needed info. Fill the vectors accordingly
-    histList.push_back(hists);
-    if (beginRunNumberList.size() > 0) {
-        if (runNumBegin != (int) beginRunNumberList.back()) {
-            beginRunNumberList.push_back(runNumBegin);
-        }
-    }else {
-        beginRunNumberList.push_back(runNumBegin);
-    }
-    if (endRunNumberList.size() > 0) {
-        if (runNumEnd != (int) endRunNumberList.back()) {
-            endRunNumberList.push_back(runNumEnd);
-        }
-    }else {
-        endRunNumberList.push_back(runNumEnd);
-    }
-    return 1;
+                                               std::vector< TObjArray> &histList,
+                                               std::vector< unsigned int > &beginRunNumberList,
+                                               std::vector< unsigned int > &endRunNumberList,
+                                               const int runNumBegin,
+                                               const int runNumEnd) const {
+  if (hists.GetEntriesFast()==0) {
+    ATH_MSG_ERROR( "! Could NOT find histogram with name *_sf in folder");
+    return 0;
+  }
+  TH1 *tmpHist(0);
+  for (int i = 0; i < hists.GetEntries(); ++i) {
+    tmpHist = (TH1 *) hists.At(i);
+    tmpHist->SetDirectory(0);
+  }
+  // Now, we have all the needed info. Fill the vectors accordingly
+  histList.push_back(hists);
+  if (beginRunNumberList.size() > 0) {
+    if (runNumBegin != (int) beginRunNumberList.back()) {
+      beginRunNumberList.push_back(runNumBegin);
+    }
+  }else {
+    beginRunNumberList.push_back(runNumBegin);
+  }
+  if (endRunNumberList.size() > 0) {
+    if (runNumEnd != (int) endRunNumberList.back()) {
+      endRunNumberList.push_back(runNumEnd);
+    }
+  }else {
+    endRunNumberList.push_back(runNumEnd);
+  }
+  return 1;
 }
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/src/EleChargeAlg.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/src/EleChargeAlg.cxx
index f1143ee0b7247c38faa2fb06a02410b80452aa99..53ac1aba0b9b0b19732829df70d6a2a82f039165 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/src/EleChargeAlg.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/src/EleChargeAlg.cxx
@@ -12,8 +12,7 @@
 #include "GaudiKernel/ITHistSvc.h"
 #include "PATInterfaces/ISystematicsTool.h"
 
-// #include "../ElectronChargeEfficiencyCorrectionTool/IElectronChargeEfficiencyCorrectionTool.h"
-#include "AsgAnalysisInterfaces/IEfficiencyScaleFactorTool.h"
+#include "EgammaAnalysisInterfaces/IAsgElectronEfficiencyCorrectionTool.h"
 
 
 
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/src/EleChargeAlg.h b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/src/EleChargeAlg.h
index 7fe1c95c3297d747189c7857ef12ab8e6c51a16b..adf091bf941ce47ce3bf4eefd5b3325b89ef3bdd 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/src/EleChargeAlg.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/src/EleChargeAlg.h
@@ -17,10 +17,7 @@
 // #include "MCTruthClassifier/IMCTruthClassifier.h"
 #include "PATInterfaces/SystematicSet.h"
 
-namespace CP{
-  // class IElectronChargeEfficiencyCorrectionTool;
-  class IEfficiencyScaleFactorTool;
-}
+class IAsgElectronEfficiencyCorrectionTool;
 
 class EleChargeAlg: public ::AthAlgorithm {
  public:
@@ -38,7 +35,7 @@ class EleChargeAlg: public ::AthAlgorithm {
   CP::SystematicSet m_syst;
 
   /// The handle to the charge-misid scale-factor tool
-  ToolHandle<CP::IEfficiencyScaleFactorTool> m_eccTool;
+  ToolHandle<IAsgElectronEfficiencyCorrectionTool> m_eccTool;
 
   /// The name of the input electron container
   StringProperty m_eleContName;
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/EgEfficiencyCorr_mem_check.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/EgEfficiencyCorr_mem_check.cxx
index 97ce34761f2ae296e9632af90ba211e69a507aff..02a10e17b3af6ab4d96f5d02637e0bbaff5ec905 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/EgEfficiencyCorr_mem_check.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/EgEfficiencyCorr_mem_check.cxx
@@ -16,7 +16,6 @@ http://valgrind.org/docs/manual/faq.html#faq.deflost
 #include <string>
 #include <vector>
 #include "EgammaAnalysisInterfaces/IAsgElectronEfficiencyCorrectionTool.h"
-#include "AsgAnalysisInterfaces/IEfficiencyScaleFactorTool.h"
 #include "AsgTools/AsgMessaging.h"
 #include "AsgTools/AnaToolHandle.h"
 #ifdef ASGTOOL_STANDALONE
@@ -45,7 +44,7 @@ int main( ) {
             tool.setProperty("IdKey", "Medium") &&
             tool.retrieve());
 
-    asg::AnaToolHandle<CP::IEfficiencyScaleFactorTool> eccTool;
+    asg::AnaToolHandle<IAsgElectronEfficiencyCorrectionTool> eccTool;
     eccTool.setTypeAndName("CP::ElectronChargeEfficiencyCorrectionTool/ElectronChargeCorrection");
     ANA_CHECK(eccTool.setProperty( "CorrectionFileName", 
                 "ElectronEfficiencyCorrection/2015_2016/rel20.7/Moriond_February2017_v1/charge_misID/ChargeCorrectionSF.Medium_FixedCutTight.root" )&&
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorrFwd.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorrFwd.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..bde38008ed68888e5f54393e7de18ed6e5ae6866
--- /dev/null
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorrFwd.cxx
@@ -0,0 +1,110 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+// System include(s):
+#include <memory>
+// ROOT include(s):
+#include <TFile.h>
+// Infrastructure include(s):
+#ifdef ROOTCORE
+#   include "xAODRootAccess/Init.h"
+#   include "xAODRootAccess/TEvent.h"
+#   include "xAODRootAccess/TStore.h"
+#endif // ROOTCORE
+
+// EDM include(s):
+#include "xAODEgamma/ElectronContainer.h" 
+#include "xAODEgamma/Electron.h"
+#include "ElectronEfficiencyCorrection/AsgElectronEfficiencyCorrectionTool.h"
+#include "Messaging.h"
+#include "SFHelpers.h"
+
+//To disable sending data
+#include "xAODRootAccess/tools/TFileAccessTracer.h"
+int main( int argc, char* argv[] ) {
+
+  xAOD::TFileAccessTracer::enableDataSubmission( false );
+  // The application's name:
+  const char* APP_NAME = argv[ 0 ];
+
+  MSG::Level mylevel=MSG::INFO;
+  MSGHELPERS::getMsgStream().msg().setLevel(mylevel);
+  MSGHELPERS::getMsgStream().msg().setName(APP_NAME);
+
+  // Check if we received a file name:
+  if( argc < 2 ) {
+    MSG_ERROR( APP_NAME << "No file name received!" );
+    MSG_ERROR( APP_NAME <<"  Usage: <<APP_NAME <<  [xAOD file name] [Num of events to use]" );
+    return 1;
+  }
+
+  // Initialise the application:
+  CHECK( xAOD::Init( APP_NAME ) );
+
+  // Open the input file:
+  const TString fileName = argv[ 1 ];
+  MSG_INFO("Opening file: " << fileName.Data() );
+  std::auto_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
+  CHECK( ifile.get() );
+
+  // Create a TEvent object:
+  xAOD::TEvent event;
+   
+  //Then the tools
+  std::vector<std::string> id_configFiles{"ElectronEfficiencyCorrection/2012/offline/efficiencySF.offline.FwdTight.2012.8TeV.rel17p2.GEO21.v02.root"}; // we don't support keys for fwd electrons, yet. Our latest file is 2012, still
+  AsgElectronEfficiencyCorrectionTool ElEffCorrectionTool ("ElEffCorrectionTool");   
+  CHECK( ElEffCorrectionTool.setProperty("CorrectionFileNameList",id_configFiles));
+  CHECK( ElEffCorrectionTool.setProperty("ForceDataType",1));
+  CHECK( ElEffCorrectionTool.setProperty("OutputLevel", mylevel ));
+  CHECK( ElEffCorrectionTool.setProperty("CorrelationModel", "FULL" )); 
+  CHECK( ElEffCorrectionTool.setProperty("UseRandomRunNumber", false ));
+  CHECK( ElEffCorrectionTool.initialize());  
+    
+  //Then open the file(s)
+  CHECK( event.readFrom( ifile.get() ) );
+  MSG_INFO( "Number of available events to read in:  " <<
+            static_cast< long long int >( event.getEntries() ) );
+
+  // Decide how many events to run over:
+  long long int entries = event.getEntries();
+  if( argc > 2 ) {
+    const long long int e = atoll( argv[ 2 ] );
+    if( e < entries ) {
+      entries = e;
+    }
+  }
+  MSG_INFO( "Number actual events to read in:  " <<entries );
+
+
+  // Loop over the events:
+  for(long  long int entry=0  ; entry < entries; ++entry ) {
+    event.getEntry( entry );
+    MSG_INFO( " \n ==> Event " << entry);
+
+    const xAOD::ElectronContainer* electrons = 0;  
+    CHECK( event.retrieve(electrons, "ForwardElectrons") );
+
+    for (const xAOD::Electron* el : *electrons){
+      if(el->pt() < 20000) continue; //skip electrons outside of recommendations
+      if(fabs(el->caloCluster()->eta()) < 2.5) continue; //skip electrons outside of recommendations
+      int index =ElEffCorrectionTool.systUncorrVariationIndex(*el);
+      /*
+       * Set up the systematic variations
+       */
+      bool isToys = false;
+      double nominalSF{};
+      double totalNeg{};
+      double totalPos{}; 
+      CHECK(SFHelpers::result(ElEffCorrectionTool,*el,nominalSF, totalPos,totalNeg,isToys)==0);
+
+      MSG_INFO("===> electron : Pt = " << el->pt() << " : eta = " << el->eta() 
+	       << " : Bin index = " <<index   <<" : SF = "<< nominalSF 
+	       << " + " << totalPos << " - " <<totalNeg << " <===");
+    }
+  }
+    
+  MSG_INFO("===> DONE <===\n"); 
+  return 0;
+
+}
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorrWithoutFile.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorrWithoutFile.cxx
index e07ac561fb5c81fe6d08ed144920578d9adddeef..0c78b065bb4cc2f194d8cb8838f758ac361f97ea 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorrWithoutFile.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorrWithoutFile.cxx
@@ -167,5 +167,3 @@ int main( int argc, char* argv[] ) {
             << " + " << totalPos << " - " <<totalNeg << " <===");
     return 0;
 }
-
-
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration.py
index cd75582cc8c298f65bfb78c98a411e85e6b4bcf3..a638c6414004c2b7629a42553a7b0fadff7a40b4 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration.py
@@ -508,9 +508,6 @@ class Configuration:
           # -- add tool to topSequence
           if not topSequence is None:
               topSequence += jetbtaggeralg
-          # -- add tool to ToolSvc
-          if AddToToolSvc:
-              ToolSvc += jetbtaggeralg
           if Verbose:
               print jetbtaggeralg
               print self.BTagTag()+' - INFO - Attached to the beforementioned JetBTaggerAlg we have the following BTagTool:'
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingFlags.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingFlags.py
index a26efa2ce2a676554ebb87ceb662470cf5cd6ff5..7fcf67e798b1ec81fed1907c69dc7225453ef981 100755
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingFlags.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingFlags.py
@@ -445,7 +445,8 @@ class _BTaggingFlags:
                               "AntiKt4Track->AntiKt4Track,AntiKt4TopoEM,AntiKt4EMTopo,AntiKt4LCTopo",
                               "AntiKt3Track->AntiKt3Track,AntiKt4Track,AntiKt4TopoEM,AntiKt4EMTopo,AntiKt4LCTopo",
                               "AntiKt2Track->AntiKt2Track,AntiKt4Track,AntiKt4TopoEM,AntiKt4EMTopo,AntiKt4LCTopo",
-                              "AntiKt4EMPFlow->AntiKt4EMPFlow,AntiKt4EMTopo,AntiKt4TopoEM,AntiKt4LCTopo"])
+                              "AntiKt4EMPFlow->AntiKt4EMPFlow,AntiKt4EMTopo,AntiKt4TopoEM,AntiKt4LCTopo",
+                              "AntiKt4HI->AntiKt4HI,AntiKt4EMTopo,AntiKt4TopoEM,AntiKt4LCTopo"])
 
       for attr in self._CalibrationSingleFolder:
         setattr(self, attr, True)
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/share/BTaggingReconstructionOutputAODList_jobOptions.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/share/BTaggingReconstructionOutputAODList_jobOptions.py
index b96df1e98d864a68ef90df0fe3a4245be1405b5b..e2c46073635a565cab948b7445c5cfb3ff0f8c91 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/share/BTaggingReconstructionOutputAODList_jobOptions.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/share/BTaggingReconstructionOutputAODList_jobOptions.py
@@ -10,7 +10,7 @@ if len(BTaggingAODList) == 0:
     # Therefore, we duplicate here some code from BTagging/share/BTagging_jobOptions.py to specify the relevant Jet collections.
     # Clearly this duplication is undesirable and should be replaced with a single function.
     #JetCollectionList = ['AntiKt4LCTopoJets', 'AntiKt10LCTopoJets', 'AntiKt4EMTopoJets', 'AntiKt4TrackJets', 'AntiKt3TrackJets']
-    JetCollectionList = ['AntiKt4LCTopoJets', 'AntiKt4EMTopoJets', 'AntiKt4TrackJets', 'AntiKt4EMPFlowJets', 'AntiKt2TrackJets']
+    JetCollectionList = ['AntiKt4LCTopoJets', 'AntiKt4EMTopoJets', 'AntiKt4TrackJets', 'AntiKt4EMPFlowJets', 'AntiKt2TrackJets', 'AntiKt4HIJets']
     from JetRec.JetRecFlags import jetFlags
     # VD: disbling b-tagging on TruthJets
     #if jetFlags.useTruth():
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/JetTagUtils.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/JetTagUtils.cxx
index 81cd1b3e92814f9c2b92445551efbf8be174ada3..af88eb1ad4954d6828647aaf794b1e37ceac6eb7 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/JetTagUtils.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/JetTagUtils.cxx
@@ -18,6 +18,13 @@ std::string JetTagUtils::getJetAuthor(xAOD::Jet& jetToTag) {
   xAOD::JetInput::Type jetAlgType = jetToTag.getInputType();
   std::string type =  xAOD::JetInput::typeName(jetAlgType);
   std::string size = std::to_string(int(jetToTag.getSizeParameter()*10));
+
+  // Special test for HI jet collections
+  // (the attribute JetUnsubtractedScaleMomentum is specific to them)
+  xAOD::JetFourMom_t v;
+  if ( jetToTag.getAttribute<xAOD::JetFourMom_t>("JetUnsubtractedScaleMomentum",v) ) {
+    type = "HI";
+  }
     
   std::string author = name;
   author.append(size);
diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt
index 277429b9bfe0b6cbdd21d788bda55cb123092e31..b1b72971867d65f63e62b011ca8ebadb47c248ff 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.003
+GaudiVersion = v30r3.004
diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt
index f52340ca94f0a81f4588c3be6fa609fd8994d3f3..13cf3e584e12ee213b3f569e8a60e480e805e1aa 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.003
+GaudiVersion = v30r3.004
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/share/HIJetRec_jobOptions.py b/Reconstruction/HeavyIonRec/HIJetRec/share/HIJetRec_jobOptions.py
index 6441e835904863dfd5bc971dd8ab28360237939b..78a1d0d92fcd715da631578701f999b4728e4539 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/share/HIJetRec_jobOptions.py
+++ b/Reconstruction/HeavyIonRec/HIJetRec/share/HIJetRec_jobOptions.py
@@ -110,6 +110,48 @@ for k in jtm.jetrecs :
 AppendOutputList(jetFlags.jetAODList)
 JetAlgFromTools(jtm.HIJetRecs,suffix="HI",persistify=True)
 
-
-
-
+# code cloned from BTagging_jobOptions.py
+# to allow b-tagging over HI jets
+
+if not BTaggingFlags.DoNotSetupBTagging: # Temporary measure so the JetRec people can test setting this all up from their side.
+  #
+  # ========== Load and configure everything
+  #
+
+  from BTagging.BTaggingConfiguration import getConfiguration
+  ConfInstance = getConfiguration()
+
+  if ConfInstance.checkFlagsUsingBTaggingFlags():
+
+    #Jet collections
+    JetCollectionList = ['AntiKt4HIJets']
+    from JetRec.JetRecFlags import jetFlags
+
+    BTaggingFlags.Jets = [ name[:-4] for name in JetCollectionList]
+
+    #BTagging list
+    btag = ConfInstance.getOutputFilesPrefix() #BTaggingFlags.OutputFilesBTag #"BTagging_"
+
+    #TODO define name author (now BTagging_AntiKt4LCTopo)
+    AuthorSubString = [ btag+name[:-4] for name in JetCollectionList]
+
+    NotInJetToolManager = [] # For jet collections
+    from JetRec.JetRecStandard import jtm
+    for i, jet in enumerate(JetCollectionList):
+        try:
+          btagger = ConfInstance.setupJetBTaggerTool(ToolSvc, jet) #The [:-4] is not needed here; this function automatically removes trailing 'jets' or 'Jets'.
+          if btagger is None:
+            continue
+          jet = jet.replace("Track", "PV0Track")
+          jetname = getattr(jtm, jet)
+          jetname.unlock()
+          jetname.JetModifiers += [ btagger ]
+          jetname.lock()
+          if BTaggingFlags.OutputLevel < 3:
+            print ConfInstance.getJetCollectionTool(jet[:-4])
+        except AttributeError as error:
+          print '#BTAG# --> ' + str(error)
+          NotInJetToolManager.append(AuthorSubString[i])
+
+    if len(NotInJetToolManager) > 0:
+        AuthorSubString = list(set(AuthorSubString) - set(NotInJetToolManager))
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/CombinedMuonTrackSummary.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/CombinedMuonTrackSummary.py
index eebaf7dcc6b2335357ee86c39982c90c02c0f988..178cf2c6c6cb7e4061b8319e4837f2f52140e7f4 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/CombinedMuonTrackSummary.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/CombinedMuonTrackSummary.py
@@ -107,7 +107,11 @@ if DetFlags.haveRIO.pixel_on():
 
   
 if DetFlags.haveRIO.SCT_on():
-  ToolSvc.CombinedMuonIDHoleSearch.SctSummaryTool      = ToolSvc.InDetSCT_ConditionsSummaryTool
+  from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup
+  sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup()
+  sct_ConditionsSummaryToolSetup.setup()
+  InDetSCT_ConditionsSummaryTool = sct_ConditionsSummaryToolSetup.getTool()
+  ToolSvc.CombinedMuonIDHoleSearch.SctSummaryTool = InDetSCT_ConditionsSummaryTool
 
 # check configuration
 #print ToolSvc.CombinedMuonIDHoleSearch
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev.sh
index 3a81280ea99f1676b13ca7048eb4d0e9f83361cf..9adb89de7973cbe6305c3c3993a7c1e3a256aa08 100755
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev.sh
+++ b/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev.sh
@@ -3,7 +3,7 @@
 # art-description: Reco_tf runs on 13TeV collision data 2017, early data, A3
 # art-type: grid
 
-Reco_tf.py --inputBSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents 300 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2017-08" --preExec 'rec.doTrigger=False' --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root
+Reco_tf.py --inputBSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents 300 --AMI=f908 --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root
 
 echo "art-result: $?"
 
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev_fpe.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev_fpe.sh
index 63ac159e1692a95d3dedfef51626df82fb1f4e48..b8887434d711d3eea719867cde6dad6e9407841c 100755
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev_fpe.sh
+++ b/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev_fpe.sh
@@ -3,7 +3,7 @@
 # art-description: Reco_tf runs on 13TeV collision data with floating point exception enabled 2017
 # art-type: grid
 
-Reco_tf.py --inputBSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents -1 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2017-08" --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root --preExec 'rec.doFloatingPointException=True;rec.doTrigger=False;' --postExec 'FPEAuditor.NStacktracesOnFPE=5'
+Reco_tf.py --inputBSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents -1 --AMI=f908 --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --outputHISTFile myHist.root --preExec 'rec.doFloatingPointException=True;rec.doTrigger=False;' --postExec 'FPEAuditor.NStacktracesOnFPE=5'
 
 echo "art-result: $?"
 
diff --git a/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/IParticleCaloExtensionTool.h b/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/IParticleCaloExtensionTool.h
index bfceb25eaed224b662feafd4bfaef2194d79a1cb..21cb8ea865e9e3ffe18ef88b11cbf1420923d504 100644
--- a/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/IParticleCaloExtensionTool.h
+++ b/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/IParticleCaloExtensionTool.h
@@ -71,18 +71,21 @@ static const InterfaceID IID_IParticleCaloExtensionTool("Trk::IParticleCaloExten
 class IParticleCaloExtensionTool : virtual public IAlgTool {
 public:
   typedef  std::unordered_map<size_t,std::unique_ptr<Trk::CaloExtension>> Cache;
+  
   /** Method returning the calo layers crossed 
    * by the IParticle track or the IParticle itself 
    * if it is  neutral/TruthParticle
    * The memory ownership is handled by the unique_ptr 
-   * @param particle     reference to the Particle
-   * @param extension     unique_ptr ref to a CaloExtension 
+   * @param particle    reference to the Particle
+   * @param extension   unique_ptr ref to a CaloExtension 
    * @return true if the call was successful
+   * Note the choice of in/out unique_ptr is mainly due
+   * to compatibility with the old interface/existing clients
    */
   virtual bool caloExtension( const xAOD::IParticle& particle, 
                               std::unique_ptr<Trk::CaloExtension>& extension ) const = 0;
-  /** A helper method that  caches in a look-up table 
-   * the calo layers crossed 
+  
+  /** Method to return the calo layers crossed  (CaloExtension)
    * by the IParticle track or the IParticle itself 
    * if it is  neutral/TruthParticle.
    * An alg using the same IParticle multiple times can use a local  cache of
@@ -90,39 +93,30 @@ public:
    * where the key is the  value of IParticle::index().
    * This method adds the relevant element to the cache look-up table 
    * which retains ownership of them. 
-   * The ptr to a const CaloExtension points (unique_ptr::get())  
-   * is the last element added to the  lookup-table. 
-   * Will be deleted when the cache goes out of scope in the algorithm.
    *
    * @param particle      reference to the Particle
-   * @param extension     ptr to a const CaloExtesion. 
    * @param cache         the look-up table cache 
-   * @return true if the CaloExtension is valid.
+   * @return ptr to a const CaloExtension (owned by the cache)
    */  
-  virtual bool caloExtension( const xAOD::IParticle& particle, 
-                              const Trk::CaloExtension* extension, 
-                              Cache& cache ) const = 0;
+  virtual const Trk::CaloExtension*  caloExtension( const xAOD::IParticle& particle, 
+                                                    Cache& cache ) const = 0;
 
 
-  /** A helper method to return from a cache collection
-   * the calo layers crossed 
+   /** Method to return the calo layers crossed  (CaloExtension)
    * by the IParticle track or the IParticle itself 
    * if it is  neutral/TruthParticle
    * It just returns the result stored in the CaloExtensionCollection
    * created by (or in a similar way as ) the caloExtensionCollection
    * method below.
    * In this case, the CaloExtensionCollection (DataVector<CaloExtension>)
-   * owns the element, so a ptr to that const element is returned.
-   * You should not delete it.
+   * owns its element.
    *
    * @param particle     reference to the Particle
-   * @param extension    ptr to a const CaloExtesion owned by the cache 
    * @param cache        The CaloExtensionCollections   
-   * @return true if the CaloExtension in the cache is valid.
+   * @return ptr to a const CaloExtension (owned by the cache)
    */  
-  virtual bool caloExtension( const xAOD::IParticle& particle, 
-                              const Trk::CaloExtension* extension, 
-                              const CaloExtensionCollection& cache ) const = 0;
+  virtual const Trk::CaloExtension*  caloExtension( const xAOD::IParticle& particle, 
+                                                    const CaloExtensionCollection& cache ) const = 0;
 
   /** Method that can be used by algorithms that :
    * A. Have an  IParticleCollection
diff --git a/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloExtensionTool.cxx b/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloExtensionTool.cxx
index e8be8c29ec1f1f4e019d690e6f4a7be73b041c5b..8c69549d8a091e377cfb836d55eef7670245497f 100644
--- a/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloExtensionTool.cxx
+++ b/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloExtensionTool.cxx
@@ -1,6 +1,6 @@
 /*
    Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
- */
+*/
 
 #include "ParticleCaloExtensionTool.h"
 #include "TrkSurfaces/PerigeeSurface.h"
@@ -85,41 +85,30 @@ bool ParticleCaloExtensionTool::caloExtension( const xAOD::IParticle& particle,
   return extension.get()!=nullptr;
 }
 
-bool ParticleCaloExtensionTool::caloExtension( const xAOD::IParticle& particle, 
-                                               const Trk::CaloExtension*  extension, 
-                                               IParticleCaloExtensionTool::Cache& cache ) const{
-  extension=nullptr;
+const Trk::CaloExtension* ParticleCaloExtensionTool::caloExtension( const xAOD::IParticle& particle, 
+                                                                    IParticleCaloExtensionTool::Cache& cache ) const{
   auto findExtension= cache.find(particle.index());
   if (findExtension!=cache.end()){
     ATH_MSG_DEBUG(" Found cached caloExtension for index: " << particle.index());
-    extension=findExtension->second.get();
-  }
+    return findExtension->second.get();
+  }   
   std::unique_ptr<Trk::CaloExtension> tmpExtension;
   if(caloExtension(particle,tmpExtension)){
     ATH_MSG_DEBUG(" Adding  caloExtension to cahce for index: " << particle.index());
     auto insertedExtension=cache.emplace(std::make_pair(size_t(particle.index()),std::move(tmpExtension)));
-    extension=insertedExtension.first->second.get();
+    return insertedExtension.first->second.get();
   }
-  return extension!=nullptr;
+  return nullptr;
 }
 
-
-bool ParticleCaloExtensionTool::caloExtension( const xAOD::IParticle& particle,
-                                               const Trk::CaloExtension* extension, 
-                                               const CaloExtensionCollection& cache ) const{
+const Trk::CaloExtension* ParticleCaloExtensionTool::caloExtension( const xAOD::IParticle& particle, 
+                                                                    const CaloExtensionCollection& cache ) const{
   size_t index=particle.index();
-  /*
-   * Protect against no proper usage
-   */
   if(index < cache.size()){ 
-    extension=cache[index];
-  }else{
-    ATH_MSG_WARNING("cache size smaller than particle index");
-    extension=nullptr;
-    return false; 
-  }
-  /* If the CaloExtension has been properly created, then it will have intersections*/
-  return (extension->caloLayerIntersections().size()>0);
+    return cache[index];
+  } 
+  ATH_MSG_WARNING("cache size smaller than particle index"); 
+  return nullptr;
 }
 
 StatusCode ParticleCaloExtensionTool::caloExtensionCollection( const xAOD::IParticleContainer& particles, 
@@ -130,7 +119,7 @@ StatusCode ParticleCaloExtensionTool::caloExtensionCollection( const xAOD::IPart
     ATH_MSG_ERROR("mask does not have the same size as in input collection");
     return StatusCode::FAILURE;
   }
- 
+
   /* Either create a proper CaloExtension or otherwise a dummy one
    * i.e one with no intersections
    */
@@ -199,7 +188,9 @@ std::unique_ptr<Trk::CaloExtension> ParticleCaloExtensionTool::caloExtension( co
   //Determine if the track was fit electron hypothesis -- so extrapolate as if the particles is non interacting
   ParticleHypothesis particleType = m_particleType;
   /* 
-   * Electrons done separately here
+   * Electrons done separately here.
+   * In principle they are always done as muon
+   * approximating non-interacting
    */
   if( particle.particleHypothesis() ==  xAOD::electron ){  
     ATH_MSG_DEBUG("Fitting using electron hypothesis");
@@ -212,9 +203,13 @@ std::unique_ptr<Trk::CaloExtension> ParticleCaloExtensionTool::caloExtension( co
         return caloExtension(particle.curvilinearParameters(index),alongMomentum,particleType);
       }
     }
+    return caloExtension(particle.perigeeParameters(),alongMomentum,particleType);
   }
 
-  /* This is more muon system oriented part */
+  /* 
+   * This is a bit more muon oriented part
+   */
+
   if(m_startFromPerigee || !particle.track()){
     bool idExit = true;
     // Muon Entry is around z 6783 and r  4255 
@@ -253,10 +248,9 @@ std::unique_ptr<Trk::CaloExtension> ParticleCaloExtensionTool::caloExtension( co
 }
 
 
-std::unique_ptr<Trk::CaloExtension> ParticleCaloExtensionTool::caloExtension( 
-                                                                             const TrackParameters& startPars, 
-                                                                             PropDirection propDir, 
-                                                                             ParticleHypothesis particleType ) const {
+std::unique_ptr<Trk::CaloExtension> ParticleCaloExtensionTool::caloExtension( const TrackParameters& startPars, 
+                                                                              PropDirection propDir, 
+                                                                              ParticleHypothesis particleType ) const {
 
   ATH_MSG_DEBUG("looking up calo states: r " << startPars.position().perp() << " z " << startPars.position().z()
                 << " momentum " << startPars.momentum().mag() );
diff --git a/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloExtensionTool.h b/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloExtensionTool.h
index 69ef2e1d42a580f4454b0d8ad3a14cd21795d71c..524320f7bc760c6a9e11daf86776f5f6ac7821c9 100644
--- a/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloExtensionTool.h
+++ b/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloExtensionTool.h
@@ -43,13 +43,11 @@ public:
   virtual bool caloExtension( const xAOD::IParticle& particle, 
                               std::unique_ptr<Trk::CaloExtension>& extension ) const override final;
 
-  virtual bool caloExtension( const xAOD::IParticle& particle, 
-                              const Trk::CaloExtension* extension, 
-                              IParticleCaloExtensionTool::Cache& cache ) const override final;
+  virtual const Trk::CaloExtension*  caloExtension( const xAOD::IParticle& particle, 
+                                                    IParticleCaloExtensionTool::Cache& cache ) const override final;
 
-  virtual bool caloExtension( const xAOD::IParticle& particle,
-                              const Trk::CaloExtension* extension, 
-                              const CaloExtensionCollection& cache ) const override final;
+  virtual  const Trk::CaloExtension* caloExtension( const xAOD::IParticle& particle,
+                                                    const CaloExtensionCollection& cache ) const override final;
 
   virtual StatusCode  caloExtensionCollection( const xAOD::IParticleContainer& particles, 
                                                const std::vector<bool>& mask,
@@ -67,7 +65,7 @@ private:
   std::unique_ptr<Trk::CaloExtension> caloExtension( const xAOD::NeutralParticle& particle ) const;
   std::unique_ptr<Trk::CaloExtension>  caloExtension( const xAOD::TrackParticle& particle ) const;
 
-  PublicToolHandle<Trk::IExtrapolator> m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"}; 
+  PublicToolHandle<Trk::IExtrapolator> m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"};
   Gaudi::Property<std::string>  m_particleTypeName{this,"ParticleType","muon","The particle type : muon, pion, nonInteracting"};
   Gaudi::Property<bool>  m_startFromPerigee{this,"StartFromPerigee",false, "Start from Perigee"};
 
diff --git a/Reconstruction/egamma/egammaAlgs/CMakeLists.txt b/Reconstruction/egamma/egammaAlgs/CMakeLists.txt
index 1252c403ce4ff14b64abd7d2e05ea0346d7147d3..d8b20deac63af2d87afab2e491a5a1df480d2457 100644
--- a/Reconstruction/egamma/egammaAlgs/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaAlgs/CMakeLists.txt
@@ -29,17 +29,23 @@ atlas_depends_on_subdirs( PRIVATE
                           Reconstruction/egamma/egammaInDetUtils
                           Reconstruction/egamma/egammaMVACalib
                           Tracking/TrkEvent/TrkPseudoMeasurementOnTrack
+			  Reconstruction/RecoTools/RecoToolInterfaces
                           Tracking/TrkEvent/TrkTrack
                           Tracking/TrkEvent/TrkTrackLink
-			  Tracking/TrkTools/TrkToolInterfaces )
+			  Tracking/TrkTools/TrkToolInterfaces 
+			  Tracking/TrkEvent/TrkCaloExtension)
+ 
 
 
 atlas_add_component( egammaAlgs
 		     src/*.cxx
                      src/components/*.cxx
                      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 )
-
+		     LINK_LIBRARIES AthenaBaseComps EventKernel xAODCaloEvent xAODEgamma xAODTruth GaudiKernel 
+		     MCTruthClassifierLib CaloGeoHelpers CaloUtilsLib AthenaKernel  StoreGateLib xAODTracking 
+		     EgammaAnalysisInterfacesLib egammaRecEvent egammaUtils  TrkToolInterfaces InDetRecToolInterfaces 
+		     FourMomUtils RecoToolInterfaces TrkTrack TrkPseudoMeasurementOnTrack InDetConversionFinderToolsLib TrkCaloExtension)            
+	     
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 
diff --git a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py
new file mode 100644
index 0000000000000000000000000000000000000000..208caa7e3f2e673ef115b89ef77ca2c89e655205
--- /dev/null
+++ b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py
@@ -0,0 +1,17 @@
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+
+__doc__ = "ToolFactory to instantiate the EMGSFCaloExtensionBuilder with default configuration"
+__author__ = "Christos"
+
+from egammaAlgs import egammaAlgsConf
+from egammaRec.Factories import AlgFactory
+from egammaRec import egammaKeys
+from egammaTrackTools.egammaTrackToolsFactories import EMLastCaloExtensionTool,EMParticleCaloExtensionTool
+
+EMGSFCaloExtensionBuilder = AlgFactory( egammaAlgsConf.EMGSFCaloExtensionBuilder,
+                                        name = 'EMGSFCaloExtensionBuilder',
+                                        LastCaloExtentionTool=EMLastCaloExtensionTool,
+                                        PerigeeCaloExtentionTool=EMParticleCaloExtensionTool,
+                                        GSFPerigeeCache='GSFPerigeeCaloExtension',
+                                        GSFLastCache='GSFLastCaloExtension',
+                                        GFFTrkPartContainerName=egammaKeys.outputTrackParticleKey()) 
diff --git a/Reconstruction/egamma/egammaAlgs/src/EMGSFCaloExtensionBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/EMGSFCaloExtensionBuilder.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..948e5e5effbcb8be13319c63e7c2078eedb84bf7
--- /dev/null
+++ b/Reconstruction/egamma/egammaAlgs/src/EMGSFCaloExtensionBuilder.cxx
@@ -0,0 +1,77 @@
+/*
+   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+/********************************************************************
+NAME:     EMGSFCaloExtensionBuilder
+PACKAGE:  offline/Reconstruction/egamma/egammaTrackTools/EMGSFCaloExtensionBuilder
+
+AUTHORS:  Anastopoulos
+PURPOSE:  Performs Calo Extension for all GSF tracks 
+ **********************************************************************/
+#include "EMGSFCaloExtensionBuilder.h"
+//
+#include "xAODTracking/TrackParticleContainer.h"
+#include "xAODTracking/TrackParticleAuxContainer.h"
+#include "xAODTracking/TrackParticle.h"
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/WriteHandle.h"
+
+//std includes
+#include <algorithm>
+#include <cmath>
+#include <memory>
+
+EMGSFCaloExtensionBuilder::EMGSFCaloExtensionBuilder(const std::string& name, 
+                                                     ISvcLocator* pSvcLocator):
+  AthAlgorithm(name, pSvcLocator)
+{
+}
+
+StatusCode EMGSFCaloExtensionBuilder::initialize() 
+{
+  ATH_CHECK(m_GSFPerigeeCacheKey.initialize());
+  ATH_CHECK(m_GSFLastCacheKey.initialize());
+  ATH_CHECK(m_GSFTrkPartContainerKey.initialize());
+  if(m_perigeeParticleCaloExtensionTool.retrieve().isFailure()){
+    ATH_MSG_ERROR("initialize: Cannot retrieve  " << m_perigeeParticleCaloExtensionTool);
+    return StatusCode::FAILURE;
+  }
+  if(m_lastParticleCaloExtensionTool.retrieve().isFailure()){
+    ATH_MSG_ERROR("initialize: Cannot retrieve " << m_lastParticleCaloExtensionTool);
+    return StatusCode::FAILURE;
+  }
+  return StatusCode::SUCCESS;
+}  
+
+StatusCode EMGSFCaloExtensionBuilder::EMGSFCaloExtensionBuilder::finalize(){ 
+  return StatusCode::SUCCESS;
+}
+
+StatusCode EMGSFCaloExtensionBuilder::execute()
+{
+  SG::ReadHandle<xAOD::TrackParticleContainer> tracks(m_GSFTrkPartContainerKey);
+
+  if(!tracks.isValid()) {
+    ATH_MSG_FATAL("Failed to retrieve TrackParticle container: "<< m_GSFTrkPartContainerKey.key());
+    return StatusCode::FAILURE;
+  }
+
+  SG::WriteHandle<CaloExtensionCollection> perigeeCache(m_GSFPerigeeCacheKey);
+  ATH_CHECK(perigeeCache.record(std::make_unique<CaloExtensionCollection>()));
+
+  SG::WriteHandle<CaloExtensionCollection> lastCache(m_GSFLastCacheKey); 
+  ATH_CHECK(lastCache.record(std::make_unique<CaloExtensionCollection>()));
+
+  const xAOD::TrackParticleContainer* ptrTracks=tracks.cptr();
+  CaloExtensionCollection* ptrPerigee=perigeeCache.ptr();
+  CaloExtensionCollection* ptrLast=lastCache.ptr();
+  std::vector<bool> mask (ptrTracks->size(),true);
+  ATH_CHECK(m_perigeeParticleCaloExtensionTool->caloExtensionCollection(*ptrTracks,mask,*ptrPerigee)); 
+  ATH_CHECK(m_lastParticleCaloExtensionTool->caloExtensionCollection(*ptrTracks,mask,*ptrLast));
+
+
+  return StatusCode::SUCCESS;
+}
+
+
diff --git a/Reconstruction/egamma/egammaAlgs/src/EMGSFCaloExtensionBuilder.h b/Reconstruction/egamma/egammaAlgs/src/EMGSFCaloExtensionBuilder.h
new file mode 100644
index 0000000000000000000000000000000000000000..ab4928206d0c024d170a5727d3263318b721eb6e
--- /dev/null
+++ b/Reconstruction/egamma/egammaAlgs/src/EMGSFCaloExtensionBuilder.h
@@ -0,0 +1,50 @@
+/*
+   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+ */
+
+#ifndef EGAMMAALGS_EMGSFCALOEXTENSIONBUILDER_H
+#define EGAMMAALGS_EMGSFCALOEXTENSIONBUILDER_H
+/**
+  @class EMGSFCaloExtensionBuilder
+  Algorithm which creates calo extension for all GSF
+  Track Particles
+  */
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
+#include "TrkCaloExtension/CaloExtensionCollection.h"
+#include "xAODTracking/TrackParticleContainerFwd.h"
+#include "RecoToolInterfaces/IParticleCaloExtensionTool.h"
+
+class EMGSFCaloExtensionBuilder : public AthAlgorithm 
+{
+public:
+  /** @brief Default constructor*/
+  EMGSFCaloExtensionBuilder(const std::string& name, ISvcLocator* pSvcLocator);
+
+  virtual StatusCode initialize() override final;
+  virtual StatusCode finalize() override final;
+  virtual StatusCode execute() override final;
+
+private:
+  /** @brief the Calo Extension tool*/
+  ToolHandle<Trk::IParticleCaloExtensionTool> m_lastParticleCaloExtensionTool {this,
+    "LastCaloExtentionTool", "Trk::ParticleCaloExtensionTool/EMLastCaloExtensionTool"};
+
+  ToolHandle<Trk::IParticleCaloExtensionTool> m_perigeeParticleCaloExtensionTool {this,
+    "PerigeeCaloExtentionTool", "Trk::ParticleCaloExtensionTool/EMParticleCaloExtensionTool"};
+
+  //Cache collections for GSF Track Particle extrapolation Perigee
+  SG::WriteHandleKey<CaloExtensionCollection>  m_GSFPerigeeCacheKey{this,
+    "GSFPerigeeCache", "GSFPerigeeCaloExtension", "Name of GSF Perigee extrapolation cache"};
+  SG::WriteHandleKey<CaloExtensionCollection>  m_GSFLastCacheKey{this,
+    "GSFLastCache", "GSFLastCaloExtension", "Name of GSF Last measurement extrapolation cache"};
+
+ //input GSF Track collection
+  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_GSFTrkPartContainerKey {this,
+    "GFFTrkPartContainerName", "GSFTrackParticles", 
+    "GSF TrackParticles"};
+
+};
+#endif //
diff --git a/Reconstruction/egamma/egammaAlgs/src/components/egammaAlgs_entries.cxx b/Reconstruction/egamma/egammaAlgs/src/components/egammaAlgs_entries.cxx
index 652d16ab4319d0f5a3ab22e1557aa4db98298451..d2e04127c24dd9ae7ad3e5a0fb67a278b647a732 100644
--- a/Reconstruction/egamma/egammaAlgs/src/components/egammaAlgs_entries.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/components/egammaAlgs_entries.cxx
@@ -10,6 +10,7 @@
 #include "../electronSuperClusterBuilder.h"
 #include "../photonSuperClusterBuilder.h"
 #include "../egammaSelectedTrackCopy.h"
+#include "../EMGSFCaloExtensionBuilder.h"
 
 DECLARE_COMPONENT( egammaBuilder )
 DECLARE_COMPONENT( egammaRecBuilder )
@@ -23,3 +24,4 @@ DECLARE_COMPONENT( egammaTopoClusterCopier )
 DECLARE_COMPONENT( electronSuperClusterBuilder )
 DECLARE_COMPONENT( photonSuperClusterBuilder )
 DECLARE_COMPONENT( egammaSelectedTrackCopy )
+DECLARE_COMPONENT( EMGSFCaloExtensionBuilder )
diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.cxx
index a4fedc9d71b0a1527c21ea5f674d7aa6220c6b61..96a545f173cdc2239797d401fca4166f734cec30 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.cxx
@@ -32,7 +32,7 @@ UPDATE : 25/06/2018
 #include <memory>
 
 egammaSelectedTrackCopy::egammaSelectedTrackCopy(const std::string& name, 
-                                         ISvcLocator* pSvcLocator):
+                                                 ISvcLocator* pSvcLocator):
   AthAlgorithm(name, pSvcLocator)
 {
 }
@@ -94,7 +94,9 @@ StatusCode egammaSelectedTrackCopy::execute()
   unsigned int selectedTracks(0);
   unsigned int selectedTRTTracks(0); 
   unsigned int selectedSiTracks(0);  
- 
+
+  //Extrapolation Cache
+  IEMExtrapolationTools::Cache cache{};
   for(const xAOD::TrackParticle* track : *trackTES){
     ATH_MSG_DEBUG ("Check Track with Eta "<< track->eta()<< " Phi " << track->phi()<<" Pt " <<track->pt());
     bool isTRT=false;
@@ -116,16 +118,14 @@ StatusCode egammaSelectedTrackCopy::execute()
     }
     for(const xAOD::CaloCluster* cluster : *clusterTES ){
       /*
-        check if it the track is selected due to this cluster.
-        If not continue to next cluster
-      */
-      if(!Select(cluster, isTRT,track )){
+         check if it the track is selected due to this cluster.
+         If not continue to next cluster
+         */
+      if(!Select(cluster,track,cache,isTRT)){
         ATH_MSG_DEBUG ("Track did not match cluster");
         continue;
       }
-      //Track is selected/matched
       ATH_MSG_DEBUG ("Track Matched");
-     //Push back the selected to the view container
       viewCopy->push_back(track); 
       ++selectedTracks;
       if(isTRT) {
@@ -162,10 +162,10 @@ StatusCode egammaSelectedTrackCopy::execute()
 }
 
 
-
-bool egammaSelectedTrackCopy::Select(const xAOD::CaloCluster*   cluster,
-                                 bool                       trkTRT,
-                                 const xAOD::TrackParticle* track) const
+bool egammaSelectedTrackCopy::Select(const xAOD::CaloCluster* cluster,
+                                     const xAOD::TrackParticle* track,
+                                     IEMExtrapolationTools::Cache& cache,
+                                     bool trkTRT) const
 {
 
   ATH_MSG_DEBUG("egammaSelectedTrackCopy::Select()" );
@@ -185,7 +185,6 @@ bool egammaSelectedTrackCopy::Select(const xAOD::CaloCluster*   cluster,
   if(trkTRT){
     Et = cluster->et();
   }
-
   // a few sanity checks
   if (fabs(clusterEta) > 10.0 || fabs(trkEta) > 10.0 || Et <= 0.0) {
     ATH_MSG_DEBUG("FAILS sanity checks :  Track Eta : " << trkEta 
@@ -197,7 +196,6 @@ bool egammaSelectedTrackCopy::Select(const xAOD::CaloCluster*   cluster,
   double etaclus_corrected = CandidateMatchHelpers::CorrectedEta(clusterEta,z_first,isEndCap);
   double phiRot = CandidateMatchHelpers::PhiROT(Et,trkEta, track->charge(),r_first ,isEndCap)  ;
   double phiRotTrack = CandidateMatchHelpers::PhiROT(track->pt(),trkEta, track->charge(),r_first ,isEndCap)  ;
-
   //Calcualate deltaPhis 
   double deltaPhiStd = P4Helpers::deltaPhi(cluster->phiBE(2), trkPhi);
   double trkPhiCorr = P4Helpers::deltaPhi(trkPhi, phiRot);
@@ -205,6 +203,13 @@ bool egammaSelectedTrackCopy::Select(const xAOD::CaloCluster*   cluster,
   double trkPhiCorrTrack = P4Helpers::deltaPhi(trkPhi, phiRotTrack);
   double deltaPhi2Track = P4Helpers::deltaPhi(cluster->phiBE(2), trkPhiCorrTrack);
 
+  /* 
+   * First we will see if it fails the quick match 
+   * Then if it passed it will get 2 chances to be selected
+   * One if it matches from last measurement
+   * The second if it matched from Perigee rescales
+   */
+
   if ((!trkTRT)&& fabs(cluster->etaBE(2) - trkEta) > 2*m_broadDeltaEta && 
       fabs( etaclus_corrected- trkEta) > 2.*m_broadDeltaEta){
     ATH_MSG_DEBUG("FAILS broad window eta match (track eta, cluster eta, cluster eta corrected): ( " 
@@ -218,9 +223,7 @@ bool egammaSelectedTrackCopy::Select(const xAOD::CaloCluster*   cluster,
                   << trkPhi << ", " << phiRot<< ", "<<phiRotTrack<< ", " << cluster->phiBE(2) << ")" );
     return false;
   }
-
   //Extrapolate from last measurement, since this is before brem fit last measurement is better.
-  IEMExtrapolationTools::TrkExtrapDef extrapFrom = IEMExtrapolationTools::fromLastMeasurement;
   std::vector<double>  eta(4, -999.0);
   std::vector<double>  phi(4, -999.0);
   std::vector<double>  deltaEta(4, -999.0);
@@ -233,20 +236,22 @@ bool egammaSelectedTrackCopy::Select(const xAOD::CaloCluster*   cluster,
                                            phi,
                                            deltaEta, 
                                            deltaPhi, 
-                                           extrapFrom).isFailure()) {return false;}  
+                                           IEMExtrapolationTools::fromLastMeasurement,
+                                           &cache).isFailure()) {
+    return false;
+  }  
 
   // Selection in narrow eta/phi window
   if(( trkTRT || fabs(deltaEta[2]) < m_narrowDeltaEta ) && 
      deltaPhi[2] < m_narrowDeltaPhi && 
      deltaPhi[2] > -m_narrowDeltaPhiBrem) {
-    ATH_MSG_DEBUG("Standard Match success " << deltaPhi[2] );
+    ATH_MSG_DEBUG("Match from Last measurement is successful :  " << deltaPhi[2] );
     return true;
   }
   else if(!trkTRT && fabs(deltaEta[2]) < m_narrowDeltaEta ){ 
-    ATH_MSG_DEBUG("Normal matched Failed deltaPhi/deltaEta " 
+    ATH_MSG_DEBUG("Failed from Last measurement with deltaPhi/deltaEta " 
                   << deltaPhi[2] <<" / "<< deltaEta[2]<<", Trying Rescale" );
     //Extrapolate from Perigee Rescaled 
-    IEMExtrapolationTools::TrkExtrapDef extrapFrom1 = IEMExtrapolationTools::fromPerigeeRescaled;
     std::vector<double>  eta1(4, -999.0);
     std::vector<double>  phi1(4, -999.0);
     std::vector<double>  deltaEta1(4, -999.0);
@@ -259,7 +264,7 @@ bool egammaSelectedTrackCopy::Select(const xAOD::CaloCluster*   cluster,
                                              phi1,
                                              deltaEta1, 
                                              deltaPhi1, 
-                                             extrapFrom1).isFailure()) return false;
+                                             IEMExtrapolationTools::fromPerigeeRescaled).isFailure()) return false;
     if( fabs(deltaEta1[2]) < m_narrowDeltaEta 
         && deltaPhi1[2] < m_narrowRescale
         && deltaPhi1[2] > -m_narrowRescaleBrem) {
@@ -271,7 +276,7 @@ bool egammaSelectedTrackCopy::Select(const xAOD::CaloCluster*   cluster,
                     << deltaPhi1[2] <<" / "<< deltaEta1[2] );
       return false;
     }
-  } 
+  }
   ATH_MSG_DEBUG("Matched Failed deltaPhi/deltaEta " << deltaPhi[2] <<" / "<< deltaEta[2]<<",isTRT, "<< trkTRT);
   return false;
 }
diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h b/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h
index 2d7878182f9d1943d49834321c5e2e6f5a9234a3..b44eff80443ffde71dd5bb980c45d8f7623adb6b 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h
@@ -39,10 +39,14 @@ public:
   virtual StatusCode execute() override final;
 
 private:
+
+
   /** @brief broad track selection */
   bool Select(const xAOD::CaloCluster* cluster,
-              bool trkTRT,
-              const xAOD::TrackParticle* track) const;
+              const xAOD::TrackParticle* track,
+              IEMExtrapolationTools::Cache& cache,
+              bool trkTRT) const;
+ 
   /** @brief Tool for extrapolation */
   ToolHandle<IEMExtrapolationTools> m_extrapolationTool {this,
     "ExtrapolationTool", "EMExtrapolationTools", "Extrapolation tool"};
diff --git a/Reconstruction/egamma/egammaCaloTools/CMakeLists.txt b/Reconstruction/egamma/egammaCaloTools/CMakeLists.txt
index 6c0f663bffb8bd22d24ba329b0be39946967f901..fe3e578fb6638143828f9e9ec65cd855ea9b8b3b 100644
--- a/Reconstruction/egamma/egammaCaloTools/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaCaloTools/CMakeLists.txt
@@ -19,7 +19,6 @@ atlas_depends_on_subdirs( PRIVATE
                           GaudiKernel
                           Reconstruction/egamma/egammaInterfaces )
 
-
 # Component(s) in the package:
 atlas_add_component( egammaCaloTools
                      src/*.cxx
diff --git a/Reconstruction/egamma/egammaEvent/CMakeLists.txt b/Reconstruction/egamma/egammaEvent/CMakeLists.txt
index 9b95b3b8dcf395c7ec62166d99e59818aa2d5582..20fce4fb7bd259f0d6e640eb7470839ec621bb1b 100644
--- a/Reconstruction/egamma/egammaEvent/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaEvent/CMakeLists.txt
@@ -10,11 +10,10 @@ atlas_depends_on_subdirs( PUBLIC
                           Calorimeter/CaloEvent
                           Calorimeter/CaloGeoHelpers
                           Calorimeter/CaloIdentifier
-                          Control/CLIDSvc
+                          Control/AthenaKernel
                           Control/AthContainers
                           Control/AthLinks
                           Control/Navigation
-                          Control/SGTools
                           Event/EventKernel
                           Event/FourMom
                           Event/NavFourMom
@@ -45,14 +44,14 @@ atlas_add_library( egammaEvent
                    INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${Boost_LIBRARIES} CaloEvent CaloGeoHelpers CaloIdentifier AthContainers AthLinks Navigation SGTools EventKernel FourMom NavFourMom ParticleEvent JetEvent Particle TrkParameters VxVertex
+                   LINK_LIBRARIES ${Boost_LIBRARIES} CaloEvent CaloGeoHelpers CaloIdentifier AthContainers AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom ParticleEvent JetEvent Particle TrkParameters VxVertex
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel egammaConditions TrkSurfaces TrkMaterialOnTrack TrkNeutralParameters TrkParametersBase TrkParticleBase TrkTrack )
 
 atlas_add_dictionary( egammaEventDict
                       egammaEvent/egammaEventDict.h
                       egammaEvent/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloGeoHelpers CaloIdentifier AthContainers AthLinks Navigation SGTools EventKernel FourMom NavFourMom ParticleEvent JetEvent Particle TrkParameters VxVertex GaudiKernel egammaConditions TrkSurfaces TrkMaterialOnTrack TrkNeutralParameters TrkParametersBase TrkParticleBase TrkTrack egammaEvent
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloGeoHelpers CaloIdentifier AthContainers AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom ParticleEvent JetEvent Particle TrkParameters VxVertex GaudiKernel egammaConditions TrkSurfaces TrkMaterialOnTrack TrkNeutralParameters TrkParametersBase TrkParticleBase TrkTrack egammaEvent
                       NAVIGABLES egammaContainer ElectronContainer PhotonContainer EMShowerMinimalContainer
                       ELEMENT_LINKS egDetailContainer CaloRingsContainer )
 
@@ -60,5 +59,5 @@ atlas_add_dictionary( egammaEnumsDict
                       egammaEvent/egammaEnumsDict.h
                       egammaEvent/selectionEnums.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloGeoHelpers CaloIdentifier AthContainers AthLinks Navigation SGTools EventKernel FourMom NavFourMom ParticleEvent JetEvent Particle TrkParameters VxVertex GaudiKernel egammaConditions TrkSurfaces TrkMaterialOnTrack TrkNeutralParameters TrkParametersBase TrkParticleBase TrkTrack egammaEvent )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloGeoHelpers CaloIdentifier AthContainers AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom ParticleEvent JetEvent Particle TrkParameters VxVertex GaudiKernel egammaConditions TrkSurfaces TrkMaterialOnTrack TrkNeutralParameters TrkParametersBase TrkParticleBase TrkTrack egammaEvent )
 
diff --git a/Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h b/Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h
index 36ca50f2cb84eab6178992798eeeef3a9653e328..d76214a6c1d2219b06ea04c0bf024b1b596a3793 100644
--- a/Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h
+++ b/Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h
@@ -9,7 +9,7 @@
 
 #include <vector>
 #include "CaloIdentifier/CaloCell_ID.h"
-#include "CLIDSvc/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 
 class RingSet {
   public:
diff --git a/Reconstruction/egamma/egammaEvent/egammaEvent/CaloRingsContainer.h b/Reconstruction/egamma/egammaEvent/egammaEvent/CaloRingsContainer.h
index e428c459669d10cf944dd93e11fd009e0cf48ba8..e51fa6429629561e4556d327cdced1e1856d8985 100755
--- a/Reconstruction/egamma/egammaEvent/egammaEvent/CaloRingsContainer.h
+++ b/Reconstruction/egamma/egammaEvent/egammaEvent/CaloRingsContainer.h
@@ -8,7 +8,7 @@
 // INCLUDE HEADER FILES:
 
 #include "AthContainers/DataVector.h"
-#include "CLIDSvc/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "egammaEvent/CaloRings.h"
 
 class CaloRingsContainer : public DataVector<CaloRings> 
@@ -18,15 +18,6 @@ class CaloRingsContainer : public DataVector<CaloRings>
 
   /** Main constructor */
   CaloRingsContainer(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS ) ;
-
-  /** reimplementation of push_back (temporary)*/
-  void push_back(const CaloRings *);
-
-  void push_back(CaloRings *);
-
-  /** wether it owns or not the cel SG::OWN_ELEMENTS or VIEW_ELEMENTS */
-  SG::OwnershipPolicy  m_ownPolicy ;
-
 };
 
 SG_BASE(CaloRingsContainer, DataVector<CaloRings>);
diff --git a/Reconstruction/egamma/egammaEvent/egammaEvent/EMShowerMinimal.h b/Reconstruction/egamma/egammaEvent/egammaEvent/EMShowerMinimal.h
index 9e49a4e5038b6e055e1f908837de18c3111dae4b..29f03f6ad30f2f62169b31fc3af8587096f25b07 100755
--- a/Reconstruction/egamma/egammaEvent/egammaEvent/EMShowerMinimal.h
+++ b/Reconstruction/egamma/egammaEvent/egammaEvent/EMShowerMinimal.h
@@ -32,7 +32,7 @@ UPDATED:
           Jun 14, 2007 (FD) Doxygen documentation
 
 ********************************************************************/
-#include "CLIDSvc/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "CaloEvent/CaloClusterContainer.h"
 #include "AthLinks/ElementLink.h"
 #include "Navigation/NavigableTerminalNode.h"
diff --git a/Reconstruction/egamma/egammaEvent/egammaEvent/EMShowerMinimalContainer.h b/Reconstruction/egamma/egammaEvent/egammaEvent/EMShowerMinimalContainer.h
index 425ae0403076f418d27dc15f4eec80ca48aab571..7ea7b12da2398523b73b7563a0a7dc202499e183 100755
--- a/Reconstruction/egamma/egammaEvent/egammaEvent/EMShowerMinimalContainer.h
+++ b/Reconstruction/egamma/egammaEvent/egammaEvent/EMShowerMinimalContainer.h
@@ -17,7 +17,7 @@ CREATED:  Sep 2003
 // INCLUDE HEADER FILES:
 
 #include "AthContainers/DataVector.h"
-#include "CLIDSvc/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "egammaEvent/EMShowerMinimal.h"
 
 class EMShowerMinimalContainer : public DataVector<EMShowerMinimal> 
diff --git a/Reconstruction/egamma/egammaEvent/egammaEvent/ElectronContainer.h b/Reconstruction/egamma/egammaEvent/egammaEvent/ElectronContainer.h
index ab74538d81bc1a3ffc463ef95e4042019819de4c..e4336658f67ef328d2d2c5475a25c2bc88bcc1b2 100755
--- a/Reconstruction/egamma/egammaEvent/egammaEvent/ElectronContainer.h
+++ b/Reconstruction/egamma/egammaEvent/egammaEvent/ElectronContainer.h
@@ -22,7 +22,7 @@ PACKAGE:  offline/Reconstruction/egammaEvent
 // INCLUDE HEADER FILES:
 
 #include "AthContainers/DataVector.h"
-#include "CLIDSvc/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "egammaEvent/Electron.h"
 #include "egammaEvent/egammaContainer.h"
 
@@ -37,14 +37,6 @@ class ElectronContainer : public DataVector<Analysis::Electron>
   /** @brief Main constructor */
   ElectronContainer(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS ) ;
 
-  /** @brief wether it owns or not the el SG::OWN_ELEMENTS or VIEW_ELEMENTS */
-  SG::OwnershipPolicy  m_ownPolicy ;
-
-  /** reimplementation of push_back (temporary)*/
-  void push_back(const Analysis::Electron*);
-
-  void push_back(Analysis::Electron*);
-
   void print();
 };
 
diff --git a/Reconstruction/egamma/egammaEvent/egammaEvent/PhotonContainer.h b/Reconstruction/egamma/egammaEvent/egammaEvent/PhotonContainer.h
index c16c1ef5717a07396aaacfb19cf394f9ab027f3b..4cc217ea9952dfb49cd0a5ca7faf270a6d75ecad 100755
--- a/Reconstruction/egamma/egammaEvent/egammaEvent/PhotonContainer.h
+++ b/Reconstruction/egamma/egammaEvent/egammaEvent/PhotonContainer.h
@@ -20,7 +20,7 @@ PACKAGE:  offline/Reconstruction/egammaEvent
 // INCLUDE HEADER FILES:
 
 #include "AthContainers/DataVector.h"
-#include "CLIDSvc/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "egammaEvent/Photon.h"
 #include "egammaEvent/egammaContainer.h"
 
@@ -35,14 +35,6 @@ class PhotonContainer : public DataVector<Analysis::Photon>
   /** @brief Main constructor */
   PhotonContainer(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS ) ;
 
-  /** @brief wether it owns or not the cel SG::OWN_ELEMENTS or VIEW_ELEMENTS */
-  SG::OwnershipPolicy  m_ownPolicy ;
-
-  /** reimplementation of push_back (temporary)*/
-  void push_back(const Analysis::Photon*);
-
-  void push_back(Analysis::Photon*);
-
   void print();
 };
 
diff --git a/Reconstruction/egamma/egammaEvent/egammaEvent/egDetailContainer.h b/Reconstruction/egamma/egammaEvent/egammaEvent/egDetailContainer.h
index fc13783af62553656ca42c0eeff830de29771265..e9677cce51633db087509d83ce7e66b0eadd6e63 100755
--- a/Reconstruction/egamma/egammaEvent/egammaEvent/egDetailContainer.h
+++ b/Reconstruction/egamma/egammaEvent/egammaEvent/egDetailContainer.h
@@ -11,7 +11,7 @@
 */
 
 #include "AthContainers/DataVector.h"
-#include "CLIDSvc/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "egammaEvent/egDetail.h"
 
 class egDetailContainer : public DataVector<egDetail> 
@@ -22,12 +22,6 @@ class egDetailContainer : public DataVector<egDetail>
 
   /** @brief Main constructor */
   egDetailContainer(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS ) ;
-
- private:
-
-  /** wether it owns or not the cel SG::OWN_ELEMENTS or VIEW_ELEMENTS */
-  //SG::OwnershipPolicy  m_ownPolicy ;
-
 };
 
 CLASS_DEF(egDetailContainer, 1180687045, 1)
diff --git a/Reconstruction/egamma/egammaEvent/egammaEvent/egammaContainer.h b/Reconstruction/egamma/egammaEvent/egammaEvent/egammaContainer.h
index 232034f040c63df43c66d7b17e876f514b8e17c1..c5778777bb6eb6512d2e038e2bddaf02b230c88e 100755
--- a/Reconstruction/egamma/egammaEvent/egammaEvent/egammaContainer.h
+++ b/Reconstruction/egamma/egammaEvent/egammaEvent/egammaContainer.h
@@ -29,7 +29,7 @@ Updated: moved to egammaEvent (SR)
 // INCLUDE HEADER FILES:
 
 #include "AthContainers/DataVector.h"
-#include "SGTools/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "egammaEvent/egamma.h"
 
 #include "NavFourMom/IParticleContainer.h"
@@ -47,14 +47,6 @@ class egammaContainer : public DataVector<egamma>
 
   void print();
 
-  /** wether it owns or not the cel SG::OWN_ELEMENTS or VIEW_ELEMENTS */
-  SG::OwnershipPolicy  m_ownPolicy ;
-
-  /** reimplementation of push_back (temporary)*/
-  void push_back(const egamma *);
-
-  void push_back(egamma *);
-
 };
 
 SG_BASE(egammaContainer, DataVector<egamma>);
diff --git a/Reconstruction/egamma/egammaEvent/src/CaloRingsContainer.cxx b/Reconstruction/egamma/egammaEvent/src/CaloRingsContainer.cxx
index 6568c9ece36ebae7b2674e69530a52d4f2210d9a..eab9c41b0b4532bec5e89974d25219eb4a6a1d1c 100755
--- a/Reconstruction/egamma/egammaEvent/src/CaloRingsContainer.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/CaloRingsContainer.cxx
@@ -12,26 +12,6 @@
 //  END OF HEADER FILES INCLUDE
 
 CaloRingsContainer::CaloRingsContainer(SG::OwnershipPolicy ownPolicy ) : 
-  DataVector<CaloRings>(ownPolicy),
-  m_ownPolicy(ownPolicy)
+  DataVector<CaloRings>(ownPolicy)
 {}
 
-// push_back with const_cast (temporary)
-void CaloRingsContainer::push_back(const CaloRings * eg)
-{
-
-  if (m_ownPolicy==SG::OWN_ELEMENTS){
-    std::cout << "ERROR Should not push_back const cell in OWN egammaContainer." << std::endl;
-  }
-
-  // have to const_cast because egammaContainer is a DataVector<egamma> not const egamma
-  CaloRings * theNonConsteg = const_cast<CaloRings*>(eg);
-  
-  DataVector<CaloRings>::push_back(theNonConsteg) ;
-}
-
-void CaloRingsContainer::push_back(CaloRings * eg)
-{
-  DataVector<CaloRings>::push_back(eg) ;
-}
-
diff --git a/Reconstruction/egamma/egammaEvent/src/EMBremFit.cxx b/Reconstruction/egamma/egammaEvent/src/EMBremFit.cxx
index 6ccfd15ee29875cc6d49094e4ecf34bb40f4ab05..08f3d11e18801aa5eeb529a705ba9684ab0309dd 100755
--- a/Reconstruction/egamma/egammaEvent/src/EMBremFit.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/EMBremFit.cxx
@@ -21,8 +21,8 @@ PURPOSE:  object containing information about Bremstrahlung fit
 #include <iostream>
 #include "egammaEvent/EMBremFit.h"
 #include "GaudiKernel/GaudiException.h"
-#include "SGTools/ClassName.h"
-#include "SGTools/BaseInfo.h"
+#include "AthenaKernel/ClassName.h"
+#include "AthenaKernel/BaseInfo.h"
 
 //  END OF HEADER FILES INCLUDE
 
diff --git a/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx b/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx
index 31ec2068baf72f4f71d8f183c969c73a160687b2..ca6ecece0b147c28b771aacafe1a8999729ab826 100755
--- a/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx
@@ -22,7 +22,7 @@ UPDATED:  Jul 30, 2010 (JM) Add ambiguity result
 #include "egammaEvent/EMConvert.h"
 
 #include "GaudiKernel/GaudiException.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 
 #include "CLHEP/Matrix/SymMatrix.h"
 #include "VxVertex/VxCandidate.h"
@@ -30,7 +30,7 @@ UPDATED:  Jul 30, 2010 (JM) Add ambiguity result
 #include "VxVertex/VxTrackAtVertex.h"
 #include "VxVertex/RecVertex.h"
 #include "TrkParameters/TrackParameters.h"
-#include "SGTools/BaseInfo.h"
+#include "AthenaKernel/BaseInfo.h"
 
 
 using CLHEP::Hep3Vector;
diff --git a/Reconstruction/egamma/egammaEvent/src/EMErrorDetail.cxx b/Reconstruction/egamma/egammaEvent/src/EMErrorDetail.cxx
index 0b14a7e4428ad6bb4feb995608fa11d93ce7c1a6..f52ba70fa39b505b486f3585dba3e214b73c7f28 100644
--- a/Reconstruction/egamma/egammaEvent/src/EMErrorDetail.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/EMErrorDetail.cxx
@@ -5,7 +5,7 @@
 #include "egammaEvent/EMErrorDetail.h"
 #include "GaudiKernel/GaudiException.h"
 #include "egammaEvent/EMShower.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 #include "AthLinks/ElementLink.h"
 #include "TrkTrack/Track.h" 
 #include "TrkParametersBase/ParametersBase.h"
@@ -15,7 +15,7 @@
 #include "VxVertex/VxTrackAtVertex.h"
 #include "VxVertex/VxCandidate.h"
 #include "egammaConditions/EMClusterErrorsParametrizations.h"
-#include "SGTools/BaseInfo.h"
+#include "AthenaKernel/BaseInfo.h"
 
 #include <cmath>
 
diff --git a/Reconstruction/egamma/egammaEvent/src/EMShower.cxx b/Reconstruction/egamma/egammaEvent/src/EMShower.cxx
index fe9a9d008b366014f38a287a0aa6e2959456a913..11c91fb94f022b6d5bd1551202a4b475d759297f 100755
--- a/Reconstruction/egamma/egammaEvent/src/EMShower.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/EMShower.cxx
@@ -46,7 +46,7 @@ Updated:  Jan 13, 2001   (MW)
 
 #include "egammaEvent/EMShower.h"
 #include "GaudiKernel/GaudiException.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 #include <iomanip>
 #include <iostream>
 
diff --git a/Reconstruction/egamma/egammaEvent/src/EMTrackFit.cxx b/Reconstruction/egamma/egammaEvent/src/EMTrackFit.cxx
index 2356c2c58980cfd85f82a43c717d5f02a2c6f2e4..001b2882e5b718fc9e46c473fb983e94048d4f41 100644
--- a/Reconstruction/egamma/egammaEvent/src/EMTrackFit.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/EMTrackFit.cxx
@@ -22,12 +22,12 @@ MODIFIED:
 #include <math.h>
 #include "egammaEvent/EMTrackFit.h"
 #include "GaudiKernel/GaudiException.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 #include "TrkTrack/Track.h" 
 #include "TrkMaterialOnTrack/EstimatedBremOnTrack.h"
 #include "TrkSurfaces/Surface.h"
 #include "TrkSurfaces/PerigeeSurface.h"
-#include "SGTools/BaseInfo.h"
+#include "AthenaKernel/BaseInfo.h"
 
 
 
diff --git a/Reconstruction/egamma/egammaEvent/src/EMTrackMatch.cxx b/Reconstruction/egamma/egammaEvent/src/EMTrackMatch.cxx
index fd1afb67692ded887ac8ed50be1d361b9455087d..123d6c1e27c5e153910387f3daed702141d40752 100755
--- a/Reconstruction/egamma/egammaEvent/src/EMTrackMatch.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/EMTrackMatch.cxx
@@ -39,8 +39,8 @@ Updated:  Jan, 2004 (FD+AK)
 // INCLUDE HEADER FILES:
 #include <math.h>
 #include "egammaEvent/EMTrackMatch.h"
-#include "SGTools/BaseInfo.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/BaseInfo.h"
+#include "AthenaKernel/ClassName.h"
 #include "GaudiKernel/GaudiException.h"
 
 //  END OF HEADER FILES INCLUDE
diff --git a/Reconstruction/egamma/egammaEvent/src/Electron.cxx b/Reconstruction/egamma/egammaEvent/src/Electron.cxx
index c43335f72f7833fac267f9a50a4256dbaa61c313..46e8962b23b13410f313ec20686cfe8ac61b67fe 100644
--- a/Reconstruction/egamma/egammaEvent/src/Electron.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/Electron.cxx
@@ -3,7 +3,7 @@
 */
 
 #include "egammaEvent/Electron.h"
-#include "SGTools/BaseInfo.h"
+#include "AthenaKernel/BaseInfo.h"
 
 
 namespace Analysis {
diff --git a/Reconstruction/egamma/egammaEvent/src/ElectronContainer.cxx b/Reconstruction/egamma/egammaEvent/src/ElectronContainer.cxx
index f8aa09bf9f0bc714ad41a9673d47b89890b44db2..ae2aeea105915d8d175f0f1e0876573b14be7c7f 100755
--- a/Reconstruction/egamma/egammaEvent/src/ElectronContainer.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/ElectronContainer.cxx
@@ -19,30 +19,9 @@ PACKAGE:  offline/Reconstruction/egammaEvent
 //  END OF HEADER FILES INCLUDE
 
 ElectronContainer::ElectronContainer(SG::OwnershipPolicy ownPolicy ) : 
-  DataVector<Analysis::Electron>(ownPolicy),
-  m_ownPolicy(ownPolicy)
+  DataVector<Analysis::Electron>(ownPolicy)
 {}
 
-// push_back with const_cast (temporary)
-void ElectronContainer::push_back(const Analysis::Electron* El)
-{
-
-  if (m_ownPolicy==SG::OWN_ELEMENTS) {
-    std::cout << "ERROR Should not push_back const cell in OWN egammaContainer." << std::endl;
-  }
-
-  // have to const_cast because egammaContainer is a DataVector<egamma> not const Electron
-  Analysis::Electron* theNonConstEl = const_cast<Analysis::Electron*>(El);
-  
-  DataVector<Analysis::Electron>::push_back(theNonConstEl) ;
-}
-
-void ElectronContainer::push_back(Analysis::Electron* El)
-{
-  DataVector<Analysis::Electron>::push_back(El) ;
-}
-
-
 // print objects found in container
 void ElectronContainer::print()
 { 
diff --git a/Reconstruction/egamma/egammaEvent/src/Photon.cxx b/Reconstruction/egamma/egammaEvent/src/Photon.cxx
index 937a3d470b45e3457002fdd01929c48e611e35b6..5413c541b45f3591f68105553c4a155e97119ac2 100644
--- a/Reconstruction/egamma/egammaEvent/src/Photon.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/Photon.cxx
@@ -3,7 +3,7 @@
 */
 
 #include "egammaEvent/Photon.h"
-#include "SGTools/BaseInfo.h"
+#include "AthenaKernel/BaseInfo.h"
 
 
 namespace Analysis {
diff --git a/Reconstruction/egamma/egammaEvent/src/PhotonContainer.cxx b/Reconstruction/egamma/egammaEvent/src/PhotonContainer.cxx
index 91a764f24723db0f01ebd52ad8faf596c88dd222..9801099eff34ea72a90943c1d207d81c24af41cf 100755
--- a/Reconstruction/egamma/egammaEvent/src/PhotonContainer.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/PhotonContainer.cxx
@@ -19,29 +19,9 @@ PACKAGE:  offline/Reconstruction/egammaEvent
 //  END OF HEADER FILES INCLUDE
 
 PhotonContainer::PhotonContainer(SG::OwnershipPolicy ownPolicy ) : 
-  DataVector<Analysis::Photon>(ownPolicy),
-  m_ownPolicy(ownPolicy)
+  DataVector<Analysis::Photon>(ownPolicy)
 {}
 
-// push_back with const_cast (temporary)
-void PhotonContainer::push_back(const Analysis::Photon* Ph)
-{
-
-  if (m_ownPolicy==SG::OWN_ELEMENTS) {
-    std::cout << "ERROR Should not push_back const cell in OWN egammaContainer." << std::endl;
-  }
-
-  // have to const_cast because egammaContainer is a DataVector<egamma> not const Photon
-  Analysis::Photon* theNonConstPh = const_cast<Analysis::Photon*>(Ph);
-  
-  DataVector<Analysis::Photon>::push_back(theNonConstPh) ;
-}
-
-void PhotonContainer::push_back(Analysis::Photon* Ph)
-{
-  DataVector<Analysis::Photon>::push_back(Ph) ;
-}
-
 // print objects found in container
 void PhotonContainer::print()
 { 
diff --git a/Reconstruction/egamma/egammaEvent/src/egDetail.cxx b/Reconstruction/egamma/egammaEvent/src/egDetail.cxx
index 6f4b999715db6ccc65bb3b615a00427ed3b52c90..b2f1c23519aadcd352330eb756b77806b4495f89 100755
--- a/Reconstruction/egamma/egammaEvent/src/egDetail.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/egDetail.cxx
@@ -4,7 +4,7 @@
 
 #include "egammaEvent/egDetail.h"
 #include "egammaEvent/egammaParamDefs.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 
 egDetail::egDetail() 
 { }
diff --git a/Reconstruction/egamma/egammaEvent/src/egDetailContainer.cxx b/Reconstruction/egamma/egammaEvent/src/egDetailContainer.cxx
index bc8ad357f0eaca0644d60fcb316c5aa5499afe27..d66a12cac44e15be7a81e620978190b1a55fc079 100755
--- a/Reconstruction/egamma/egammaEvent/src/egDetailContainer.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/egDetailContainer.cxx
@@ -21,7 +21,6 @@ PACKAGE:  offline/Reconstruction/egammaEvent
 //  END OF HEADER FILES INCLUDE
 
 egDetailContainer::egDetailContainer(SG::OwnershipPolicy ownPolicy ) : 
-  DataVector<egDetail>(ownPolicy)//,
-  //m_ownPolicy(ownPolicy)
+  DataVector<egDetail>(ownPolicy)
 {}
 
diff --git a/Reconstruction/egamma/egammaEvent/src/egamma.cxx b/Reconstruction/egamma/egammaEvent/src/egamma.cxx
index bad66f7037e3d2f0cc394eb0777733afd32e03dc..92371f7e9cde4ca92d34ca2d58a6a6b94c7af862 100755
--- a/Reconstruction/egamma/egammaEvent/src/egamma.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/egamma.cxx
@@ -11,7 +11,7 @@
 #include "CaloEvent/CaloCluster.h"
 #include "egammaEvent/EMErrorDetail.h"
 #include "egammaEvent/egammaPIDdefsObs.h"
-#include "SGTools/BaseInfo.h"
+#include "AthenaKernel/BaseInfo.h"
 
 #include <iomanip>
 #include <iostream>
diff --git a/Reconstruction/egamma/egammaEvent/src/egammaContainer.cxx b/Reconstruction/egamma/egammaEvent/src/egammaContainer.cxx
index 7b78d618f4dc577ac62cf5d096e17ab46c9afdf3..fffd09cd1724d9f7b5421fa9be055e27e8c6e536 100755
--- a/Reconstruction/egamma/egammaEvent/src/egammaContainer.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/egammaContainer.cxx
@@ -26,29 +26,9 @@ Updated:  Moved to egammaEvent
 //  END OF HEADER FILES INCLUDE
 
 egammaContainer::egammaContainer(SG::OwnershipPolicy ownPolicy ) : 
-  DataVector<egamma>(ownPolicy),
-  m_ownPolicy(ownPolicy)
+  DataVector<egamma>(ownPolicy)
 {}
 
-// push_back with const_cast (temporary)
-void egammaContainer::push_back(const egamma * eg)
-{
-
-  if (m_ownPolicy==SG::OWN_ELEMENTS){
-    std::cout << "ERROR Should not push_back const cell in OWN egammaContainer." << std::endl;
-  }
-
-  // have to const_cast because egammaContainer is a DataVector<egamma> not const egamma
-  egamma * theNonConsteg = const_cast<egamma*>(eg);
-  
-  DataVector<egamma>::push_back(theNonConsteg) ;
-}
-
-void egammaContainer::push_back(egamma * eg)
-{
-  DataVector<egamma>::push_back(eg) ;
-}
-
 // print objects found in container
 void egammaContainer::print()
 { 
diff --git a/Reconstruction/egamma/egammaInterfaces/CMakeLists.txt b/Reconstruction/egamma/egammaInterfaces/CMakeLists.txt
index 461b05cc12769dfc2c1624366b42e31d8557d860..8056716b817c6c797a22e76a5298cd15bbedebf4 100644
--- a/Reconstruction/egamma/egammaInterfaces/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaInterfaces/CMakeLists.txt
@@ -10,23 +10,17 @@ atlas_depends_on_subdirs( PUBLIC
                           Event/xAOD/xAODCaloEvent
                           Event/xAOD/xAODEgamma
                           Event/xAOD/xAODTracking
-                          Reconstruction/egamma/egammaRecEvent
                           GaudiKernel
-                          DetectorDescription/GeoPrimitives
-                          Event/EventPrimitives
                           Tracking/TrkEvent/TrkEventPrimitives
                           Tracking/TrkEvent/TrkNeutralParameters
-                          Tracking/TrkEvent/TrkParameters )
+                          Tracking/TrkEvent/TrkParameters 
+			  Tracking/TrkEvent/TrkCaloExtension)
 
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
-# Component(s) in the package:
 atlas_add_dictionary( egammaInterfacesDict
                       egammaInterfaces/egammaInterfacesDict.h
                       egammaInterfaces/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} xAODCaloEvent xAODEgamma xAODTracking GaudiKernel TrkEventPrimitives TrkNeutralParameters TrkParameters )
+                      INCLUDE_DIRS 
+		      LINK_LIBRARIES ${ROOT_LIBRARIES} xAODCaloEvent xAODEgamma xAODTracking GaudiKernel TrkEventPrimitives TrkNeutralParameters TrkParameters TrkCaloExtension)
 
 # Install files from the package:
 atlas_install_headers( egammaInterfaces )
diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMExtrapolationTools.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMExtrapolationTools.h
index ef748f5c7d8b2370c90931d5feab486f77aa51f6..42dd90a6e2cd20850132ee4804bff4f665c51524 100644
--- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMExtrapolationTools.h
+++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMExtrapolationTools.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef EGAMMAINTERFACES_IEMEXTRAPOLATIONTOOLS_H
@@ -12,13 +12,17 @@
 #include "xAODCaloEvent/CaloClusterFwd.h"
 #include "xAODTracking/TrackParticleFwd.h"
 #include "xAODTracking/VertexFwd.h"
+#include "TrkCaloExtension/CaloExtension.h"
+#include <memory>
+#include <unordered_map>
+
 
 
 static const InterfaceID IID_IEMExtrapolationTools("IEMExtrapolationTools", 1, 0);
 
 class IEMExtrapolationTools : virtual public IAlgTool {
 
- public:
+public:
 
   /** Enum for track extrapolation to calo */
   enum TrkExtrapDef {
@@ -42,6 +46,7 @@ class IEMExtrapolationTools : virtual public IAlgTool {
   /** finalize method*/
   virtual StatusCode finalize() = 0;
 
+  typedef  std::unordered_map<size_t,std::unique_ptr<Trk::CaloExtension>> Cache;
   /**  test for cluster/extrapolated track match, from Trk::TrackParticleBase,
    *   returns true for good match, and the values for eta/phi, 
    *     deltaEta/deltaPhi for sampling 2
@@ -54,7 +59,8 @@ class IEMExtrapolationTools : virtual public IAlgTool {
                               std::vector<double>&          phi,
                               std::vector<double>&          deltaEta,
                               std::vector<double>&          deltaPhi,
-                              unsigned int                  extrapFrom = fromPerigee) const = 0;
+                              unsigned int                  extrapFrom = fromPerigee,
+                              Cache* cache=nullptr) const = 0;
 
 
   /**   get eta, phi, deltaEta, and deltaPhi at the four calorimeter
@@ -63,24 +69,18 @@ class IEMExtrapolationTools : virtual public IAlgTool {
    */
   virtual StatusCode getMatchAtCalo (const xAOD::CaloCluster*            cluster, 
                                      const xAOD::TrackParticle* trkPB,
-				      bool                          isTRT,                         
-				     Trk::PropDirection            direction,
+                                     bool                          isTRT,                         
+                                     Trk::PropDirection            direction,
                                      std::vector<double>&          eta,
                                      std::vector<double>&          phi,
                                      std::vector<double>&          deltaEta,
                                      std::vector<double>&          deltaPhi,
-                                     unsigned int                  extrapFrom = fromPerigee) const = 0;
-
+                                     unsigned int                  extrapFrom = fromPerigee,
+                                     Cache* cache=nullptr) const = 0;
 
-  /**  test for cluster/extrapolated track match, from NeutralParticle */
-  virtual bool  matchesAtCalo(const xAOD::CaloCluster*           cluster,       
-                              const Trk::NeutralParameters*      perigee, 
-                              bool                               isTRT,
-                              double&                            deltaEta,
-                              double&                            deltaPhi) const = 0;
 
   /** test for vertex-to-cluster match given also the positions 
-    * at the calorimeter from the vertex extrapolation  **/
+   * at the calorimeter from the vertex extrapolation  **/
   virtual bool matchesAtCalo(const xAOD::CaloCluster* cluster,
                              const xAOD::Vertex *vertex,
                              float etaAtCalo,
@@ -88,20 +88,20 @@ class IEMExtrapolationTools : virtual public IAlgTool {
 
 
   /** get eta, phi at EM2 given a vertex which is converted to NeutralParameters.
-      Return false if the extrapolation fails **/
+    Return false if the extrapolation fails **/
   virtual bool getEtaPhiAtCalo (const xAOD::Vertex* vertex, 
                                 float *etaAtCalo,
                                 float *phiAtCalo) const = 0;
 
   /** get eta, phi at EM2 given NeutralParameters.
-      Return false if the extrapolation fails **/
+    Return false if the extrapolation fails **/
   virtual bool getEtaPhiAtCalo (const Trk::TrackParameters* trkPar, 
-				float *etaAtCalo,
-				float *phiAtCalo) const =0;
-  
+                                float *etaAtCalo,
+                                float *phiAtCalo) const =0;
+
   /** get the momentum of the i-th at the vertex (designed for conversions) **/
   virtual Amg::Vector3D getMomentumAtVertex(const xAOD::Vertex&, unsigned int) const = 0;
-    
+
   /** get sum of the momenta at the vertex (designed for conversions). Retrieve from auxdata if available and \<reuse\> is true **/
   virtual Amg::Vector3D getMomentumAtVertex(const xAOD::Vertex&, bool reuse = true) const = 0;
 
diff --git a/Reconstruction/egamma/egammaRec/python/Factories.py b/Reconstruction/egamma/egammaRec/python/Factories.py
index 9f1cf598be2f4b83c7b2ceafce4497f46b22810c..770e12fd1a31c7230d4b5deee7d615f6edcbb6d9 100644
--- a/Reconstruction/egamma/egammaRec/python/Factories.py
+++ b/Reconstruction/egamma/egammaRec/python/Factories.py
@@ -1,5 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 __doc__ = "Factories to lazy instantiate Private/Public Tools and Algorithms"
 __authors__ = "Bruno Lenzi, Christos Anastopoulos, Jovan Mitrevski"
 from AthenaCommon.Logging import logging
@@ -97,8 +96,8 @@ class FullNameWrapper( FcnWrapper ):
 
 class Factory:
   """Factory: base class of ToolFactory and AlgFactory.
-  Allows to "lazy" instantiate tools (algs) and add them to ToolSvc (TopSequence) if needed.
-  Allows to set properties in the c-tor , including other factories,tools and also define preInit/postInit methods.
+  Allows to "lazy" instantiate tools/algs/services. Properties are set in the c-tor , 
+  and can include other factories,tools. One can also define preInit/postInit methods.
   The end result is that the configuration can be defined/formed/composed before the actual instantiation  
   which happens when needed, i.e at demand  via () (__call__())  method.
   
@@ -113,15 +112,14 @@ class Factory:
   # default via FcnWrapper or ToolFactory instance, called when the tool is instantiated
   def getNameOfTool2(): return MyTool2().getFullName()
   MyTool3 = ToolFactory(MyPkgConf.MyTool3, 
-    Tool1 = MyTool1, # ToolFactory instance, not actual tool instance (the tool intantiated when needed)
+    Tool1 = MyTool1, # ToolFactory instance, not actual tool instance 
     NameOfTool2 = FcnWrapper(getNameOfTool2), # could have used FullNameWrapper( MyTool2 )
   ) 
-  
+
   # Actual tool instantiation at demand
   MyTool1() # create tool instance with default values
   MyTool2(propertyY = 'xx') # create a tool instance overriding default propertyY. At this point setPropertyX will be called
   MyTool3() # create default instance, will all try to instantiate MyTool1 (effect depends on Private/Public usage)
-  
   tool2a = MyTool2('myTool2a') # create another factory instance with the same properties as MyTool2 above ('x')
   tool3a = MyTool3('myTool3a', Tool1 = MyTool1('myTool1a', propertyA = 'B'),NameOfTool2 = 'myTool2a') 
   # create another factory instance overriding  both properties set above for MyTool3
@@ -148,7 +146,8 @@ class Factory:
   def __call__(self, name = '', **kw ):
     """Call preInit functions, instantiate tool (alg), call postInit functions and add
        to ToolSvc (TopSequence)"""
-    params = dict(self.defaults, **kw)
+    params=self.defaults.copy()
+    params.update(kw)
     params['name'] = name or params.get('name', self.iclass.__name__)
     del name, kw # to avoid silly mistakes    
 
@@ -166,8 +165,8 @@ class Factory:
        treatException('calling preInit function %s on %s instantiation\n' %  (fcn.__name__, params['name']))
        raise
     
-    # Call FcnWrapper or ToolFactory parameters 
-    # (or if they are inside a list, for ToolHandleArray)
+    # Instantiate the Factory  parameters or call the Function wrappers.  
+    # (if they are inside a list -->ToolHandleArray loop over them)
     classes = (FcnWrapper, ToolFactory, PublicToolFactory, ServiceFactory)
     for paramName, value in params.items():
       if isinstance(value, classes) or \
@@ -212,56 +211,56 @@ class ToolFactory( Factory ):
 
   def __init__(self, iclass, **defaults ):
     self.iclass = iclass
-    self.defaults = dict({'doAdd': False}, **defaults)
+    self.defaults={'doAdd': False}
+    self.defaults.update(defaults)
 
   def add(self, obj):
-      factoriesInfo("Tool with name ==> %s  will not be added in ToolSvc, use PublicToolFactory for public tools" %  obj.getFullName() )
+      factoriesInfo("Tool with name ==> %s  is a Private Tool, will not be added in ToolSvc" %  obj.getFullName() )
       pass
 
   def copyPublic(self, name, **kw):
     "copy(self, name, **kw) --> return a new instance of the factory as a puclic tool with new name and defaults"
-
-    deflt = dict(self.defaults, **kw)
-
+    deflt = self.defaults.copy()
+    deflt.update(kw)
     deflt['name'] = name
     deflt['doAdd'] = True
-
     return PublicToolFactory(self.iclass, **deflt )
 
-
 class PublicToolFactory( Factory ):
   """ToolFactory: to instantiate tools. Adds in ToolSvc (public tools). See Factory"""
-
   def __init__(self, iclass, **defaults ):
     self.iclass = iclass
-    self.defaults = dict({'doAdd': True}, **defaults)
-
+    self.defaults={'doAdd': True}
+    self.defaults.update(defaults)
+    
   def add(self, obj):
     if not isAlreadyInToolSvc(obj.getName()):
-      factoriesInfo("Adding new Tool ===> %s" % obj.getFullName())
+      factoriesInfo("Adding new Public Tool ===> %s" % obj.getFullName())
       addToToolSvc(obj)
     else :
-      factoriesInfo("Tool with name ==> %s  already in ToolSvc, use existing instance" %  obj.getFullName() )
+      factoriesInfo("Public Tool with name ==> %s  already in ToolSvc, using existing instance" %  obj.getFullName() )
 
 class ServiceFactory( Factory ):
   """ServiceFactory: to instantiate services. Adds to ServiceMgr. See Factory"""
 
   def __init__(self, iclass, **defaults ):
     self.iclass = iclass
-    self.defaults = dict({'doAdd': True}, **defaults)
+    self.defaults={'doAdd': True}
+    self.defaults.update(defaults)
 
   def add(self, obj):
     if not isAlreadyInServiceMgr(obj.getName()):
       factoriesInfo("Adding new Service ===> %s" % obj.getFullName())
       addToServiceMgr(obj)
     else :
-      factoriesInfo("Service with name ==> %s  already in ServiceMgr, use existing instance" %  obj.getFullName() )
+      factoriesInfo("Service with name ==> %s  already in ServiceMgr, using existing instance" %  obj.getFullName() )
 
 class AlgFactory( Factory ):
   """AlgFactory: to instantiate algs and add them to TopSequence. See Factory"""
   def __init__(self, iclass, **defaults ):
     self.iclass = iclass
-    self.defaults = dict({'doAdd': True}, **defaults)
+    self.defaults={'doAdd': True}
+    self.defaults.update(defaults)
     
   def add(self, obj):
     factoriesInfo("Adding new Algorithm ==> %s " %obj.getFullName())
diff --git a/Reconstruction/egamma/egammaRec/python/egammaRecFlags.py b/Reconstruction/egamma/egammaRec/python/egammaRecFlags.py
index 61367ac2e30ed6727d33325495175fb85395473a..72c432121ddf7cb0d73c6c8ff0414dd66bf74959 100755
--- a/Reconstruction/egamma/egammaRec/python/egammaRecFlags.py
+++ b/Reconstruction/egamma/egammaRec/python/egammaRecFlags.py
@@ -52,7 +52,7 @@ class doTopoCaloSeeded (JobProperty):
     StoredValue=True
 
 class doBremFinding (egammaRecFlagsJobProperty):
-    """ switch for whether to do the brem binding
+    """ switch for whether to do the brem finding
     """
     statusOn=True
     allowedTypes=['bool']
diff --git a/Reconstruction/egamma/egammaRec/share/egammaRec_jobOptions.py b/Reconstruction/egamma/egammaRec/share/egammaRec_jobOptions.py
index 18a980636f005eee0147c86c9558684eeed6e823..542172a42f99d6abb4d591cb110b5299b5b82f41 100755
--- a/Reconstruction/egamma/egammaRec/share/egammaRec_jobOptions.py
+++ b/Reconstruction/egamma/egammaRec/share/egammaRec_jobOptions.py
@@ -12,8 +12,7 @@ from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 jobproperties.egammaRecFlags.print_JobProperties("full")
 
-######The simple cases where we can already disable something
-
+######The simple cases where we can disable a flag
 # Truth
 if not rec.doTruth(): 
 	jobproperties.egammaRecFlags.doEgammaTruthAssociation = False
@@ -39,23 +38,28 @@ def setupGSF():
                 from egammaAlgs.egammaSelectedTrackCopy import egammaSelectedTrackCopy
                 egammaSelectedTrackCopy(doPrint=True)
         except Exception:
-                treatException("Could not set up the egamma track Selection for GSF. Switch it off !")
+                treatException("Could not set up the egamma track Selection for GSF. Switch Brem Building off !")
                 jobproperties.egammaRecFlags.doBremFinding=False 
         try:
                 from egammaAlgs.EMBremCollectionBuilder import EMBremCollectionBuilder
                 EMBremCollectionBuilder(doPrint=True)
         except Exception:
-                treatException("Could not set up EMBremCollectionBuilder. Switch it off !")
+                treatException("Could not set up EMBremCollectionBuilder. Switch Brem Building off !")
                 jobproperties.egammaRecFlags.doBremFinding=False 
+        try:
+                from egammaAlgs.EMGSFCaloExtensionBuilder import EMGSFCaloExtensionBuilder
+                EMGSFCaloExtensionBuilder(doPrint=True)
+        except Exception:
+                treatException("Could not set up EMGSFCaloExtensionBuilder.")
 
-#Function to schedule the vertices      
+#Function to schedule the conversion vertices reconstructions      
 def setupVertices():
         # Conversion vertex builder can not run in the default mode without GSF
         try:
                 from egammaAlgs.EMVertexBuilder import EMVertexBuilder
                 EMVertexBuilder(doPrint=True)
         except Exception:
-                treatException("Could not set up the conversion vertex building. Switch it off !")
+                treatException("Could not set up the conversion vertex building. Switch vertex building off !")
                 jobproperties.egammaRecFlags.doVertexBuilding=False
 
 #Function to schedule the Topo cluster based egamma
@@ -116,20 +120,11 @@ if jobproperties.egammaRecFlags.doEgammaCaloSeeded():
                 setupTopoSeededEgamma()        
         elif not jobproperties.egammaRecFlags.doSuperclusters() and (jobproperties.CaloRecFlags.doEmCluster() or rec.readESD()):
                 setupSWSeededEgamma()
-                #Special algs to run on ESD when we do standard egamma
-                if rec.doESD():
-                        try:
-                                topSequence+=CfgMgr.ClusterMatching__CaloClusterMatchLinkAlg("EgammaTCLinks",
-                                                                                             ClustersToDecorate=egammaKeys.outputClusterKey())
-                                topSequence+=CfgMgr.ClusterMatching__CaloClusterMatchLinkAlg("TopoEgammaTCLinks",
-                                                                                             ClustersToDecorate=egammaKeys.outputTopoSeededClusterKey())
-                        except:
-                                treatException("Could not set up ClusterMatching tool! Switched off")
         else:
                 jobproperties.egammaRecFlags.doEgammaCaloSeeded=False
 
 if jobproperties.egammaRecFlags.doEgammaForwardSeeded():
-                setupFwdSeededEgamma()
+        setupFwdSeededEgamma()
 
 if jobproperties.egammaRecFlags.doEgammaTruthAssociation() and jobproperties.egammaRecFlags.doEgammaCaloSeeded(): 
         setupTruthAssociation()
diff --git a/Reconstruction/egamma/egammaTools/CMakeLists.txt b/Reconstruction/egamma/egammaTools/CMakeLists.txt
index 7e85fbbc8405756bdd7556c8c4adc6a4b17a046e..473351888d6fa1ec254391fef5236308b0aec9d7 100644
--- a/Reconstruction/egamma/egammaTools/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaTools/CMakeLists.txt
@@ -46,7 +46,10 @@ atlas_add_component( egammaTools
 	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 )
+	LINK_LIBRARIES CaloConditions CaloEvent  CaloIdentifier CaloRecLib CaloUtilsLib AthenaBaseComps AthenaKernel 
+	AthContainers SGTools StoreGateLib  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/EMTrackMatchBuilder.py b/Reconstruction/egamma/egammaTools/python/EMTrackMatchBuilder.py
index 48d4db2abf1beeba87b3d0c7abe19a7dd551934f..cbb32c84d3a7d425c58e187d65822b17881ddd98 100644
--- a/Reconstruction/egamma/egammaTools/python/EMTrackMatchBuilder.py
+++ b/Reconstruction/egamma/egammaTools/python/EMTrackMatchBuilder.py
@@ -8,11 +8,11 @@ from egammaRec.Factories import FcnWrapper, ToolFactory
 from egammaRec import egammaKeys
 from RecExConfig.RecFlags import rec
 from AthenaCommon.BeamFlags import jobproperties
-from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools
+from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools, EMExtrapolationToolsCache
 
 EMTrackMatchBuilder = ToolFactory( egammaToolsConf.EMTrackMatchBuilder,
       TrackParticlesName = egammaKeys.outputTrackParticleKey(),
-      ExtrapolationTool  = EMExtrapolationTools,
+      ExtrapolationTool  = EMExtrapolationToolsCache,
       broadDeltaEta      = 0.1, #candidate match is done in 2 times this  so +- 0.2
       broadDeltaPhi      = 0.15,  #candidate match is done in 2 times this  so +- 0.3
       useLastMeasurement = False, #important for GSF!!!
diff --git a/Reconstruction/egamma/egammaTools/src/EMTrackMatchBuilder.cxx b/Reconstruction/egamma/egammaTools/src/EMTrackMatchBuilder.cxx
index 8318d6efdde0c62432bf2c5e81a46f5a60f40e7a..52f4e36773451a501fe8b0a1b6b7acde299f41b7 100644
--- a/Reconstruction/egamma/egammaTools/src/EMTrackMatchBuilder.cxx
+++ b/Reconstruction/egamma/egammaTools/src/EMTrackMatchBuilder.cxx
@@ -1,6 +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 HEADER FILES:
 
@@ -27,7 +27,7 @@
 /////////////////////////////////////////////////////////////////
 
 //  CONSTRUCTOR:
-   
+
 EMTrackMatchBuilder::EMTrackMatchBuilder(const std::string& type,
                                          const std::string& name,
                                          const IInterface* parent) : 
@@ -84,7 +84,7 @@ StatusCode EMTrackMatchBuilder::executeRec(egammaRec* eg) const
   //
 
   ATH_MSG_DEBUG("Executing EMTrackMatchBuilder");
- 
+
   // protection against bad pointers
   if (eg==0) return StatusCode::SUCCESS;
 
@@ -97,7 +97,7 @@ StatusCode EMTrackMatchBuilder::executeRec(egammaRec* eg) const
     ATH_MSG_WARNING("execute: cluster energy is 0.0! Ignoring cluster.");
     return StatusCode::SUCCESS;
   }
-        
+
   // retrieve the trackparticle container
   SG::ReadHandle<xAOD::TrackParticleContainer> trackPC(m_TrackParticlesKey);
 
@@ -106,7 +106,7 @@ StatusCode EMTrackMatchBuilder::executeRec(egammaRec* eg) const
     ATH_MSG_ERROR("Couldn't retrieve TrackParticle container with key: " << m_TrackParticlesKey.key());
     return StatusCode::FAILURE;
   }
-   
+
   // call the execute method
   CHECK( trackExecute(eg, trackPC.cptr()) );
   return StatusCode::SUCCESS;
@@ -120,26 +120,26 @@ StatusCode EMTrackMatchBuilder::trackExecute(egammaRec* eg, const xAOD::TrackPar
     ATH_MSG_WARNING("trackExecute: NULL pointer to egammaRec or TrackParticleContainer");
     return StatusCode::SUCCESS;
   }
-  
+
   // retrieve corresponding cluster
   const xAOD::CaloCluster* cluster = eg->caloCluster();
-  
+
   // check for 0 energy clusters
   if (cluster && cluster->e() == 0.0) {
     ATH_MSG_WARNING("trackExecute: cluster energy is 0.0! Ignoring cluster.");
     return StatusCode::SUCCESS;
   }
   ATH_MSG_DEBUG("in trackExecute");
-  
+
   // Loop over tracks and fill TrackMatch vector
   std::vector<TrackMatch> trkMatches; 
   xAOD::TrackParticleContainer::const_iterator trkIt = trackPC->begin();
   for (unsigned int trackNumber = 0; trkIt != trackPC->end(); ++trkIt, ++trackNumber) 
   {
     bool isTRT = (xAOD::EgammaHelpers::numberOfSiHits(*trkIt) < 4);
-    
+
     if (!(isCandidateMatch(cluster, isTRT, (*trkIt), false ) &&
-        inBroadWindow(trkMatches, cluster, trackNumber, isTRT, (*trkIt), Trk::alongMomentum)) && m_isCosmics)
+          inBroadWindow(trkMatches, cluster, trackNumber, isTRT, (*trkIt), Trk::alongMomentum)) && m_isCosmics)
     {
       // Second chance for cosmics, flip eta and phi
       if (isCandidateMatch(cluster, isTRT, (*trkIt), true))
@@ -151,8 +151,8 @@ StatusCode EMTrackMatchBuilder::trackExecute(egammaRec* eg, const xAOD::TrackPar
   {
     //sort the track matches
     std::sort(trkMatches.begin(), trkMatches.end(), TrackMatchSorter());
-  
-  
+
+
     //set the matching values
     TrackMatch bestTrkMatch=trkMatches.at(0);
     for(int i=0; i<4 ;++i){
@@ -161,7 +161,7 @@ StatusCode EMTrackMatchBuilder::trackExecute(egammaRec* eg, const xAOD::TrackPar
       eg->setDeltaPhiRescaled (i, bestTrkMatch.deltaPhiRescaled[i]); 
     }
     eg->setDeltaPhiLast(bestTrkMatch.deltaPhiLast);
-    
+
     //set the element Links
     ATH_MSG_DEBUG("============================================");
     typedef ElementLink<xAOD::TrackParticleContainer> EL;
@@ -171,10 +171,10 @@ StatusCode EMTrackMatchBuilder::trackExecute(egammaRec* eg, const xAOD::TrackPar
     IProxyDict* sg = SG::CurrentEventStore::store();
     for (const TrackMatch& m : trkMatches) {
       ATH_MSG_DEBUG("Match  dR: "<< m.dR
-		    <<" second  dR: "<< m.seconddR
-		    <<" score: "<< m.score
-		    <<" hitsScore: " << m.hitsScore 
-		    <<" isTRT : "<< m.isTRT);
+                    <<" second  dR: "<< m.seconddR
+                    <<" score: "<< m.score
+                    <<" hitsScore: " << m.hitsScore 
+                    <<" isTRT : "<< m.isTRT);
       if (key.empty())
         trackParticleLinks.emplace_back (*trackPC, m.trackNumber, sg);
       else
@@ -198,7 +198,7 @@ EMTrackMatchBuilder::inBroadWindow(std::vector<TrackMatch>& trackMatches,
 {
   // make position match between cluster and TrackParameters at LAr calorimeter 
   // 
-  
+
   // protection against bad pointers
   if (cluster==0 || trkPB==0) return false;
 
@@ -209,9 +209,9 @@ EMTrackMatchBuilder::inBroadWindow(std::vector<TrackMatch>& trackMatches,
   else {
     extrapFrom   = IEMExtrapolationTools::fromPerigee;
   }
-  
+
   ATH_MSG_DEBUG("inBroadWindow: extrapolation method From (0 Last, 1 perigee , 2 Rescale) " << extrapFrom);
-  
+
   // Now get the delta eta/phi and eta correction at the calorimeter
   std::vector<double>  eta(4, -999.0);
   std::vector<double>  phi(4, -999.0);
@@ -227,56 +227,63 @@ EMTrackMatchBuilder::inBroadWindow(std::vector<TrackMatch>& trackMatches,
   std::vector<double>  deltaEtaRes(4, -999.0);
   std::vector<double>  deltaPhiRes(4, -999.0); 
   ATH_MSG_DEBUG("### Matching #### ");  
+  
+  /* 
+   * If it is TRT we can determine immediately if it failed
+   * or not (we use matches at calo)
+   * If it is silicon we always do both Rescale 
+   * and Standard and then we decide
+   */
   if(trkTRT){//TRTSA
     if(!m_extrapolationTool->matchesAtCalo (cluster, 
-					    trkPB, 
-					    trkTRT,
-					    dir, 
-					    eta,
-					    phi,
-					    deltaEta, 
-					    deltaPhi, 
-					    extrapFrom)) {
+                                            trkPB, 
+                                            trkTRT,
+                                            dir, 
+                                            eta,
+                                            phi,
+                                            deltaEta, 
+                                            deltaPhi, 
+                                            extrapFrom)) {
       ATH_MSG_DEBUG("Normal matched Failed deltaPhi/deltaEta " << deltaPhi[2] <<" / "<< deltaEta[2]<<", No Rescale attempted, isTRTSA = " <<trkTRT);
       return false;
     }
   } //end if is TRTSA
   else{//Silicon tracks
     if (m_extrapolationTool->getMatchAtCalo (cluster, 
-					     trkPB, 
-					     trkTRT,
-					     dir, 
-					     eta,
-					     phi,
-					     deltaEta, 
-					     deltaPhi, 
-					     extrapFrom).isFailure()) 
-		{
-		  if (m_useLastMeasurement) ATH_MSG_DEBUG("Extrapolation from last measurement failed");
-		  else ATH_MSG_DEBUG("Extrapolation from perigee failed");
-		  return false;
-		}
+                                             trkPB, 
+                                             trkTRT,
+                                             dir, 
+                                             eta,
+                                             phi,
+                                             deltaEta, 
+                                             deltaPhi, 
+                                             extrapFrom).isFailure()) 
+    {
+      if (m_useLastMeasurement) ATH_MSG_DEBUG("Extrapolation from last measurement failed");
+      else ATH_MSG_DEBUG("Extrapolation from perigee failed");
+      return false;
+    }
     //=======================================================================================///
     //Calculate both always std and rescale
     IEMExtrapolationTools::TrkExtrapDef extrapFrom1 = IEMExtrapolationTools::fromPerigeeRescaled;
     std::vector<double>  eta1(4, -999.0);
     std::vector<double>  phi1(4, -999.0);
     if (m_extrapolationTool->getMatchAtCalo (cluster, 
-					     trkPB, 
-					     trkTRT,
-					     dir, 
-					     eta1,
-					     phi1,
-					     deltaEtaRes, 
-					     deltaPhiRes, 
-					     extrapFrom1).isFailure())
-		{
-		  ATH_MSG_DEBUG("Extrapolation from rescaled perigee failed");
-		  return false;
-		}
-    
+                                             trkPB, 
+                                             trkTRT,
+                                             dir, 
+                                             eta1,
+                                             phi1,
+                                             deltaEtaRes, 
+                                             deltaPhiRes, 
+                                             extrapFrom1).isFailure())
+    {
+      ATH_MSG_DEBUG("Extrapolation from rescaled perigee failed");
+      return false;
+    }
+
     ATH_MSG_DEBUG("Done with extrapolations");
-    
+
     deltaPhiRescale = deltaPhiRes[2];
     //Try to match : First std , then rescale, else failure 
     if(fabs(deltaEta[2]) < m_narrowDeltaEta &&deltaPhi[2] < m_narrowDeltaPhi && deltaPhi[2] > -m_narrowDeltaPhiBrem){
@@ -297,8 +304,12 @@ EMTrackMatchBuilder::inBroadWindow(std::vector<TrackMatch>& trackMatches,
       return false;
     }
   } //end if is silicon
-  
-  //In case of extrapolation from perigee keep the dPhi from the last measurement
+
+  /*In case of extrapolation from 
+   * perigee keep the dPhi from the last measurement
+   * This means for success we do another extrapolation
+   * from last
+   */
   if (!m_useLastMeasurement ) {  
     IEMExtrapolationTools::TrkExtrapDef extrapFrom1 = IEMExtrapolationTools::fromLastMeasurement;
     std::vector<double>  eta1(4, -999.0);
@@ -307,8 +318,8 @@ EMTrackMatchBuilder::inBroadWindow(std::vector<TrackMatch>& trackMatches,
     std::vector<double>  deltaPhi1(4, -999.0);
     if (m_extrapolationTool->getMatchAtCalo (cluster, 
                                              trkPB, 
-					     trkTRT,
-					     dir, 
+                                             trkTRT,
+                                             dir, 
                                              eta1,
                                              phi1,
                                              deltaEta1, 
@@ -318,7 +329,7 @@ EMTrackMatchBuilder::inBroadWindow(std::vector<TrackMatch>& trackMatches,
       ATH_MSG_DEBUG("Extrapolation from last measurement failed");
       return false;
     }
-    
+
     //Always the deltaPhiLast will be from the last measurement
     deltaPhiLast = deltaPhi1[2];
   }
@@ -328,10 +339,10 @@ EMTrackMatchBuilder::inBroadWindow(std::vector<TrackMatch>& trackMatches,
   }
   ATH_MSG_DEBUG("Rescale dPhi " << deltaPhiRescale);
   ATH_MSG_DEBUG("dPhi Last measurement " << deltaPhiLast);     
-  
+
   //Create Track Match struct here
   TrackMatch trkmatch;
-  
+
   //Add the matching variable to the TrackMAtch
   for(int i=0; i<4 ;++i){
     trkmatch.deltaEta[i]=deltaEta.at(i); 
@@ -339,7 +350,7 @@ EMTrackMatchBuilder::inBroadWindow(std::vector<TrackMatch>& trackMatches,
     trkmatch.deltaPhiRescaled[i]=deltaPhiRes.at(i); 
   }  
   trkmatch.deltaPhiLast=deltaPhiLast; 
-  
+
   //Variables used for the sorting. Note both dPhi will be used.
   trkmatch.isTRT=trkTRT;
   trkmatch.trackNumber=trackNumber;
@@ -376,54 +387,54 @@ EMTrackMatchBuilder::inBroadWindow(std::vector<TrackMatch>& trackMatches,
 
       //Check number of pixel hits
       if (trkPB->summaryValue(uint8_value,  xAOD::numberOfPixelDeadSensors)){
-	nPixel+=uint8_value;
+        nPixel+=uint8_value;
       }
       if (trkPB->summaryValue(uint8_value,  xAOD::numberOfPixelHits)){
-	nPixel+=uint8_value;
+        nPixel+=uint8_value;
       }
 
       //20 primary score points if it also have pixel hits
       if (nPixel > 0)  {
-	trkmatch.score+=20;
+        trkmatch.score+=20;
       }
 
       //Check the 2 innermost layers
       int nInnerMost =0;
       if (trkPB->summaryValue(uint8_value,  xAOD::numberOfInnermostPixelLayerHits)){
-	nInnerMost+=uint8_value;
+        nInnerMost+=uint8_value;
       }
       int expectInnermostPixelLayerHit = 0; 
       if (trkPB->summaryValue(uint8_value,  xAOD::expectInnermostPixelLayerHit)){
-	expectInnermostPixelLayerHit+=uint8_value;
+        expectInnermostPixelLayerHit+=uint8_value;
       }
       int nNextToInnerMost =0;
       if (trkPB->summaryValue(uint8_value,  xAOD::numberOfNextToInnermostPixelLayerHits)){
-	nNextToInnerMost+=uint8_value;
+        nNextToInnerMost+=uint8_value;
       }
       int expectNextToInnermostPixelLayerHit = 0; 
       if (trkPB->summaryValue(uint8_value,  xAOD::expectNextToInnermostPixelLayerHit)){
-	expectNextToInnermostPixelLayerHit+=uint8_value;
+        expectNextToInnermostPixelLayerHit+=uint8_value;
       }
-      
+
       //Secondary score , find the longest track possible, 
       //i.e the one with the most inner hists  in the pixel 
       //npixel*5 
       trkmatch.hitsScore+=(nPixel*5);
       //Extra points for NextToInnermost
       if(!expectNextToInnermostPixelLayerHit ||  nNextToInnerMost>0){
-	trkmatch.hitsScore+=5;
+        trkmatch.hitsScore+=5;
       }
       //Extra points for Innermost
       if(!expectInnermostPixelLayerHit ||  nInnerMost>0){
-	trkmatch.hitsScore+=10;
+        trkmatch.hitsScore+=10;
       }
 
       ATH_MSG_DEBUG("Pixel hits : " <<nPixel 
-		    <<" InnerMost : " << nInnerMost
-		    <<" Expected InnerMost : " << expectInnermostPixelLayerHit
-		    <<" NextToInnerMost : " << nNextToInnerMost
-		    <<" Expected NextToInnerMost : " << expectNextToInnermostPixelLayerHit);   
-    
+                    <<" InnerMost : " << nInnerMost
+                    <<" Expected InnerMost : " << expectInnermostPixelLayerHit
+                    <<" NextToInnerMost : " << nNextToInnerMost
+                    <<" Expected NextToInnerMost : " << expectNextToInnermostPixelLayerHit);   
+
     }  
   }
   ATH_MSG_DEBUG("Score : " <<trkmatch.score <<" hitsScore : " <<trkmatch.hitsScore);   
diff --git a/Reconstruction/egamma/egammaTrackTools/CMakeLists.txt b/Reconstruction/egamma/egammaTrackTools/CMakeLists.txt
index 40f5b5f69ac35bfccb4ce8e5c0c4c3edf533c58f..17765d77d91b9d9886f0fa50a2c10f2ef7fe6e1c 100644
--- a/Reconstruction/egamma/egammaTrackTools/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaTrackTools/CMakeLists.txt
@@ -46,15 +46,17 @@ atlas_depends_on_subdirs( PRIVATE
                           Tracking/TrkFitter/TrkFitterInterfaces
                           Tracking/TrkVertexFitter/TrkVertexFitterInterfaces )
 
-# External dependencies:
-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( egammaTrackTools
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} CaloDetDescrLib CaloEvent CaloIdentifier CaloUtilsLib CaloGeoHelpers AthenaBaseComps AthContainers AtlasDetDescr IdDictDetDescr EventPrimitives xAODCaloEvent xAODEgamma xAODTracking FourMomUtils GaudiKernel InDetIdentifier RecoToolInterfaces TrkSurfaces TrkCaloCluster_OnTrack TrkCaloExtension TrkEventPrimitives TrkMaterialOnTrack TrkMeasurementBase TrkNeutralParameters TrkParameters TrkParametersIdentificationHelpers TrkParticleBase TrkPseudoMeasurementOnTrack TrkRIO_OnTrack TrkTrack TrkVertexOnTrack VxVertex TrkExInterfaces TrkFitterInterfaces TrkVertexFitterInterfaces )
+                     INCLUDE_DIRS 
+                     LINK_LIBRARIES CaloDetDescrLib CaloEvent CaloIdentifier CaloUtilsLib CaloGeoHelpers AthenaBaseComps AthContainers 
+		     AtlasDetDescr IdDictDetDescr EventPrimitives xAODCaloEvent xAODEgamma xAODTracking FourMomUtils GaudiKernel InDetIdentifier 
+		     RecoToolInterfaces TrkSurfaces TrkCaloCluster_OnTrack TrkCaloExtension TrkEventPrimitives TrkMaterialOnTrack TrkMeasurementBase 
+		     TrkNeutralParameters TrkParameters TrkParametersIdentificationHelpers TrkParticleBase TrkPseudoMeasurementOnTrack TrkRIO_OnTrack TrkTrack 
+		     TrkVertexOnTrack VxVertex TrkExInterfaces TrkFitterInterfaces TrkVertexFitterInterfaces )
 
 # Install files from the package:
 atlas_install_headers( egammaTrackTools )
diff --git a/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py b/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py
index 7b8dcc1a636047b7fcfd4324cc87b959a4029358..5f8023227662cbd8e7bba593b428451729267826 100644
--- a/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py
+++ b/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py
@@ -1,14 +1,16 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 
 __doc__ = "ToolFactories to instantiate all egammaCaloTools with default configuration"
-__author__ = "Bruno Lenzi"
+__author__ = "Bruno Lenzi , Christos Anastopoulos"
 from egammaRec.Factories import FcnWrapper, ToolFactory
 import egammaTrackToolsConf
 from egammaRec import egammaKeys
 from egammaTools.InDetTools import egammaExtrapolator
 import AthenaCommon.CfgMgr as CfgMgr
-#--------------------------------------
-EMDefaultCaloExtensionTool =  ToolFactory (CfgMgr.Trk__ParticleCaloExtensionTool)
+
+EMLastCaloExtensionTool =  ToolFactory (CfgMgr.Trk__ParticleCaloExtensionTool,
+                                           name="EMLastCaloExtensionTool",
+                                           Extrapolator = egammaExtrapolator)
 
 EMParticleCaloExtensionTool =  ToolFactory (CfgMgr.Trk__ParticleCaloExtensionTool, 
                                             name="EMParticleCaloExtensionTool",
@@ -17,12 +19,18 @@ EMParticleCaloExtensionTool =  ToolFactory (CfgMgr.Trk__ParticleCaloExtensionToo
                                             StartFromPerigee = True)
 
 EMExtrapolationTools = ToolFactory( egammaTrackToolsConf.EMExtrapolationTools,
-                                    DefaultCaloExtentionTool=EMDefaultCaloExtensionTool,
+                                    name ="EMExtrapolationTools",
+                                    LastCaloExtentionTool=EMLastCaloExtensionTool,
                                     PerigeeCaloExtentionTool = EMParticleCaloExtensionTool,
                                     Extrapolator=egammaExtrapolator,
-                                    useCaching = True)
+                                    useCaching=False)
 
-#---------------------------------------
+EMExtrapolationToolsCache = ToolFactory( egammaTrackToolsConf.EMExtrapolationTools,
+                                         name ="EMExtrapolationToolsCache",
+                                         LastCaloExtentionTool=EMLastCaloExtensionTool,
+                                         PerigeeCaloExtentionTool = EMParticleCaloExtensionTool,
+                                         Extrapolator=egammaExtrapolator,
+                                         GSFPerigeeCache='GSFPerigeeCaloExtension',
+                                         GSFLastCache='GSFLastCaloExtension',
+                                         useCaching=True)
 
-# Import the factories that are not defined here
-pass
diff --git a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx
index cd765a9d8b880e1873aa4ad31db0406d46c0f5de..c29738b172162fa5d435cf9e967634cb084ccf7d 100644
--- a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx
+++ b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx
@@ -1,6 +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  "EMExtrapolationTools.h"
 #include  "TrkEventPrimitives/PropDirection.h"
@@ -34,27 +34,23 @@ EMExtrapolationTools::EMExtrapolationTools(const std::string& type,
   m_trtId(0)
 {
 
-  // Name of the utility for conversion
-  
   declareInterface<IEMExtrapolationTools>(this);
 }
 
-// =========================================================
 EMExtrapolationTools::~EMExtrapolationTools() {}
 
-// =========================================================
 StatusCode EMExtrapolationTools::initialize() 
 {
 
   ATH_MSG_DEBUG("Initializing " << name() << "...");
 
   // Retrieve TrackToCalo tool for extrapolation to calorimeter
-  if ( m_defaultParticleCaloExtensionTool.retrieve().isFailure() ) {
-    ATH_MSG_ERROR("Cannot retrieve DefaultParticleCaloExtensionTool" << m_defaultParticleCaloExtensionTool );
+  if ( m_lastParticleCaloExtensionTool.retrieve().isFailure() ) {
+    ATH_MSG_ERROR("Cannot retrieve DefaultParticleCaloExtensionTool" << m_lastParticleCaloExtensionTool );
     return StatusCode::FAILURE;
   }
   else {
-    ATH_MSG_DEBUG("Retrieved DefaultParticleCaloExtensionTool tool " << m_defaultParticleCaloExtensionTool);
+    ATH_MSG_DEBUG("Retrieved DefaultParticleCaloExtensionTool tool " << m_lastParticleCaloExtensionTool);
   }
 
   if ( m_perigeeParticleCaloExtensionTool.retrieve().isFailure() ) {
@@ -85,24 +81,22 @@ StatusCode EMExtrapolationTools::initialize()
   } else {
     ATH_MSG_DEBUG("Could not get TRT_ID helper !");
   }
-  
+  ATH_CHECK(m_GSFPerigeeCacheKey.initialize(m_useCaching));
+  ATH_CHECK(m_GSFLastCacheKey.initialize(m_useCaching));
+
   return StatusCode::SUCCESS;
 }
 
-// =====================================================================
 StatusCode EMExtrapolationTools::finalize() 
 {
   return StatusCode::SUCCESS;
 }
 
-// ======================= Electron Charged Track related interfaces
-
-//////////////////////////////////////////////////////////////////////////////
-//* Extrapolate TrackParticle to electron CaloCluster
-//* Returns selection
-//* i.e performs the cuts
-//It also returns the quantities used for matching
-//////////////////////////////////////////////////////////////////////////////
+/* 
+ * Electron Charged Track related interfaces
+ * Extrapolates TrackParticle to  CaloCluster
+ * Returns the selection results
+ */
 bool
 EMExtrapolationTools::matchesAtCalo(const xAOD::CaloCluster*      cluster, 
                                     const xAOD::TrackParticle*    trkPB, 
@@ -112,172 +106,179 @@ EMExtrapolationTools::matchesAtCalo(const xAOD::CaloCluster*      cluster,
                                     std::vector<double>&          phi,
                                     std::vector<double>&          deltaEta,
                                     std::vector<double>&          deltaPhi,
-                                    unsigned int                  extrapFrom) const  
+                                    unsigned int                  extrapFrom,
+                                    Cache*                        cache) const  
 {
-
-  // Sample for testing match
-  unsigned int               iSampling  = 2;  
-
-  // Decide matching for TRT standalone
-  // In case of standalone TRT tracks get an idea where the last measurement is
+  // Always use the 2nd sampling
+  constexpr unsigned int iSampling  = 2;  
+  // Decide eta matching for TRT standalone
+  // Skip barrel tracks matching endcap clusters and vice-versa
   int isTRTB = 0 ;
   if(isTRT){
     if (!m_trtId) {
       ATH_MSG_WARNING("Should have m_trtId defined for isTRT");
       return false;
     }
-    isTRTB = getTRTsection(trkPB);
-    // First pass on TRT tracks, skip barrel tracks matching endcap clusters and vice-versa
+    int isTRTB = getTRTsection(trkPB);
     if((isTRTB==2 && (cluster->eta()<=0.6  || cluster->eta()>=2.4)   ) ||
        (isTRTB==-2 && (cluster->eta()>=-0.6 || cluster->eta()<=-2.4)  ) ||
        (isTRTB==1 && (cluster->eta()<=-0.1 || cluster->eta()>=1.3)   ) ||
        (isTRTB==-1 && (cluster->eta()>=0.1  || cluster->eta()<=-1.3)  )
-       ) {
+      ) {
       return false;
     }
   }
-  
   //Call getMatchAtCalo
-  if(getMatchAtCalo (cluster,trkPB,isTRT,direction, eta,phi, deltaEta, deltaPhi,extrapFrom).isFailure()){
-    ATH_MSG_WARNING("getMatchAtCalo failed");
+  if(getMatchAtCalo (cluster,trkPB,isTRT,direction, eta,phi, deltaEta, deltaPhi,extrapFrom,cache).isFailure()){
+    ATH_MSG_WARNING("getMatchAtCalo call failed");
     return false;
   }  
-  
   // Selection in the narrow eta/phi window
-  if((isTRT && ((abs(isTRTB)==1 && deltaPhi[iSampling] < m_narrowDeltaPhiTRTbarrel && 
-		 deltaPhi[iSampling] > -m_narrowDeltaPhiBremTRTbarrel) || 
-		(abs(isTRTB)==2 && deltaPhi[iSampling] < m_narrowDeltaPhiTRTendcap && 
-		 deltaPhi[iSampling] > -m_narrowDeltaPhiBremTRTendcap)))
-     || 
-     (!isTRT && fabs(deltaEta[iSampling]) < m_narrowDeltaEta && 
-      deltaPhi[iSampling] < m_narrowDeltaPhi && 
-      deltaPhi[iSampling] > -m_narrowDeltaPhiBrem) ) {
-    return true;
+  if(isTRT){
+    if ( (abs(isTRTB)==1 && deltaPhi[iSampling] < m_narrowDeltaPhiTRTbarrel && deltaPhi[iSampling] > -m_narrowDeltaPhiBremTRTbarrel) || 
+         (abs(isTRTB)==2 && deltaPhi[iSampling] < m_narrowDeltaPhiTRTendcap && deltaPhi[iSampling] > -m_narrowDeltaPhiBremTRTendcap)){
+      return true;
+    }
+  }
+  else{
+    if (fabs(deltaEta[iSampling]) < m_narrowDeltaEta && deltaPhi[iSampling] < m_narrowDeltaPhi && deltaPhi[iSampling] > -m_narrowDeltaPhiBrem) {
+      return true;
+    }
   }
-
   return false;
 }
-/////////////////////////////////////////////////////////////////////////////////////////////
-//* Extrapolate to calorimeter for trackParticle
-/////////////////////////////////////////////////////////////////////////////////////////////
+/*
+ * This is the method that does the heavy lifting for the 
+ * electrons extrapolations. Handles multipe extrapolation modes.
+ */
 StatusCode
 EMExtrapolationTools::getMatchAtCalo (const xAOD::CaloCluster*      cluster, 
                                       const xAOD::TrackParticle*    trkPB,
-				      bool                          isTRT, 
+                                      bool                          isTRT, 
                                       Trk::PropDirection            direction,
                                       std::vector<double>&          eta,
                                       std::vector<double>&          phi,
                                       std::vector<double>&          deltaEta,
                                       std::vector<double>&          deltaPhi,
-                                      unsigned int                  extrapFrom) const
+                                      unsigned int                  extrapFrom,
+                                      Cache*                        cache) const
 {
-  // Extrapolate track to calo and return the extrapolated eta/phi and
-  // the deta/dphi between cluster and track
-  //   We allow different ways to extrapolate:
-  // 
-  //     1) from the last measurement point track parameters  
-  //     2) from the perigee 
-  //     3) from the perigee with the track momentum rescaled by the cluster energy
-  //
+  /* Extrapolate track to calo and return 
+   * the extrapolated eta/phi and
+   * the deta/dphi between cluster and track
+   * We allow different ways to extrapolate:
+   * 1) from the last measurement  track parameters (this is always the case for TRT standalone)  
+   * 2) from the perigee track parameters
+   * 3) from the perigee with the track momentum rescaled by the cluster energy
+   *
+   * But in principle the possible workFlows are quite constrained 
+   */
   ATH_MSG_DEBUG("getMatchAtCalo");
-   
   if(deltaEta.size() < 4  || deltaPhi.size()<4 || eta.size()<4 || phi.size()<4 ){
     ATH_MSG_WARNING("deltaEta, deltaPhi, eta , phi size should be at least 4");
     return StatusCode::SUCCESS;
   }
 
-  //------------------------------------------------------------------------------------------------------------------------------------//
-  //------------------- Create the extension, supports different methods of extrapolation (i.e last point, perigee, perigee rescaled ---//  
-  std::unique_ptr<Trk::CaloExtension> extension = nullptr;      
+  bool didExtension=false;
+  /* 
+   * Rescaled Perigee is "easy"
+   * It will never have a cache
+   */ 
   double atPerigeePhi(-999);
-  double PerigeeTrkParPhi(-999);
-  //TRT  only track. Could be in the standard or GSF container.
-  //Use the std tool and the cached result always. For TRT only it does not matter if perigee or rescaled requested.
-  if (isTRT){
-    if(!m_defaultParticleCaloExtensionTool->caloExtension(*trkPB,extension)){
-      ATH_MSG_INFO("Could not create an extension for TRT only track with : "<< " Track Pt "
-		      <<trkPB->pt()<< " Track Eta " << trkPB->eta()<<" Track Fitter " 
-		      << trkPB->trackFitter() << " isTRT " << isTRT<<" Extrapolate From " <<  extrapFrom); 
-      return StatusCode::SUCCESS;
-    }
-  }
-  //extrapolation using  Rescaled Perigee, not caching possible as it is changed per cluster
-  else if (fromPerigeeRescaled == extrapFrom) {
+  double PerigeeTrkParPhi(-999); 
+  CaloExtensionHelpers::EtaPhiPerLayerVector intersections;
+  if(fromPerigeeRescaled == extrapFrom){
     const Trk::TrackParameters*  trkPar = getRescaledPerigee(trkPB, cluster);    
     if(!trkPar){
       ATH_MSG_ERROR("getMatchAtCalo: Cannot access track parameters"); 
       return StatusCode::FAILURE; 
-    }
-    extension = m_perigeeParticleCaloExtensionTool->caloExtension( *trkPar, direction, Trk::muon );
+    }  
+    std::unique_ptr<Trk::CaloExtension> extension = m_perigeeParticleCaloExtensionTool->caloExtension( *trkPar, direction, Trk::muon);
     Amg::Vector3D atPerigee(trkPar->position().x(), trkPar->position().y(), trkPar->position().z()); 
     atPerigeePhi=atPerigee.phi(); ;
     PerigeeTrkParPhi=trkPar->momentum().phi();
     ATH_MSG_DEBUG("Rescale (phi, eta , pt, charge) ( " << trkPar->momentum().phi() << " , " << trkPar->momentum().eta() << " , " 
-		  << trkPar->momentum().perp() <<" , " << trkPar->charge()<< ")");
+                  << trkPar->momentum().perp() <<" , " << trkPar->charge()<< ")");
     ATH_MSG_DEBUG("Before Rescale (phi, eta , pt,charge) ( " << trkPB->phi() <<" , " << trkPB->eta() <<" , " 
-		  << trkPB->pt()<< " , " << trkPB->charge()<<")");
-    delete trkPar;    
-  }
-  //GSF track Particles, extrapolate from perigee , using the egamma tool instance and the egamma dedicated cache.
-  else if( trkPB->trackFitter() == xAOD::GaussianSumFilter && fromPerigee == extrapFrom){
-    if(!m_perigeeParticleCaloExtensionTool->caloExtension(*trkPB,extension)){
-      ATH_MSG_INFO("Could not create an extension from perigee for a silicon GSF track with : "<< " Track Pt "
-		      <<trkPB->pt()<< " Track Eta " << trkPB->eta()<<" Track Fitter " 
-		      << trkPB->trackFitter() << " isTRT " << isTRT<<" Extrapolate From " <<  extrapFrom); 
-      return StatusCode::SUCCESS;
+                  << trkPB->pt()<< " , " << trkPB->charge()<<")");
+    delete trkPar;
+    didExtension=extension.get()!=nullptr;
+    if(didExtension){
+      intersections=getIntersections(*extension,cluster); 
     }
   }
-  //GSF track Particles, from last measurement , the cache for GSF is used for the perigee so do not use it here 
-  else if( trkPB->trackFitter() == xAOD::GaussianSumFilter && fromLastMeasurement == extrapFrom){
-    if(!m_defaultParticleCaloExtensionTool->caloExtension(*trkPB,extension)){
-      ATH_MSG_INFO("Could not create an extension from last measurement for a silicon GSF track with : "<< " Track Pt "
-		      <<trkPB->pt()<< " Track Eta " << trkPB->eta()<<" Track Fitter " 
-		      << trkPB->trackFitter() << " isTRT " << isTRT<<" Extrapolate From " <<  extrapFrom); 
-      return StatusCode::SUCCESS;
+  /* For the other cases
+   * See if there is a collection cache
+   * else if there is an in algorithm cache
+   * else do it without a cache
+   */
+  else if(fromPerigee == extrapFrom){
+    if (m_useCaching){
+      SG::ReadHandle<CaloExtensionCollection>  PerigeeCache(m_GSFPerigeeCacheKey);
+      if (!PerigeeCache.isValid()) {
+        ATH_MSG_ERROR("Could not retrieve Perigee Cache " << PerigeeCache.key());
+        return StatusCode::FAILURE;
+      }
+      const Trk::CaloExtension* extension = m_perigeeParticleCaloExtensionTool->caloExtension(*trkPB,*PerigeeCache);
+      didExtension=extension!=nullptr; 
+      if(didExtension){
+        intersections=getIntersections(*extension,cluster);
+      }
     }
-  }
-  //Else track Particles before GSF, or failed GSF, or last measurement use the std tool/cache
-  else {
-    if(!m_defaultParticleCaloExtensionTool->caloExtension(*trkPB,extension)){
-      ATH_MSG_INFO("Could not create an extension from last measurement for a standard (non-GSF) track with : "<< " Track Pt "
-		      <<trkPB->pt()<< " Track Eta " << trkPB->eta()<<" Track Fitter " 
-		      << trkPB->trackFitter() << " isTRT " << isTRT<<" Extrapolate From " <<  extrapFrom); 
-      return StatusCode::SUCCESS;
+    else if(cache){
+      const Trk::CaloExtension* extension=m_perigeeParticleCaloExtensionTool->caloExtension(*trkPB,*cache);
+      didExtension=extension!=nullptr; 
+      if(didExtension){ 
+        intersections=getIntersections(*extension,cluster);
+      }
+    } 
+    else{
+      std::unique_ptr<Trk::CaloExtension> extension = nullptr;
+      didExtension=m_perigeeParticleCaloExtensionTool->caloExtension(*trkPB,extension);
+      if(didExtension){
+        intersections=getIntersections(*extension,cluster); 
+      }
     }
   }
-  //------------------------------------------------------------------------------------------------------------------------------------//
-  if(!extension){
-    ATH_MSG_INFO("Could not create an extension for "<< " Track Pt "
-		    <<trkPB->pt()<< " Track Eta " << trkPB->eta()<<" Track Fitter " 
-		    << trkPB->trackFitter() << " isTRT " << isTRT<<" Extrapolate From " <<  extrapFrom); 
-    return StatusCode::SUCCESS;
+  else if(fromLastMeasurement == extrapFrom){
+    if (m_useCaching){
+      SG::ReadHandle<CaloExtensionCollection>  LastCache(m_GSFLastCacheKey);
+      if (!LastCache.isValid()) {
+        ATH_MSG_ERROR("Could not retrieve Last Cache " << LastCache.key());
+        return StatusCode::FAILURE;
+      }
+      const Trk::CaloExtension* extension=m_lastParticleCaloExtensionTool->caloExtension(*trkPB,*LastCache);
+      didExtension=extension!=nullptr; 
+      if(didExtension){ 
+        intersections=getIntersections(*extension,cluster);
+      }
+    }
+    else if(cache){
+      const Trk::CaloExtension* extension =m_lastParticleCaloExtensionTool->caloExtension(*trkPB,*cache);
+      didExtension=extension!=nullptr; 
+      if(didExtension){ 
+        intersections=getIntersections(*extension,cluster);
+      }
+    } 
+    else{
+      std::unique_ptr<Trk::CaloExtension> extension = nullptr;
+      didExtension=m_lastParticleCaloExtensionTool->caloExtension(*trkPB,extension);
+      if(didExtension){
+        intersections=getIntersections(*extension,cluster); 
+      }
+    }
   }
-  //----------------------------------------------Calculate intersections------------------------------------------------------------------------------//
-  //Layers to calculate intersections
-  CaloExtensionHelpers::LayersToSelect layersToSelect;  
-  if ( xAOD::EgammaHelpers::isBarrel( cluster )  ) {
-    // Barrel
-    layersToSelect.insert(CaloSampling::PreSamplerB );  
-    layersToSelect.insert(CaloSampling::EMB1 );  
-    layersToSelect.insert(CaloSampling::EMB2 );  
-    layersToSelect.insert(CaloSampling::EMB3 );  
-  } else {
-    // Endcap
-    layersToSelect.insert(CaloSampling::PreSamplerE );  
-    layersToSelect.insert(CaloSampling::EME1 );  
-    layersToSelect.insert(CaloSampling::EME2 );  
-    layersToSelect.insert(CaloSampling::EME3 );        
+  if(!didExtension){
+    ATH_MSG_INFO("Could not create an extension from " << extrapFrom <<  " for a track with : "<< " Track Pt "
+                 <<trkPB->pt()<< " Track Eta " << trkPB->eta()<<" Track Fitter " << trkPB->trackFitter() << " isTRT " << isTRT); 
+    return StatusCode::SUCCESS; 
   }
-
-  CaloExtensionHelpers::EtaPhiPerLayerVector intersections;
-  CaloExtensionHelpers::midPointEtaPhiPerLayerVector( *extension, intersections, &layersToSelect );
   std::vector<bool> hasBeenHit(4,false); 
   // Should we flip the sign for deltaPhi? 
   bool flipSign = false; 
   if(trkPB->charge() > 0) {
     flipSign = true; 
   }
-  
   for( const auto& p : intersections ){    
     int  i(0); 
     auto sample = std::get<0>(p);
@@ -296,7 +297,6 @@ EMExtrapolationTools::getMatchAtCalo (const xAOD::CaloCluster*      cluster,
     } else {
       continue;
     }
-      
     eta[i]      = std::get<1>(p); 
     phi[i]      = std::get<2>(p); 
     deltaEta[i] = cluster->etaBE(i) - std::get<1>(p); 
@@ -305,20 +305,19 @@ EMExtrapolationTools::getMatchAtCalo (const xAOD::CaloCluster*      cluster,
     if(flipSign)  {
       deltaPhi[i] = -deltaPhi[i];
     }
-    
     ATH_MSG_DEBUG("getMatchAtCalo: i, eta, phi, deta, dphi: "  
-		  << i << " " << eta[i] << " " << phi[i] << " " 
-		  << deltaEta[i] << " " << deltaPhi[i]);     
-    
-    if (fromPerigeeRescaled == extrapFrom && !isTRT) {
+                  << i << " " << eta[i] << " " << phi[i] << " " 
+                  << deltaEta[i] << " " << deltaPhi[i]);     
+    if (fromPerigeeRescaled == extrapFrom) {
       if ( i == 2 && deltaPhi.size() > 4) { 
-	// For rescaled perigee when at sampling 2, save the phi   
-	// rotation of the track. This is defined as: ((phi of point at 
-	// sampling 2 - phi of point at track vertex/perigee) - phi of 
-	// direction of track at perigee) 
-	double perToSamp2 = std::get<2>(p)  - atPerigeePhi; 
-	deltaPhi[4] = fabs(P4Helpers::deltaPhi(perToSamp2, PerigeeTrkParPhi)); 
-	ATH_MSG_DEBUG("getMatchAtCalo: phi-rot: " << deltaPhi[4]); 
+        /* For rescaled perigee when at sampling 2, save the the  rotation in phi
+         * This is defined as: 
+         * ((phi of point at sampling 2 - phi of point at track vertex/perigee) - 
+         * phi of direction of track at perigee) 
+         */  
+        double perToSamp2 = std::get<2>(p)  - atPerigeePhi; 
+        deltaPhi[4] = fabs(P4Helpers::deltaPhi(perToSamp2, PerigeeTrkParPhi)); 
+        ATH_MSG_DEBUG("getMatchAtCalo: phi-rot: " << deltaPhi[4]); 
       }
     }
   }
@@ -331,100 +330,70 @@ EMExtrapolationTools::getMatchAtCalo (const xAOD::CaloCluster*      cluster,
   return StatusCode::SUCCESS;   
 }
 
-// =================================================================
-// ======================= Photon/vertex Neutral track parameters Related Interfaces 
-
-///////////////////////////////////////////////////////////////////////////////
-//* Extrapolate double-track conversion with the neutral perigee
-///////////////////////////////////////////////////////////////////////////////
-bool
-EMExtrapolationTools::matchesAtCalo(const xAOD::CaloCluster*           cluster, 
-				    const Trk::NeutralParameters*      phPerigee, 
-				    bool                               isTRT,
-				    double&                            deltaEta,
-				    double&                            deltaPhi) const 
-{
-
-  float etaAtCalo, phiAtCalo;
-  Trk::PerigeeSurface surface( phPerigee->position() );
-  const Trk::TrackParameters* trkPar = surface.createTrackParameters( phPerigee->position(), phPerigee->momentum().unit()*1e9,1,0);  
-  if( !getEtaPhiAtCalo( trkPar, &etaAtCalo, &phiAtCalo) ){
-    delete trkPar;
-    return false;
-  }
-  delete trkPar;
-
-  deltaEta = cluster->eta() - etaAtCalo;
-  deltaPhi = P4Helpers::deltaPhi(cluster->phi(),phiAtCalo); 
-  if ((!isTRT && (fabs(deltaEta) > m_broadDeltaEta) )
-      || (isTRT && (fabs(deltaEta) > std::max(m_TRTbarrelDeltaEta, m_TRTendcapDeltaEta)) )         
-      || fabs(deltaPhi) > m_broadDeltaPhi) {
-    return false;
-  }
-
-  if ((isTRT && fabs(deltaPhi) < std::max(m_narrowDeltaPhiTRTbarrel, m_narrowDeltaPhiTRTendcap)) || 
-      (!isTRT && fabs(deltaEta)< m_narrowDeltaEta && fabs(deltaPhi) < m_narrowDeltaPhi) ){
-    return true;
-  }
-  return false;
-}
+/*
+ * Photon/vertex/Neutral track parameters 
+ * Related methods 
+ * needed for  Extrapolating/matching conversions
+ */
 
+/*  Method  doing the matching given the eta at calo as input  */
 bool EMExtrapolationTools::matchesAtCalo(const xAOD::CaloCluster* cluster,
-					 const xAOD::Vertex *vertex,
-					 float etaAtCalo,
-					 float phiAtCalo) const
+                                         const xAOD::Vertex *vertex,
+                                         float etaAtCalo,
+                                         float phiAtCalo) const
 {
   if (!cluster || !vertex) return false;  
   float deltaEta = fabs(etaAtCalo - cluster->etaBE(2));
   float deltaPhi = fabs(P4Helpers::deltaPhi(cluster->phi(), phiAtCalo));
-  
+
   int TRTsection = 0;
   if (xAOD::EgammaHelpers::numberOfSiTracks(vertex) == 0)
     TRTsection = getTRTsection(vertex->trackParticle(0));
-  
+
   // First pass on TRT tracks, skip barrel tracks matching endcap clusters and vice-versa
   if((TRTsection==2 && (cluster->eta()<=0.6  || cluster->eta()>=2.4)   ) ||
      (TRTsection==-2 && (cluster->eta()>=-0.6 || cluster->eta()<=-2.4)  ) ||
      (TRTsection==1 && (cluster->eta()<=-0.1 || cluster->eta()>=1.3)   ) ||
      (TRTsection==-1 && (cluster->eta()>=0.1  || cluster->eta()<=-1.3)  )
-     ) {
+    ) {
     return false;
   }
-  
+
   // The maximum deltaEta/deltaPhi for Si, TRT barrel, TRT endcap
   std::vector<double> dEtaV{m_narrowDeltaEta, m_TRTbarrelDeltaEta, m_TRTendcapDeltaEta};
   std::vector<double> dPhiV{m_narrowDeltaPhi, m_narrowDeltaPhiTRTbarrel, m_narrowDeltaPhiTRTendcap};
 
   return (deltaEta < dEtaV[abs(TRTsection)] && deltaPhi < dPhiV[abs(TRTsection)]);
 }
-
-
-// =================================================================
+/*
+ * The following two are the heavy lifting methods.
+ * Start from vertex/Track Parameters 
+ * and then calculate the eta/phi at calo
+ */
 bool EMExtrapolationTools::getEtaPhiAtCalo (const xAOD::Vertex* vertex, 
-					    float *etaAtCalo,
-					    float *phiAtCalo) const
+                                            float *etaAtCalo,
+                                            float *phiAtCalo) const
 {
   if (!vertex) return false;
-  // Get the momentum at the vertex
   Amg::Vector3D momentum = getMomentumAtVertex(*vertex);
-  // Protection against momentum = 0
   if (momentum.mag() < 1e-5){
     ATH_MSG_DEBUG("Intersection failed");
     return false;
   }
   Trk::PerigeeSurface surface (vertex->position());
-  // Hack create high pt track parameters
-  const Trk::TrackParameters* trkPar =  surface.createTrackParameters( vertex->position(), momentum.unit() *1.e9, +1, 0);
+  /*
+   * Create high pt track parameters to mimic a neutral particle.
+   * This in principle is an approximation
+   */ 
+  const Trk::TrackParameters* trkPar =  surface.createTrackParameters( vertex->position(), momentum.unit() *1.e10, +1, 0);
   bool success = getEtaPhiAtCalo( trkPar, etaAtCalo, phiAtCalo);
   delete trkPar;
   return success;   
 }
-
-// =================================================================
+/*  The actual calculation happens here*/
 bool EMExtrapolationTools::getEtaPhiAtCalo (const Trk::TrackParameters* trkPar, 
-					    float *etaAtCalo,
-					    float *phiAtCalo) const{
-
+                                            float *etaAtCalo,
+                                            float *phiAtCalo) const{
   if (!trkPar) return false;
   CaloExtensionHelpers::LayersToSelect layersToSelect;    
   if ( fabs(trkPar->eta()) < 1.425) {
@@ -434,29 +403,15 @@ bool EMExtrapolationTools::getEtaPhiAtCalo (const Trk::TrackParameters* trkPar,
     // Endcap
     layersToSelect.insert(CaloSampling::EME2 );  
   }
-  bool success = getHackEtaPhiAtCalo( trkPar, etaAtCalo, phiAtCalo, layersToSelect);
-  return success;   
-}
-// =================================================================
-
-bool EMExtrapolationTools::getHackEtaPhiAtCalo (const Trk::TrackParameters* trkPar, 
-						float *etaAtCalo,
-						float *phiAtCalo,
-						CaloExtensionHelpers::LayersToSelect& layersToSelect
-						) const
 
-{
   std::unique_ptr<Trk::CaloExtension> extension = nullptr;      
   extension = m_perigeeParticleCaloExtensionTool->caloExtension( *trkPar, Trk::alongMomentum, Trk::muon );
-
   if(!extension){
     ATH_MSG_WARNING("Could not create an extension from getHackEtaPhiAtCalo ");
     return false;
   } 
-
   CaloExtensionHelpers::EtaPhiPerLayerVector intersections;
   CaloExtensionHelpers::midPointEtaPhiPerLayerVector( *extension, intersections, &layersToSelect );
- 
   bool hitEM2(false);
   for( const auto& p : intersections ){    
     int  i(0); 
@@ -467,14 +422,13 @@ bool EMExtrapolationTools::getHackEtaPhiAtCalo (const Trk::TrackParameters* trkP
       hitEM2=true;
       ++i;
       ATH_MSG_DEBUG("getMatchAtCalo: i, eta, phi : "  
-		    << i << " " << std::get<1>(p) << " " << std::get<2>(p) ); 
-      
+                    << i << " " << std::get<1>(p) << " " << std::get<2>(p) ); 
     }
   }
   return hitEM2;   
 }
 
-// =================================================================
+/* Methods to get the momemtum at the conversion vertex*/
 Amg::Vector3D EMExtrapolationTools::getMomentumAtVertex(const xAOD::Vertex& vertex, unsigned int index) const
 {
   Amg::Vector3D momentum(0., 0., 0.);
@@ -521,7 +475,7 @@ Amg::Vector3D EMExtrapolationTools::getMomentumAtVertex(const xAOD::Vertex& vert
   }
   return momentum;  
 }
-// =================================================================
+
 Amg::Vector3D EMExtrapolationTools::getMomentumAtVertex(const xAOD::Vertex& vertex, bool reuse /* = true */) const
 {
   Amg::Vector3D momentum(0., 0., 0.);
@@ -536,12 +490,12 @@ Amg::Vector3D EMExtrapolationTools::getMomentumAtVertex(const xAOD::Vertex& vert
       accPx.isAvailable(vertex) && 
       accPy.isAvailable(vertex) && 
       accPz.isAvailable(vertex) 
-      ){
+     ){
     // Already decorated with parameters at vertex
     ATH_MSG_DEBUG("getMomentumAtVertex : getting from auxdata");
     return Amg::Vector3D(accPx(vertex), 
-			 accPy(vertex),  
-			 accPz(vertex)); 
+                         accPy(vertex),  
+                         accPz(vertex)); 
   }
   else{
     for (unsigned int i = 0; i < vertex.nTrackParticles(); ++i){
@@ -550,9 +504,10 @@ Amg::Vector3D EMExtrapolationTools::getMomentumAtVertex(const xAOD::Vertex& vert
   }
   return momentum;	
 }
-// ============================================================================
 
-// ======================= HELPERS==============================================
+/* 
+ * Create Rescaled Perigee Parametrs
+ */
 const Trk::TrackParameters* 
 EMExtrapolationTools::getRescaledPerigee(const xAOD::TrackParticle* trkPB, const xAOD::CaloCluster* cluster) const {
   const Trk::TrackParameters* oldPerigee = &trkPB->perigeeParameters();
@@ -574,14 +529,42 @@ EMExtrapolationTools::getRescaledPerigee(const xAOD::TrackParticle* trkPB, const
   Trk::PerigeeSurface surface (oldPerigee->position());
   //This surface has the correct offset in x and y
   const Trk::TrackParameters* result  = surface.createParameters<5,Trk::Charged>(0,
-										 0,
-										 phi,
-										 theta,
-										 qoverp);
+                                                                                 0,
+                                                                                 phi,
+                                                                                 theta,
+                                                                                 qoverp);
   return (result);
 }
 
-// =================================================================
+/*
+ * Helper to get the Eta/Phi per Layer
+ */
+CaloExtensionHelpers::EtaPhiPerLayerVector 
+EMExtrapolationTools::getIntersections (const Trk::CaloExtension& extension,const xAOD::CaloCluster* cluster) const
+{
+  //Layers to calculate intersections
+  CaloExtensionHelpers::LayersToSelect layersToSelect;  
+  if ( xAOD::EgammaHelpers::isBarrel( cluster )  ) {
+    // Barrel
+    layersToSelect.insert(CaloSampling::PreSamplerB );  
+    layersToSelect.insert(CaloSampling::EMB1 );  
+    layersToSelect.insert(CaloSampling::EMB2 );  
+    layersToSelect.insert(CaloSampling::EMB3 );  
+  } else {
+    // Endcap
+    layersToSelect.insert(CaloSampling::PreSamplerE );  
+    layersToSelect.insert(CaloSampling::EME1 );  
+    layersToSelect.insert(CaloSampling::EME2 );  
+    layersToSelect.insert(CaloSampling::EME3 );        
+  }
+  CaloExtensionHelpers::EtaPhiPerLayerVector intersections;
+  CaloExtensionHelpers::midPointEtaPhiPerLayerVector(extension, intersections, &layersToSelect );
+  return intersections;
+}
+
+/*
+ * Helper to identify the TRT section
+ */
 int EMExtrapolationTools::getTRTsection(const xAOD::TrackParticle* trkPB) const{
   if (!trkPB){
     ATH_MSG_DEBUG("Null pointer to TrackParticle");
@@ -602,9 +585,9 @@ int EMExtrapolationTools::getTRTsection(const xAOD::TrackParticle* trkPB) const{
     //Loop over the TrkStateOnSurfaces search last valid TSOS first
     for ( DataVector<const Trk::TrackStateOnSurface>::const_reverse_iterator rItTSoS = trackStates->rbegin(); rItTSoS != trackStates->rend(); ++rItTSoS){
       if ( (*rItTSoS)->type(Trk::TrackStateOnSurface::Measurement) && !((*rItTSoS)->type(Trk::TrackStateOnSurface::Outlier)) && (*rItTSoS)->measurementOnTrack()!=0 
-	   && !dynamic_cast<const Trk::PseudoMeasurementOnTrack*>((*rItTSoS)->measurementOnTrack())){
-	trkPar = (*rItTSoS)->measurementOnTrack();
-	break;
+           && !dynamic_cast<const Trk::PseudoMeasurementOnTrack*>((*rItTSoS)->measurementOnTrack())){
+        trkPar = (*rItTSoS)->measurementOnTrack();
+        break;
       }
     }
   }
diff --git a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.h b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.h
index 789bee553e0f7fc5cb011441dd2b09119143113a..b73fc0e8daf6c7b05242b8e50a8c77007dcf7667 100644
--- a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.h
+++ b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.h
@@ -1,39 +1,39 @@
 /*
-  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 EGAMMATRACKTOOLS_EMEXTRAPOLATIONTOOLS_H
 #define EGAMMATRACKTOOLS_EMEXTRAPOLATIONTOOLS_H
 /** 
   @class EMExtrapolationTools
-          Tools for track extrapolation to the calorimeter
+  Tools for track extrapolation to the calorimeter
   @author Thomas Koffas, Christos Anastopoulos
-*/
+  */
 
 /********************************************************************
 
 NAME:     EMExtrapolationTools.h
 PACKAGE:  offline/Reconstruction/egammaTrackTools
-
 AUTHORS:  T. Koffas, C.Anastopoulos
-
 PURPOSE:  Tool which propagate track to 
-             - calorimeter
-             - cluster
-********************************************************************/
+- calorimeter
+- cluster
+ ********************************************************************/
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "StoreGate/ReadHandleKey.h"
+
 #include "egammaInterfaces/IEMExtrapolationTools.h"
+
 #include "TrkNeutralParameters/NeutralParameters.h"
 #include "TrkParameters/TrackParameters.h"
-
 #include "xAODCaloEvent/CaloClusterFwd.h"
 #include "xAODTracking/TrackParticleFwd.h"
 #include "xAODTracking/VertexFwd.h"
 
 #include "TrkCaloExtension/CaloExtensionHelpers.h"
-
+#include "TrkCaloExtension/CaloExtensionCollection.h"
 #include "RecoToolInterfaces/IParticleCaloExtensionTool.h"
 #include "TrkExInterfaces/IExtrapolator.h"
 
@@ -42,13 +42,13 @@ class CaloDepthTool;
 
 namespace Trk
 {
-  class INeutralParticleParameterCalculator;
+class INeutralParticleParameterCalculator;
 }
 
 
 class EMExtrapolationTools : virtual public IEMExtrapolationTools, public AthAlgTool {
 
- public:
+public:
 
   /** @brief Constructor with parameters */
   EMExtrapolationTools (const std::string& type,const std::string& name, const IInterface* parent);
@@ -56,11 +56,13 @@ class EMExtrapolationTools : virtual public IEMExtrapolationTools, public AthAlg
   virtual ~EMExtrapolationTools();
 
   /** @brief initialize method */
-  virtual StatusCode initialize();
+  virtual StatusCode initialize() override final;
   /** @brief finalize method */
-  virtual StatusCode finalize();
+  virtual StatusCode finalize() override final;
 
 
+  typedef  std::unordered_map<size_t,std::unique_ptr<Trk::CaloExtension>> Cache;
+ 
   /**  test for cluster/extrapolated track match, from xAOD::TrackParticle,
    * returns true for good match using sampling 2, and
    *  the values for eta/phi, deltaEta/deltaPhi 
@@ -73,58 +75,56 @@ class EMExtrapolationTools : virtual public IEMExtrapolationTools, public AthAlg
                               std::vector<double>&          phi,
                               std::vector<double>&          deltaEta,
                               std::vector<double>&          deltaPhi,
-                              unsigned int                  extrapFrom = fromPerigee) const;
+                              unsigned int                  extrapFrom = fromPerigee,
+                              Cache* cache=nullptr) const override final;
 
 
   /**   get eta, phi, deltaEta, and deltaPhi at the four calorimeter
    *    layers given the Trk::ParametersBase.  */
   virtual StatusCode getMatchAtCalo (const xAOD::CaloCluster*      cluster, 
                                      const xAOD::TrackParticle*    trkPB,
-				     bool                          isTRT, 
+                                     bool                          isTRT, 
                                      Trk::PropDirection            direction,
                                      std::vector<double>&          eta,
                                      std::vector<double>&          phi,
                                      std::vector<double>&          deltaEta,
                                      std::vector<double>&          deltaPhi,
-                                     unsigned int                  extrapFrom = fromPerigee) const;
-
+                                     unsigned int                  extrapFrom = fromPerigee,
+                                     Cache* cache=nullptr) const override final;
 
-  /**  test for cluster/extrapolated track match, from NeutralPerigee */
-  virtual bool  matchesAtCalo(const xAOD::CaloCluster*                 cluster,       
-                              const Trk::NeutralParameters*      perigee, 
-                              bool                               isTRT,
-                              double&                            deltaEta,
-                              double&                            deltaPhi) const;
 
 
   /** test for vertex-to-cluster match given also the positions 
-      at the calorimeter from the vertex extrapolation  **/
+    at the calorimeter from the vertex extrapolation  **/
   virtual bool matchesAtCalo(const xAOD::CaloCluster* cluster,
-                     const xAOD::Vertex *vertex,
-                     float etaAtCalo,
-                     float phiAtCalo)  const;
+                             const xAOD::Vertex *vertex,
+                             float etaAtCalo,
+                             float phiAtCalo)  const override final;
 
 
   /** get eta, phi at EM2 given a vertex which is converted to NeutralParameters.
-      Return false if the extrapolation fails **/
+    Return false if the extrapolation fails **/
   virtual bool getEtaPhiAtCalo (const xAOD::Vertex* vertex, 
                                 float *etaAtCalo,
-                                float *phiAtCalo) const;
+                                float *phiAtCalo) const override final;
 
   /** get eta, phi at EM2 given NeutralParameters.
-      Return false if the extrapolation fails **/
- virtual bool getEtaPhiAtCalo (const Trk::TrackParameters* trkPar, 
-			       float *etaAtCalo,
-			       float *phiAtCalo) const;
+    Return false if the extrapolation fails **/
+  virtual bool getEtaPhiAtCalo (const Trk::TrackParameters* trkPar, 
+                                float *etaAtCalo,
+                                float *phiAtCalo) const override final;
 
   /** get the momentum of the i-th at the vertex (designed for conversions) **/
-  Amg::Vector3D getMomentumAtVertex(const xAOD::Vertex&, unsigned int) const;
-  
+  Amg::Vector3D getMomentumAtVertex(const xAOD::Vertex&, unsigned int) const override final;
+
   /** get sum of the momenta at the vertex (designed for conversions). Retrieve from auxdata if available and \<reuse\> is true **/
-  Amg::Vector3D getMomentumAtVertex(const xAOD::Vertex&, bool reuse = true) const;
+  Amg::Vector3D getMomentumAtVertex(const xAOD::Vertex&, bool reuse = true) const override final;
+
+
+private:
 
-    
- private:
+  /** @Helper to get the per Layer Intersections **/ 
+  CaloExtensionHelpers::EtaPhiPerLayerVector getIntersections (const Trk::CaloExtension& extension,const xAOD::CaloCluster* cluster) const;
 
   /** @Perform the Rescaling of the perigee parameters with the cluster energy **/
   const Trk::TrackParameters*  getRescaledPerigee(const xAOD::TrackParticle* trkPB, const xAOD::CaloCluster* cluster) const;
@@ -132,48 +132,44 @@ class EMExtrapolationTools : virtual public IEMExtrapolationTools, public AthAlg
   /** @brief Return +/- 1 (2) if track is in positive/negative TRT barrel (endcap) **/
   int getTRTsection(const xAOD::TrackParticle* trkPB) const;
 
-  /** get eta, phi at EM2 For trackparameters 
-      Return false if the extrapolation fails **/
-  bool getHackEtaPhiAtCalo (const  Trk::TrackParameters*, 
-                            float *etaAtCalo,
-                            float *phiAtCalo,
-			    CaloExtensionHelpers::LayersToSelect& layersToSelect
-			    ) const;
-  
-  ToolHandle<Trk::IParticleCaloExtensionTool> m_defaultParticleCaloExtensionTool {this,
-      "DefaultCaloExtentionTool", "Trk::ParticleCaloExtensionTool"};
+  ToolHandle<Trk::IParticleCaloExtensionTool> m_lastParticleCaloExtensionTool {this,
+    "LastCaloExtentionTool", "Trk::ParticleCaloExtensionTool/EMLastCaloExtensionTool"};
 
   ToolHandle<Trk::IParticleCaloExtensionTool> m_perigeeParticleCaloExtensionTool {this,
-      "PerigeeCaloExtentionTool", "Trk::ParticleCaloExtensionTool/EMParticleCaloExtensionTool"};
+    "PerigeeCaloExtentionTool", "Trk::ParticleCaloExtensionTool/EMParticleCaloExtensionTool"};
 
   ToolHandle<Trk::IExtrapolator> m_extrapolator {this, 
-      "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"};
-       
+    "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"};
+
   // Track-to-cluster match cuts
   Gaudi::Property<double> m_broadDeltaEta{this, "BroadDeltaEta", 0.05};
   Gaudi::Property<double> m_broadDeltaPhi{this, "BroadDeltaPhi", 0.10};
   Gaudi::Property<double> m_narrowDeltaEta{this, "NarrowDeltaEta", 0.05};
   Gaudi::Property<double> m_narrowDeltaPhi{this, "NarrowDeltaPhi", 0.05};
   Gaudi::Property<double> m_narrowDeltaPhiBrem{this,
-      "NarrowDeltaPhiBrem", 0.10};
+    "NarrowDeltaPhiBrem", 0.10};
   Gaudi::Property<double> m_narrowDeltaPhiTRTbarrel{this,
-      "NarrowDeltaPhiTRTbarrel", 0.02};
+    "NarrowDeltaPhiTRTbarrel", 0.02};
   Gaudi::Property<double> m_narrowDeltaPhiBremTRTbarrel{this,
-      "NarrowDeltaPhiBremTRTbarrel", 0.03};
+    "NarrowDeltaPhiBremTRTbarrel", 0.03};
   Gaudi::Property<double> m_narrowDeltaPhiTRTendcap{this,
-      "NarrowDeltaPhiTRTendcap", 0.02};
+    "NarrowDeltaPhiTRTendcap", 0.02};
   Gaudi::Property<double> m_narrowDeltaPhiBremTRTendcap{this,
-      "NarrowDeltaPhiBremTRTendcap", 0.03};
+    "NarrowDeltaPhiBremTRTendcap", 0.03};
   Gaudi::Property<double> m_TRTbarrelDeltaEta{this, "TRTbarrelDeltaEta", 0.35};
   Gaudi::Property<double> m_TRTendcapDeltaEta{this, "TRTendcapDeltaEta", 0.2};
 
   // ID TRT helper
   const TRT_ID*                         m_trtId;
-  
-  //Use the a cache for track Particle extrapolation
-  Gaudi::Property<bool>  m_useCaching {this, 
-      "useCaching", true, "Use the cache for track Particle extrapolation"};
-  
+
+  //Cache collections for GSF Track Particle extrapolation Perigee
+  SG::ReadHandleKey<CaloExtensionCollection>  m_GSFPerigeeCacheKey{this,
+  "GSFPerigeeCache", "GSFPerigeeCaloExtension", "Name of GSF Perigee extrapolation cache"};
+  SG::ReadHandleKey<CaloExtensionCollection>  m_GSFLastCacheKey{this,
+  "GSFLastCache", "GSFLastCaloExtension", "Name of GSF Last measurement extrapolation cache"};
+ //Use the a cache for GSF Track Particle extrapolation
+  Gaudi::Property<bool>  m_useCaching {this,"useCaching", false, "Use a CaloExtension Collection as cache"};
+
 };
 
 
diff --git a/Simulation/FastShower/FastCaloSim/FastCaloSim/AddNoiseCellBuilderTool.h b/Simulation/FastShower/FastCaloSim/FastCaloSim/AddNoiseCellBuilderTool.h
index e36ee0e8b6815b92beccb6daa43b72dcffb5e0e2..cefe33bcfac54473a448f1aed9391acecf44dd36 100755
--- a/Simulation/FastShower/FastCaloSim/FastCaloSim/AddNoiseCellBuilderTool.h
+++ b/Simulation/FastShower/FastCaloSim/FastCaloSim/AddNoiseCellBuilderTool.h
@@ -4,56 +4,43 @@
 
 #ifndef ADDNOISE_CELLBUILDERTOOL_H
 #define ADDNOISE_CELLBUILDERTOOL_H
-// 
+//
 // CellBuilderTool.cxx
 //     Building Cells objects from Atlfast
 //
 // Michael Duehrssen
 
 #include "FastCaloSim/BasicCellBuilderTool.h"
-//#include "CaloUtils/ICaloNoiseTool.h"
 #include "CaloInterface/ICaloNoiseTool.h"
 #include "AthenaKernel/IAtRndmGenSvc.h"
 
 #include <string>
 
-class TRandom;
-
 namespace CLHEP {
   class HepRandomEngine;
 }
 
 class AddNoiseCellBuilderTool: public BasicCellBuilderTool
 {
-public:    
+public:
   AddNoiseCellBuilderTool(
-			     const std::string& type, 
-			     const std::string& name, 
-			     const IInterface* parent);
+                          const std::string& type,
+                          const std::string& name,
+                          const IInterface* parent);
   ~AddNoiseCellBuilderTool();
 
 
-  virtual StatusCode initialize();
+  virtual StatusCode initialize() override;
 
   // update theCellContainer
-  virtual StatusCode process( CaloCellContainer * theCellContainer) ;
+  virtual StatusCode process( CaloCellContainer * theCellContainer) override;
 private:
-  std::string m_noiseToolName; 
-  //NoiseTool
-  ICaloNoiseTool* m_noiseTool;
-  
-  //TRandom* m_rand;
 
+  ToolHandle<ICaloNoiseTool> m_noiseTool;   //NoiseTool - public
   ServiceHandle<IAtRndmGenSvc>   m_rndmSvc;
-  CLHEP::HepRandomEngine*        m_randomEngine;
-  std::string                    m_randomEngineName;         //!< Name of the random number stream
-  
-  bool m_donoise;
+  CLHEP::HepRandomEngine*        m_randomEngine{};
+  std::string                    m_randomEngineName{"FastCaloSimNoiseRnd"};         //!< Name of the random number stream
+  bool m_donoise{true};
 };
 
 #endif
-
-
-
-
-
diff --git a/Simulation/FastShower/FastCaloSim/FastCaloSim/BasicCellBuilderTool.h b/Simulation/FastShower/FastCaloSim/FastCaloSim/BasicCellBuilderTool.h
index 582d2d57c0a737022b299b51f7fc7f7eedcd1d2a..557c24f9b58cd42bb15119a2deb8937ba1aac10b 100755
--- a/Simulation/FastShower/FastCaloSim/FastCaloSim/BasicCellBuilderTool.h
+++ b/Simulation/FastShower/FastCaloSim/FastCaloSim/BasicCellBuilderTool.h
@@ -4,7 +4,7 @@
 
 #ifndef BASIC_CELLBUILDERTOOL_H
 #define BASIC_CELLBUILDERTOOL_H
-// 
+//
 // CellBuilderTool.cxx
 //     Building Cells objects from Atlfast
 //
@@ -21,7 +21,6 @@
 
 #include "FastCaloSim/FSmap.h"
 
-class StoreGateSvc; 
 class CaloCellContainer ;
 class CaloDetDescrManager ;
 class CaloCellContainer ;
@@ -31,29 +30,29 @@ class cellinfo_map
 {
 public:
   typedef std::pair<const CaloDetDescrElement*,float> cellinfo;
-//  typedef std::vector<cellinfo> cellinfo_vec;
+  //  typedef std::vector<cellinfo> cellinfo_vec;
   class cellinfo_vec {
-    public:
-      typedef std::vector<cellinfo> vec;
-
-      cellinfo_vec():m_vol(0) {m_subvol[0]=m_subvol[1]=m_subvol[2]=m_subvol[3]=0;};
-      
-      cellinfo& operator[](unsigned int i) {return m_cellinfo_vec[i];};
-      void resize(unsigned int n) {m_cellinfo_vec.resize(n);};
-      unsigned int size() {return m_cellinfo_vec.size();};
-      void push_back(const cellinfo & ele,int layernr) {m_cellinfo_vec.push_back(ele);m_vol+=ele.second;m_subvol[layernr]+=ele.second;};
-      double vol() {return m_vol;};
-      double vol(int i) {return m_subvol[i];};
-
-      vec m_cellinfo_vec;
-      double m_vol;
-      double m_subvol[4];
+  public:
+    typedef std::vector<cellinfo> vec;
+
+    cellinfo_vec():m_vol(0) {m_subvol[0]=m_subvol[1]=m_subvol[2]=m_subvol[3]=0;};
+
+    cellinfo& operator[](unsigned int i) {return m_cellinfo_vec[i];};
+    void resize(unsigned int n) {m_cellinfo_vec.resize(n);};
+    unsigned int size() {return m_cellinfo_vec.size();};
+    void push_back(const cellinfo & ele,int layernr) {m_cellinfo_vec.push_back(ele);m_vol+=ele.second;m_subvol[layernr]+=ele.second;};
+    double vol() {return m_vol;};
+    double vol(int i) {return m_subvol[i];};
+
+    vec m_cellinfo_vec;
+    double m_vol;
+    double m_subvol[4];
   };
   typedef std::vector< std::vector<cellinfo_vec> > map_type;
 
   cellinfo_map(int p_neta=0, int p_nphi=0):
-  m_eta_start(-5), m_eta_end(5), m_phi_start(-M_PI), m_phi_end(M_PI), m_neta(p_neta), m_nphi(p_nphi), m_leta(1), m_lphi(1) { 
-    
+    m_eta_start(-5), m_eta_end(5), m_phi_start(-M_PI), m_phi_end(M_PI), m_neta(p_neta), m_nphi(p_nphi), m_leta(1), m_lphi(1) {
+
     if(m_neta>0) {
       m_deta=(m_eta_end-m_eta_start)/m_neta;
     }
@@ -67,10 +66,10 @@ public:
   }
 
   cellinfo_map(double p_eta_start, double p_eta_end, double p_phi_start, double p_phi_end, int p_neta=100, int p_nphi=64, int p_leta=1, int p_lphi=1):
-               m_eta_start(p_eta_start), m_eta_end(p_eta_end), m_phi_start(p_phi_start), m_phi_end(p_phi_end), m_neta(p_neta), m_nphi(p_nphi), m_leta(p_leta), m_lphi(p_lphi) {
+    m_eta_start(p_eta_start), m_eta_end(p_eta_end), m_phi_start(p_phi_start), m_phi_end(p_phi_end), m_neta(p_neta), m_nphi(p_nphi), m_leta(p_leta), m_lphi(p_lphi) {
     if(m_neta>0) m_deta=(m_eta_end-m_eta_start)/m_neta;
     if(m_nphi>0) m_dphi=(m_phi_end-m_phi_start)/m_nphi;
-    
+
     m_map.resize(m_neta);
     for(unsigned int i=0;i<m_neta;++i) m_map[i].resize(m_nphi);
   }
@@ -86,11 +85,11 @@ public:
     m_lphi=p_lphi;
     if(m_neta>0) m_deta=(m_eta_end-m_eta_start)/m_neta;
     if(m_nphi>0) m_dphi=(m_phi_end-m_phi_start)/m_nphi;
-    
+
     m_map.resize(m_neta);
     for(unsigned int i=0;i<m_neta;++i) m_map[i].resize(m_nphi);
   }
-  
+
   double eta_start() const {return m_eta_start;};
   double eta_end() const {return m_eta_end;};
   double phi_start() const {return m_eta_start;};
@@ -104,26 +103,26 @@ public:
 
   double index_to_eta_center(const int i) const {return m_eta_start+(i+0.5)*m_deta;};
   double index_to_phi_center(const int i) const {return m_phi_start+(i+0.5)*m_dphi;};
-  
+
   int    eta_to_index(const double eta) const {return (int)floor( (eta-m_eta_start)/m_deta );};
   int    phi_to_index_cont(const double phi) const {
-             return (int)floor( (phi-m_phi_start)/m_dphi );
-         };
+    return (int)floor( (phi-m_phi_start)/m_dphi );
+  };
   int    phi_to_index(const double phi) const {
-             int iphi=phi_to_index_cont(phi);
-             if(iphi<0) iphi+=m_nphi;
-             if(iphi>=(int)m_nphi) iphi-=m_nphi;
-             return iphi;
-         };
-  
+    int iphi=phi_to_index_cont(phi);
+    if(iphi<0) iphi+=m_nphi;
+    if(iphi>=(int)m_nphi) iphi-=m_nphi;
+    return iphi;
+  };
+
   void eta_range(const int ieta,double& eta1,double& eta2) { eta1=m_eta_start+ieta*m_deta; eta2=eta1+m_leta*m_deta; };
   void phi_range(const int iphi,double& phi1,double& phi2) { phi1=m_phi_start+iphi*m_dphi; phi2=phi1+m_lphi*m_dphi; };
-  
+
   cellinfo_vec& vec(int ieta,int iphi) {return m_map[ieta][iphi];};
-  
+
   const std::string& name() const {return m_name;};
   void setname(const std::string& name) {m_name=name;};
-  
+
 private:
   double m_eta_start;
   double m_eta_end;
@@ -132,27 +131,27 @@ private:
   unsigned int m_neta;
   unsigned int m_nphi;
   unsigned int m_leta;
-  unsigned int m_lphi;   
+  unsigned int m_lphi;
   double m_deta;
   double m_dphi;
-  
+
   std::string m_name;
-  
+
   map_type m_map;
 };
 
 
 class BasicCellBuilderTool: public extends<AthAlgTool, ICaloCellMakerTool>
 {
-public:    
-//  typedef std::vector< std::vector<cellinfo_vec> > cellinfo_map;
+public:
+  //  typedef std::vector< std::vector<cellinfo_vec> > cellinfo_map;
   typedef cellinfo_map::cellinfo cellinfo;
   typedef cellinfo_map::cellinfo_vec cellinfo_vec;
 
   BasicCellBuilderTool(
-			     const std::string& type, 
-			     const std::string& name, 
-			     const IInterface* parent);
+                       const std::string& type,
+                       const std::string& name,
+                       const IInterface* parent);
 
   ~BasicCellBuilderTool();
 
@@ -162,19 +161,19 @@ public:
   // update theCellContainer
   virtual StatusCode process( CaloCellContainer * theCellContainer) override;
 
-protected: 
-  void init_all_maps(); 
-  void init_cell(cellinfo_map& map,const CaloDetDescrElement* theDDE); 
+protected:
+  void init_all_maps();
+  void init_cell(cellinfo_map& map,const CaloDetDescrElement* theDDE);
   void init_volume(cellinfo_map& map);
   void find_phi0();
 
-//  void init_map(cellinfo_map& map, int layer); //layer 1=EM 3=HAD
+  //  void init_map(cellinfo_map& map, int layer); //layer 1=EM 3=HAD
   void findCells(cellinfo_vec & cell_vec, double eta_min, double eta_max, double phi_min, double phi_max, int layer);
 
 
   void addCell(CaloCellContainer * theCellContainer, int etabin, int phibin, double energy, cellinfo_map& map );
 
-  Identifier m_id; 
+  Identifier m_id;
   int m_nEvent;
   double m_phi0_em;
   double m_phi0_had;
@@ -184,14 +183,14 @@ protected:
   cellinfo_map m_em_map;
   cellinfo_map m_em_fine_map;
   cellinfo_map m_had_map;
-  
+
   double                   m_min_eta_sample[2][CaloCell_ID_FCS::MaxSample]; //[side][calosample]
   double                   m_max_eta_sample[2][CaloCell_ID_FCS::MaxSample]; //[side][calosample]
   FSmap< double , double > m_rmid_map[2][CaloCell_ID_FCS::MaxSample]; //[side][calosample]
   FSmap< double , double > m_zmid_map[2][CaloCell_ID_FCS::MaxSample]; //[side][calosample]
   FSmap< double , double > m_rent_map[2][CaloCell_ID_FCS::MaxSample]; //[side][calosample]
   FSmap< double , double > m_zent_map[2][CaloCell_ID_FCS::MaxSample]; //[side][calosample]
-  
+
 
   double deta(CaloCell_ID_FCS::CaloSample sample,double eta) const;
   void   minmaxeta(CaloCell_ID_FCS::CaloSample sample,double eta,double& mineta,double& maxeta) const;
@@ -202,8 +201,6 @@ protected:
   double zmid(CaloCell_ID_FCS::CaloSample sample,double eta) const;
   double zent(CaloCell_ID_FCS::CaloSample sample,double eta) const;
 
-  //StoreGateSvc* m_storeGate; 
-
   const CaloDetDescrManager* m_caloDDM;
   const CaloCell_ID*  m_caloCID;
   const AtlasDetectorID* m_atlas_id ;
@@ -213,8 +210,3 @@ protected:
 };
 
 #endif
-
-
-
-
-
diff --git a/Simulation/FastShower/FastCaloSim/FastCaloSim/FastShowerCellBuilderTool.h b/Simulation/FastShower/FastCaloSim/FastCaloSim/FastShowerCellBuilderTool.h
index d2b683c358076591823db209f3c922d691963908..09aa3f89cf67287bd4cda2de49b61c9d2409ae9f 100755
--- a/Simulation/FastShower/FastCaloSim/FastCaloSim/FastShowerCellBuilderTool.h
+++ b/Simulation/FastShower/FastCaloSim/FastCaloSim/FastShowerCellBuilderTool.h
@@ -4,7 +4,7 @@
 
 #ifndef FASTSHOWER_CELLBUILDERTOOL_H
 #define FASTSHOWER_CELLBUILDERTOOL_H
-// 
+//
 // CellBuilderTool.cxx
 //     Building Cells objects from Atlfast
 //
@@ -17,30 +17,31 @@
 //#include "TruthHelper/GenAccessIO.h"
 #include "FastSimulationEvent/GenParticleEnergyDepositMap.h"
 #include "HepPDT/ParticleDataTable.hh"
-#include "TrkExInterfaces/ITimedExtrapolator.h" 
+#include "TrkExInterfaces/ITimedExtrapolator.h"
 #include "TrkEventPrimitives/PdgToParticleHypothesis.h"
+#include "GaudiKernel/IPartPropSvc.h"
 
 /*
-#if FastCaloSim_project_release_v1 == 12
+  #if FastCaloSim_project_release_v1 == 12
   #include "CLHEP/HepPDT/ParticleDataTable.hh"
-#else  
+  #else
   #include "HepPDT/ParticleDataTable.hh"
-#endif  
+  #endif
 */
 /*
-#include "AtlfastEvent/CollectionDefs.h"
+  #include "AtlfastEvent/CollectionDefs.h"
 
-namespace HepMC_helper{
+  namespace HepMC_helper{
   class IMCselector;
-}
+  }
 
-namespace FastShower{
+  namespace FastShower{
   class GridletForger;
-}
+  }
 
-namespace Atlfast {
+  namespace Atlfast {
   class TesIO;
-}  
+  }
 */
 
 namespace HepMC {
@@ -69,11 +70,11 @@ class TLateralShapeCorrectionBase;
 
 class FastShowerCellBuilderTool: public BasicCellBuilderTool
 {
-public:    
+public:
   FastShowerCellBuilderTool(
-			     const std::string& type, 
-			     const std::string& name, 
-			     const IInterface* parent);
+                            const std::string& type,
+                            const std::string& name,
+                            const IInterface* parent);
   ~FastShowerCellBuilderTool();
 
 
@@ -86,8 +87,8 @@ public:
   // the actual simulation code for one particle can run standalone without process(CaloCellContainer* theCellContainer),
   // but setupEvent() should be called before the first particle and releaseEvent() after the last particle
   StatusCode process_particle(CaloCellContainer* theCellContainer, std::vector<Trk::HitInfo>* hitVector,
-			      Amg::Vector3D initMom, double mass, int pdgId, int barcode );
-  
+                              Amg::Vector3D initMom, double mass, int pdgId, int barcode );
+
   StatusCode callBack( IOVSVC_CALLBACK_ARGS );
 
   typedef std::map<int,int> MCdo_simul_state;
@@ -98,75 +99,72 @@ private:
   void LoadParametrizationsFromDir(std::string dir);
   void LoadParametrizationsFromFile(TDirectory& infile,MSG::Level level=MSG::INFO);
   StatusCode OpenParamSource(std::string insource);
-  
-  std::string                    m_mcLocation;   
-  std::string                    m_ParticleParametrizationFileName;
+
+  std::string                    m_mcLocation{"TruthEvent"};
+  std::string                    m_ParticleParametrizationFileName{""};
   std::vector< std::string >     m_AdditionalParticleParametrizationFileNames;
-  
+
   std::vector< std::string >     m_DB_folder;
   std::vector< int >             m_DB_channel;
   std::vector< std::string >     m_DB_dirname;
-  
-  std::string                    m_MuonEnergyInCaloContainer;
-  bool                           m_simul_ID_only;
-  bool                           m_simul_ID_v14_truth_cuts;
-  bool                           m_simul_EM_geant_only;
-  bool                           m_simul_heavy_ions;
-  
-  ICoolHistSvc*                  p_coolhistsvc;
-//  const std::string              m_histfolder; // COOL folder to access
-
-//  HepMC_helper::IMCselector*     m_mcSelector; //selects input particles
-/*  
-  FastShower::LateralShape*      m_latshape;
-  FastShower::LateralShape*      m_latshape_pion;
-  FastShower::LongitudinalShape* m_longshape;
-*/
 
+  std::string                    m_MuonEnergyInCaloContainer{"FatrasDepositedMuonEnergyInCalo"};
+  bool                           m_simul_ID_only{true};
+  bool                           m_simul_ID_v14_truth_cuts{false};
+  bool                           m_simul_EM_geant_only{false};
+  bool                           m_simul_heavy_ions{false};
+
+  ServiceHandle<ICoolHistSvc>    m_coolhistsvc;
+  //  const std::string              m_histfolder; // COOL folder to access
+
+  //  HepMC_helper::IMCselector*     m_mcSelector; //selects input particles
+  /*
+    FastShower::LateralShape*      m_latshape;
+    FastShower::LateralShape*      m_latshape_pion;
+    FastShower::LongitudinalShape* m_longshape;
+  */
+  ServiceHandle<IPartPropSvc>    m_partPropSvc;
   ServiceHandle<IAtRndmGenSvc>   m_rndmSvc;
-  CLHEP::HepRandomEngine*               m_randomEngine;
-  std::string                    m_randomEngineName;         //!< Name of the random number stream
+  CLHEP::HepRandomEngine*        m_randomEngine{};
+  std::string                    m_randomEngineName{"FastCaloSimRnd"};         //!< Name of the random number stream
 
   //CaloDepthTool*                 m_calodepth;
   //CaloDepthTool*                 m_calodepthEntrance;
-  
+
   /** The Extrapolator setup */
-  ToolHandle<Trk::ITimedExtrapolator>   m_extrapolator;          
-
-  ToolHandle<ICaloSurfaceHelper>   m_caloSurfaceHelper;
-  ICaloCoordinateTool*           m_calo_tb_coord;
-  
-  std::string                    m_calosurf_middle_InstanceName;
-  std::string                    m_calosurf_entrance_InstanceName;
-
-  bool                           m_jo_interpolate; //ATA: make marjorie's iterpolation optional
-  bool                           m_energy_eta_selection;//mwerner: make new selection of EnergyParam optional
-  bool                           m_use_Ekin_for_depositions;//Use the kinetic energy of a particle to as measure of the energie to deposit in the calo
-  
+  ToolHandle<Trk::ITimedExtrapolator>   m_extrapolator; //public tool
+
+  ToolHandle<ICaloSurfaceHelper>   m_caloSurfaceHelper; //public tool
+  ToolHandle<ICaloCoordinateTool>  m_calo_tb_coord; //public tool
+
+  bool                           m_jo_interpolate{false}; //ATA: make marjorie's iterpolation optional
+  bool                           m_energy_eta_selection{false};//mwerner: make new selection of EnergyParam optional
+  bool                           m_use_Ekin_for_depositions{false};//Use the kinetic energy of a particle to as measure of the energie to deposit in the calo
+
   std::vector< float >           m_sampling_energy_reweighting;
-  
+
   void                           CaloLocalPoint (const Trk::TrackParameters* parm, Amg::Vector3D* pt_ctb, Amg::Vector3D* pt_local);
-  
-  int                            m_n_surfacelist;
+
+  int                            m_n_surfacelist{5};
   CaloCell_ID_FCS::CaloSample    m_surfacelist[CaloCell_ID_FCS::MaxSample];
-  
-  HepPDT::ParticleDataTable*     m_particleDataTable;
-  
-  TRandom*                       m_rndm;
+
+  HepPDT::ParticleDataTable*     m_particleDataTable{};
+
+  TRandom*                       m_rndm{};
 
   std::vector< int >             m_invisibles;
-  
-//  TGraphErrors*                  geometry[CaloCell_ID_FCS::MaxSample][3];
-  
+
+  //  TGraphErrors*                  geometry[CaloCell_ID_FCS::MaxSample][3];
+
   ParticleEnergyParametrization* findElower(int id,double E,double eta);
   ParticleEnergyParametrization* findEupper(int id,double E,double eta);
   TShape_Result* findShape (int id,int calosample,double E,double eta,double dist,double distrange);
-  
+
   //void sum_par(const HepMC::GenParticle* par,MsgStream& log,std::vector<double>& sums,int level=0);
   //void print_par(const HepMC::GenParticle* par,MsgStream& log,int level=0);
-  
 
-public:    
+
+public:
   enum flag_simul_sate {
     zero_state=0,
     out_of_ID=-1,
@@ -183,8 +181,8 @@ public:
 private:
   //std::vector< double > m_spline_reweight_x;
   //std::vector< double > m_spline_reweight_y;
-  
-  bool m_is_init_shape_correction;
+
+  bool m_is_init_shape_correction{false};
   void init_shape_correction();
   typedef std::vector< TLateralShapeCorrectionBase* > t_shape_correction;
   t_shape_correction m_shape_correction;
@@ -200,15 +198,15 @@ private:
   void MC_remove_out_of_ID(MCdo_simul_state& do_simul_state,const MCparticleCollection& particles);
   void MC_remove_out_of_EM(MCdo_simul_state& do_simul_state,const MCparticleCollection& particles);
   void MC_remove_below_v14_truth_cuts(MCdo_simul_state& do_simul_state,const MCparticleCollection& particles);
-  
-//ID              Energy             Eta
+
+  //ID              Energy             Eta
   typedef std::map< double , ParticleEnergyParametrization* > t_map_PEP_Eta;
   typedef std::map< double , t_map_PEP_Eta > t_map_PEP_Energy;
   typedef std::map< int    , t_map_PEP_Energy > t_map_PEP_ID;
   t_map_PEP_ID m_map_ParticleEnergyParametrizationMap;
 
-//ID              Energy             Eta                Dist
-//  typedef std::map< double , TShape_Result* > t_map_PSP_Eta;
+  //ID              Energy             Eta                Dist
+  //  typedef std::map< double , TShape_Result* > t_map_PSP_Eta;
   typedef std::vector< TShape_Result* > t_map_PSP_DistEta;
   typedef std::map< double , t_map_PSP_DistEta > t_map_PSP_Energy;
   typedef std::map< int    , t_map_PSP_Energy > t_map_PSP_calosample;
@@ -223,14 +221,14 @@ private:
   std::map< int , double> m_simul_sum_energy;
   std::map< int , double> m_simul_sum_energyEM;
   std::map< int , double> m_simul_sum_energyHAD;
-  
+
 // Variables used during single event generation
 private:
   double m_E_tot_em;
   double m_E_tot_had;
   double m_Et_tot_em;
   double m_Et_tot_had;
-  
+
   double m_E_tot_sample[CaloCell_ID_FCS::MaxSample];
   double m_E_lost_sample[CaloCell_ID_FCS::MaxSample];
   double m_Et_tot_sample[CaloCell_ID_FCS::MaxSample];
@@ -268,19 +266,14 @@ public:
   double get_eta_calo_surf(int layer) const {return m_letaCalo[layer];};
   double get_phi_calo_surf(int layer) const {return m_lphiCalo[layer];};
   double get_d_calo_surf(int layer) const {return m_dCalo[layer];};
-  
+
 private:
-  std::string 	           m_FastShowerInfoContainerKey;
-  bool 			   m_storeFastShowerInfo;
-  FastShowerInfoContainer* m_FastShowerInfoContainer;
+  std::string              m_FastShowerInfoContainerKey{"FastShowerInfoContainer"};
+  bool                     m_storeFastShowerInfo{false};
+  FastShowerInfoContainer* m_FastShowerInfoContainer{};
   Trk::PdgToParticleHypothesis        m_pdgToParticleHypothesis;
-  mutable const Trk::TrackingVolume*  m_caloEntrance;
-  std::string                         m_caloEntranceName; 
+  mutable const Trk::TrackingVolume*  m_caloEntrance{};
+  std::string                         m_caloEntranceName{"InDet::Containers::InnerDetector"};
 };
 
 #endif
-
-
-
-
-
diff --git a/Simulation/FastShower/FastCaloSim/src/AddNoiseCellBuilderTool.cxx b/Simulation/FastShower/FastCaloSim/src/AddNoiseCellBuilderTool.cxx
index 567a269bcf3b471534b08402d71b302e01486174..f0df8386a57109cdc9d777faa203d0cf6d38dbde 100755
--- a/Simulation/FastShower/FastCaloSim/src/AddNoiseCellBuilderTool.cxx
+++ b/Simulation/FastShower/FastCaloSim/src/AddNoiseCellBuilderTool.cxx
@@ -5,42 +5,29 @@
 #include "FastCaloSim/AddNoiseCellBuilderTool.h"
 #include "FastCaloSim/FastSimCell.h"
 
-#include "GaudiKernel/ISvcLocator.h"
-#include "GaudiKernel/StatusCode.h"
-#include "GaudiKernel/MsgStream.h"
-#include "StoreGate/StoreGateSvc.h" 
-
 #include "CLHEP/Random/RandGaussZiggurat.h"
 #include "CLHEP/Random/RandFlat.h"
 
 #include "CaloEvent/CaloCellContainer.h"
 #include "TileEvent/TileCell.h"
 #include "CaloDetDescr/CaloDetDescrManager.h"
-#include "GaudiKernel/ListItem.h"
-
-//#include "TRandom3.h"
 
 #include <map>
 #include <iomanip>
 #include <fstream>
 
 AddNoiseCellBuilderTool::AddNoiseCellBuilderTool(
-			     const std::string& type, 
-			     const std::string& name, 
-			     const IInterface* parent)
-      :  BasicCellBuilderTool(type, name, parent),
-                           m_noiseToolName("CaloNoiseTool/calonoisetool"),
-			   m_rndmSvc("AtRndmGenSvc", name),
-			   m_randomEngine(0),
-			   m_randomEngineName("FastCaloSimNoiseRnd"),
-			   m_donoise(true)
-{ 
-  declareInterface<ICaloCellMakerTool>( this );
-  declareProperty("CaloNoiseTool",         m_noiseToolName);
+                                                 const std::string& type,
+                                                 const std::string& name,
+                                                 const IInterface* parent)
+  : BasicCellBuilderTool(type, name, parent)
+  , m_noiseTool("CaloNoiseTool/calonoisetool")
+  , m_rndmSvc("AtRndmGenSvc", name)
+{
+  declareProperty("CaloNoiseTool",         m_noiseTool);
   declareProperty("doNoise",               m_donoise);
   declareProperty("RandomStreamName",      m_randomEngineName,     "Name of the random number stream");
 
-  //m_rand = new TRandom3();
 }
 
 
@@ -51,111 +38,78 @@ AddNoiseCellBuilderTool::~AddNoiseCellBuilderTool()
 
 StatusCode AddNoiseCellBuilderTool::initialize()
 {
-  MsgStream log(msgSvc(), name());
-  log << MSG::INFO <<  "Initialisating started" << endmsg ;
-
-  StatusCode sc=BasicCellBuilderTool::initialize();
-  
-  IToolSvc* p_toolSvc = 0;    // Pointer to Tool Service
-  sc = service("ToolSvc", p_toolSvc);
-  if (sc.isFailure()) {
-    log << MSG::FATAL
-	<< " Tool Service not found "
-	<< endmsg;
-    return StatusCode::FAILURE;
-  }
+  ATH_MSG_DEBUG("Initialization started");
 
-  IAlgTool* algtool;
-  ListItem corr(m_noiseToolName);	  
-  sc = p_toolSvc->retrieveTool(corr.type(), corr.name(), algtool);
-  if (sc.isFailure()) {
-    log << MSG::INFO
-	<< "Unable to find tool for " << m_noiseToolName
-	<< endmsg;
-    return StatusCode::FAILURE;
-  } else {
-    log << MSG::INFO << "Noise Tool "
-	<< m_noiseToolName << " is selected!" << endmsg;
-  }
-  m_noiseTool=dynamic_cast<ICaloNoiseTool*>(algtool); 
+  ATH_CHECK(BasicCellBuilderTool::initialize());
+
+  ATH_CHECK(m_noiseTool.retrieve());
 
   // Random number service
-  if ( m_rndmSvc.retrieve().isFailure() ) {
-    log<<MSG::ERROR<< "Could not retrieve " << m_rndmSvc << endmsg;
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK(m_rndmSvc.retrieve());
 
   //Get own engine with own seeds:
   m_randomEngine = m_rndmSvc->GetEngine(m_randomEngineName);
   if (!m_randomEngine) {
-    log<<MSG::ERROR << "Could not get random engine '" << m_randomEngineName << "'" << endmsg;
+    ATH_MSG_ERROR("Could not get random engine '" << m_randomEngineName << "'");
     return StatusCode::FAILURE;
   }
 
-  log << MSG::INFO <<  "Initialisating finished" << endmsg ;
-  return sc;
+  ATH_MSG_DEBUG("Initialization finished");
+  return StatusCode::SUCCESS;
 }
 
 StatusCode AddNoiseCellBuilderTool::process(CaloCellContainer * theCellContainer)
 {
-  MsgStream log( msgSvc(), name() );
-  
   m_rndmSvc->print(m_randomEngineName);
   //m_randomEngine->showStatus();
   unsigned int rseed=0;
   while(rseed==0) {
     rseed=(unsigned int)( CLHEP::RandFlat::shoot(m_randomEngine) * std::numeric_limits<unsigned int>::max() );
   }
-  //m_rand->SetSeed(rseed);
 
-  log << MSG::INFO << "Executing start calo size=" <<theCellContainer->size()<<" Event="<<m_nEvent;//<<" rseed="<<rseed;
-  //if(m_rand)  log<<" seed(m_rand="<<m_rand->ClassName()<<")="<<m_rand->GetSeed();
-  log<< endmsg;
+  ATH_MSG_INFO("Executing start calo size=" <<theCellContainer->size()<<" Event="<<m_nEvent/*<<" rseed="<<rseed*/);
 
   ++m_nEvent;
-  
+
   double E_tot=0;
   double Et_tot=0;
   CaloCellContainer::iterator f_cell = theCellContainer->begin();
   CaloCellContainer::iterator l_cell = theCellContainer->end();
   for ( ; f_cell!=l_cell; ++f_cell)
-  {
-    CaloCell* cell = (*f_cell) ;
-    if(!cell) continue;
-    const CaloDetDescrElement* theDDE=cell->caloDDE();
-    if(!theDDE) continue;
-    
-    CaloGain::CaloGain gain=m_noiseTool->estimatedGain(cell,ICaloNoiseToolStep::CELLS);
-    
-    #if FastCaloSim_project_release_v1 == 12
+    {
+      CaloCell* cell = (*f_cell) ;
+      if(!cell) continue;
+      const CaloDetDescrElement* theDDE=cell->caloDDE();
+      if(!theDDE) continue;
+
+      CaloGain::CaloGain gain=m_noiseTool->estimatedGain(cell,ICaloNoiseToolStep::CELLS);
+
+#if FastCaloSim_project_release_v1 == 12
       CaloCell_ID::SUBCALO calo=theDDE->getSubCalo();
       if(calo==CaloCell_ID::TILE) {
         ((FastSimTileCell*)cell)->setGain(gain);
       } else {
         ((FastSimCaloCell*)cell)->setGain(gain);
       }
-    #else  
+#else
       cell->setGain(gain);
-    #endif  
-
-    if(m_donoise) {
-      double sigma=m_noiseTool->elecNoiseRMS(cell);
-      //double enoise=m_rand->Gaus(0.0,1.0)*sigma;
-      double enoise=CLHEP::RandGaussZiggurat::shoot(m_randomEngine,0.0,1.0)*sigma;
-
-      
-    
-/*
-    if(cell->energy()>1000) {
-      log<<MSG::DEBUG<<"sample="<<cell->caloDDE()->getSampling()<<" eta="<<cell->eta()<<" phi="<<cell->phi()<<" gain="<<gain<<" e="<<cell->energy()<<" sigma="<<sigma<<" enoise="<<enoise<<endmsg;
+#endif
+
+      if(m_donoise) {
+        double sigma=m_noiseTool->elecNoiseRMS(cell);
+        //double enoise=m_rand->Gaus(0.0,1.0)*sigma;
+        double enoise=CLHEP::RandGaussZiggurat::shoot(m_randomEngine,0.0,1.0)*sigma;
+        /*
+          if(cell->energy()>1000) {
+          ATH_MSG_DEBUG("sample="<<cell->caloDDE()->getSampling()<<" eta="<<cell->eta()<<" phi="<<cell->phi()<<" gain="<<gain<<" e="<<cell->energy()<<" sigma="<<sigma<<" enoise="<<enoise);
+          }
+        */
+        cell->setEnergy(cell->energy()+enoise);
+      }
+      E_tot+=cell->energy();
+      Et_tot+=cell->energy()/cosh(cell->eta());
     }
-*/    
-      cell->setEnergy(cell->energy()+enoise);
-    }  
-    E_tot+=cell->energy();
-    Et_tot+=cell->energy()/cosh(cell->eta());
-  }  
-
-  log << MSG::INFO << "Executing finished calo size=" <<theCellContainer->size()<<" ; e="<<E_tot<<" ; et="<<Et_tot<< endmsg;
+
+  ATH_MSG_INFO("Executing finished calo size=" <<theCellContainer->size()<<" ; e="<<E_tot<<" ; et="<<Et_tot);
   return StatusCode::SUCCESS;
 }
diff --git a/Simulation/FastShower/FastCaloSim/src/BasicCellBuilderTool.cxx b/Simulation/FastShower/FastCaloSim/src/BasicCellBuilderTool.cxx
index b72028a3a29ad668168752fb341a338bd839279e..c540458521584f03ebe1381e1bb1f75afbd79695 100755
--- a/Simulation/FastShower/FastCaloSim/src/BasicCellBuilderTool.cxx
+++ b/Simulation/FastShower/FastCaloSim/src/BasicCellBuilderTool.cxx
@@ -10,26 +10,21 @@
 #include "CaloDetDescr/CaloDetDescrManager.h"
 #include "CaloDetDescr/CaloDetDescriptor.h"
 
-#include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/StatusCode.h"
- 
-#include "GaudiKernel/INTupleSvc.h"
 
-#include "StoreGate/StoreGateSvc.h" 
-
-#include <iostream> 
+#include <iostream>
 #include <cmath>
 
 BasicCellBuilderTool::BasicCellBuilderTool(
-			     const std::string& type, 
-			     const std::string& name, 
-			     const IInterface* parent)
+                                           const std::string& type,
+                                           const std::string& name,
+                                           const IInterface* parent)
   :base_class(type, name, parent),
    m_nEvent(0),
    m_caloDDM(0),
    m_caloCID(0),
    m_atlas_id(0)
-{ 
+{
   declareProperty("phi0_em",m_phi0_em);
   declareProperty("phi0_had",m_phi0_had);
 
@@ -110,41 +105,15 @@ StatusCode BasicCellBuilderTool::initialize()
   // pointer to detector manager:
   m_atlas_id = (m_caloDDM->getCalo_Mgr())->getEM_ID();
 
-  //StatusCode sc;
-  /*
-  //initialize the StoreGateSvc ptr
-  sc = service("StoreGateSvc", m_storeGate); 
-  if (StatusCode::SUCCESS!= sc )
-  {
-    return sc; 
-  } 
-  */
-
-  // need tool service to get LArCablingService
-  IToolSvc* toolSvc;
-  if (service("ToolSvc", toolSvc).isFailure()) {
-    ATH_MSG_ERROR("Tool Service not found "); 
-    return StatusCode::FAILURE;
-  }
-
-/*
-// retrive onlineID helper from detStore
-  StoreGateSvc* detStore;
-  if (service("DetectorStore", detStore).isFailure()) {
-    log << MSG::ERROR   << "Unable to access DetectoreStore" << endmsg ;
-    return StatusCode::FAILURE;
-  }
-*/  
-
   m_nEvent=0;
 
-  return StatusCode::SUCCESS; 
+  return StatusCode::SUCCESS;
 
 }
 
 /*
-void BasicCellBuilderTool::init_map(cellinfo_map& map, int layer)
-{
+  void BasicCellBuilderTool::init_map(cellinfo_map& map, int layer)
+  {
   ATH_MSG_DEBUG("Building map layer=" << layer);
 
   double eta_min=0;
@@ -152,23 +121,23 @@ void BasicCellBuilderTool::init_map(cellinfo_map& map, int layer)
   double phi_min=0;
   double phi_max=0;
   for(unsigned int i=0;i<map.neta();++i) {
-    map.eta_range(i,eta_min,eta_max);
-    for(unsigned int j=0;j<map.nphi();++j) {
-      map.phi_range(j,phi_min,phi_max);
-      findCells(map.vec(i,j),eta_min,eta_max,phi_min,phi_max,layer);
-    }   
+  map.eta_range(i,eta_min,eta_max);
+  for(unsigned int j=0;j<map.nphi();++j) {
+  map.phi_range(j,phi_min,phi_max);
+  findCells(map.vec(i,j),eta_min,eta_max,phi_min,phi_max,layer);
+  }
+  }
   }
-}
 */
 
 double BasicCellBuilderTool::deta(CaloCell_ID_FCS::CaloSample sample,double eta) const
 {
   int side=0;
   if(eta>0) side=1;
-  
+
   double mineta=m_min_eta_sample[side][sample];
   double maxeta=m_max_eta_sample[side][sample];
-  
+
   if(eta<mineta) {
     return fabs(eta-mineta);
   } else if(eta>maxeta) {
@@ -177,20 +146,20 @@ double BasicCellBuilderTool::deta(CaloCell_ID_FCS::CaloSample sample,double eta)
     double d1=fabs(eta-mineta);
     double d2=fabs(eta-maxeta);
     if(d1<d2) return -d1;
-     else return -d2;
+    else return -d2;
   }
 }
 
-void BasicCellBuilderTool::minmaxeta(CaloCell_ID_FCS::CaloSample sample,double eta,double& mineta,double& maxeta) const 
+void BasicCellBuilderTool::minmaxeta(CaloCell_ID_FCS::CaloSample sample,double eta,double& mineta,double& maxeta) const
 {
   int side=0;
   if(eta>0) side=1;
-  
+
   mineta=m_min_eta_sample[side][sample];
   maxeta=m_max_eta_sample[side][sample];
 }
 
-double BasicCellBuilderTool::rmid(CaloCell_ID_FCS::CaloSample sample,double eta) const 
+double BasicCellBuilderTool::rmid(CaloCell_ID_FCS::CaloSample sample,double eta) const
 {
   int side=0;
   if(eta>0) side=1;
@@ -198,7 +167,7 @@ double BasicCellBuilderTool::rmid(CaloCell_ID_FCS::CaloSample sample,double eta)
   return m_rmid_map[side][sample].find_closest(eta)->second;
 }
 
-double BasicCellBuilderTool::zmid(CaloCell_ID_FCS::CaloSample sample,double eta) const 
+double BasicCellBuilderTool::zmid(CaloCell_ID_FCS::CaloSample sample,double eta) const
 {
   int side=0;
   if(eta>0) side=1;
@@ -206,16 +175,16 @@ double BasicCellBuilderTool::zmid(CaloCell_ID_FCS::CaloSample sample,double eta)
   return m_zmid_map[side][sample].find_closest(eta)->second;
 }
 
-double BasicCellBuilderTool::rzmid(CaloCell_ID_FCS::CaloSample sample,double eta) const 
+double BasicCellBuilderTool::rzmid(CaloCell_ID_FCS::CaloSample sample,double eta) const
 {
   int side=0;
   if(eta>0) side=1;
 
   if(isCaloBarrel(sample)) return m_rmid_map[side][sample].find_closest(eta)->second;
-   else                    return m_zmid_map[side][sample].find_closest(eta)->second;
+  else                    return m_zmid_map[side][sample].find_closest(eta)->second;
 }
 
-double BasicCellBuilderTool::rent(CaloCell_ID_FCS::CaloSample sample,double eta) const 
+double BasicCellBuilderTool::rent(CaloCell_ID_FCS::CaloSample sample,double eta) const
 {
   int side=0;
   if(eta>0) side=1;
@@ -223,7 +192,7 @@ double BasicCellBuilderTool::rent(CaloCell_ID_FCS::CaloSample sample,double eta)
   return m_rent_map[side][sample].find_closest(eta)->second;
 }
 
-double BasicCellBuilderTool::zent(CaloCell_ID_FCS::CaloSample sample,double eta) const 
+double BasicCellBuilderTool::zent(CaloCell_ID_FCS::CaloSample sample,double eta) const
 {
   int side=0;
   if(eta>0) side=1;
@@ -237,7 +206,7 @@ double BasicCellBuilderTool::rzent(CaloCell_ID_FCS::CaloSample sample,double eta
   if(eta>0) side=1;
 
   if(isCaloBarrel(sample)) return m_rent_map[side][sample].find_closest(eta)->second;
-   else                    return m_zent_map[side][sample].find_closest(eta)->second;
+  else                    return m_zent_map[side][sample].find_closest(eta)->second;
 }
 
 
@@ -248,11 +217,11 @@ void BasicCellBuilderTool::init_all_maps()
   cellinfo_map* curmap;
   cellinfo_map* curmap2;
 
-  ATH_MSG_DEBUG("size all cells : " <<m_caloDDM->element_end()-m_caloDDM->element_begin() 
-            <<  "; LAREM="          <<m_caloDDM->element_end(CaloCell_ID::LAREM)-m_caloDDM->element_begin(CaloCell_ID::LAREM)
-            <<  "; TILE="           <<m_caloDDM->element_end(CaloCell_ID::TILE)-m_caloDDM->element_begin(CaloCell_ID::TILE)
-            <<  "; LARHEC="         <<m_caloDDM->element_end(CaloCell_ID::LARHEC)-m_caloDDM->element_begin(CaloCell_ID::LARHEC)
-            <<  "; LARFCAL="        <<m_caloDDM->element_end(CaloCell_ID::LARFCAL)-m_caloDDM->element_begin(CaloCell_ID::LARFCAL) );
+  ATH_MSG_DEBUG("size all cells : " <<m_caloDDM->element_end()-m_caloDDM->element_begin()
+                <<  "; LAREM="          <<m_caloDDM->element_end(CaloCell_ID::LAREM)-m_caloDDM->element_begin(CaloCell_ID::LAREM)
+                <<  "; TILE="           <<m_caloDDM->element_end(CaloCell_ID::TILE)-m_caloDDM->element_begin(CaloCell_ID::TILE)
+                <<  "; LARHEC="         <<m_caloDDM->element_end(CaloCell_ID::LARHEC)-m_caloDDM->element_begin(CaloCell_ID::LARHEC)
+                <<  "; LARFCAL="        <<m_caloDDM->element_end(CaloCell_ID::LARFCAL)-m_caloDDM->element_begin(CaloCell_ID::LARFCAL) );
 
 /*
   int nokfcal=0;
@@ -262,7 +231,7 @@ void BasicCellBuilderTool::init_all_maps()
     if(theDDE) {
       ++nokfcal;
       if(fabs(theDDE->eta()+4.95)<0.1) log << MSG::DEBUG <<  "init cell eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling() <<" calo="<<theDDE->getSubCalo()<< endmsg ;
-    }  
+    }
   }
   log << MSG::INFO <<  "Loop only fcal finished nok="<<nokfcal << endmsg ;
 */
@@ -287,21 +256,21 @@ void BasicCellBuilderTool::init_all_maps()
   for(int side=0;side<=1;++side) for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample) {
     m_min_eta_sample[side][sample]=+1000;
     m_max_eta_sample[side][sample]=-1000;
-  }  
+  }
 
 
   for(CaloDetDescrManager::calo_element_const_iterator calo_iter=m_caloDDM->element_begin();calo_iter<m_caloDDM->element_end();++calo_iter) {
     const CaloDetDescrElement* theDDE=*calo_iter;
     if(theDDE) {
       ++nok;
-/*
-      CaloCell_ID::SUBCALO calo=theDDE->getSubCalo();
-      if( calo==CaloCell_ID::LARFCAL ) {
+      /*
+        CaloCell_ID::SUBCALO calo=theDDE->getSubCalo();
+        if( calo==CaloCell_ID::LARFCAL ) {
         log << MSG::DEBUG <<  "init cell eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling() <<" calo="<<theDDE->getSubCalo();
         log<<" deta="<<theDDE->deta()<<" dphi="<<theDDE->dphi()<<" dr="<<theDDE->dr()<<" vol="<<theDDE->volume() ;
         log<<" dx="<<theDDE->dx()<<" dy="<<theDDE->dy()<<" dz="<<theDDE->dz()<< endmsg ;
-      }  
-*/      
+      }
+*/
       CaloCell_ID::SUBCALO calo=theDDE->getSubCalo();
       CaloCell_ID_FCS::CaloSample sample=(CaloCell_ID_FCS::CaloSample)theDDE->getSampling();
 
@@ -316,7 +285,7 @@ void BasicCellBuilderTool::init_all_maps()
       double max_eta=theDDE->eta()+theDDE->deta()/2;
       if(min_eta<m_min_eta_sample[side][sample]) m_min_eta_sample[side][sample]=min_eta;
       if(max_eta>m_max_eta_sample[side][sample]) m_max_eta_sample[side][sample]=max_eta;
-      
+
       if(rz_map_eta[side][sample].find(eta_raw)==rz_map_eta[side][sample].end()) {
         rz_map_eta [side][sample][eta_raw]=0;
         rz_map_rmid[side][sample][eta_raw]=0;
@@ -331,7 +300,7 @@ void BasicCellBuilderTool::init_all_maps()
       rz_map_rent[side][sample][eta_raw]+=theDDE->r()-theDDE->dr();
       rz_map_zent[side][sample][eta_raw]+=theDDE->z()-theDDE->dz()*sign_side;
       rz_map_n   [side][sample][eta_raw]++;
-      
+
       if(do_celllist_map) {
         int cl_neta=m_celllist_maps[sample].leta()-1;
         int cl_nphi=m_celllist_maps[sample].lphi()-1;
@@ -352,13 +321,13 @@ void BasicCellBuilderTool::init_all_maps()
           for(int s_iphi=iphi1;s_iphi<=iphi2;++s_iphi) {
             int iphi=s_iphi;
             if(iphi<0)           iphi+=m_celllist_maps[sample].nphi();
-            if((unsigned int)iphi>=m_celllist_maps[sample].nphi()) iphi-=m_celllist_maps[sample].nphi(); 
+            if((unsigned int)iphi>=m_celllist_maps[sample].nphi()) iphi-=m_celllist_maps[sample].nphi();
 
             m_celllist_maps[sample].vec(ieta,iphi).push_back( cellinfo( theDDE,1),2);
           }
-        }    
+        }
 
-      }  
+      }
 
       if(theDDE->volume()>0) {
         ++nvolOK;
@@ -371,13 +340,13 @@ void BasicCellBuilderTool::init_all_maps()
         if(sample==CaloCell_ID_FCS::TileGap3) continue;
 
         ++naccept;
-        
+
         if(doem_celllist_map && calo==CaloCell_ID::LAREM) {
           double ceta_min=theDDE->eta()-m_em_celllist_map.deta()*emcl_neta;
           double ceta_max=theDDE->eta()+m_em_celllist_map.deta()*emcl_neta;
           double cphi_min=theDDE->phi()-m_em_celllist_map.dphi()*emcl_nphi;
           double cphi_max=theDDE->phi()+m_em_celllist_map.dphi()*emcl_nphi;
-          
+
           int iphi1=m_em_celllist_map.phi_to_index_cont(cphi_min);
           int iphi2=m_em_celllist_map.phi_to_index_cont(cphi_max);
           int ieta1=m_em_celllist_map.eta_to_index(ceta_min);
@@ -390,28 +359,28 @@ void BasicCellBuilderTool::init_all_maps()
             for(int s_iphi=iphi1;s_iphi<=iphi2;++s_iphi) {
               int iphi=s_iphi;
               if(iphi<0)           iphi+=m_em_celllist_map.nphi();
-              if((unsigned int)iphi>=m_em_celllist_map.nphi()) iphi-=m_em_celllist_map.nphi(); 
+              if((unsigned int)iphi>=m_em_celllist_map.nphi()) iphi-=m_em_celllist_map.nphi();
 
               m_em_celllist_map.vec(ieta,iphi).push_back( cellinfo( theDDE,1),2);
             }
-          }    
-          
-        }  
+          }
+
+        }
 
         curmap=0;
         curmap2=0;
         if(calo==CaloCell_ID::LAREM)   {
           curmap=&m_em_map;
           if(fabs(theDDE->eta())<2.9 && m_em_fine_map.neta()>0) curmap2=&m_em_fine_map;
-/*          
+/*
           if(log.level()<=MSG::DEBUG) {
             if(theDDE->phi()>0.0 && theDDE->phi()<0.1 && theDDE->eta()>0) {
               log<<"init cell eta="<<theDDE->eta()<<" phi="<<theDDE->phi()<<" r="<<theDDE->r()<<" z="<<theDDE->z()<<" sample="<<theDDE->getSampling() <<" calo="<<theDDE->getSubCalo();
               log<<endmsg;
             }
-          }  
-*/          
-        }  
+          }
+*/
+        }
         if(sample==CaloCell_ID_FCS::FCAL0) curmap=&m_em_map;
 
         if(calo==CaloCell_ID::LARHEC)  curmap=&m_had_map;
@@ -425,36 +394,36 @@ void BasicCellBuilderTool::init_all_maps()
           if(sample!=CaloCell_ID_FCS::EMB1 && sample!=CaloCell_ID_FCS::EME1) init_cell(*curmap,theDDE);
         }
       } else {
-//        log << MSG::WARNING <<  "volume=0 cell eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling() <<" calo="<<theDDE->getSubCalo()<< endmsg ;
+          //        log << MSG::WARNING <<  "volume=0 cell eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling() <<" calo="<<theDDE->getSubCalo()<< endmsg ;
       }
     } else {
-//      log << MSG::ERROR <<  "empty caloDDM element"<< endmsg ;
-    }  
+      //      log << MSG::ERROR <<  "empty caloDDM element"<< endmsg ;
+    }
   }
   for(int side=0;side<=1;++side) for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample) {
-    if(rz_map_n[side][sample].size()>0) {
-      for(FSmap< double , int    >::iterator iter=rz_map_n[side][sample].begin();iter!=rz_map_n[side][sample].end();++iter) {
-        double eta_raw=iter->first;
-        if(iter->second<1) {
-          ATH_MSG_WARNING("rz-map for side="<<side<<" sample="<<sample<<" eta_raw="<<eta_raw<<" : #cells="<<iter->second<<" !!!");
-        } else {
-          double eta =rz_map_eta[side][sample][eta_raw]/iter->second;
-          double rmid=rz_map_rmid[side][sample][eta_raw]/iter->second;
-          double zmid=rz_map_zmid[side][sample][eta_raw]/iter->second;
-          double rent=rz_map_rent[side][sample][eta_raw]/iter->second;
-          double zent=rz_map_zent[side][sample][eta_raw]/iter->second;
-          
-          m_rmid_map[side][sample][eta]=rmid;
-          m_zmid_map[side][sample][eta]=zmid;
-          m_rent_map[side][sample][eta]=rent;
-          m_zent_map[side][sample][eta]=zent;
+      if(rz_map_n[side][sample].size()>0) {
+        for(FSmap< double , int    >::iterator iter=rz_map_n[side][sample].begin();iter!=rz_map_n[side][sample].end();++iter) {
+          double eta_raw=iter->first;
+          if(iter->second<1) {
+            ATH_MSG_WARNING("rz-map for side="<<side<<" sample="<<sample<<" eta_raw="<<eta_raw<<" : #cells="<<iter->second<<" !!!");
+          } else {
+            double eta =rz_map_eta[side][sample][eta_raw]/iter->second;
+            double rmid=rz_map_rmid[side][sample][eta_raw]/iter->second;
+            double zmid=rz_map_zmid[side][sample][eta_raw]/iter->second;
+            double rent=rz_map_rent[side][sample][eta_raw]/iter->second;
+            double zent=rz_map_zent[side][sample][eta_raw]/iter->second;
+
+            m_rmid_map[side][sample][eta]=rmid;
+            m_zmid_map[side][sample][eta]=zmid;
+            m_rent_map[side][sample][eta]=rent;
+            m_zent_map[side][sample][eta]=zent;
+          }
         }
+        ATH_MSG_DEBUG("rz-map for side="<<side<<" sample="<<sample<<" #etas="<<m_rmid_map[side][sample].size());
+      } else {
+        ATH_MSG_WARNING("rz-map for side="<<side<<" sample="<<sample<<" is empty!!!");
       }
-      ATH_MSG_DEBUG("rz-map for side="<<side<<" sample="<<sample<<" #etas="<<m_rmid_map[side][sample].size());
-    } else {
-      ATH_MSG_WARNING("rz-map for side="<<side<<" sample="<<sample<<" is empty!!!");
     }
-  }
 
   ATH_MSG_INFO("Building all maps finished : n(total)="<<nok<< " n(volume>0)="<<nvolOK<<" n(used)="<<naccept);
 }
@@ -476,8 +445,8 @@ void BasicCellBuilderTool::init_volume(cellinfo_map& map)
         for(unsigned int k=0;k<map.vec(i,j).size();++k) {
           map.vec(i,j)[k].second/=vol;
         }
-      }  
-    }   
+      }
+    }
   }
   ATH_MSG_DEBUG("Normalizing volumes finished");
 }
@@ -485,7 +454,7 @@ void BasicCellBuilderTool::init_volume(cellinfo_map& map)
 
 void BasicCellBuilderTool::init_cell(cellinfo_map& map,const CaloDetDescrElement* theDDE)
 {
-//  log << MSG::VERBOSE <<  "init cell "<<map.name()<<" eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling() << endmsg ;
+  //  log << MSG::VERBOSE <<  "init cell "<<map.name()<<" eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling() << endmsg ;
 
   double c_phi_min_org=theDDE->phi()-theDDE->dphi()/2;
   double c_phi_max_org=theDDE->phi()+theDDE->dphi()/2;
@@ -503,24 +472,24 @@ void BasicCellBuilderTool::init_cell(cellinfo_map& map,const CaloDetDescrElement
       double eta=pcorner[i].eta();
       if(theDDE->phi()>+2 && phi<-2) phi+=2*M_PI;
       if(theDDE->phi()<-2 && phi>+2) phi-=2*M_PI;
-      
+
       if(phi<c_phi_min_org) c_phi_min_org=phi;
       if(phi>c_phi_max_org) c_phi_max_org=phi;
       if(eta<c_eta_min) c_eta_min=eta;
       if(eta>c_eta_max) c_eta_max=eta;
-  
+
 //      log << MSG::DEBUG<<"corner "<<i<<" eta="<<eta<<" phi="<<phi;
 //      log<<" ndeta="<<c_eta_max-c_eta_min<<" ndphi="<<c_phi_max_org-c_phi_min_org<< endmsg ;
     }
-/*    
+/*
     if( (fabs(c_eta_max)>4.9 || fabs(c_eta_min)>4.9) && fabs(theDDE->phi())<0.5 ) log<<MSG::DEBUG;
      else log << MSG::VERBOSE;
     log<<  "init FCAL cell "<<map.name()<<" eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling() <<" calo="<<theDDE->getSubCalo();
     log<<" deta="<<theDDE->deta()<<" dphi="<<theDDE->dphi()<<" dr="<<theDDE->dr()<<" vol="<<theDDE->volume() ;
     log<<" dx="<<theDDE->dx()<<" dy="<<theDDE->dy()<<" dz="<<theDDE->dz();
     log<<" ndeta="<<c_eta_max-c_eta_min<<" ndphi="<<c_phi_max_org-c_phi_min_org<< endmsg ;
-*/    
-  }  
+*/
+  }
 
 
 
@@ -528,81 +497,81 @@ void BasicCellBuilderTool::init_cell(cellinfo_map& map,const CaloDetDescrElement
   int layernr=0;
 
   switch ( calosample ) {
-// Cell in ECal
-    case CaloCell_ID_FCS::PreSamplerB:
-    case CaloCell_ID_FCS::PreSamplerE:
-      layernr=0;
-      break;
-    case CaloCell_ID_FCS::EMB1:
-    case CaloCell_ID_FCS::EME1:
-      layernr=1;
-      break;
-    case CaloCell_ID_FCS::EMB2:
-    case CaloCell_ID_FCS::EME2:
-      layernr=2;
-      break;
-    case CaloCell_ID_FCS::EMB3:
-    case CaloCell_ID_FCS::EME3:
-      layernr=3;
-      break;
-// Cell in HCal
-    case CaloCell_ID_FCS::TileBar0:
-    case CaloCell_ID_FCS::TileExt0:
-    case CaloCell_ID_FCS::TileGap1:
-    case CaloCell_ID_FCS::HEC0:
-      layernr=0;
-      break;
-    case CaloCell_ID_FCS::TileBar1:
-    case CaloCell_ID_FCS::TileExt1:
-    case CaloCell_ID_FCS::TileGap2:
-    case CaloCell_ID_FCS::HEC1:
-      layernr=1;
-      break;
-    case CaloCell_ID_FCS::TileBar2:
-    case CaloCell_ID_FCS::TileExt2:
-    case CaloCell_ID_FCS::TileGap3:
-    case CaloCell_ID_FCS::HEC2:
-      layernr=2;
-      break;
-    case CaloCell_ID_FCS::HEC3:
-      layernr=3;
-      break;
-// Cell in FCal
-    case CaloCell_ID_FCS::FCAL0:
-      layernr=0;
-      break;
-    case CaloCell_ID_FCS::FCAL1:
-      layernr=1;
-      break;
-    case CaloCell_ID_FCS::FCAL2:
-      layernr=2;
-      break;
-    default :
-      ATH_MSG_ERROR(" unknown CELL type " << calosample);
-      break;
+    // Cell in ECal
+  case CaloCell_ID_FCS::PreSamplerB:
+  case CaloCell_ID_FCS::PreSamplerE:
+    layernr=0;
+    break;
+  case CaloCell_ID_FCS::EMB1:
+  case CaloCell_ID_FCS::EME1:
+    layernr=1;
+    break;
+  case CaloCell_ID_FCS::EMB2:
+  case CaloCell_ID_FCS::EME2:
+    layernr=2;
+    break;
+  case CaloCell_ID_FCS::EMB3:
+  case CaloCell_ID_FCS::EME3:
+    layernr=3;
+    break;
+    // Cell in HCal
+  case CaloCell_ID_FCS::TileBar0:
+  case CaloCell_ID_FCS::TileExt0:
+  case CaloCell_ID_FCS::TileGap1:
+  case CaloCell_ID_FCS::HEC0:
+    layernr=0;
+    break;
+  case CaloCell_ID_FCS::TileBar1:
+  case CaloCell_ID_FCS::TileExt1:
+  case CaloCell_ID_FCS::TileGap2:
+  case CaloCell_ID_FCS::HEC1:
+    layernr=1;
+    break;
+  case CaloCell_ID_FCS::TileBar2:
+  case CaloCell_ID_FCS::TileExt2:
+  case CaloCell_ID_FCS::TileGap3:
+  case CaloCell_ID_FCS::HEC2:
+    layernr=2;
+    break;
+  case CaloCell_ID_FCS::HEC3:
+    layernr=3;
+    break;
+    // Cell in FCal
+  case CaloCell_ID_FCS::FCAL0:
+    layernr=0;
+    break;
+  case CaloCell_ID_FCS::FCAL1:
+    layernr=1;
+    break;
+  case CaloCell_ID_FCS::FCAL2:
+    layernr=2;
+    break;
+  default :
+    ATH_MSG_ERROR(" unknown CELL type " << calosample);
+    break;
   }
 
   int iphi1=map.phi_to_index_cont(c_phi_min_org);
   int iphi2=map.phi_to_index_cont(c_phi_max_org);
   int ieta1=map.eta_to_index(c_eta_min);
   int ieta2=map.eta_to_index(c_eta_max);
-  
+
   double eta_min;
   double eta_max;
   double phi_min;
   double phi_max;
-  
+
   for(int ieta=ieta1;ieta<=ieta2;++ieta) {
     if(ieta<0)          continue;
     if((unsigned int)ieta>=map.neta()) continue;
     map.eta_range(ieta,eta_min,eta_max);
-    
+
     for(int s_iphi=iphi1;s_iphi<=iphi2;++s_iphi) {
       int iphi=s_iphi;
       if(iphi<0)           iphi+=map.nphi();
-      if((unsigned int)iphi>=map.nphi()) iphi-=map.nphi(); 
+      if((unsigned int)iphi>=map.nphi()) iphi-=map.nphi();
       map.phi_range(iphi,phi_min,phi_max);
-      
+
       double phi_0=0.5*(phi_min+phi_max);
       double phi_add=0;
       if(phi_0<-2) phi_add=-2*M_PI; // project all phi's to phi<0 if inputcell phi<-2
@@ -620,13 +589,13 @@ void BasicCellBuilderTool::init_cell(cellinfo_map& map,const CaloDetDescrElement
         c_phi_max+=phi_add;
       }
 
-//      log << MSG::VERBOSE << "eta_min=" <<eta_min<<" eta_max=" <<eta_max<<" c_eta_min=" <<c_eta_min<<" c_eta_max=" <<c_eta_max<<std::endl;
-//      log << MSG::VERBOSE << "phi_min=" <<phi_min<<" phi_max=" <<phi_max<<" c_phi_min=" <<c_phi_min<<" c_phi_max=" <<c_phi_max<< endmsg;
+      //      log << MSG::VERBOSE << "eta_min=" <<eta_min<<" eta_max=" <<eta_max<<" c_eta_min=" <<c_eta_min<<" c_eta_max=" <<c_eta_max<<std::endl;
+      //      log << MSG::VERBOSE << "phi_min=" <<phi_min<<" phi_max=" <<phi_max<<" c_phi_min=" <<c_phi_min<<" c_phi_max=" <<c_phi_max<< endmsg;
 
       // First test if cell is completely in volume, most likely after cellsInZone
       if(eta_min<=c_eta_min && eta_max>=c_eta_max && phi_min<=c_phi_min && phi_max>=c_phi_max) {
         map.vec(ieta,iphi).push_back( cellinfo( theDDE,(float)theDDE->volume() ),layernr );
-//        log << MSG::VERBOSE << " -> cell eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling()<<" overlap="<<1<<std::endl;
+        //        log << MSG::VERBOSE << " -> cell eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling()<<" overlap="<<1<<std::endl;
         continue;
       }
 
@@ -672,8 +641,8 @@ void BasicCellBuilderTool::init_cell(cellinfo_map& map,const CaloDetDescrElement
 
       if(overlap_eta>1 || overlap_phi>1) {
         ATH_MSG_WARNING("strange overlap eta="<<overlap_eta<<" overlap_phi="<<overlap_phi<<" boundary eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()
-                      <<" ; eta_min=" <<eta_min<<" eta_max=" <<eta_max<<" c_eta_min=" <<c_eta_min<<" c_eta_max=" <<c_eta_max
-                      <<" ; phi_min=" <<phi_min<<" phi_max=" <<phi_max<<" c_phi_min=" <<c_phi_min<<" c_phi_max=" <<c_phi_max );
+                        <<" ; eta_min=" <<eta_min<<" eta_max=" <<eta_max<<" c_eta_min=" <<c_eta_min<<" c_eta_max=" <<c_eta_max
+                        <<" ; phi_min=" <<phi_min<<" phi_max=" <<phi_max<<" c_phi_min=" <<c_phi_min<<" c_phi_max=" <<c_phi_max );
       }
 
       float overlap=overlap_eta*overlap_phi;
@@ -682,14 +651,14 @@ void BasicCellBuilderTool::init_cell(cellinfo_map& map,const CaloDetDescrElement
 
       if(overlapvol>0) {
         map.vec(ieta,iphi).push_back( cellinfo(theDDE,overlapvol),layernr );
-//        log << MSG::VERBOSE << " -> cell eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling()<<" overlap="<<overlap<<endmsg;
+        //        log << MSG::VERBOSE << " -> cell eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling()<<" overlap="<<overlap<<endmsg;
         continue;
-      }  
+      }
 
     }
   }
 
-//  log << MSG::VERBOSE <<  "init cell finished" <<std::endl<< endmsg ;
+  //  log << MSG::VERBOSE <<  "init cell finished" <<std::endl<< endmsg ;
 }
 
 
@@ -706,13 +675,13 @@ void BasicCellBuilderTool::findCells(cellinfo_vec & cell_vec, double eta_min, do
   std::vector<double> vol_list;
   std::vector<bool> emhadflag_list;
   double vol=0;
-  
+
   // Now do some tricks to calculate geometric overlaps, map phi in continues range
   double phi_0=0.5*(phi_min+phi_max);
   double phi_add=0;
   if(phi_0<-2) phi_add=-2*M_PI; // project all phi's to phi<0 if inputcell phi<-2
   if(phi_0>+2) phi_add=+2*M_PI; // project all phi's to phi>0 if inputcell phi>+2
-  
+
   std::vector<CaloCell_ID::SUBCALO> subcalos;
   if(layer==0) {
     subcalos.push_back(CaloCell_ID::LAREM);
@@ -726,7 +695,7 @@ void BasicCellBuilderTool::findCells(cellinfo_vec & cell_vec, double eta_min, do
     subcalos.push_back(CaloCell_ID::LARHEC);
     subcalos.push_back(CaloCell_ID::LARFCAL);
   }
-  
+
   const CaloDetDescrElement* theDDE;
 
   for(unsigned int sc=0;sc<subcalos.size();++sc) {
@@ -734,7 +703,7 @@ void BasicCellBuilderTool::findCells(cellinfo_vec & cell_vec, double eta_min, do
     ATH_MSG_VERBOSE("sc="<<sc<<" : idhash_list.size()=" <<idhash_list.size());
     caloDDE_list.reserve(caloDDE_list.size()+idhash_list.size());
     vol_list.reserve(vol_list.size()+idhash_list.size());
-  
+
     double c_phi_min;
     double c_phi_max;
     double c_eta_min;
@@ -745,125 +714,124 @@ void BasicCellBuilderTool::findCells(cellinfo_vec & cell_vec, double eta_min, do
       theDDE=m_caloDDM->get_element(*it_idhash);
       if(theDDE) if(theDDE->volume()>0) {
 
-        //dont' fill PreSampler and TileGap
-        CaloCell_ID_FCS::CaloSample sample=(CaloCell_ID_FCS::CaloSample)theDDE->getSampling();
-        CaloCell_ID::SUBCALO calo=theDDE->getSubCalo();
+          //dont' fill PreSampler and TileGap
+          CaloCell_ID_FCS::CaloSample sample=(CaloCell_ID_FCS::CaloSample)theDDE->getSampling();
+          CaloCell_ID::SUBCALO calo=theDDE->getSubCalo();
 
-        if(sample==CaloCell_ID_FCS::PreSamplerB) continue;
-        if(sample==CaloCell_ID_FCS::PreSamplerE) continue;
-        if(sample==CaloCell_ID_FCS::TileGap1) continue;
-        if(sample==CaloCell_ID_FCS::TileGap2) continue;
-        if(sample==CaloCell_ID_FCS::TileGap3) continue;
+          if(sample==CaloCell_ID_FCS::PreSamplerB) continue;
+          if(sample==CaloCell_ID_FCS::PreSamplerE) continue;
+          if(sample==CaloCell_ID_FCS::TileGap1) continue;
+          if(sample==CaloCell_ID_FCS::TileGap2) continue;
+          if(sample==CaloCell_ID_FCS::TileGap3) continue;
 
-        if(layer==0) {
-          if(! (sample==CaloCell_ID_FCS::EMB1 || sample==CaloCell_ID_FCS::EME1)) continue;
-        }
-        if(layer==1) {
-          if(sample==CaloCell_ID_FCS::EMB1) continue;
-          if(sample==CaloCell_ID_FCS::EME1) continue;
-          if(! (calo==CaloCell_ID::LAREM || sample==CaloCell_ID_FCS::FCAL0)) continue;
-        }
-        if(layer==3) {
-          if(! (calo==CaloCell_ID::LARHEC || calo==CaloCell_ID::TILE || sample==CaloCell_ID_FCS::FCAL1 || sample==CaloCell_ID_FCS::FCAL2)) continue;
-        }
+          if(layer==0) {
+            if(! (sample==CaloCell_ID_FCS::EMB1 || sample==CaloCell_ID_FCS::EME1)) continue;
+          }
+          if(layer==1) {
+            if(sample==CaloCell_ID_FCS::EMB1) continue;
+            if(sample==CaloCell_ID_FCS::EME1) continue;
+            if(! (calo==CaloCell_ID::LAREM || sample==CaloCell_ID_FCS::FCAL0)) continue;
+          }
+          if(layer==3) {
+            if(! (calo==CaloCell_ID::LARHEC || calo==CaloCell_ID::TILE || sample==CaloCell_ID_FCS::FCAL1 || sample==CaloCell_ID_FCS::FCAL2)) continue;
+          }
 
-        //get cell boundaries
-        c_phi_min=theDDE->phi()-theDDE->dphi()/2;
-        c_phi_max=theDDE->phi()+theDDE->dphi()/2;
-        c_eta_min=theDDE->eta()-theDDE->deta()/2;
-        c_eta_max=theDDE->eta()+theDDE->deta()/2;
-
-        // map phi in continues range
-        if(c_phi_min>2 && phi_0<-2) {
-          c_phi_min+=phi_add;
-          c_phi_max+=phi_add;
-        } else if(c_phi_max<-2 && phi_0>+2) {
-          c_phi_min+=phi_add;
-          c_phi_max+=phi_add;
-        }
+          //get cell boundaries
+          c_phi_min=theDDE->phi()-theDDE->dphi()/2;
+          c_phi_max=theDDE->phi()+theDDE->dphi()/2;
+          c_eta_min=theDDE->eta()-theDDE->deta()/2;
+          c_eta_max=theDDE->eta()+theDDE->deta()/2;
+
+          // map phi in continues range
+          if(c_phi_min>2 && phi_0<-2) {
+            c_phi_min+=phi_add;
+            c_phi_max+=phi_add;
+          } else if(c_phi_max<-2 && phi_0>+2) {
+            c_phi_min+=phi_add;
+            c_phi_max+=phi_add;
+          }
 
-  //      log << MSG::DEBUG << "fill cell boundary eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling()<<std::endl;
-  //      log << MSG::DEBUG << "eta_min=" <<eta_min<<" eta_max=" <<eta_max<<" c_eta_min=" <<c_eta_min<<" c_eta_max=" <<c_eta_max<<std::endl;
-  //      log << MSG::DEBUG << "phi_min=" <<phi_min<<" phi_max=" <<phi_max<<" c_phi_min=" <<c_phi_min<<" c_phi_max=" <<c_phi_max<< endmsg;
+          //      log << MSG::DEBUG << "fill cell boundary eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling()<<std::endl;
+          //      log << MSG::DEBUG << "eta_min=" <<eta_min<<" eta_max=" <<eta_max<<" c_eta_min=" <<c_eta_min<<" c_eta_max=" <<c_eta_max<<std::endl;
+          //      log << MSG::DEBUG << "phi_min=" <<phi_min<<" phi_max=" <<phi_max<<" c_phi_min=" <<c_phi_min<<" c_phi_max=" <<c_phi_max<< endmsg;
 
-        // First test if cell is completely in volume, most likely after cellsInZone
-        if(eta_min<=c_eta_min && eta_max>=c_eta_max && phi_min<=c_phi_min && phi_max>=c_phi_max) {
-          caloDDE_list.push_back(theDDE);
-          vol_list.push_back(theDDE->volume());
-          vol+=theDDE->volume();
-          continue;
-        }
+          // First test if cell is completely in volume, most likely after cellsInZone
+          if(eta_min<=c_eta_min && eta_max>=c_eta_max && phi_min<=c_phi_min && phi_max>=c_phi_max) {
+            caloDDE_list.push_back(theDDE);
+            vol_list.push_back(theDDE->volume());
+            vol+=theDDE->volume();
+            continue;
+          }
 
-        // test for no overlap at all
-        if(c_eta_max<=eta_min) continue;
-        if(c_eta_min>=eta_max) continue;
-        if(c_phi_max<=phi_min) continue;
-        if(c_phi_min>=phi_max) continue;
-
-
-        // there must be some overlap, test independetly for eta and phi
-        double overlap_eta=0;
-        double overlap_phi=0;
-
-        if(eta_min<=c_eta_min && eta_max>=c_eta_max) {
-          // cell completely in eta range
-          overlap_eta=1;
-        } else  if(eta_min>=c_eta_min && eta_max<=c_eta_max) {
-          // eta range completely in cell
-          overlap_eta=(eta_max-eta_min)/(c_eta_max-c_eta_min);
-        } else if(eta_min<=c_eta_min) {
-          overlap_eta=(eta_max-c_eta_min)/(c_eta_max-c_eta_min);
-        } else if(eta_max>=c_eta_max) {
-          overlap_eta=(c_eta_max-eta_min)/(c_eta_max-c_eta_min);
-        } else {
-          ATH_MSG_WARNING("strange cell boundary eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" ; eta_min=" <<eta_min<<" eta_max=" <<eta_max<<" c_eta_min=" <<c_eta_min<<" c_eta_max=" <<c_eta_max);
-        }
+          // test for no overlap at all
+          if(c_eta_max<=eta_min) continue;
+          if(c_eta_min>=eta_max) continue;
+          if(c_phi_max<=phi_min) continue;
+          if(c_phi_min>=phi_max) continue;
+
+
+          // there must be some overlap, test independetly for eta and phi
+          double overlap_eta=0;
+          double overlap_phi=0;
+
+          if(eta_min<=c_eta_min && eta_max>=c_eta_max) {
+            // cell completely in eta range
+            overlap_eta=1;
+          } else  if(eta_min>=c_eta_min && eta_max<=c_eta_max) {
+            // eta range completely in cell
+            overlap_eta=(eta_max-eta_min)/(c_eta_max-c_eta_min);
+          } else if(eta_min<=c_eta_min) {
+            overlap_eta=(eta_max-c_eta_min)/(c_eta_max-c_eta_min);
+          } else if(eta_max>=c_eta_max) {
+            overlap_eta=(c_eta_max-eta_min)/(c_eta_max-c_eta_min);
+          } else {
+            ATH_MSG_WARNING("strange cell boundary eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" ; eta_min=" <<eta_min<<" eta_max=" <<eta_max<<" c_eta_min=" <<c_eta_min<<" c_eta_max=" <<c_eta_max);
+          }
 
 
-        if(phi_min<=c_phi_min && phi_max>=c_phi_max) {
-          // cell completely in eta range
-          overlap_phi=1;
-        } else  if(phi_min>=c_phi_min && phi_max<=c_phi_max) {
-          // eta range completely in cell
-          overlap_phi=(phi_max-phi_min)/(c_phi_max-c_phi_min);
-        } else if(phi_min<=c_phi_min) {
-          overlap_phi=(phi_max-c_phi_min)/(c_phi_max-c_phi_min);
-        } else if(phi_max>=c_phi_max) {
-          overlap_phi=(c_phi_max-phi_min)/(c_phi_max-c_phi_min);
-        } else {
-          ATH_MSG_WARNING("strange cell boundary eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" ; phi_min=" <<phi_min<<" phi_max=" <<phi_max<<" c_phi_min=" <<c_phi_min<<" c_phi_max=" <<c_phi_max);
-        }
+          if(phi_min<=c_phi_min && phi_max>=c_phi_max) {
+            // cell completely in eta range
+            overlap_phi=1;
+          } else  if(phi_min>=c_phi_min && phi_max<=c_phi_max) {
+            // eta range completely in cell
+            overlap_phi=(phi_max-phi_min)/(c_phi_max-c_phi_min);
+          } else if(phi_min<=c_phi_min) {
+            overlap_phi=(phi_max-c_phi_min)/(c_phi_max-c_phi_min);
+          } else if(phi_max>=c_phi_max) {
+            overlap_phi=(c_phi_max-phi_min)/(c_phi_max-c_phi_min);
+          } else {
+            ATH_MSG_WARNING("strange cell boundary eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" ; phi_min=" <<phi_min<<" phi_max=" <<phi_max<<" c_phi_min=" <<c_phi_min<<" c_phi_max=" <<c_phi_max);
+          }
 
-        if(overlap_eta>1 || overlap_phi>1) {
-          ATH_MSG_WARNING("strange overlap eta="<<overlap_eta<<" overlap_phi="<<overlap_phi<<" boundary eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()
-                        <<" ; eta_min=" <<eta_min<<" eta_max=" <<eta_max<<" c_eta_min=" <<c_eta_min<<" c_eta_max=" <<c_eta_max
-                        <<" ; phi_min=" <<phi_min<<" phi_max=" <<phi_max<<" c_phi_min=" <<c_phi_min<<" c_phi_max=" <<c_phi_max );
-        }
+          if(overlap_eta>1 || overlap_phi>1) {
+            ATH_MSG_WARNING("strange overlap eta="<<overlap_eta<<" overlap_phi="<<overlap_phi<<" boundary eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()
+                            <<" ; eta_min=" <<eta_min<<" eta_max=" <<eta_max<<" c_eta_min=" <<c_eta_min<<" c_eta_max=" <<c_eta_max
+                            <<" ; phi_min=" <<phi_min<<" phi_max=" <<phi_max<<" c_phi_min=" <<c_phi_min<<" c_phi_max=" <<c_phi_max );
+          }
 
-        double overlap=overlap_eta*overlap_phi;
-        if(overlap<0.02) continue;
-        double overlapvol=overlap*theDDE->volume();
+          double overlap=overlap_eta*overlap_phi;
+          if(overlap<0.02) continue;
+          double overlapvol=overlap*theDDE->volume();
 
-        if(overlapvol>0) {
-          caloDDE_list.push_back(theDDE);
-          vol_list.push_back(overlapvol);
-          vol+=overlapvol;
-          continue;
-        }  
+          if(overlapvol>0) {
+            caloDDE_list.push_back(theDDE);
+            vol_list.push_back(overlapvol);
+            vol+=overlapvol;
+            continue;
+          }
 
 
-      }
+        }
     }
   }
   ATH_MSG_VERBOSE("caloDDE_list.size()=" <<caloDDE_list.size() << " ; vol_list.size()=" <<vol_list.size() );
-  
 
-//  log << MSG::DEBUG << "REGION : eta_min=" <<eta_min<<" eta_max=" << " phi_min=" <<phi_min<<" phi_max=" <<phi_max<< endmsg;
+  //  log << MSG::DEBUG << "REGION : eta_min=" <<eta_min<<" eta_max=" << " phi_min=" <<phi_min<<" phi_max=" <<phi_max<< endmsg;
   for(unsigned int i=0;i<caloDDE_list.size();++i) {
     theDDE=caloDDE_list[i];
     ATH_MSG_VERBOSE( i <<" : cell eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" sample="<<theDDE->getSampling()<<" deta="<<theDDE->deta()<<" dphi="<<theDDE->dphi()<<" overlap="<<vol_list[i]/theDDE->volume() );
   }
-  
+
   double test=0;
   for(unsigned int i=0;i<caloDDE_list.size();++i) {
     test+=vol_list[i];
@@ -873,7 +841,7 @@ void BasicCellBuilderTool::findCells(cellinfo_vec & cell_vec, double eta_min, do
 
   if(vol!=test) {
     ATH_MSG_WARNING("Volumne sum not correct : vol=" <<vol<<" test="<<test);
-  } else {  
+  } else {
     ATH_MSG_VERBOSE("Volume sum vol=" <<vol);
   }
 }
@@ -893,13 +861,13 @@ StatusCode BasicCellBuilderTool::process(CaloCellContainer * theCellContainer)
 {
   ATH_MSG_INFO("Executing start size=" <<theCellContainer->size());
   ++m_nEvent;
-  
-//  addCell0101(theCellContainer,48,10,300000,m_em_map);
-//  addCell0101(theCellContainer,52,10,100000,m_em_map);
-//  addCell0101(theCellContainer,52,20,300000,m_had_map);
 
-//  addCell0101(theCellContainer,54,30,300000,m_em_map);
-//  addCell0101(theCellContainer,54,30,300000,m_had_map);
+  //  addCell0101(theCellContainer,48,10,300000,m_em_map);
+  //  addCell0101(theCellContainer,52,10,100000,m_em_map);
+  //  addCell0101(theCellContainer,52,20,300000,m_had_map);
+
+  //  addCell0101(theCellContainer,54,30,300000,m_em_map);
+  //  addCell0101(theCellContainer,54,30,300000,m_had_map);
 
 
   ATH_MSG_INFO("Executing finished : end size=" <<theCellContainer->size());
@@ -910,10 +878,10 @@ StatusCode BasicCellBuilderTool::process(CaloCellContainer * theCellContainer)
 
 void BasicCellBuilderTool::addCell(CaloCellContainer * theCellContainer, int etabin, int phibin, double energy, cellinfo_map& map )
 {
-//  log << MSG::DEBUG << "theCellContainer->hasTotalSize()="<<theCellContainer->hasTotalSize()<< endmsg;
-//  log << MSG::DEBUG << "theCellContainer->isOrderedAndComplete()="<<theCellContainer->isOrderedAndComplete()<< endmsg;
-//  log << MSG::DEBUG << "theCellContainer->isOrdered()="<<theCellContainer->isOrdered()<< endmsg;
-//  log << MSG::DEBUG << "theCellContainer->hasTotalSize()="<<theCellContainer->hasTotalSize()<< endmsg;
+  //  log << MSG::DEBUG << "theCellContainer->hasTotalSize()="<<theCellContainer->hasTotalSize()<< endmsg;
+  //  log << MSG::DEBUG << "theCellContainer->isOrderedAndComplete()="<<theCellContainer->isOrderedAndComplete()<< endmsg;
+  //  log << MSG::DEBUG << "theCellContainer->isOrdered()="<<theCellContainer->isOrdered()<< endmsg;
+  //  log << MSG::DEBUG << "theCellContainer->hasTotalSize()="<<theCellContainer->hasTotalSize()<< endmsg;
 
   if(etabin<0 || etabin>=(int)map.neta()) {
     ATH_MSG_WARNING("wrong etabin or phibin in BasicCellBuilderTool::addCell etabin="<<etabin<<" phibin="<<phibin<<" neta="<<map.neta()<<" nphi="<<map.nphi());
@@ -927,48 +895,47 @@ void BasicCellBuilderTool::addCell(CaloCellContainer * theCellContainer, int eta
 
   cellinfo_vec::vec::iterator iterbeg(map.vec(etabin,phibin).m_cellinfo_vec.begin());
   cellinfo_vec::vec::iterator iterend(map.vec(etabin,phibin).m_cellinfo_vec.end());
-  
+
   bool new_cell_created=false;
-  
+
   double etest=0;
   int nadd=0;
-  
+
   //double towerphi=map.index_to_phi_center(phibin);
   double towereta=map.index_to_eta_center(etabin);
 
   for(cellinfo_vec::vec::iterator iter=iterbeg;iter<iterend;++iter) {
     const CaloDetDescrElement* theDDE=(iter->first);
-    if (theDDE!=0) 	
-    {
-      CaloCell* theCaloCell;
-
-      // is there a other way to get a non const pointer?
-      theCaloCell=(CaloCell*)(theCellContainer->findCell(theDDE->calo_hash()));
-      if(theCaloCell) {
-        ATH_MSG_VERBOSE("found calo cell : eta=" <<theCaloCell->caloDDE()->eta()<<" phi="<<theCaloCell->caloDDE()->phi()<<" overlap="<<iter->second<<"old e=" <<theCaloCell->energy()<< " ; new e=" <<theCaloCell->energy()+energy*iter->second);
-        theCaloCell->setEnergy(theCaloCell->energy()+energy*iter->second);
-/*
-        if(fabs(towereta-theCaloCell->caloDDE()->eta())>0.1 || fabs(towerphi-theCaloCell->caloDDE()->phi())>0.1) {
-          log<<MSG::WARNING<<"    -> teta="<<towereta<<" tphi="<<towerphi <<" ceta="<<theCaloCell->caloDDE()->eta()<<" cphi="<<theCaloCell->caloDDE()->phi()<<endmsg;
-        }  
-*/
+    if (theDDE!=0)
+      {
+        CaloCell* theCaloCell;
+
+        // is there a other way to get a non const pointer?
+        theCaloCell=(CaloCell*)(theCellContainer->findCell(theDDE->calo_hash()));
+        if(theCaloCell) {
+          ATH_MSG_VERBOSE("found calo cell : eta=" <<theCaloCell->caloDDE()->eta()<<" phi="<<theCaloCell->caloDDE()->phi()<<" overlap="<<iter->second<<"old e=" <<theCaloCell->energy()<< " ; new e=" <<theCaloCell->energy()+energy*iter->second);
+          theCaloCell->setEnergy(theCaloCell->energy()+energy*iter->second);
+          /*
+            if(fabs(towereta-theCaloCell->caloDDE()->eta())>0.1 || fabs(towerphi-theCaloCell->caloDDE()->phi())>0.1) {
+            log<<MSG::WARNING<<"    -> teta="<<towereta<<" tphi="<<towerphi <<" ceta="<<theCaloCell->caloDDE()->eta()<<" cphi="<<theCaloCell->caloDDE()->phi()<<endmsg;
+            }
+          */
+        } else {
+          ATH_MSG_WARNING("det_elm found eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" overlap="<<iter->second<<" hash="<<theDDE->calo_hash()
+                          << " : new   calo cell : e=" <<energy*iter->second);
+          theCaloCell=new CaloCell(theDDE,energy*iter->second,0,1,CaloGain::UNKNOWNGAIN);
+          theCellContainer->push_back(theCaloCell);
+          new_cell_created=true;
+        }
+        etest+=energy*iter->second;
+        ++nadd;
       } else {
-        ATH_MSG_WARNING("det_elm found eta=" <<theDDE->eta()<<" phi="<<theDDE->phi()<<" overlap="<<iter->second<<" hash="<<theDDE->calo_hash()
-                     << " : new   calo cell : e=" <<energy*iter->second);
-        theCaloCell=new CaloCell(theDDE,energy*iter->second,0,1,CaloGain::UNKNOWNGAIN);
-        theCellContainer->push_back(theCaloCell);
-        new_cell_created=true;
-      }
-      etest+=energy*iter->second;
-      ++nadd;
-    } else {
       ATH_MSG_ERROR("no det_elm found etabin=" <<etabin<<" phibin="<<phibin);
     }
-  } 
+  }
   if(fabs(etest-energy)>0.1 && fabs(towereta)<4.9) {
     ATH_MSG_ERROR("energy missmatch "<<map.name()<<" eta="<<map.index_to_eta_center(etabin)<<" phi="<<map.index_to_phi_center(phibin)
-                <<": Ein=" <<energy<<" Eout="<<etest<<" : "<<nadd<<" cells for filling");
+                  <<": Ein=" <<energy<<" Eout="<<etest<<" : "<<nadd<<" cells for filling");
   }
   if(new_cell_created) theCellContainer->initializeLookUpTable();
-}	
-
+}
diff --git a/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx b/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx
index 6ff55f0e760294ec296bcbcb6c53b1210b6377ed..9cb3895595c447b0fe69b3e55271cf3de775c38d 100755
--- a/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx
+++ b/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx
@@ -12,14 +12,14 @@
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/StatusCode.h"
 #include "GaudiKernel/ListItem.h"
-#include "StoreGate/StoreGateSvc.h" 
+#include "StoreGate/StoreGateSvc.h"
 #if FastCaloSim_project_release_v1 == 12
-  #include "PartPropSvc/PartPropSvc.h"
-  #include "CLHEP/HepPDT/ParticleData.hh"
-#else  
-  #include "GaudiKernel/IPartPropSvc.h"
-  #include "HepPDT/ParticleData.hh"
-#endif  
+#include "PartPropSvc/PartPropSvc.h"
+#include "CLHEP/HepPDT/ParticleData.hh"
+#else
+#include "GaudiKernel/IPartPropSvc.h"
+#include "HepPDT/ParticleData.hh"
+#endif
 #include "CLHEP/Random/RandGaussZiggurat.h"
 #include "CLHEP/Random/RandFlat.h"
 #include "HepMC/GenParticle.h"
@@ -92,10 +92,10 @@ typedef std::vector<const HepMC::GenParticle*>  MCparticleCollection ;
 bool FastCaloSimIsGenSimulStable(const HepMC::GenParticle* p) {
   int status=p->status();
   HepMC::GenVertex* vertex = p->end_vertex();
-  // we want to keep primary particle with status==2 but without vertex in HepMC 
+  // we want to keep primary particle with status==2 but without vertex in HepMC
   int vertex_barcode=-999999;
   if (vertex) vertex_barcode=vertex->barcode();
-  
+
   return (
           (status%1000 == 1) ||
           (status%1000 == 2 && status > 1000) ||
@@ -106,40 +106,27 @@ bool FastCaloSimIsGenSimulStable(const HepMC::GenParticle* p) {
 
 
 FastShowerCellBuilderTool::FastShowerCellBuilderTool(const std::string& type, const std::string& name, const IInterface* parent)
-                          :BasicCellBuilderTool(type, name, parent),
-                           m_mcLocation("TruthEvent"),
-                           m_ParticleParametrizationFileName(""),
-                           m_AdditionalParticleParametrizationFileNames(0),
-                           m_DB_folder(0),
-                           m_DB_channel(0),
-                           m_DB_dirname(0),
-                           m_MuonEnergyInCaloContainer("FatrasDepositedMuonEnergyInCalo"),
-                           m_simul_ID_only(true),
-                           m_simul_ID_v14_truth_cuts(false),
-                           m_simul_EM_geant_only(false),
-                           m_simul_heavy_ions(false),
-                           p_coolhistsvc(0),
-                           m_rndmSvc("AtDSFMTGenSvc", name),
-                           m_randomEngine(0),
-                           m_randomEngineName("FastCaloSimRnd"),
-                           m_extrapolator(""),   
-                           m_caloSurfaceHelper(""),
-                           m_sampling_energy_reweighting(CaloCell_ID_FCS::MaxSample,1.0),
-                           m_rndm(0),
-                           m_invisibles(0),
-                           m_is_init_shape_correction(false),
-                           m_caloEntrance(0),
-                           m_caloEntranceName("InDet::Containers::InnerDetector")
-{ 
-  declareInterface<ICaloCellMakerTool>( this );
- 
+  : BasicCellBuilderTool(type, name, parent)
+  , m_AdditionalParticleParametrizationFileNames(0)
+  , m_DB_folder(0)
+  , m_DB_channel(0)
+  , m_DB_dirname(0)
+  , m_coolhistsvc("CoolHistSvc", name)
+  , m_partPropSvc("PartPropSvc", name)
+  , m_rndmSvc("AtDSFMTGenSvc", name)
+  , m_extrapolator("")
+  , m_caloSurfaceHelper("")
+  , m_calo_tb_coord("TBCaloCoordinate")
+  , m_sampling_energy_reweighting(CaloCell_ID_FCS::MaxSample,1.0)
+  , m_invisibles(0)
+{
   const int n_surfacelist=5;
   CaloCell_ID_FCS::CaloSample surfacelist[n_surfacelist]={CaloCell_ID_FCS::PreSamplerB,
                                                           CaloCell_ID_FCS::PreSamplerE,
                                                           CaloCell_ID_FCS::EME1,
                                                           CaloCell_ID_FCS::EME2,
                                                           CaloCell_ID_FCS::FCAL0
-                                                         };
+  };
   m_n_surfacelist=n_surfacelist;
   for(int i=0;i<n_surfacelist;++i) m_surfacelist[i]=surfacelist[i];
   m_rndm=new TRandom3();
@@ -148,12 +135,14 @@ FastShowerCellBuilderTool::FastShowerCellBuilderTool(const std::string& type, co
 
   declareProperty("ParticleParametrizationFileName",m_ParticleParametrizationFileName);
   declareProperty("AdditionalParticleParametrizationFileNames",m_AdditionalParticleParametrizationFileNames);
-  
+
+  declareProperty("CoolHistSvc",                    m_coolhistsvc,          "");
+  declareProperty("PartPropSvc",                    m_partPropSvc,          "");
   declareProperty("RandomService",                  m_rndmSvc,              "Name of the random number service");
   declareProperty("RandomStreamName",               m_randomEngineName,     "Name of the random number stream");
 
   declareProperty("MuonEnergyInCaloContainerName",  m_MuonEnergyInCaloContainer);
-  
+
   declareProperty("DoSimulWithInnerDetectorTruthOnly",m_simul_ID_only);
   declareProperty("DoSimulWithInnerDetectorV14TruthCuts",m_simul_ID_v14_truth_cuts);
   declareProperty("DoSimulWithEMGeantInteractionsOnly",m_simul_EM_geant_only);
@@ -162,13 +151,14 @@ FastShowerCellBuilderTool::FastShowerCellBuilderTool(const std::string& type, co
   declareProperty("Extrapolator",                   m_extrapolator );
   declareProperty("CaloEntrance",                   m_caloEntranceName );
   declareProperty("CaloSurfaceHelper",              m_caloSurfaceHelper );
-  
-  declareProperty("FastShowerInfoContainerKey",     m_FastShowerInfoContainerKey="FastShowerInfoContainer");
-  declareProperty("StoreFastShowerInfo",            m_storeFastShowerInfo=false);
-  
-  declareProperty("DoEnergyInterpolation",          m_jo_interpolate=false); //ATA: make interpolation optional
-  declareProperty("DoNewEnergyEtaSelection",        m_energy_eta_selection=false); //mwerner: make new selction of EnergyParam optional 
-  declareProperty("use_Ekin_for_depositions",       m_use_Ekin_for_depositions=false);//Use the kinetic energy of a particle to as measure of the energie to deposit in the calo
+  declareProperty("CaloCoordinateTool",             m_calo_tb_coord);
+
+  declareProperty("FastShowerInfoContainerKey",     m_FastShowerInfoContainerKey);
+  declareProperty("StoreFastShowerInfo",            m_storeFastShowerInfo);
+
+  declareProperty("DoEnergyInterpolation",          m_jo_interpolate); //ATA: make interpolation optional
+  declareProperty("DoNewEnergyEtaSelection",        m_energy_eta_selection); //mwerner: make new selction of EnergyParam optional
+  declareProperty("use_Ekin_for_depositions",       m_use_Ekin_for_depositions);//Use the kinetic energy of a particle to as measure of the energie to deposit in the calo
 
   //declareProperty("spline_reweight_x",       m_spline_reweight_x);
   //declareProperty("spline_reweight_y",       m_spline_reweight_y);
@@ -177,13 +167,13 @@ FastShowerCellBuilderTool::FastShowerCellBuilderTool(const std::string& type, co
   declareProperty("sampling_energy_reweighting",m_sampling_energy_reweighting);
 
   m_invisibles.push_back(0);
-/*  
-  m_invisibles.push_back(12);
-  m_invisibles.push_back(14);
-  m_invisibles.push_back(16);
-  m_invisibles.push_back(1000022);
-  m_invisibles.push_back(1000039);  
-*/  
+  /*
+    m_invisibles.push_back(12);
+    m_invisibles.push_back(14);
+    m_invisibles.push_back(16);
+    m_invisibles.push_back(1000022);
+    m_invisibles.push_back(1000039);
+  */
 
   declareProperty("Invisibles",m_invisibles);
 
@@ -226,26 +216,26 @@ void FastShowerCellBuilderTool::LoadParametrizationsFromDir(std::string dir)
   TSystemDirectory d(dirname,dirname);
   TList* files=d.GetListOfFiles();
   for(int i=0;i<files->GetSize();++i) if(files->At(i)){
-//    cout<<i<<" : "<<files->At(i)->GetName()<<" = "<<files->At(i)->GetTitle()<<endl;
-    TString name=files->At(i)->GetName();
-    if(name.Index(".root")==kNPOS) continue;
-    name.ReplaceAll(".root","");
-    TFile* infile = TFile::Open(files->At(i)->GetName());
-    if(infile && infile->IsOpen()) {
-      LoadParametrizationsFromFile(*infile);
-      infile->Close();
-      delete infile;
+      //    cout<<i<<" : "<<files->At(i)->GetName()<<" = "<<files->At(i)->GetTitle()<<endl;
+      TString name=files->At(i)->GetName();
+      if(name.Index(".root")==kNPOS) continue;
+      name.ReplaceAll(".root","");
+      TFile* infile = TFile::Open(files->At(i)->GetName());
+      if(infile && infile->IsOpen()) {
+        LoadParametrizationsFromFile(*infile);
+        infile->Close();
+        delete infile;
+      }
     }
-  }
   gSystem->cd(curdir);
 }
 
 
 class shape_count_info {
-  public:
+public:
   int n;
   double min_eta,max_eta;
-  double min_E,max_E;   
+  double min_E,max_E;
 
   shape_count_info():n(0),min_eta(1000),max_eta(-1),min_E(1000000000),max_E(-1) {};
 };
@@ -254,11 +244,11 @@ bool checkParticleEnergyParametrization(ParticleEnergyParametrization* param, TS
 {
   if(!param) {
     return false;
-  }  
+  }
 
   /*
   //The parametrizations for param->DistPara(0) and param->DistPara(>m_Ecal_vs_dist->GetNbinsX()) should never be used
-  //Could be deleted, but to be safe lets not touch them now extensively... 
+  //Could be deleted, but to be safe lets not touch them now extensively...
   ParticleEnergyParametrizationInDistbin* inbin=param->DistPara(0);
   if(inbin) inbin->m_corr.ResizeTo(0,0);
   ParticleEnergyParametrizationInDistbin* inbin=param->DistPara(m_Ecal_vs_dist->GetNbinsX()+1);
@@ -270,27 +260,27 @@ bool checkParticleEnergyParametrization(ParticleEnergyParametrization* param, TS
     if(!inbin) {
       msg+=Form("DistPara(%d) not filled. ",i);
       continue;
-    }  
+    }
     for(int j=-2;j<0;++j) {
       if(isnan(inbin->m_mean(j))) {
         inbin->m_corr.ResizeTo(0,0);
         msg+=Form("mean(%d,%d) is nan, fixed by removing correlation matrix, n=%d elements. ",i,j,inbin->m_corr.GetNoElements());
         break;
-      }  
+      }
       if(isnan(inbin->m_RMS(j))) {
         inbin->m_corr.ResizeTo(0,0);
         msg+=Form("RMS(%d,%d) is nan, fixed by removing correlation matrix, n=%d elements. ",i,j,inbin->m_corr.GetNoElements());
         break;
-      }  
+      }
     }
     for(int j=0;j<CaloCell_ID_FCS::MaxSample;++j) {
       if(inbin->m_ElayerProp[j]) {
         if(isnan(inbin->m_mean(j))) {
           msg+=Form("mean(%d,%d) is nan, not fixable! ",i,j);
           return false;
-        }  
+        }
       }
-    }  
+    }
     for(int j=-2;j<CaloCell_ID_FCS::MaxSample;++j) {
       if(inbin->m_corr.GetNoElements()==0) break;
       for(int k=-2;k<CaloCell_ID_FCS::MaxSample;++k) {
@@ -298,9 +288,9 @@ bool checkParticleEnergyParametrization(ParticleEnergyParametrization* param, TS
           inbin->m_corr.ResizeTo(0,0);
           msg+=Form("corr(%d,%d,%d) is nan, fixed by removing correlation matrix, n=%d elements. ",i,j,k,inbin->m_corr.GetNoElements());
           break;
-        }  
+        }
       }
-    }  
+    }
   }
   return true;
 }
@@ -310,99 +300,90 @@ void FastShowerCellBuilderTool::LoadParametrizationsFromFile(TDirectory& infile,
   TIterator *iter=infile.GetListOfKeys()->MakeIterator();
   if (!iter) return; // This should really not happen
   iter->Reset();
-  
+
   std::map< int,shape_count_info >   n_energy,n_shape;
   while(TKey *key=(TKey*)(iter->Next()))
-  {
-    TClass *cl=gROOT->GetClass(key->GetClassName());
-    if(cl->InheritsFrom(TLateralShapeCorrectionBase::Class()))
-    {
-      TLateralShapeCorrectionBase* obj=(TLateralShapeCorrectionBase*)(key->ReadObj());
-      if(obj) {
-        m_shape_correction.push_back(obj);
-        ATH_MSG_LVL(level," -> Got TLateralShapeCorrectionBase obj "<<obj->GetName()<<":"<<obj->GetTitle()<<"="<<obj->str() );
-      }
-    }
-    if(cl->InheritsFrom(TShape_Result::Class()))
-    {
-      TShape_Result* obj=(TShape_Result*)(key->ReadObj());
-      if(obj) {
-//        cout<<" -> Got obj "<<obj->GetName()<<" : "<<obj->GetTitle()<<endl;
-
-        //ID              Energy             Eta                Dist
-        //std::map< int , std::map< double , std::map< double , std::map< double , TShape_Result* > > > > m_map_ParticleShapeParametrizationMap;
-
-        m_map_ParticleShapeParametrizationMap[obj->id()][obj->calosample()][obj->E()].push_back(obj);
-        ++n_shape[obj->id()].n;
-        n_shape[obj->id()].min_eta=TMath::Min(n_shape[obj->id()].min_eta,obj->eta());
-        n_shape[obj->id()].max_eta=TMath::Max(n_shape[obj->id()].max_eta,obj->eta());
-        n_shape[obj->id()].min_E  =TMath::Min(n_shape[obj->id()].min_E  ,obj->E()  );
-        n_shape[obj->id()].max_E  =TMath::Max(n_shape[obj->id()].max_E  ,obj->E()  );
-      }
-    }
-    if(cl->InheritsFrom(ParticleEnergyParametrization::Class()))
     {
-      ParticleEnergyParametrization* obj=(ParticleEnergyParametrization*)(key->ReadObj());
-      TString msg;
-      if(checkParticleEnergyParametrization(obj,msg)) {
-//        cout<<" -> Got obj "<<obj->GetName()<<" : "<<obj->GetTitle()<<endl;
-        obj->SetNoDirectoryHisto();
-
-        //ID              Energy             Eta
-        //std::map< int , std::map< double , std::map< double , ParticleEnergyParametrization* > > > m_map_ParticleEnergyParametrizationMap;
-
-        m_map_ParticleEnergyParametrizationMap[obj->id()][obj->E()][obj->eta()]=obj;
-        ++n_energy[obj->id()].n;
-        n_energy[obj->id()].min_eta=TMath::Min(n_energy[obj->id()].min_eta,obj->eta());
-        n_energy[obj->id()].max_eta=TMath::Max(n_energy[obj->id()].max_eta,obj->eta());
-        n_energy[obj->id()].min_E  =TMath::Min(n_energy[obj->id()].min_E  ,obj->E()  );
-        n_energy[obj->id()].max_E  =TMath::Max(n_energy[obj->id()].max_E  ,obj->E()  );
-        if(msg!="") {
-          ATH_MSG_WARNING("Could fix some nan in input parametrization "<<obj->GetName()<<" ("<<obj->GetTitle()<<"): "<<msg.Data());
+      TClass *cl=gROOT->GetClass(key->GetClassName());
+      if(cl->InheritsFrom(TLateralShapeCorrectionBase::Class()))
+        {
+          TLateralShapeCorrectionBase* obj=(TLateralShapeCorrectionBase*)(key->ReadObj());
+          if(obj) {
+            m_shape_correction.push_back(obj);
+            ATH_MSG_LVL(level," -> Got TLateralShapeCorrectionBase obj "<<obj->GetName()<<":"<<obj->GetTitle()<<"="<<obj->str() );
+          }
+        }
+      if(cl->InheritsFrom(TShape_Result::Class()))
+        {
+          TShape_Result* obj=(TShape_Result*)(key->ReadObj());
+          if(obj) {
+            //        cout<<" -> Got obj "<<obj->GetName()<<" : "<<obj->GetTitle()<<endl;
+
+            //ID              Energy             Eta                Dist
+            //std::map< int , std::map< double , std::map< double , std::map< double , TShape_Result* > > > > m_map_ParticleShapeParametrizationMap;
+
+            m_map_ParticleShapeParametrizationMap[obj->id()][obj->calosample()][obj->E()].push_back(obj);
+            ++n_shape[obj->id()].n;
+            n_shape[obj->id()].min_eta=TMath::Min(n_shape[obj->id()].min_eta,obj->eta());
+            n_shape[obj->id()].max_eta=TMath::Max(n_shape[obj->id()].max_eta,obj->eta());
+            n_shape[obj->id()].min_E  =TMath::Min(n_shape[obj->id()].min_E  ,obj->E()  );
+            n_shape[obj->id()].max_E  =TMath::Max(n_shape[obj->id()].max_E  ,obj->E()  );
+          }
+        }
+      if(cl->InheritsFrom(ParticleEnergyParametrization::Class()))
+        {
+          ParticleEnergyParametrization* obj=(ParticleEnergyParametrization*)(key->ReadObj());
+          TString msg;
+          if(checkParticleEnergyParametrization(obj,msg)) {
+            //        cout<<" -> Got obj "<<obj->GetName()<<" : "<<obj->GetTitle()<<endl;
+            obj->SetNoDirectoryHisto();
+
+            //ID              Energy             Eta
+            //std::map< int , std::map< double , std::map< double , ParticleEnergyParametrization* > > > m_map_ParticleEnergyParametrizationMap;
+
+            m_map_ParticleEnergyParametrizationMap[obj->id()][obj->E()][obj->eta()]=obj;
+            ++n_energy[obj->id()].n;
+            n_energy[obj->id()].min_eta=TMath::Min(n_energy[obj->id()].min_eta,obj->eta());
+            n_energy[obj->id()].max_eta=TMath::Max(n_energy[obj->id()].max_eta,obj->eta());
+            n_energy[obj->id()].min_E  =TMath::Min(n_energy[obj->id()].min_E  ,obj->E()  );
+            n_energy[obj->id()].max_E  =TMath::Max(n_energy[obj->id()].max_E  ,obj->E()  );
+            if(msg!="") {
+              ATH_MSG_WARNING("Could fix some nan in input parametrization "<<obj->GetName()<<" ("<<obj->GetTitle()<<"): "<<msg.Data());
+            }
+          } else if(obj) {
+            ATH_MSG_WARNING("Found nan in input parametrization "<<obj->GetName()<<" ("<<obj->GetTitle()<<"): "<<msg.Data());
+          }
         }
-      } else if(obj) {
-        ATH_MSG_WARNING("Found nan in input parametrization "<<obj->GetName()<<" ("<<obj->GetTitle()<<"): "<<msg.Data());
-      }
     }
-  }
   if (iter) delete iter;
   iter=0;
-  
+
   for(std::map< int,shape_count_info >::iterator i=n_energy.begin();i!=n_energy.end();++i) {
     ATH_MSG_LVL(level,"     Energy parametrization id="<<i->first<<" : "<<i->second.n<<" parametrizations loaded: "<<i->second.min_eta<<"<|eta|<"<<i->second.max_eta<<" ; "<<i->second.min_E<<"<E<"<<i->second.max_E );
   }
   for(std::map< int,shape_count_info >::iterator i=n_shape.begin();i!=n_shape.end();++i) {
     ATH_MSG_LVL(level,"     Shape  parametrization id="<<i->first<<" : "<<i->second.n<<" parametrizations loaded: "<<i->second.min_eta<<"<|eta|<"<<i->second.max_eta<<" ; "<<i->second.min_E<<"<E<"<<i->second.max_E );
   }
-  
+
 }
 
 
 StatusCode FastShowerCellBuilderTool::initialize()
 {
   ATH_MSG_INFO("Initialisating started");
-  
-  if ( BasicCellBuilderTool::initialize().isFailure() ) {
-    return StatusCode::FAILURE;
-  }
-  
-  IPartPropSvc* p_PartPropSvc=0;
-  if (service("PartPropSvc",p_PartPropSvc).isFailure() || p_PartPropSvc == 0) {
-    ATH_MSG_ERROR("could not find PartPropService");
-    return StatusCode::FAILURE;
-  }
-  
-  m_particleDataTable = (HepPDT::ParticleDataTable*) p_PartPropSvc->PDT();
-  if(m_particleDataTable == 0){
+
+  ATH_CHECK(BasicCellBuilderTool::initialize());
+
+  ATH_CHECK(m_partPropSvc.retrieve());
+
+  m_particleDataTable = (HepPDT::ParticleDataTable*) m_partPropSvc->PDT();
+  if(!m_particleDataTable) {
     ATH_MSG_ERROR("PDG table not found");
     return StatusCode::FAILURE;
   }
-  
+
   // Random number service
-  if ( m_rndmSvc.retrieve().isFailure() ) {
-    ATH_MSG_ERROR("Could not retrieve " << m_rndmSvc);
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK(m_rndmSvc.retrieve());
 
   //Get own engine with own seeds:
   m_randomEngine = m_rndmSvc->GetEngine(m_randomEngineName);
@@ -411,59 +392,28 @@ StatusCode FastShowerCellBuilderTool::initialize()
     return StatusCode::FAILURE;
   }
 
-  /*
-  sc = service("StoreGateSvc", m_storeGate);
-  if (sc.isFailure())
-  {
-    log << MSG::ERROR
-        << "Unable to get pointer to StoreGateSvc"
-        << endmsg;
-    return StatusCode::FAILURE;
-  }
-  */
-
-  // Retrieve Tools
-  IToolSvc* p_toolSvc = 0;
-  if ( service("ToolSvc",p_toolSvc).isFailure() ){
-    ATH_MSG_ERROR("Cannot find ToolSvc! ");
-    return StatusCode::FAILURE;
+  // Get TimedExtrapolator
+  if (m_extrapolator.empty()) {
+    ATH_MSG_DEBUG("No Extrapolator specified.");
   }
   else {
-    IAlgTool* algTool;
-
-    // Get TimedExtrapolator 
-    if (!m_extrapolator.empty() && m_extrapolator.retrieve().isFailure())
-      return StatusCode::FAILURE;
-    else ATH_MSG_DEBUG("Extrapolator retrieved "<< m_extrapolator);
-
-    // Get CaloSurfaceHelper
-    if (m_caloSurfaceHelper.retrieve().isFailure())
-       ATH_MSG_INFO("CaloSurfaceHelper not found ");
-
-    //#if FastCaloSim_project_release_v1 == 12
-    //m_calosurf_middle->setCaloDepth(m_calodepth);
-    //#endif  
+    ATH_CHECK(m_extrapolator.retrieve());
+    ATH_MSG_DEBUG("Extrapolator retrieved "<< m_extrapolator);
+  }
 
-    //#if FastCaloSim_project_release_v1 == 12
-    //m_calosurf_entrance->setCaloDepth(m_calodepthEntrance);
-    //#endif  
+  // Get CaloSurfaceHelper
+  ATH_CHECK(m_caloSurfaceHelper.retrieve());
 
+  ATH_CHECK(m_calo_tb_coord.retrieve());
+  ATH_MSG_INFO("retrieved " << m_calo_tb_coord.name());
 
-    std::string CaloCoordinateTool_name="TBCaloCoordinate";
-    ListItem CaloCoordinateTool(CaloCoordinateTool_name);
-    if ( p_toolSvc->retrieveTool(CaloCoordinateTool.type(),CaloCoordinateTool.name(), algTool, this).isFailure() ) {
-      ATH_MSG_ERROR("Cannot retrieve " << CaloCoordinateTool_name);
-      return StatusCode::FAILURE;
-    }
-    m_calo_tb_coord = dynamic_cast<ICaloCoordinateTool*>(algTool);    
-    if ( !m_calo_tb_coord ) {
-      ATH_MSG_ERROR("Cannot retrieve " << CaloCoordinateTool_name);
-      return StatusCode::FAILURE;
-    } else {
-      ATH_MSG_INFO("retrieved " << CaloCoordinateTool_name);
-    }
+  //#if FastCaloSim_project_release_v1 == 12
+  //m_calosurf_middle->setCaloDepth(m_calodepth);
+  //#endif
 
-  }
+  //#if FastCaloSim_project_release_v1 == 12
+  //m_calosurf_entrance->setCaloDepth(m_calodepthEntrance);
+  //#endif
 
   find_phi0();
 
@@ -482,13 +432,13 @@ StatusCode FastShowerCellBuilderTool::initialize()
   ATH_MSG_INFO("========================= Init EM celllist map =============================");
   m_em_celllist_map.init(-5,+5,-M_PI+m_phi0_em ,+M_PI+m_phi0_em ,100,64,2,2);
   m_em_celllist_map.setname("EMlist");
-  
+
   ATH_MSG_INFO("========================= Init celllist maps sample 0 ... "<< CaloCell_ID_FCS::LastSample);
   for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample) {
     //log << MSG::INFO <<  "========================= Init celllist map sample "<<sample<<" =============================" <<endmsg;
     m_celllist_maps[sample].init(-5,+5,-M_PI+m_phi0_em ,+M_PI+m_phi0_em ,100,64,3,3);
     m_celllist_maps[sample].setname("samplecelllist");
-//    m_celllist_maps[sample];
+    //    m_celllist_maps[sample];
   }
 
   init_all_maps();
@@ -497,26 +447,23 @@ StatusCode FastShowerCellBuilderTool::initialize()
   init_volume(m_em_fine_map);
   init_volume(m_had_map);
 
-/*
-  if(m_mcLocation=="") {
+  /*
+    if(m_mcLocation=="") {
     log << MSG::INFO <<  "========================= Atlfast::GlobalEventData::Instance() =========================" <<endmsg;
     Atlfast::GlobalEventData* ged = Atlfast::GlobalEventData::Instance();
     m_mcLocation       = ged -> mcLocation();
-  }  
-*/  
+    }
+  */
   ATH_MSG_INFO("McCollection="<< m_mcLocation);
 
   //m_gentesIO = new GenAccessIO();
 
 
   // get the CoolHistSvc
-  if (service("CoolHistSvc",p_coolhistsvc).isFailure()) {
-    ATH_MSG_ERROR("Could not get CoolHistSvc");
-    return StatusCode::FAILURE;
-  }
-  
+  ATH_CHECK(m_coolhistsvc.retrieve());
+
   /*
-  if(m_spline_reweight_x.size()>0 && m_spline_reweight_x.size()==m_spline_reweight_y.size()) {
+    if(m_spline_reweight_x.size()>0 && m_spline_reweight_x.size()==m_spline_reweight_y.size()) {
     TEtaSplineReweight* cor_ele=new TEtaSplineReweight("EtaEleCorrection","EtaEleCorrection");
     TSpline3* sp=new TSpline3("",&m_spline_reweight_x[0],&m_spline_reweight_y[0],m_spline_reweight_x.size(),"b1e1",0,0);
     cor_ele->SetSpline(sp);
@@ -529,14 +476,14 @@ StatusCode FastShowerCellBuilderTool::initialize()
     cor_ele->m_min_pT=0;
     cor_ele->m_max_pT=20000000;
     m_shape_correction.push_back(cor_ele);
-    
+
     TEtaSplineReweight* cor_gamma=new TEtaSplineReweight("EtaGammaCorrection","EtaGammaCorrection");
     *cor_gamma=*cor_ele;
     cor_gamma->m_pdgid=22;
     m_shape_correction.push_back(cor_gamma);
-  }
+    }
   */
-  
+
   if (OpenParamSource(m_ParticleParametrizationFileName).isFailure()) {
     ATH_MSG_WARNING("Open of "<<m_ParticleParametrizationFileName<<" failed");
   }
@@ -550,13 +497,13 @@ StatusCode FastShowerCellBuilderTool::initialize()
     if(fabs(m_sampling_energy_reweighting[i]-1.0)>0.001) {
       ATH_MSG_INFO("Apply sampling reweight factor "<<m_sampling_energy_reweighting[i]<<" to sampling "<<i);
     }
-  }  
+  }
 
   msg(MSG::INFO) <<"Invisible particles (n="<<m_invisibles.size()<<"): ";
   for(unsigned int i=0;i<m_invisibles.size();++i) {
     if(m_invisibles[i]==0) msg(MSG::INFO)<<"(pdgid=0 -> Use TruthHelper class IsGenNonInteracting), ";
-     else msg(MSG::INFO)<<"(pdgid="<<m_invisibles[i]<<"), ";
-  }  
+    else msg(MSG::INFO)<<"(pdgid="<<m_invisibles[i]<<"), ";
+  }
   msg(MSG::INFO)<<endmsg;
 
   if(m_simul_ID_only) {
@@ -566,7 +513,7 @@ StatusCode FastShowerCellBuilderTool::initialize()
       msg(MSG::INFO)<<"[r="<<m_ID_cylinder_r[ic]<<",z="<<m_ID_cylinder_z[ic]<<"] ";
     }
     msg(MSG::INFO)<<endmsg;
-  }  
+  }
 
   ATH_MSG_INFO("Initialisating finished");
   return StatusCode::SUCCESS;
@@ -582,7 +529,7 @@ StatusCode FastShowerCellBuilderTool::OpenParamSource(std::string insource)
       if(m_DB_folder.size()==maxdbINFOoutput) ATH_MSG_INFO("... skipping extra INFO output for further DB registration ...");
     } else {
       ATH_MSG_DEBUG("Register Parametrization from DB : "<< insource);
-    }  
+    }
     insource.erase(0,3);
 
     std::string::size_type strpos=insource.find(":");
@@ -615,7 +562,7 @@ StatusCode FastShowerCellBuilderTool::OpenParamSource(std::string insource)
     m_DB_folder.push_back(cool_folder);
     m_DB_channel.push_back(cool_channel);
     m_DB_dirname.push_back(cool_object);
-    
+
     for(unsigned int icool=0;icool<m_DB_folder.size()-1;++icool) {
       if(cool_folder==m_DB_folder[icool]) {
         ATH_MSG_DEBUG("  IOV callback from FastShowerCellBuilderTool already registered");
@@ -631,7 +578,7 @@ StatusCode FastShowerCellBuilderTool::OpenParamSource(std::string insource)
     } else {
       ATH_MSG_INFO("  Registered IOV callback from FastShowerCellBuilderTool for folder "<< cool_folder);
     }
-  } else {  
+  } else {
     std::string ParticleParametrizationFile = PathResolver::find_file(insource, "DATAPATH");
     if ( ParticleParametrizationFile == "" ) {
       ATH_MSG_WARNING("Can't find parametrization file " << insource << " in DATAPATH");
@@ -653,7 +600,7 @@ StatusCode FastShowerCellBuilderTool::OpenParamSource(std::string insource)
           LoadParametrizationsFromFile(*dir);
         } else {
           ATH_MSG_INFO("  Can't find directory EnergyResults in parametrization file");
-        }  
+        }
 
         dir=(TDirectory*)infile->Get("ShapeResults");
         if(dir) {
@@ -661,13 +608,13 @@ StatusCode FastShowerCellBuilderTool::OpenParamSource(std::string insource)
           LoadParametrizationsFromFile(*dir);
         } else {
           ATH_MSG_INFO("  Can't find directory ShapeResults in parametrization file");
-        }  
+        }
 
         dir=(TDirectory*)infile->Get("ShapeCorrection");
         if(dir) {
           ATH_MSG_INFO("  LoadParametrizations : ShapeCorrection");
           LoadParametrizationsFromFile(*dir);
-        }  
+        }
       } else {
         ATH_MSG_WARNING("Can't open parametrization file " << ParticleParametrizationFile);
       }
@@ -679,13 +626,13 @@ StatusCode FastShowerCellBuilderTool::OpenParamSource(std::string insource)
       delete infile;
       infile=0;
     }
-  }  
+  }
   return StatusCode::SUCCESS;
-}  
+}
 
 
 
-StatusCode FastShowerCellBuilderTool::callBack( IOVSVC_CALLBACK_ARGS_P( I, keys) ) 
+StatusCode FastShowerCellBuilderTool::callBack( IOVSVC_CALLBACK_ARGS_P( I, keys) )
 {
   // printout the list of keys invoked - will normally only be for our
   // histogram folder
@@ -694,7 +641,7 @@ StatusCode FastShowerCellBuilderTool::callBack( IOVSVC_CALLBACK_ARGS_P( I, keys)
        itr!=keys.end();++itr) msg(MSG::INFO) << *itr << " ";
   msg(MSG::INFO) << endmsg;
   // check all the keys, if we find the histogram folder, update the pointer
-  
+
   MSG::Level level=MSG::INFO;
   int nprint=0;
 
@@ -702,7 +649,7 @@ StatusCode FastShowerCellBuilderTool::callBack( IOVSVC_CALLBACK_ARGS_P( I, keys)
     for(unsigned int icool=0;icool<m_DB_folder.size();++icool) {
       if (*itr==m_DB_folder[icool]) {
         TObject* odir;
-        if (p_coolhistsvc->getTObject(m_DB_folder[icool],m_DB_channel[icool],m_DB_dirname[icool],odir).isSuccess()) {
+        if (m_coolhistsvc->getTObject(m_DB_folder[icool],m_DB_channel[icool],m_DB_dirname[icool],odir).isSuccess()) {
           if (odir!=0) {
             TDirectory* dir=(TDirectory*)odir;
             if(nprint>1) {
@@ -718,7 +665,7 @@ StatusCode FastShowerCellBuilderTool::callBack( IOVSVC_CALLBACK_ARGS_P( I, keys)
               dir->SetMother(0);
             }
             ++nprint;
-          } else { 
+          } else {
             ATH_MSG_FATAL("Can't find "<<m_DB_folder[icool]<<":"<<m_DB_channel[icool]<<":"<<m_DB_dirname[icool]<<" in parametrization file, but DB access OK");
             return StatusCode::FAILURE;
           }
@@ -743,7 +690,7 @@ ParticleEnergyParametrization* FastShowerCellBuilderTool::findElower(int id,doub
     if(iter_E!=iter_id->second.end()) {
       if(iter_E->first>=E && iter_E!=iter_id->second.begin()) iter_E--;
       ATH_MSG_DEBUG("E found="<<iter_E->first);
-// first para_eta > fabs_eta  !! might be wrong !! 
+      // first para_eta > fabs_eta  !! might be wrong !!
       double aeta=fabs(eta);
       t_map_PEP_Eta::iterator iter_eta=iter_E->second.lower_bound(aeta);
 
@@ -752,7 +699,7 @@ ParticleEnergyParametrization* FastShowerCellBuilderTool::findElower(int id,doub
         ATH_MSG_DEBUG(" new eta selection for energy paramertization is used ");
         if(iter_eta==iter_E->second.end()) iter_eta--;
         if(iter_eta!=iter_E->second.end()) {
-          
+
           t_map_PEP_Eta::iterator best(iter_eta);
           double deta_best=fabs(best->first - aeta);
           while(iter_eta->first < aeta ) {
@@ -764,18 +711,18 @@ ParticleEnergyParametrization* FastShowerCellBuilderTool::findElower(int id,doub
               }
             } else break;
           }
-          
+
           if(msgLvl(MSG::DEBUG)) {
             ATH_MSG_DEBUG("eta found="<<best->first);
             ATH_MSG_DEBUG(best->second->GetName()<<" : "<<best->second->GetTitle());
-          }  
+          }
           return best->second;
         } else {
           if(msgLvl(MSG::DEBUG)) {
             ATH_MSG_DEBUG("eta="<<eta<<" not found : size="<<iter_E->second.size());
             ATH_MSG_DEBUG("begin="<<iter_E->second.begin()->first);
             ATH_MSG_DEBUG("rbegin="<<iter_E->second.rbegin()->first);
-          }  
+          }
           return 0;
         }
       } else {
@@ -783,14 +730,14 @@ ParticleEnergyParametrization* FastShowerCellBuilderTool::findElower(int id,doub
           if(msgLvl(MSG::DEBUG)) {
             ATH_MSG_DEBUG("eta found="<<iter_eta->first);
             ATH_MSG_DEBUG(iter_eta->second->GetName()<<" : "<<iter_eta->second->GetTitle());
-          }  
+          }
           return iter_eta->second;
         } else {
           if(msgLvl(MSG::DEBUG)) {
             ATH_MSG_DEBUG("eta="<<eta<<" not found : size="<<iter_E->second.size());
             ATH_MSG_DEBUG("begin="<<iter_E->second.begin()->first);
             ATH_MSG_DEBUG("rbegin="<<iter_E->second.rbegin()->first);
-          }  
+          }
           return 0;
         }
       }
@@ -799,7 +746,7 @@ ParticleEnergyParametrization* FastShowerCellBuilderTool::findElower(int id,doub
         ATH_MSG_DEBUG("E="<<E<<" not found : size="<<iter_id->second.size());
         ATH_MSG_DEBUG("begin="<<iter_id->second.begin()->first);
         ATH_MSG_DEBUG("rbegin="<<iter_id->second.rbegin()->first);
-      }  
+      }
       return 0;
     }
   } else {
@@ -835,18 +782,18 @@ ParticleEnergyParametrization* FastShowerCellBuilderTool::findEupper(int id,doub
               }
             } else break;
           }
-          
+
           if(msgLvl(MSG::DEBUG)) {
             ATH_MSG_DEBUG("eta found="<<best->first);
             ATH_MSG_DEBUG(best->second->GetName()<<" : "<<best->second->GetTitle());
-          }  
+          }
           return best->second;
         } else {
           if(msgLvl(MSG::DEBUG)) {
             ATH_MSG_DEBUG("eta="<<eta<<" not found : size="<<iter_E->second.size());
             ATH_MSG_DEBUG("begin="<<iter_E->second.begin()->first);
             ATH_MSG_DEBUG("rbegin="<<iter_E->second.rbegin()->first);
-          }  
+          }
           return 0;
         }
       } else {
@@ -854,14 +801,14 @@ ParticleEnergyParametrization* FastShowerCellBuilderTool::findEupper(int id,doub
           if(msgLvl(MSG::DEBUG)) {
             ATH_MSG_DEBUG("eta found="<<iter_eta->first);
             ATH_MSG_DEBUG(iter_eta->second->GetName()<<" : "<<iter_eta->second->GetTitle());
-          }  
+          }
           return iter_eta->second;
         } else {
           if(msgLvl(MSG::DEBUG)) {
             ATH_MSG_DEBUG("eta="<<eta<<" not found : size="<<iter_E->second.size());
             ATH_MSG_DEBUG("begin="<<iter_E->second.begin()->first);
             ATH_MSG_DEBUG("rbegin="<<iter_E->second.rbegin()->first);
-          }  
+          }
           return 0;
         }
       }
@@ -870,7 +817,7 @@ ParticleEnergyParametrization* FastShowerCellBuilderTool::findEupper(int id,doub
         ATH_MSG_DEBUG("E="<<E<<" not found : size="<<iter_id->second.size());
         ATH_MSG_DEBUG("begin="<<iter_id->second.begin()->first);
         ATH_MSG_DEBUG("rbegin="<<iter_id->second.rbegin()->first);
-      }  
+      }
       return 0;
     }
   } else {
@@ -885,11 +832,11 @@ TShape_Result* FastShowerCellBuilderTool::findShape (int id,int calosample,doubl
   t_map_PSP_ID::iterator iter_id=m_map_ParticleShapeParametrizationMap.find(id);
   if(iter_id!=m_map_ParticleShapeParametrizationMap.end()) {
     ATH_MSG_DEBUG("ID found="<<iter_id->first);
-    
+
     t_map_PSP_calosample::iterator iter_cs=iter_id->second.find(calosample);
     if(iter_cs!=iter_id->second.end()) {
       ATH_MSG_DEBUG("calosample found="<<iter_cs->first);
-    
+
       t_map_PSP_Energy::iterator iter_E=iter_cs->second.lower_bound(E);
       if(iter_E==iter_cs->second.end()) iter_E--;
       double edist=fabs(iter_E->first - E);
@@ -903,11 +850,11 @@ TShape_Result* FastShowerCellBuilderTool::findShape (int id,int calosample,doubl
         if(msgLvl(MSG::DEBUG)) {
           ATH_MSG_DEBUG("E found="<<iter_E->first);
           ATH_MSG_DEBUG("disteta size="<<iter_E->second.size());
-        }  
-        
+        }
+
         double bestscore=10000000;
         TShape_Result* best_shape=0;
-        
+
         for(t_map_PSP_DistEta::iterator iter_disteta=iter_E->second.begin();iter_disteta<iter_E->second.end();++iter_disteta) {
           double scoreeta=fabs(((*iter_disteta)->eta()-fabs(eta))/0.2);
           double scoredist=fabs(((*iter_disteta)->meandist()-dist)/distrange);
@@ -915,8 +862,8 @@ TShape_Result* FastShowerCellBuilderTool::findShape (int id,int calosample,doubl
           if(!best_shape || score<bestscore) {
             bestscore=score;
             best_shape=(*iter_disteta);
-          } 
-        } 
+          }
+        }
 
         if(best_shape) {
           ATH_MSG_DEBUG("best parametrization found : "<<best_shape->GetName()<<" = "<<best_shape->GetTitle());
@@ -930,7 +877,7 @@ TShape_Result* FastShowerCellBuilderTool::findShape (int id,int calosample,doubl
           ATH_MSG_DEBUG("E="<<E<<" not found : size="<<iter_id->second.size());
           ATH_MSG_DEBUG("begin="<<iter_id->second.begin()->first);
           ATH_MSG_DEBUG("rbegin="<<iter_id->second.rbegin()->first);
-        }  
+        }
         return 0;
       }
     } else {
@@ -951,25 +898,25 @@ void FastShowerCellBuilderTool::CaloLocalPoint (const Trk::TrackParameters* parm
 
   *pt_ctb = parm->position();
 
-  ATH_MSG_DEBUG( "Impact point in ctb coord : x,y,z= " 
-      << pt_ctb->x() << " " 
-      << pt_ctb->y() << " " << pt_ctb->z() << " R=" 
-      << std::sqrt( pt_ctb->x()*pt_ctb->x() + pt_ctb->y()*pt_ctb->y() 
-                    + pt_ctb->z()*pt_ctb->z())
-      << " eta=" << pt_ctb->eta() << " phi=" << pt_ctb->phi() );
+  ATH_MSG_DEBUG( "Impact point in ctb coord : x,y,z= "
+                 << pt_ctb->x() << " "
+                 << pt_ctb->y() << " " << pt_ctb->z() << " R="
+                 << std::sqrt( pt_ctb->x()*pt_ctb->x() + pt_ctb->y()*pt_ctb->y()
+                               + pt_ctb->z()*pt_ctb->z())
+                 << " eta=" << pt_ctb->eta() << " phi=" << pt_ctb->phi() );
 
   m_calo_tb_coord->ctb_to_local(*pt_ctb, *pt_local);
-    
-  ATH_MSG_DEBUG( "Impact point in local coord : x,y,z= " 
-      << pt_local->x() << " " 
-      << pt_local->y() << " " << pt_local->z() << " R=" 
-      << std::sqrt( pt_local->x()*pt_local->x() 
-                    + pt_local->y()*pt_local->y() 
-                    + pt_local->z()*pt_local->z())
-      << " eta=" << pt_local->eta() << " phi=" << pt_local->phi() );
+
+  ATH_MSG_DEBUG( "Impact point in local coord : x,y,z= "
+                 << pt_local->x() << " "
+                 << pt_local->y() << " " << pt_local->z() << " R="
+                 << std::sqrt( pt_local->x()*pt_local->x()
+                               + pt_local->y()*pt_local->y()
+                               + pt_local->z()*pt_local->z())
+                 << " eta=" << pt_local->eta() << " phi=" << pt_local->phi() );
 }
 
-bool FastShowerCellBuilderTool::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVector, CaloCell_ID_FCS::CaloSample sample)  
+bool FastShowerCellBuilderTool::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVector, CaloCell_ID_FCS::CaloSample sample)
 {
   m_layerCaloOK[sample]=false;
   m_letaCalo[sample]=m_eta_calo_surf;
@@ -983,14 +930,14 @@ bool FastShowerCellBuilderTool::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVe
   std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
   while ( it!= hitVector->end() && it->detID != (3000+sample) ) { it++;}
   //while ((*it).detID != (3000+sample) && it < hitVector->end() )  it++;
-  
+
   if (it!=hitVector->end()) {
     Amg::Vector3D hitPos1 = (*it).trackParms->position();
     int sid1=(*it).detID;
     int sid2=-1;
     Amg::Vector3D hitPos;
     Amg::Vector3D hitPos2;
-    
+
     std::vector<Trk::HitInfo>::iterator itnext = it;
     ++itnext;
     if(itnext!=hitVector->end()) {
@@ -1030,7 +977,7 @@ bool FastShowerCellBuilderTool::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVe
                   " r1="<<hitPos1.perp()<<" z1="<<hitPos1[Amg::z]<<" r2="<<hitPos2.perp()<<" z2="<<hitPos2[Amg::z]<<
                   " re="<<hitPos.perp()<<" ze="<<hitPos[Amg::z]
                   );
-  } 
+  }
   if(!best_found) {
     it = hitVector->begin();
     double best_dist=0.5;
@@ -1087,11 +1034,11 @@ bool FastShowerCellBuilderTool::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVe
         }
       }
       ATH_MSG_VERBOSE(" extrapol without layer hit: id="<<sid1<<" -> "<<sid2<<" dist="<<dist<<" mindist="<<best_dist<<
-                    " t="<<t<<" best_inside="<<best_inside<<" target r/z="<<tmp_target<<
-                    " r1="<<hitPos1.perp()<<" z1="<<hitPos1[Amg::z]<<" r2="<<hitPos2.perp()<<" z2="<<hitPos2[Amg::z]<<
-                    " re="<<hitPos.perp()<<" ze="<<hitPos[Amg::z]<<
-                    " rb="<<best_hitPos.perp()<<" zb="<<best_hitPos[Amg::z]
-                    );
+                      " t="<<t<<" best_inside="<<best_inside<<" target r/z="<<tmp_target<<
+                      " r1="<<hitPos1.perp()<<" z1="<<hitPos1[Amg::z]<<" r2="<<hitPos2.perp()<<" z2="<<hitPos2[Amg::z]<<
+                      " re="<<hitPos.perp()<<" ze="<<hitPos[Amg::z]<<
+                      " rb="<<best_hitPos.perp()<<" zb="<<best_hitPos[Amg::z]
+                      );
       if(best_found) {
         m_letaCalo[sample]=best_hitPos.eta();
         m_lphiCalo[sample]=best_hitPos.phi();
@@ -1099,18 +1046,18 @@ bool FastShowerCellBuilderTool::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVe
         rzmiddle=rzmid((CaloCell_ID_FCS::CaloSample)sample,m_letaCalo[sample]);
         distsamp=deta((CaloCell_ID_FCS::CaloSample)sample,m_letaCalo[sample]);
         m_layerCaloOK[sample]=true;
-      }              
-    } 
+      }
+    }
     if(best_found) {
       ATH_MSG_DEBUG(" extrapol without layer hit: id="<<best_id1<<" -> "<<best_id2<<" mindist="<<best_dist<<
                     " best_inside="<<best_inside<<" target r/z="<<best_target<<
                     " rb="<<best_hitPos.perp()<<" zb="<<best_hitPos[Amg::z]
                     );
-    }                  
+    }
   }
-  
+
   if(isCaloBarrel((CaloCell_ID_FCS::CaloSample)sample)) rzmiddle*=cosh(m_letaCalo[sample]);
-   else                                                 rzmiddle= fabs(rzmiddle/tanh(m_letaCalo[sample]));
+  else                                                 rzmiddle= fabs(rzmiddle/tanh(m_letaCalo[sample]));
 
   m_dCalo[sample]=rzmiddle;
   m_distetaCaloBorder[sample]=distsamp;
@@ -1118,10 +1065,10 @@ bool FastShowerCellBuilderTool::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVe
   if(msgLvl(MSG::DEBUG)) {
     msg(MSG::DEBUG)<<"  Final par TTC sample "<<(int)sample;
     if(m_layerCaloOK[sample]) msg()<<" (good)";
-     else msg()<<" (bad)";
+    else msg()<<" (bad)";
     msg()<<" eta=" << m_letaCalo[sample] << "   phi=" << m_lphiCalo[sample] <<" m_dCalo="<<m_dCalo[sample]<<" dist(hit)="<<hitdist<< endmsg;
-  } 
- 
+  }
+
   return m_layerCaloOK[sample];
 }
 
@@ -1136,10 +1083,10 @@ bool FastShowerCellBuilderTool::get_calo_surface(std::vector<Trk::HitInfo>* hitV
   for(int i=0;i<m_n_surfacelist;++i) {
     CaloCell_ID_FCS::CaloSample sample=m_surfacelist[i];
     std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
-    while (it != hitVector->end() && it->detID != (3000+sample) )  { it++;} 
+    while (it != hitVector->end() && it->detID != (3000+sample) )  { it++;}
     if(it==hitVector->end()) continue;
     Amg::Vector3D hitPos = (*it).trackParms->position();
-    
+
     //double offset = 0.;
     double etaCalo = hitPos.eta();
 
@@ -1158,12 +1105,12 @@ bool FastShowerCellBuilderTool::get_calo_surface(std::vector<Trk::HitInfo>* hitV
         m_d_calo_surf=rzent(sample,etaCalo);
         msg(MSG::DEBUG)<<" r/z="<<m_d_calo_surf;
         if(isCaloBarrel(sample)) m_d_calo_surf*=cosh(etaCalo);
-         else                    m_d_calo_surf= fabs(m_d_calo_surf/tanh(etaCalo));
+        else                    m_d_calo_surf= fabs(m_d_calo_surf/tanh(etaCalo));
         msg(MSG::DEBUG)<<" d="<<m_d_calo_surf;
         if(distsamp<0) {
           msg(MSG::DEBUG)<<endmsg;
           break;
-        }  
+        }
       }
       msg(MSG::DEBUG)<<endmsg;
     } else {
@@ -1174,7 +1121,7 @@ bool FastShowerCellBuilderTool::get_calo_surface(std::vector<Trk::HitInfo>* hitV
   if(m_sample_calo_surf==CaloCell_ID_FCS::noSample) {
     // first intersection with sensitive calo layer
     std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
-    while ( it < hitVector->end() && (*it).detID != 3 ) { it++;}   // to be updated 
+    while ( it < hitVector->end() && (*it).detID != 3 ) { it++;}   // to be updated
     if (it==hitVector->end())   {  // no calo intersection, abort
       return false;
     }
@@ -1182,29 +1129,29 @@ bool FastShowerCellBuilderTool::get_calo_surface(std::vector<Trk::HitInfo>* hitV
     m_eta_calo_surf=surface_hitPos.eta();
     m_phi_calo_surf=surface_hitPos.phi();
     m_d_calo_surf=surface_hitPos.mag();
-    
+
     double pT=(*it).trackParms->momentum().perp();
     if(TMath::Abs(m_eta_calo_surf)>4.9 || pT<500 || (TMath::Abs(m_eta_calo_surf)>4 && pT<1000) ) {
       ATH_MSG_DEBUG("only entrance to calo entrance layer found, no surface : eta="<<m_eta_calo_surf<<" phi="<<m_phi_calo_surf<<" d="<<m_d_calo_surf<<" pT="<<pT);
-    } else {  
+    } else {
       ATH_MSG_WARNING("only entrance to calo entrance layer found, no surface : eta="<<m_eta_calo_surf<<" phi="<<m_phi_calo_surf<<" d="<<m_d_calo_surf<<" pT="<<pT);
-    }  
+    }
   } else {
     ATH_MSG_DEBUG("entrance to calo surface : sample="<<m_sample_calo_surf<<" eta="<<m_eta_calo_surf<<" phi="<<m_phi_calo_surf<<" deta="<<min_calo_surf_dist<<" dsurf="<<m_d_calo_surf);
   }
-  
+
   return true;
 }
 
 StatusCode FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCellContainer, std::vector<Trk::HitInfo>* hitVector,
-                                                       Amg::Vector3D initMom, double mass, int pdgid, int barcode)  
+                                                       Amg::Vector3D initMom, double mass, int pdgid, int barcode)
 {
-  // no intersections with Calo layers found : abort;        
+  // no intersections with Calo layers found : abort;
   if(!hitVector || !hitVector->size())  {
     ATH_MSG_DEBUG(" Calo hit vector empty: aborting particle processing ");
     return StatusCode::FAILURE;
   }
-  
+
   // Setup of the FastShowerInfo debug containers if requested
   FastShowerInfo *fastshowerinfo(0);
   if( m_storeFastShowerInfo ) {
@@ -1212,26 +1159,26 @@ StatusCode FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCel
     fastshowerinfo = new FastShowerInfo();
     fastshowerinfo->Initialize( CaloCell_ID_FCS::MaxSample );
   }
-  
+
   ///////////////////////////
   // Init of basic quantities
   ///////////////////////////
-  
+
   // Ugly code, ptruth_XYZ are member variables
   m_ptruth_eta=initMom.eta();
-  if( fabs(m_ptruth_eta)>6.0 ) { 
+  if( fabs(m_ptruth_eta)>6.0 ) {
     if(m_storeFastShowerInfo) delete fastshowerinfo;
     return StatusCode::SUCCESS;
   }
 
   m_ptruth_phi=initMom.phi();
   m_ptruth_e = sqrt(initMom.mag2()+mass*mass);
-  
+
   TVector3 truth_direction;  // added (25.5.2009)
   truth_direction.SetPtEtaPhi(1.,m_ptruth_eta,m_ptruth_phi);
   TVector3 z_direction;// added (25.5.2009)
   z_direction.SetXYZ(0,0,1);// added (25.5.2009)  // added (25.5.2009)
-  double ang_beta = z_direction.Angle(truth_direction);// added (25.5.2009)  
+  double ang_beta = z_direction.Angle(truth_direction);// added (25.5.2009)
   // Definition of et2 and et according to CLHEP::HepLorentzVector
   //double pt2 = part->momentum().perp2();
   //double et2 = pt2 == 0 ? 0 : m_ptruth_e*m_ptruth_e * pt2/(pt2+part->momentum().z()*part->momentum().z());
@@ -1248,8 +1195,8 @@ StatusCode FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCel
     if(pdgid==22 || pdgid==111) {
       m_refid=22;
       refmass=0;
-    }  
-    if( pdgid==11 || pdgid==-11 ) { 
+    }
+    if( pdgid==11 || pdgid==-11 ) {
       m_refid=11;
       refmass=0.511;
       //log<<MSG::VERBOSE<<" electron parametrization found " << endmsg;
@@ -1259,45 +1206,45 @@ StatusCode FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCel
       m_refid=22;
       refmass=0;
       //if(pdgid==11 || pdgid==-11) log<<MSG::VERBOSE<<" no electron parametrization found: USE PHOTON " << endmsg;
-    }  
+    }
   }
   if(pdgid==13 || pdgid==-13) {
     m_refid=13;
     refmass=105.658367; //PDG mass
-  }  
+  }
   if(pdgid==111) {
-    // there shouldn't be stable pi0, but sometimes they are in the truth info, because of G4 cuts. 
+    // there shouldn't be stable pi0, but sometimes they are in the truth info, because of G4 cuts.
     // Treat them as massless to deposit the full energy: pi0->gamma gamma
     partmass=0;
   }
-  
+
   // Default use the total particle energy as base quantity to deposit into the calo
   double Ein=m_ptruth_e;
   if(m_use_Ekin_for_depositions) { // alternatively use only the kinetic energy
     double Ekin=Ein - partmass; // kinetic energy of incoming particle
-    Ein=Ekin+refmass; //the parametrization is done in bins of E, so go back from Ekin to the E used in the input reference 
+    Ein=Ekin+refmass; //the parametrization is done in bins of E, so go back from Ekin to the E used in the input reference
   }
   double EinT=Ein * m_ptruth_pt/m_ptruth_p; // only needed to trigger debug output
-  
+
   if(Ein<10) {
     // don't simulate particles below 10MeV
     if(m_storeFastShowerInfo) delete fastshowerinfo;
     return StatusCode::SUCCESS;
   }
-  
+
   for(int i=CaloCell_ID_FCS::FirstSample;i<CaloCell_ID_FCS::MaxSample;++i) {
     m_layerCaloOK[i]=false;
     m_distetaCaloBorder[i]=1000;
     m_dCalo[i]=0;
     m_letaCalo[i]=m_lphiCalo[i]=-999;
-  }  
-  
+  }
+
   if( m_storeFastShowerInfo ) {
     // storing the particle information inside the FastShowerInfo object
     fastshowerinfo->SetPtEtaPhiE( m_ptruth_pt, m_ptruth_eta, m_ptruth_phi, m_ptruth_e );
     fastshowerinfo->SetBarcodeAndPDGId( barcode, pdgid );
   }
-  
+
   std::stringstream particle_info_str;
   particle_info_str<<"id="<<pdgid<<" rid="<<m_refid<<" e="<<m_ptruth_e<<" Ein="<<Ein<<" EinT="<<EinT<<" pt="<<m_ptruth_pt<<" p="<<m_ptruth_p<<" m="<<mass<<" eta="<<m_ptruth_eta<<" phi="<<m_ptruth_phi;
 
@@ -1305,13 +1252,13 @@ StatusCode FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCel
     ATH_MSG_DEBUG("====================================================");
     ATH_MSG_DEBUG("initial "<<particle_info_str.str());
     ATH_MSG_DEBUG("====================================================");
-  }  
-  
+  }
+
   //////////////////////////////////////
   // Start calo extrapolation
   // First: get entry point into first calo sample
   //////////////////////////////////////
-  
+
   if(msgLvl(MSG::DEBUG)) {
     std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
     while (it < hitVector->end() )  {
@@ -1320,35 +1267,35 @@ StatusCode FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCel
       ATH_MSG_DEBUG(" HIT: layer="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag());
       it++;
     }
-  }  
-  
+  }
+
   if(!get_calo_surface(hitVector)) {
     if(TMath::Abs(m_ptruth_eta)>5 || EinT<500) {
       ATH_MSG_DEBUG("Calo hit vector does not contain calo layer entry: aborting processing particle "<<particle_info_str.str());
-    } else {  
+    } else {
       ATH_MSG_WARNING("Calo hit vector does not contain calo layer entry: aborting processing particle "<<particle_info_str.str());
-    }  
+    }
     if(m_storeFastShowerInfo) delete fastshowerinfo;
     return StatusCode::FAILURE;
   }
-  
+
   TVector3 surface;
   surface.SetPtEtaPhi(1,m_eta_calo_surf,m_phi_calo_surf);
   surface.SetMag(m_d_calo_surf);
-  
+
   if(m_storeFastShowerInfo) fastshowerinfo->SetCaloSurface(m_eta_calo_surf, m_phi_calo_surf, m_d_calo_surf);
-  
-  // only continue if inside the calo 
+
+  // only continue if inside the calo
   if( fabs(m_eta_calo_surf)> 6 ) {
     if(m_storeFastShowerInfo) delete fastshowerinfo;
     return StatusCode::SUCCESS;
   }
-  
+
   double distrange=0;
   double Epara_E = Ein; // Basic input energy to be put into the calo without response, used for parametrization lookup
-  
+
   ParticleEnergyShape p;
-  
+
   //////////////////////////////
   // Process Muon info from Fatras
   //////////////////////////////
@@ -1364,7 +1311,7 @@ StatusCode FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCel
     }
     // loop over intersection
     std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
-    while (it < hitVector->end() && (*it).detID != -3 )  { it++;}   // to be updated 
+    while (it < hitVector->end() && (*it).detID != -3 )  { it++;}   // to be updated
     if(it!=hitVector->end()) {
       Amg::Vector3D hitPos = (*it).trackParms->position();
       CaloCell_ID_FCS::CaloSample sample = (CaloCell_ID_FCS::CaloSample)((*it).detID-3000);    // to be updated
@@ -1373,7 +1320,7 @@ StatusCode FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCel
       double dCurr = hitPos.mag();
       while ( it < hitVector->end()-1 )  {
         // step to the layer exit to evaluate the deposit
-        it++; 
+        it++;
         pCurr = (*it).trackParms->momentum().mag();
         double edeposit = pLast - pCurr; // to be updated! Includes dead material energy loss in calo deposit
         hitPos = (*it).trackParms->position();
@@ -1385,19 +1332,19 @@ StatusCode FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCel
           m_lphiCalo[sample]=hitPos.phi();
           m_dCalo[sample]=0.5*(dCurr+hitPos.mag());
           p.dist000+=p.E_layer[sample]*m_dCalo[sample];
-          
+
           ATH_MSG_DEBUG("muon deposit: sampe="<<sample<<" E/Etot="<<p.E_layer[sample]<<" ; in : eta= " << m_letaCalo[sample] <<" m_dCalo="<<m_dCalo[sample]);
         }
         sample = (CaloCell_ID_FCS::CaloSample)((*it).detID-3000);         // to be updated
         dCurr = hitPos.mag();
         pLast = pCurr;
       }
-      
+
       p.Ecal=p.E;
       p.dist000/=p.E;
       p.dist_in=p.dist000;
-    }  
-  } else {  
+    }
+  } else {
     //////////////////////////////
     // Process all non muon particles
     //////////////////////////////
@@ -1407,11 +1354,11 @@ StatusCode FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCel
     if(Elower) {
       ATH_MSG_DEBUG("lower : "<< Elower->GetTitle()<< " lower E: " << Elower->E());
       Epara=Elower;
-    }  
+    }
     if(Eupper) {
       ATH_MSG_DEBUG("upper : "<< Eupper->GetTitle()<< " upper E: " << Eupper->E());
       Epara=Eupper;
-    }  
+    }
     if(Elower && Eupper) {
       ATH_MSG_DEBUG("lower : "<< Elower->GetTitle()<< " lower E: " << Elower->E()<< " ; upper : "<< Eupper->GetTitle()<< " upper E: " << Eupper->E());
       /* interpolate */
@@ -1422,35 +1369,35 @@ StatusCode FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCel
         else wt=1.0;
         if(ran<wt) Epara = Elower;
         else Epara = Eupper;
-      } else { 
+      } else {
         if( fabs(Elower->E()-Ein) < fabs(Eupper->E()-Ein) ){
           Epara=Elower;
         } else{
           Epara=Eupper;
         }
-      }        
+      }
       /* interpolate */
     }
     if(Epara) {
       Epara_E = Epara->E();
       ATH_MSG_DEBUG("take  : "<< Epara->GetTitle());
       Epara->DiceParticle(p,*m_rndm);
-      
+
       if(m_storeFastShowerInfo) Epara->CopyDebugInfo(fastshowerinfo); // old version: fastshowerinfo->SetParticleEnergyParam( *Epara );
-      
+
       if(p.E<=0) {
         MSG::Level level=MSG::WARNING;
         if(Ein<2000) level=MSG::DEBUG;
         if(EinT<2000) level=MSG::DEBUG;
         ATH_MSG_LVL(level,"particle energy<=0 ");
         ATH_MSG_LVL(level," - "<<particle_info_str.str()<< " parametrization  : "<< Epara->GetTitle()<<" : skip particle...");
-        
+
         if(m_storeFastShowerInfo) delete fastshowerinfo;
-        
+
         if(p.E<0) return StatusCode::FAILURE;
         return StatusCode::SUCCESS;
       }
-      
+
       if(p.E>=3 && p.E*Ein>2000) {
         ATH_MSG_WARNING("particle energy/truth="<<p.E);
         ATH_MSG_WARNING(" - "<<particle_info_str.str());
@@ -1459,42 +1406,42 @@ StatusCode FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCel
         for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample) {
           ATH_MSG_WARNING(" - sample "<<sample<<" E/Etot="<<p.E_layer[sample] <<" fcal="<<p.fcal_layer[sample]<<" w="<<Epara->weight(sample));
         }
-        
+
         if(m_storeFastShowerInfo) delete fastshowerinfo;
-        
+
         ATH_MSG_WARNING(" - skip particle...");
         return StatusCode::FAILURE;
       }
-      
+
       /*
       // now loop over intersections and match with the parametrized deposit ( by default in the middle )
       double dCurr = hitPos.mag();
       while ( it < hitVector->end()-1 )  {
-        it++;
-        hitPos = (*it).trackParms->position();
-        if (sample>0) {  // save layer deposit as relative fraction of the momentum ?
-          if(p.E_layer[sample]<0) p.E_layer[sample]=0;
-          if(p.E_layer[sample]>0) {
-            m_dCalo[sample] = 0.5*( dCurr + hitPos.mag() );
-            p.dist000+=p.E_layer[sample]*hitPos.mag();
-            if(m_dCalo[sample]<0.01 && p.E_layer[sample]>0) {
-              ATH_MSG_WARNING("Calo position for sample "<<sample<<" E/Etot="<<p.E_layer[sample]<<" ; in : eta= " << hitPos.eta() <<" m_dCalo="<<m_dCalo[sample]);
-            }
-          }
-        }
-        dCurr = hitPos.mag();
-        sample = (CaloCell_ID_FCS::CaloSample)((*it).detID-3000);         // to be updated
+      it++;
+      hitPos = (*it).trackParms->position();
+      if (sample>0) {  // save layer deposit as relative fraction of the momentum ?
+      if(p.E_layer[sample]<0) p.E_layer[sample]=0;
+      if(p.E_layer[sample]>0) {
+      m_dCalo[sample] = 0.5*( dCurr + hitPos.mag() );
+      p.dist000+=p.E_layer[sample]*hitPos.mag();
+      if(m_dCalo[sample]<0.01 && p.E_layer[sample]>0) {
+      ATH_MSG_WARNING("Calo position for sample "<<sample<<" E/Etot="<<p.E_layer[sample]<<" ; in : eta= " << hitPos.eta() <<" m_dCalo="<<m_dCalo[sample]);
+      }
       }
-      
+      }
+      dCurr = hitPos.mag();
+      sample = (CaloCell_ID_FCS::CaloSample)((*it).detID-3000);         // to be updated
+      }
+
       p.dist000/=p.E;
       distrange=fabs((Epara->GetDistMax()-Epara->GetDistMin())/Epara->GetNDistBins());
-      
+
       ATH_MSG_DEBUG("Ein="<<Ein<<" Ecal/Ein="<<p.Ecal<<" E/Ein="<<p.E<<" E="<<p.E*Ein
-          <<" din="<<p.dist_in<<" dist000="<<p.dist000<<" drec="<<p.dist_rec
-          <<" dmin="<<Epara->GetDistMin()<<" dmax="<<Epara->GetDistMax()<<" nd="<<Epara->GetNDistBins()<<" drange="<<distrange);
-      */    
-          
-          
+      <<" din="<<p.dist_in<<" dist000="<<p.dist000<<" drec="<<p.dist_rec
+      <<" dmin="<<Epara->GetDistMin()<<" dmax="<<Epara->GetDistMax()<<" nd="<<Epara->GetNDistBins()<<" drange="<<distrange);
+      */
+
+
       // now try to extrpolate to all calo layers, that contain energy
       for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample) {
         if(p.E_layer[sample]<0) p.E_layer[sample]=0;
@@ -1512,468 +1459,468 @@ StatusCode FastShowerCellBuilderTool::process_particle(CaloCellContainer* theCel
       distrange=fabs((Epara->GetDistMax()-Epara->GetDistMin())/Epara->GetNDistBins());
 
       ATH_MSG_DEBUG("Ein="<<Ein<<" Ecal/Ein="<<p.Ecal<<" E/Ein="<<p.E<<" E="<<p.E*Ein
-          <<" din="<<p.dist_in<<" dist000="<<p.dist000<<" drec="<<p.dist_rec
-          <<" surface: d="<<surface.Mag()<<" r="<<surface.Perp()<<" z="<<surface.z()
-          <<" dmin="<<Epara->GetDistMin()<<" dmax="<<Epara->GetDistMax()<<" nd="<<Epara->GetNDistBins()<<" drange="<<distrange);
-          
-          
-    }  
-  }
-  
+                    <<" din="<<p.dist_in<<" dist000="<<p.dist000<<" drec="<<p.dist_rec
+                    <<" surface: d="<<surface.Mag()<<" r="<<surface.Perp()<<" z="<<surface.z()
+                    <<" dmin="<<Epara->GetDistMin()<<" dmax="<<Epara->GetDistMax()<<" nd="<<Epara->GetNDistBins()<<" drange="<<distrange);
+
+
+    }
+  }
+
   p.dist_rec=p.dist000-surface.Mag();
-  
+
   // If there is no energy in the calo, abort
   if(p.E<=0) {
     if(m_storeFastShowerInfo) delete fastshowerinfo;
     return StatusCode::FAILURE;
   }
-  
+
   //////////////////////////////////////
   // Main loop over all calorimeter layers
   //////////////////////////////////////
   for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample) if(!isnan(p.E_layer[sample])) {
-    // Now scale relative energy response to particle energy
-    p.E_layer[sample]*=Ein*m_sampling_energy_reweighting[sample];
-    ATH_MSG_DEBUG("============= E"<<sample<<"="<<p.E_layer[sample]<<" =============");
-    
-    double E_orig=p.E_layer[sample];
-    double Et_orig=E_orig/cosh(m_eta_calo_surf);
-    // Add energy to lost energy couner, if all deposit goes OK, subtract it again...
-    m_E_lost_sample[sample]+=E_orig;
-    m_Et_lost_sample[sample]+=Et_orig;
-    
-    if(p.E_layer[sample]>0 && (!isnan(p.E_layer[sample])) && fabs(m_letaCalo[sample])<5.0) {
-      ATH_MSG_DEBUG("E"<<sample<<"="<<p.E_layer[sample]<<" d="<<m_dCalo[sample]);
-      
-      // Calculate estimates for cell energy fluctuations. Should be updated with better numbers
-      double smaple_err=0.1;
-      if(sample>=CaloCell_ID_FCS::PreSamplerB && sample<=CaloCell_ID_FCS::EME3    ) smaple_err=0.1; //LAr      10%/sqrt(E)
-      if(sample>=CaloCell_ID_FCS::HEC0        && sample<=CaloCell_ID_FCS::TileExt2) smaple_err=0.5; //hadronic 50%/sqrt(E) ???
-      if(sample>=CaloCell_ID_FCS::FCAL0       && sample<=CaloCell_ID_FCS::FCAL2   ) smaple_err=1.0; //FCAL    100%/sqrt(E) ???
-      
-      // Find parametrization for the lateral shape distribution in the sample
-      TShape_Result* shape;
-      if(m_jo_interpolate) {
-        shape=findShape( m_refid , sample , Epara_E , m_letaCalo[sample] , p.dist_in , distrange);
-      } else {
-        shape=findShape( m_refid , sample , Ein     , m_letaCalo[sample] , p.dist_in , distrange);
-      }  
-      if(shape) {
-        if(msgLvl(MSG::DEBUG)) {
-          msg(MSG::DEBUG)<<"found shape : "<<shape->GetName()<<" dmin="<<shape->distmin()<<"dmax="<<shape->distmax()<<" corr=[";
-          for(unsigned int icorr=0;icorr<shape->m_correction.size();++icorr) {
-            if(icorr>0) msg()<<";";
-            msg()<<shape->m_correction[icorr]->GetName();
-          }
-          msg()<<"]"<<endmsg;
+      // Now scale relative energy response to particle energy
+      p.E_layer[sample]*=Ein*m_sampling_energy_reweighting[sample];
+      ATH_MSG_DEBUG("============= E"<<sample<<"="<<p.E_layer[sample]<<" =============");
+
+      double E_orig=p.E_layer[sample];
+      double Et_orig=E_orig/cosh(m_eta_calo_surf);
+      // Add energy to lost energy couner, if all deposit goes OK, subtract it again...
+      m_E_lost_sample[sample]+=E_orig;
+      m_Et_lost_sample[sample]+=Et_orig;
+
+      if(p.E_layer[sample]>0 && (!isnan(p.E_layer[sample])) && fabs(m_letaCalo[sample])<5.0) {
+        ATH_MSG_DEBUG("E"<<sample<<"="<<p.E_layer[sample]<<" d="<<m_dCalo[sample]);
+
+        // Calculate estimates for cell energy fluctuations. Should be updated with better numbers
+        double smaple_err=0.1;
+        if(sample>=CaloCell_ID_FCS::PreSamplerB && sample<=CaloCell_ID_FCS::EME3    ) smaple_err=0.1; //LAr      10%/sqrt(E)
+        if(sample>=CaloCell_ID_FCS::HEC0        && sample<=CaloCell_ID_FCS::TileExt2) smaple_err=0.5; //hadronic 50%/sqrt(E) ???
+        if(sample>=CaloCell_ID_FCS::FCAL0       && sample<=CaloCell_ID_FCS::FCAL2   ) smaple_err=1.0; //FCAL    100%/sqrt(E) ???
+
+        // Find parametrization for the lateral shape distribution in the sample
+        TShape_Result* shape;
+        if(m_jo_interpolate) {
+          shape=findShape( m_refid , sample , Epara_E , m_letaCalo[sample] , p.dist_in , distrange);
+        } else {
+          shape=findShape( m_refid , sample , Ein     , m_letaCalo[sample] , p.dist_in , distrange);
         }
-      } else {
-        if( !(sample>=CaloCell_ID_FCS::FCAL0 && sample<=CaloCell_ID_FCS::FCAL2) ) {
-          MSG::Level level=MSG::WARNING;
-          if(m_refid==13) level=MSG::DEBUG;
-          if(msgLvl(level)) {
-            ATH_MSG_LVL(level,"no shape found calosample="<<sample<<" Elayer="<<E_orig);
-            ATH_MSG_LVL(level," - "<<particle_info_str.str());
-            ATH_MSG_LVL(level," - Ecal/Ein="<<p.Ecal<<" E/Ein="<<p.E<<" E="<<p.E*Ein
-                        <<" din="<<p.dist_in<<" dist000="<<p.dist000<<" drec="<<p.dist_rec);
-          }      
-        }  
-      }
-      
-      ATH_MSG_DEBUG("  m_letaCalo="<<m_letaCalo[sample]<<" m_lphiCalo="<<m_lphiCalo[sample]);
-      double fcx=m_letaCalo[sample];
-      double fcy=m_lphiCalo[sample];
-      double direction_factor=0.0;
-      double distfactor = 0.0;
-      //double distsign = 1.;
-      
-      TVector3 truth;  // added (25.5.2009)
-      truth.SetPtEtaPhi(1.,m_letaCalo[sample],m_lphiCalo[sample]);// added (25.5.2009)
-      double ang_alpha = truth.Angle(truth_direction);  // added (25.5.2009)
-      double ang_gamma = z_direction.Angle(truth);// added (25.5.2009)
-      int sign =1;// added (25.5.2009)
-      if(TMath::Abs(ang_beta) > TMath::Abs(ang_gamma)){
-        sign= -1;// added (25.5.2009) 
-        ang_beta = TMath::Pi() - ang_beta;
-      }
-      direction_factor = (TMath::Sin(ang_alpha)/TMath::Sin(ang_beta));
-      
-      double lookup_letaCalo=fcx;
-      double lookup_lphiCalo=fcy;
-      
-      /*          direction_factor = 0;  */ 
-      if(shape!=0) {
-        distfactor = 2*(p.dist_in-shape->distmin())/(shape->distmax()-shape->distmin())-1;
-        if(distfactor > 1.) distfactor =1.;
-        if(distfactor < -1.) distfactor =-1.;
-        //if(distfactor < 0.) distsign = -1.;
-        // calculate position of shower in calo
-        fcx=shape->eta_center(m_letaCalo[sample]/*,distsign*distfactor*/,direction_factor*sign);
-        fcy=shape->phi_center(m_lphiCalo[sample]);
-        lookup_letaCalo=fcx;
-        lookup_lphiCalo=fcy;
-        m_distetaCaloBorder[sample]=deta((CaloCell_ID_FCS::CaloSample)sample,fcx);
-        double mineta,maxeta;
-        minmaxeta((CaloCell_ID_FCS::CaloSample)sample,fcx,mineta,maxeta);
-        
-        // correct shower position in calo, if it is outside the calo layer boundaries
-        // TODO: Apply relocation of shape to overlap with active calo also if no shape function is found
-        if(m_distetaCaloBorder[sample]>0) {
-          double bordereta=maxeta;
-          if(fcx<mineta) bordereta=mineta;
-          lookup_letaCalo=bordereta;
-          double eta_jakobi=shape->eta_jakobi_factor(bordereta);
-          //TODO: m_dCalo[sample] should not be taken, better dcalo at mineta/maxeta
-          double cutoff_eta=shape->cutoff_eta()/(eta_jakobi*m_dCalo[sample]);
-          double newetaCaloBorder=cutoff_eta/2;
+        if(shape) {
           if(msgLvl(MSG::DEBUG)) {
-            msg(MSG::DEBUG)<<"  fcx="<<fcx<<" fcy="<<fcy<<" mineta="<<mineta<<" maxeta="<<maxeta<<" deta_border="
-                           <<m_distetaCaloBorder[sample]<<" bordereta="<<bordereta<<" eta_jakobi="<<eta_jakobi
-                           <<" cutoff_eta [mm]="<<shape->cutoff_eta()<<" dcalo="<<m_dCalo[sample]
-                           <<" shapesize="<<cutoff_eta<<" aim deta_border="<<newetaCaloBorder;
-          }  
-          if(m_distetaCaloBorder[sample]>newetaCaloBorder) {
-            double olddeta=m_distetaCaloBorder[sample];
-            double oldletaCalo=m_letaCalo[sample];
-            double oldfcx=fcx;
-            double delta=m_distetaCaloBorder[sample]-newetaCaloBorder;
-            
-            if(fcx<mineta) {
-              fcx+=delta;
-            } else if(fcx>maxeta) {
-              fcx-=delta;
+            msg(MSG::DEBUG)<<"found shape : "<<shape->GetName()<<" dmin="<<shape->distmin()<<"dmax="<<shape->distmax()<<" corr=[";
+            for(unsigned int icorr=0;icorr<shape->m_correction.size();++icorr) {
+              if(icorr>0) msg()<<";";
+              msg()<<shape->m_correction[icorr]->GetName();
             }
-            m_letaCalo[sample]=fcx;
-            
-            /* Causing to big steps!!!
-               if(fcx<mineta) {
-               while(fcx<mineta){ 
-               m_letaCalo[sample]+=delta;
-               fcx=shape->eta_center(m_letaCalo[sample],direction_factor*sign);
-               }
-               } else if(fcx>maxeta) {
-               while(fcx>maxeta){ 
-               m_letaCalo[sample]-=delta;
-               fcx=shape->eta_center(m_letaCalo[sample],direction_factor*sign);
-               }                
-               }
-
-               fcx=shape->eta_center(m_letaCalo[sample],direction_factor*sign);
-            */
-
-            m_distetaCaloBorder[sample]=deta((CaloCell_ID_FCS::CaloSample)sample,fcx);
+            msg()<<"]"<<endmsg;
+          }
+        } else {
+          if( !(sample>=CaloCell_ID_FCS::FCAL0 && sample<=CaloCell_ID_FCS::FCAL2) ) {
+            MSG::Level level=MSG::WARNING;
+            if(m_refid==13) level=MSG::DEBUG;
+            if(msgLvl(level)) {
+              ATH_MSG_LVL(level,"no shape found calosample="<<sample<<" Elayer="<<E_orig);
+              ATH_MSG_LVL(level," - "<<particle_info_str.str());
+              ATH_MSG_LVL(level," - Ecal/Ein="<<p.Ecal<<" E/Ein="<<p.E<<" E="<<p.E*Ein
+                          <<" din="<<p.dist_in<<" dist000="<<p.dist000<<" drec="<<p.dist_rec);
+            }
+          }
+        }
+
+        ATH_MSG_DEBUG("  m_letaCalo="<<m_letaCalo[sample]<<" m_lphiCalo="<<m_lphiCalo[sample]);
+        double fcx=m_letaCalo[sample];
+        double fcy=m_lphiCalo[sample];
+        double direction_factor=0.0;
+        double distfactor = 0.0;
+        //double distsign = 1.;
+
+        TVector3 truth;  // added (25.5.2009)
+        truth.SetPtEtaPhi(1.,m_letaCalo[sample],m_lphiCalo[sample]);// added (25.5.2009)
+        double ang_alpha = truth.Angle(truth_direction);  // added (25.5.2009)
+        double ang_gamma = z_direction.Angle(truth);// added (25.5.2009)
+        int sign =1;// added (25.5.2009)
+        if(TMath::Abs(ang_beta) > TMath::Abs(ang_gamma)){
+          sign= -1;// added (25.5.2009)
+          ang_beta = TMath::Pi() - ang_beta;
+        }
+        direction_factor = (TMath::Sin(ang_alpha)/TMath::Sin(ang_beta));
+
+        double lookup_letaCalo=fcx;
+        double lookup_lphiCalo=fcy;
+
+        /*          direction_factor = 0;  */
+        if(shape!=0) {
+          distfactor = 2*(p.dist_in-shape->distmin())/(shape->distmax()-shape->distmin())-1;
+          if(distfactor > 1.) distfactor =1.;
+          if(distfactor < -1.) distfactor =-1.;
+          //if(distfactor < 0.) distsign = -1.;
+          // calculate position of shower in calo
+          fcx=shape->eta_center(m_letaCalo[sample]/*,distsign*distfactor*/,direction_factor*sign);
+          fcy=shape->phi_center(m_lphiCalo[sample]);
+          lookup_letaCalo=fcx;
+          lookup_lphiCalo=fcy;
+          m_distetaCaloBorder[sample]=deta((CaloCell_ID_FCS::CaloSample)sample,fcx);
+          double mineta,maxeta;
+          minmaxeta((CaloCell_ID_FCS::CaloSample)sample,fcx,mineta,maxeta);
+
+          // correct shower position in calo, if it is outside the calo layer boundaries
+          // TODO: Apply relocation of shape to overlap with active calo also if no shape function is found
+          if(m_distetaCaloBorder[sample]>0) {
+            double bordereta=maxeta;
+            if(fcx<mineta) bordereta=mineta;
+            lookup_letaCalo=bordereta;
+            double eta_jakobi=shape->eta_jakobi_factor(bordereta);
+            //TODO: m_dCalo[sample] should not be taken, better dcalo at mineta/maxeta
+            double cutoff_eta=shape->cutoff_eta()/(eta_jakobi*m_dCalo[sample]);
+            double newetaCaloBorder=cutoff_eta/2;
             if(msgLvl(MSG::DEBUG)) {
-              msg(MSG::DEBUG)<<" new deta="<<m_distetaCaloBorder[sample]<<endmsg;
-            }  
-            
-            if(m_distetaCaloBorder[sample]>olddeta) {
-              ATH_MSG_WARNING("repositioned cell impact, but deta increased!!!! stay with the old...");
-              m_distetaCaloBorder[sample]=olddeta;
-              m_letaCalo[sample]=oldletaCalo;
-              fcx=oldfcx;
-            }  
+              msg(MSG::DEBUG)<<"  fcx="<<fcx<<" fcy="<<fcy<<" mineta="<<mineta<<" maxeta="<<maxeta<<" deta_border="
+                             <<m_distetaCaloBorder[sample]<<" bordereta="<<bordereta<<" eta_jakobi="<<eta_jakobi
+                             <<" cutoff_eta [mm]="<<shape->cutoff_eta()<<" dcalo="<<m_dCalo[sample]
+                             <<" shapesize="<<cutoff_eta<<" aim deta_border="<<newetaCaloBorder;
+            }
+            if(m_distetaCaloBorder[sample]>newetaCaloBorder) {
+              double olddeta=m_distetaCaloBorder[sample];
+              double oldletaCalo=m_letaCalo[sample];
+              double oldfcx=fcx;
+              double delta=m_distetaCaloBorder[sample]-newetaCaloBorder;
+
+              if(fcx<mineta) {
+                fcx+=delta;
+              } else if(fcx>maxeta) {
+                fcx-=delta;
+              }
+              m_letaCalo[sample]=fcx;
+
+              /* Causing to big steps!!!
+                 if(fcx<mineta) {
+                 while(fcx<mineta){
+                 m_letaCalo[sample]+=delta;
+                 fcx=shape->eta_center(m_letaCalo[sample],direction_factor*sign);
+                 }
+                 } else if(fcx>maxeta) {
+                 while(fcx>maxeta){
+                 m_letaCalo[sample]-=delta;
+                 fcx=shape->eta_center(m_letaCalo[sample],direction_factor*sign);
+                 }
+                 }
+
+                 fcx=shape->eta_center(m_letaCalo[sample],direction_factor*sign);
+              */
+
+              m_distetaCaloBorder[sample]=deta((CaloCell_ID_FCS::CaloSample)sample,fcx);
+              if(msgLvl(MSG::DEBUG)) {
+                msg(MSG::DEBUG)<<" new deta="<<m_distetaCaloBorder[sample]<<endmsg;
+              }
+
+              if(m_distetaCaloBorder[sample]>olddeta) {
+                ATH_MSG_WARNING("repositioned cell impact, but deta increased!!!! stay with the old...");
+                m_distetaCaloBorder[sample]=olddeta;
+                m_letaCalo[sample]=oldletaCalo;
+                fcx=oldfcx;
+              }
+            } else {
+              msg(MSG::DEBUG)<<endmsg;
+            }
           } else {
-            msg(MSG::DEBUG)<<endmsg;
-          }  
-        } else {
-          ATH_MSG_DEBUG("  fcx="<<fcx<<" fcy="<<fcy<<" mineta="<<mineta<<" maxeta="<<maxeta<<" deta="<<m_distetaCaloBorder[sample]);
+            ATH_MSG_DEBUG("  fcx="<<fcx<<" fcy="<<fcy<<" mineta="<<mineta<<" maxeta="<<maxeta<<" deta="<<m_distetaCaloBorder[sample]);
+          }
+
+          if(m_storeFastShowerInfo) shape->SetDebugInfo(sample, fastshowerinfo); // old version: fastshowerinfo->SetTShapeResult( sample, *shape );
+
         }
-        
-        if(m_storeFastShowerInfo) shape->SetDebugInfo(sample, fastshowerinfo); // old version: fastshowerinfo->SetTShapeResult( sample, *shape );
-        
-      }
-      
-      if(m_storeFastShowerInfo) fastshowerinfo->SetCaloInfo(sample, fcx, fcy, m_letaCalo[sample], m_lphiCalo[sample]);
-      
-      if(fabs(lookup_letaCalo)>5.0) {
-        lookup_letaCalo*=4.99/fabs(lookup_letaCalo);
-      }
-            
-      // Ugly code: does a fast lookup which cells should be considered to be filled with energy
-      int iphi=m_celllist_maps[sample].phi_to_index(lookup_lphiCalo);
-      int ieta=m_celllist_maps[sample].eta_to_index(lookup_letaCalo);
-      cellinfo_map::cellinfo_vec& vec=m_celllist_maps[sample].vec(ieta,iphi);
-      int n_cells=vec.size();
-      
-      ATH_MSG_DEBUG("  n_cells=" <<n_cells);
-      
-      std::vector< const CaloDetDescrElement* > theDDE;
-      std::vector< double > E_theDDE;
-      theDDE.reserve(n_cells);
-      E_theDDE.reserve(n_cells);
-      
-      for(int icell=0;icell<n_cells;++icell) {
-        const CaloDetDescrElement* newcell=vec[icell].first;
-        theDDE[icell]=newcell;
-        E_theDDE[icell]=0;
-      }  
-      
-      double elayertot=0;
-      int ibestcell=-1;
-      double bestdist=100000000000.0;
-      CLHEP::Hep3Vector truthimpact;
-      truthimpact.setREtaPhi(1,fcx,fcy);
-      truthimpact.setMag(m_dCalo[sample]);
-      
-      if(shape==0) {
-        // If no shape is found, find the hit cell and deposit all energy in the hit cell
+
+        if(m_storeFastShowerInfo) fastshowerinfo->SetCaloInfo(sample, fcx, fcy, m_letaCalo[sample], m_lphiCalo[sample]);
+
+        if(fabs(lookup_letaCalo)>5.0) {
+          lookup_letaCalo*=4.99/fabs(lookup_letaCalo);
+        }
+
+        // Ugly code: does a fast lookup which cells should be considered to be filled with energy
+        int iphi=m_celllist_maps[sample].phi_to_index(lookup_lphiCalo);
+        int ieta=m_celllist_maps[sample].eta_to_index(lookup_letaCalo);
+        cellinfo_map::cellinfo_vec& vec=m_celllist_maps[sample].vec(ieta,iphi);
+        int n_cells=vec.size();
+
+        ATH_MSG_DEBUG("  n_cells=" <<n_cells);
+
+        std::vector< const CaloDetDescrElement* > theDDE;
+        std::vector< double > E_theDDE;
+        theDDE.reserve(n_cells);
+        E_theDDE.reserve(n_cells);
+
         for(int icell=0;icell<n_cells;++icell) {
-          const CaloDetDescrElement* cell=theDDE[icell];
-          double dist;
-          if( sample>=CaloCell_ID_FCS::FCAL0 && sample<=CaloCell_ID_FCS::FCAL2 ) {
-            double distx=( cell->x() - truthimpact.x() )/cell->dx();
-            double disty=( cell->y() - truthimpact.y() )/cell->dy();
-            dist=sqrt( distx*distx + disty*disty );
-          } else {
+          const CaloDetDescrElement* newcell=vec[icell].first;
+          theDDE[icell]=newcell;
+          E_theDDE[icell]=0;
+        }
+
+        double elayertot=0;
+        int ibestcell=-1;
+        double bestdist=100000000000.0;
+        CLHEP::Hep3Vector truthimpact;
+        truthimpact.setREtaPhi(1,fcx,fcy);
+        truthimpact.setMag(m_dCalo[sample]);
+
+        if(shape==0) {
+          // If no shape is found, find the hit cell and deposit all energy in the hit cell
+          for(int icell=0;icell<n_cells;++icell) {
+            const CaloDetDescrElement* cell=theDDE[icell];
+            double dist;
+            if( sample>=CaloCell_ID_FCS::FCAL0 && sample<=CaloCell_ID_FCS::FCAL2 ) {
+              double distx=( cell->x() - truthimpact.x() )/cell->dx();
+              double disty=( cell->y() - truthimpact.y() )/cell->dy();
+              dist=sqrt( distx*distx + disty*disty );
+            } else {
+              double disteta=( cell->eta() - truthimpact.eta() )/cell->deta();
+              double distphi=( cell->phi() - truthimpact.phi() )/cell->dphi();
+              dist=sqrt( disteta*disteta + distphi*distphi );
+            }
+            if(dist<bestdist || ibestcell<0) {
+              bestdist=dist;
+              ibestcell=icell;
+            }
+          }
+          if(ibestcell>=0) {
+            double subetot=1;
+            E_theDDE[ibestcell]=subetot;
+            elayertot+=subetot;
+
+            const CaloDetDescrElement* cell=theDDE[ibestcell];
+            if( !(sample>=CaloCell_ID_FCS::FCAL0 && sample<=CaloCell_ID_FCS::FCAL2) && m_refid!=13) {
+              ATH_MSG_WARNING("best cell found for calosample "<<sample<<" eta="<<m_letaCalo[sample]<<" phi="<<m_lphiCalo[sample]
+                              <<" ceta="<<cell->eta()<<" cphi="<<cell->phi()
+                              <<" cdeta="<<cell->deta()<<" cdphi="<<cell->dphi()<<" bd="<<bestdist);
+            } else {
+              ATH_MSG_DEBUG  ("best cell found for calosample "<<sample<<" eta="<<m_letaCalo[sample]<<" phi="<<m_lphiCalo[sample]
+                              <<" ceta="<<cell->eta()<<" cphi="<<cell->phi()
+                              <<" cdeta="<<cell->deta()<<" cdphi="<<cell->dphi()<<" bd="<<bestdist);
+            }
+
+          }
+        } else {
+          //if a shape is found, find the hit cell and do eta position fine correction
+          for(int icell=0;icell<n_cells;++icell) {
+            const CaloDetDescrElement* cell=theDDE[icell];
             double disteta=( cell->eta() - truthimpact.eta() )/cell->deta();
-            double distphi=( cell->phi() - truthimpact.phi() )/cell->dphi();
-            dist=sqrt( disteta*disteta + distphi*distphi );
+            double distphi=TVector2::Phi_mpi_pi( cell->phi() - truthimpact.phi() )/cell->dphi();
+            double dist=sqrt( disteta*disteta + distphi*distphi );
+            if(dist<bestdist) {
+              bestdist=dist;
+              ibestcell=icell;
+            }
           }
-          if(dist<bestdist || ibestcell<0) {
-            bestdist=dist;
-            ibestcell=icell;
+          double fcx_fine_corr=fcx ;
+          double cellpos=0 ;
+          if(ibestcell < 0 ) {
+            ATH_MSG_WARNING("NO BEST CELL FOUND ");
+            ATH_MSG_WARNING(" - calosample="<<sample<<" Elayer="<<E_orig);
+            ATH_MSG_WARNING(" - id="<<pdgid<<" eta="<<m_letaCalo[sample]<<" phi="<<m_lphiCalo[sample]);
+            ATH_MSG_WARNING(" - Ein="<<Ein<<" Ecal/Ein="<<p.Ecal<<" E/Ein="<<p.E<<" E="<<p.E*Ein
+                            <<" din="<<p.dist_in<<" dist000="<<p.dist000<<" drec="<<p.dist_rec);
+            ATH_MSG_WARNING(" - fcx="<<fcx<<" fcy="<<fcy);
+
+          }
+          const CaloDetDescrElement* cell_hit=0;
+          if(ibestcell >= 0){
+            cell_hit= theDDE[ibestcell];
+            cellpos = (fcx - cell_hit->eta() + cell_hit->deta()/2 )/ cell_hit->deta();
+            cellpos = cellpos - floor(cellpos);
+            while(cellpos < 0) cellpos =cellpos+ 1.;
+            while(cellpos > 1) cellpos =cellpos -1.;
+            fcx_fine_corr = fcx_fine_corr  +shape->reldeta_dist()*sin(cellpos*2*TMath::Pi())  ;
+
+            ATH_MSG_DEBUG("  fcx_fine="<<fcx_fine_corr<<" fcx="<<fcx<<" direction_factor*sign="<<direction_factor*sign);
+          }
+
+          // 1st loop over all cells and calculate the relative energy content in each cell
+          for(int icell=0;icell<n_cells;++icell) {
+            const CaloDetDescrElement* cell=theDDE[icell];
+
+            double Einwide;
+            double Ecell=shape->CellIntegralEtaPhi(*cell,m_letaCalo[sample],m_lphiCalo[sample],Einwide,fcx_fine_corr,fcy,direction_factor*sign);
+
+            //              if(icell<20) log << MSG::DEBUG <<"  ("<<icell<<") ceta="<<cell->eta()<<" cphi="<<cell->phi()<<" E="<<Ecell<<" Einwide="<<Einwide<<endmsg;
+            if(Einwide<=0) {
+              E_theDDE[icell]=0;
+              continue;
+            }
+
+            if(shape->HasCellFactor() && cell_hit) {
+              float disteta=                    ( cell->eta() - cell_hit->eta() )/cell_hit->deta();
+              float distphi=TVector2::Phi_mpi_pi( cell->phi() - cell_hit->phi() )/cell_hit->dphi();
+              long int idisteta=lroundf(disteta);
+              long int idistphi=lroundf(distphi);
+              //log << MSG::DEBUG <<"  ("<<icell<<") ceta="<<cell->eta()<<" cphi="<<cell->phi()<<" E="<<Ecell<<" Einwide="<<Einwide<<" deta="<<disteta<<"="<<idisteta<<" dphi="<<distphi<<"="<<idistphi<<endmsg;
+
+              for(unsigned int icorr=0;icorr<shape->m_correction.size();++icorr) {
+                if(shape->m_correction[icorr]->HasCellFactor()) {
+                  Ecell*=shape->m_correction[icorr]->cellfactor(idisteta,idistphi);
+                }
+              }
+            }
+
+            double subetot=Ecell;
+
+            E_theDDE[icell]=subetot;
+            elayertot+=subetot;
+
+            if(m_storeFastShowerInfo) fastshowerinfo->AddCellSubETot( sample, subetot, cell->identify().get_identifier32().get_compact());
+          }
+          if(ibestcell>=0) {
+            elayertot-= E_theDDE[ibestcell];
+            E_theDDE[ibestcell]*=(1+ shape->reletascale()*fabs(direction_factor));
+            elayertot+=E_theDDE[ibestcell];
+            const CaloDetDescrElement* cell=theDDE[ibestcell];
+            double eta_jakobi=TMath::Abs( 2.0*TMath::Exp(-cell->eta())/(1.0+TMath::Exp(-2*cell->eta())) );
+            //  double phi_dist2r=1.0/TMath::CosH(fcx);
+            double phi_dist2r=1.0;
+            double dist000=TMath::Sqrt(cell->r()*cell->r()+cell->z()*cell->z());
+            double celldx=cell->deta()*eta_jakobi*dist000;
+            double celldy=cell->dphi()*phi_dist2r*cell->r();
+            ATH_MSG_DEBUG("center cell found for calosample "<<sample<<" eta="<<m_letaCalo[sample]<<" phi="<<m_lphiCalo[sample]
+                          <<" ceta="<<cell->eta()<<" cphi="<<cell->phi()<<" bd="<<bestdist
+                          <<" cdeta="<<cell->deta()<<" cdphi="<<cell->dphi()<<" cdx="<<celldx<<" cdy="<<celldy<<" r="<<cell->r()<<" d="<<dist000);
           }
         }
-        if(ibestcell>=0) {
-          double subetot=1;
-          E_theDDE[ibestcell]=subetot;
-          elayertot+=subetot;
-          
-          const CaloDetDescrElement* cell=theDDE[ibestcell];
-          if( !(sample>=CaloCell_ID_FCS::FCAL0 && sample<=CaloCell_ID_FCS::FCAL2) && m_refid!=13) {
-            ATH_MSG_WARNING("best cell found for calosample "<<sample<<" eta="<<m_letaCalo[sample]<<" phi="<<m_lphiCalo[sample]
-                            <<" ceta="<<cell->eta()<<" cphi="<<cell->phi()
-                            <<" cdeta="<<cell->deta()<<" cdphi="<<cell->dphi()<<" bd="<<bestdist);
-          } else {
-            ATH_MSG_DEBUG  ("best cell found for calosample "<<sample<<" eta="<<m_letaCalo[sample]<<" phi="<<m_lphiCalo[sample]
-                            <<" ceta="<<cell->eta()<<" cphi="<<cell->phi()
-                            <<" cdeta="<<cell->deta()<<" cdphi="<<cell->dphi()<<" bd="<<bestdist);
-          }  
-          
-        }  
-      } else {
-        //if a shape is found, find the hit cell and do eta position fine correction
-        for(int icell=0;icell<n_cells;++icell) {
-          const CaloDetDescrElement* cell=theDDE[icell];
-          double disteta=( cell->eta() - truthimpact.eta() )/cell->deta();
-          double distphi=TVector2::Phi_mpi_pi( cell->phi() - truthimpact.phi() )/cell->dphi();
-          double dist=sqrt( disteta*disteta + distphi*distphi );
-          if(dist<bestdist) {
-            bestdist=dist;
-            ibestcell=icell;
+
+        if(elayertot<=0) {
+          MSG::Level level=MSG::DEBUG;
+          if(Et_orig>500) level=MSG::WARNING;
+          if(msgLvl(level)) {
+            msg(level)<< "calosample "<<sample<<" : no energy dep around truth impact ("<<m_letaCalo[sample]<<"/"<<fcx<<"/"<<lookup_letaCalo<<";"<<m_lphiCalo[sample]<<"/"<<fcy<<"/"<<lookup_lphiCalo<<"), E("<<sample<<")="<<E_orig<<", Et("<<sample<<")="<<Et_orig<<endmsg;
+            msg(level)<< " - "<<particle_info_str.str()<<endmsg;
+            msg(level)<< " - ";
+            if(shape) msg() << level << "parametrization  : "<< shape->GetTitle()<<", ";
+            msg() << level << "skip sample..."<<endmsg;
           }
+          continue;
         }
-        double fcx_fine_corr=fcx ;
-        double cellpos=0 ;
-        if(ibestcell < 0 ) {
-          ATH_MSG_WARNING("NO BEST CELL FOUND ");
-          ATH_MSG_WARNING(" - calosample="<<sample<<" Elayer="<<E_orig);
-          ATH_MSG_WARNING(" - id="<<pdgid<<" eta="<<m_letaCalo[sample]<<" phi="<<m_lphiCalo[sample]);
-          ATH_MSG_WARNING(" - Ein="<<Ein<<" Ecal/Ein="<<p.Ecal<<" E/Ein="<<p.E<<" E="<<p.E*Ein
-                          <<" din="<<p.dist_in<<" dist000="<<p.dist000<<" drec="<<p.dist_rec);
-          ATH_MSG_WARNING(" - fcx="<<fcx<<" fcy="<<fcy);
-          
+
+        if(shape) {
+          ATH_MSG_DEBUG(shape->GetTitle()<<": cutoff="<<shape->cutoff_eta()<<" dmin="<<shape->distmin()<<" dmax="<<shape->distmax());
         }
-        const CaloDetDescrElement* cell_hit=0;
-        if(ibestcell >= 0){
-          cell_hit= theDDE[ibestcell];
-          cellpos = (fcx - cell_hit->eta() + cell_hit->deta()/2 )/ cell_hit->deta();
-          cellpos = cellpos - floor(cellpos);
-          while(cellpos < 0) cellpos =cellpos+ 1.;
-          while(cellpos > 1) cellpos =cellpos -1.;
-          fcx_fine_corr = fcx_fine_corr  +shape->reldeta_dist()*sin(cellpos*2*TMath::Pi())  ;
-          
-          ATH_MSG_DEBUG("  fcx_fine="<<fcx_fine_corr<<" fcx="<<fcx<<" direction_factor*sign="<<direction_factor*sign);
+
+        ATH_MSG_DEBUG("sample "<<sample<<" etot="<<p.E_layer[sample]<<" elayertot="<<elayertot);
+        double elayertot2=0;
+
+        // 2nd loop over all cells: renormalize to total energy in layer and apply cell fluctuations
+        for(int icell=0;icell<n_cells;++icell) {
+          //          const CaloDetDescrElement* cell=theDDE[i][icell];
+          double ecell=E_theDDE[icell]*p.E_layer[sample]/elayertot;
+          if(ecell<=0) continue;
+          //          log<<MSG::DEBUG<<"layer "<<i<<" cell eta="<<cell->eta()<<" phi="<<cell->phi()<<" Eorg="<<ecell;
+
+          /*
+            if(ecell/p.E_layer[sample]>0.01) {
+            const CaloDetDescrElement* cell=theDDE[icell];
+            log << MSG::DEBUG <<" ceta="<<cell->eta()<<" cphi="<<cell->phi()<<" E="<<ecell;
+            if(ibestcell) {
+            const CaloDetDescrElement* bestcell=theDDE[ibestcell];
+            log <<" dhit :deta="<<cell->eta()-bestcell->eta()<<" dphi="<<TVector2::Phi_mpi_pi( cell->phi() - bestcell->phi() );
+            }
+            log <<endmsg;
+            }
+          */
+
+          double rndfactor=-1;
+          while(rndfactor<=0) rndfactor=CLHEP::RandGaussZiggurat::shoot(m_randomEngine,1.0,smaple_err/sqrt(ecell/1000));
+          ecell*=rndfactor;
+          //          if(ecell<0) ecell=0;
+          //          log<<" Esmear="<<ecell<<endmsg;
+          elayertot2+=ecell;
+          E_theDDE[icell]=ecell;
+
+          if(m_storeFastShowerInfo) fastshowerinfo->AddCellEErrorCorrected(sample, ecell );
         }
-        
-        // 1st loop over all cells and calculate the relative energy content in each cell
+        double elayertot3=0;
+        // 3rd loop over all cells: renormalize to total energy in layer again and deposit energy in the calo
         for(int icell=0;icell<n_cells;++icell) {
           const CaloDetDescrElement* cell=theDDE[icell];
-          
-          double Einwide;
-          double Ecell=shape->CellIntegralEtaPhi(*cell,m_letaCalo[sample],m_lphiCalo[sample],Einwide,fcx_fine_corr,fcy,direction_factor*sign);
-          
-          //              if(icell<20) log << MSG::DEBUG <<"  ("<<icell<<") ceta="<<cell->eta()<<" cphi="<<cell->phi()<<" E="<<Ecell<<" Einwide="<<Einwide<<endmsg;
-          if(Einwide<=0) {
-            E_theDDE[icell]=0;
-            continue;
-          } 
-            
-          if(shape->HasCellFactor() && cell_hit) {
-            float disteta=                    ( cell->eta() - cell_hit->eta() )/cell_hit->deta();
-            float distphi=TVector2::Phi_mpi_pi( cell->phi() - cell_hit->phi() )/cell_hit->dphi();
-            long int idisteta=lroundf(disteta);
-            long int idistphi=lroundf(distphi);
-            //log << MSG::DEBUG <<"  ("<<icell<<") ceta="<<cell->eta()<<" cphi="<<cell->phi()<<" E="<<Ecell<<" Einwide="<<Einwide<<" deta="<<disteta<<"="<<idisteta<<" dphi="<<distphi<<"="<<idistphi<<endmsg;
-                
-            for(unsigned int icorr=0;icorr<shape->m_correction.size();++icorr) {
-              if(shape->m_correction[icorr]->HasCellFactor()) {
-                Ecell*=shape->m_correction[icorr]->cellfactor(idisteta,idistphi);
-              }
-            }
+          double ecell=E_theDDE[icell]*p.E_layer[sample]/elayertot2;
+          if(ecell==0) continue;
+          elayertot3+=ecell;
+
+          // is there a other way to get a non const pointer?
+          CaloCell* theCaloCell=(CaloCell*)(theCellContainer->findCell(cell->calo_hash()));
+          if(theCaloCell) {
+            //            log << MSG::VERBOSE << "found calo cell : eta=" <<theCaloCell->caloDDE()->eta()<<" phi="<<theCaloCell->caloDDE()->phi()<<" overlap="<<iter->second<<"old e=" <<theCaloCell->energy()<< " ; new e=" <<theCaloCell->energy()+energy*iter->second<< endmsg;
+            theCaloCell->setEnergy(theCaloCell->energy()+ecell);
+
+            if(m_storeFastShowerInfo) fastshowerinfo->AddCellEFinal(sample, ecell );
+          } else {
+            ATH_MSG_WARNING("det_elm found eta=" <<cell->eta()<<" phi="<<cell->phi()<<" hash="<<cell->calo_hash()
+                            << " : e=" <<ecell<< " not filled!!! doing nothing!!!");
+            //            theCaloCell=new CaloCell(cell,ecell,0,1,CaloGain::UNKNOWNGAIN);
+            //            theCellContainer->push_back(theCaloCell);
+
+            if(m_storeFastShowerInfo) fastshowerinfo->AddCellEFinal(sample);
           }
-          
-          double subetot=Ecell;
-            
-          E_theDDE[icell]=subetot;
-          elayertot+=subetot;
-          
-          if(m_storeFastShowerInfo) fastshowerinfo->AddCellSubETot( sample, subetot, cell->identify().get_identifier32().get_compact());
         }
-        if(ibestcell>=0) {
-          elayertot-= E_theDDE[ibestcell];
-          E_theDDE[ibestcell]*=(1+ shape->reletascale()*fabs(direction_factor));
-          elayertot+=E_theDDE[ibestcell];
-          const CaloDetDescrElement* cell=theDDE[ibestcell];
-          double eta_jakobi=TMath::Abs( 2.0*TMath::Exp(-cell->eta())/(1.0+TMath::Exp(-2*cell->eta())) );
-          //  double phi_dist2r=1.0/TMath::CosH(fcx);
-          double phi_dist2r=1.0;
-          double dist000=TMath::Sqrt(cell->r()*cell->r()+cell->z()*cell->z());
-          double celldx=cell->deta()*eta_jakobi*dist000;
-          double celldy=cell->dphi()*phi_dist2r*cell->r();
-          ATH_MSG_DEBUG("center cell found for calosample "<<sample<<" eta="<<m_letaCalo[sample]<<" phi="<<m_lphiCalo[sample]
-                        <<" ceta="<<cell->eta()<<" cphi="<<cell->phi()<<" bd="<<bestdist
-                        <<" cdeta="<<cell->deta()<<" cdphi="<<cell->dphi()<<" cdx="<<celldx<<" cdy="<<celldy<<" r="<<cell->r()<<" d="<<dist000);
+
+        if(fabs(E_orig - elayertot3)>0.1) {
+          ATH_MSG_ERROR("calosample "<<sample<<" : energy not fully deposited, E("<<sample<<")="<<E_orig<<", Et("<<sample<<")="<<Et_orig<<", deposit="<<elayertot3);
+          ATH_MSG_ERROR(" - "<<particle_info_str.str());
+          if(shape) ATH_MSG_ERROR("parametrization  : "<< shape->GetTitle());
         }
-      }
 
-      if(elayertot<=0) {
-        MSG::Level level=MSG::DEBUG;
-        if(Et_orig>500) level=MSG::WARNING;
-        if(msgLvl(level)) {
-          msg(level)<< "calosample "<<sample<<" : no energy dep around truth impact ("<<m_letaCalo[sample]<<"/"<<fcx<<"/"<<lookup_letaCalo<<";"<<m_lphiCalo[sample]<<"/"<<fcy<<"/"<<lookup_lphiCalo<<"), E("<<sample<<")="<<E_orig<<", Et("<<sample<<")="<<Et_orig<<endmsg;
-          msg(level)<< " - "<<particle_info_str.str()<<endmsg;
-          msg(level)<< " - ";
-          if(shape) msg() << level << "parametrization  : "<< shape->GetTitle()<<", ";
-          msg() << level << "skip sample..."<<endmsg;
-        }  
-        continue;
-      }
+        double et_elayertot3=elayertot3/cosh(m_eta_calo_surf);
 
-      if(shape) {
-        ATH_MSG_DEBUG(shape->GetTitle()<<": cutoff="<<shape->cutoff_eta()<<" dmin="<<shape->distmin()<<" dmax="<<shape->distmax());
-      }  
-      
-      ATH_MSG_DEBUG("sample "<<sample<<" etot="<<p.E_layer[sample]<<" elayertot="<<elayertot);
-      double elayertot2=0;
-      
-      // 2nd loop over all cells: renormalize to total energy in layer and apply cell fluctuations
-      for(int icell=0;icell<n_cells;++icell) {
-        //          const CaloDetDescrElement* cell=theDDE[i][icell];
-        double ecell=E_theDDE[icell]*p.E_layer[sample]/elayertot;
-        if(ecell<=0) continue;
-        //          log<<MSG::DEBUG<<"layer "<<i<<" cell eta="<<cell->eta()<<" phi="<<cell->phi()<<" Eorg="<<ecell;
-        
-        /*
-          if(ecell/p.E_layer[sample]>0.01) {
-          const CaloDetDescrElement* cell=theDDE[icell];
-          log << MSG::DEBUG <<" ceta="<<cell->eta()<<" cphi="<<cell->phi()<<" E="<<ecell;
-          if(ibestcell) {
-          const CaloDetDescrElement* bestcell=theDDE[ibestcell];
-          log <<" dhit :deta="<<cell->eta()-bestcell->eta()<<" dphi="<<TVector2::Phi_mpi_pi( cell->phi() - bestcell->phi() );
-          }
-          log <<endmsg;
-          }
-        */
-        
-        double rndfactor=-1;
-        while(rndfactor<=0) rndfactor=CLHEP::RandGaussZiggurat::shoot(m_randomEngine,1.0,smaple_err/sqrt(ecell/1000));
-        ecell*=rndfactor;
-        //          if(ecell<0) ecell=0;
-        //          log<<" Esmear="<<ecell<<endmsg;
-        elayertot2+=ecell;
-        E_theDDE[icell]=ecell;
-        
-        if(m_storeFastShowerInfo) fastshowerinfo->AddCellEErrorCorrected(sample, ecell );
-      }
-      double elayertot3=0;
-      // 3rd loop over all cells: renormalize to total energy in layer again and deposit energy in the calo
-      for(int icell=0;icell<n_cells;++icell) {
-        const CaloDetDescrElement* cell=theDDE[icell];
-        double ecell=E_theDDE[icell]*p.E_layer[sample]/elayertot2;
-        if(ecell==0) continue;
-        elayertot3+=ecell;
-          
-        // is there a other way to get a non const pointer?
-        CaloCell* theCaloCell=(CaloCell*)(theCellContainer->findCell(cell->calo_hash()));
-        if(theCaloCell) {
-          //            log << MSG::VERBOSE << "found calo cell : eta=" <<theCaloCell->caloDDE()->eta()<<" phi="<<theCaloCell->caloDDE()->phi()<<" overlap="<<iter->second<<"old e=" <<theCaloCell->energy()<< " ; new e=" <<theCaloCell->energy()+energy*iter->second<< endmsg;
-          theCaloCell->setEnergy(theCaloCell->energy()+ecell);
-          
-          if(m_storeFastShowerInfo) fastshowerinfo->AddCellEFinal(sample, ecell );
+        if(sample>=CaloCell_ID_FCS::PreSamplerB && sample<=CaloCell_ID_FCS::EME3) {
+          m_E_tot_em+=elayertot3;
+          m_Et_tot_em+=et_elayertot3;
+          //          simul_map_energy[part->barcode()]+=elayertot3;
+          //          simul_map_energyEM[part->barcode()]+=elayertot3;
         } else {
-          ATH_MSG_WARNING("det_elm found eta=" <<cell->eta()<<" phi="<<cell->phi()<<" hash="<<cell->calo_hash()
-                          << " : e=" <<ecell<< " not filled!!! doing nothing!!!");
-          //            theCaloCell=new CaloCell(cell,ecell,0,1,CaloGain::UNKNOWNGAIN);
-          //            theCellContainer->push_back(theCaloCell);
-          
-          if(m_storeFastShowerInfo) fastshowerinfo->AddCellEFinal(sample);
+          m_E_tot_had+=elayertot3;
+          m_Et_tot_had+=et_elayertot3;
+          //          simul_map_energy[part->barcode()]+=elayertot3;
+          //          simul_map_energyHAD[part->barcode()]+=elayertot3;
         }
-      }
-        
-      if(fabs(E_orig - elayertot3)>0.1) {
-        ATH_MSG_ERROR("calosample "<<sample<<" : energy not fully deposited, E("<<sample<<")="<<E_orig<<", Et("<<sample<<")="<<Et_orig<<", deposit="<<elayertot3);
-        ATH_MSG_ERROR(" - "<<particle_info_str.str());
-        if(shape) ATH_MSG_ERROR("parametrization  : "<< shape->GetTitle());
-      }
-      
-      double et_elayertot3=elayertot3/cosh(m_eta_calo_surf);
-      
-      if(sample>=CaloCell_ID_FCS::PreSamplerB && sample<=CaloCell_ID_FCS::EME3) {
-        m_E_tot_em+=elayertot3;
-        m_Et_tot_em+=et_elayertot3;
-        //          simul_map_energy[part->barcode()]+=elayertot3;
-        //          simul_map_energyEM[part->barcode()]+=elayertot3;
-      } else {
-        m_E_tot_had+=elayertot3;
-        m_Et_tot_had+=et_elayertot3;
-        //          simul_map_energy[part->barcode()]+=elayertot3;
-        //          simul_map_energyHAD[part->barcode()]+=elayertot3;
-      }  
-      m_E_tot_sample[sample]+=elayertot3;
-      m_Et_tot_sample[sample]+=et_elayertot3;
-      
-      m_E_lost_sample[sample]-=elayertot3;
-      m_Et_lost_sample[sample]-=et_elayertot3;
-      
-      ATH_MSG_DEBUG("sample "<<sample<<" etot="<<p.E_layer[sample]<<" e1="<<elayertot<<" e2="<<elayertot2<<" e3="<<elayertot3);
-      
-      if(m_storeFastShowerInfo) {
-        if(ibestcell>=0) {
-          fastshowerinfo->SetLayerInfo( sample, elayertot, elayertot2, elayertot3, theDDE[ibestcell]->eta(), theDDE[ibestcell]->phi(), (unsigned int)theDDE[ibestcell]->calo_hash() );
+        m_E_tot_sample[sample]+=elayertot3;
+        m_Et_tot_sample[sample]+=et_elayertot3;
+
+        m_E_lost_sample[sample]-=elayertot3;
+        m_Et_lost_sample[sample]-=et_elayertot3;
+
+        ATH_MSG_DEBUG("sample "<<sample<<" etot="<<p.E_layer[sample]<<" e1="<<elayertot<<" e2="<<elayertot2<<" e3="<<elayertot3);
+
+        if(m_storeFastShowerInfo) {
+          if(ibestcell>=0) {
+            fastshowerinfo->SetLayerInfo( sample, elayertot, elayertot2, elayertot3, theDDE[ibestcell]->eta(), theDDE[ibestcell]->phi(), (unsigned int)theDDE[ibestcell]->calo_hash() );
           } else {
-          fastshowerinfo->SetLayerInfo( sample, elayertot, elayertot2, elayertot3 );
-        }        
-      }
-    } else {
-      MSG::Level level=MSG::DEBUG;
-      bool is_debug=false;
-      if(fabs(m_letaCalo[sample])>5 && fabs(m_letaCalo[sample])<10) is_debug=true;
-      if(fabs(m_ptruth_eta)>4.9) is_debug=true;
-      if(Et_orig>100 && (!is_debug) ) level=MSG::WARNING;
-      if(Et_orig>1) {
-        ATH_MSG_LVL(level,"calosample "<<sample<<" : no eta on calo found for truth impact ("<<m_letaCalo[sample]<<","<<m_lphiCalo[sample]<<"), E("<<sample<<")="<<E_orig<<", Et("<<sample<<")="<<Et_orig);
-        ATH_MSG_LVL(level," - "<<particle_info_str.str());
-        ATH_MSG_LVL(level," - skip sample...");
+            fastshowerinfo->SetLayerInfo( sample, elayertot, elayertot2, elayertot3 );
+          }
+        }
+      } else {
+        MSG::Level level=MSG::DEBUG;
+        bool is_debug=false;
+        if(fabs(m_letaCalo[sample])>5 && fabs(m_letaCalo[sample])<10) is_debug=true;
+        if(fabs(m_ptruth_eta)>4.9) is_debug=true;
+        if(Et_orig>100 && (!is_debug) ) level=MSG::WARNING;
+        if(Et_orig>1) {
+          ATH_MSG_LVL(level,"calosample "<<sample<<" : no eta on calo found for truth impact ("<<m_letaCalo[sample]<<","<<m_lphiCalo[sample]<<"), E("<<sample<<")="<<E_orig<<", Et("<<sample<<")="<<Et_orig);
+          ATH_MSG_LVL(level," - "<<particle_info_str.str());
+          ATH_MSG_LVL(level," - skip sample...");
+        }
       }
-    }  
-  }
+    }
 
   if(m_storeFastShowerInfo) p.CopyDebugInfo( fastshowerinfo ); // old version: fastshowerinfo->SetParticleEnergyShape( p );
 
   if(m_storeFastShowerInfo)
-  {
-    ATH_MSG_DEBUG("Adding FastShowerInfoObject to the container");
-    m_FastShowerInfoContainer->push_back(fastshowerinfo);
-  }
- 
+    {
+      ATH_MSG_DEBUG("Adding FastShowerInfoObject to the container");
+      m_FastShowerInfoContainer->push_back(fastshowerinfo);
+    }
+
   return StatusCode::SUCCESS;
 }
 
 
 /*
-void FastShowerCellBuilderTool::print_par(const HepMC::GenParticle* par,MsgStream& log,int level)
-{
+  void FastShowerCellBuilderTool::print_par(const HepMC::GenParticle* par,MsgStream& log,int level)
+  {
   log.width(2*level);
   log<<MSG::INFO<<"";
   log<<"-> id="<<par->pdg_id()<<" stat="<<par->status()<<" bc="<<par->barcode();
@@ -1981,35 +1928,35 @@ void FastShowerCellBuilderTool::print_par(const HepMC::GenParticle* par,MsgStrea
   log<<" E="<<simul_sum_energy[par->barcode()]<<" E(EM)="<<simul_sum_energyEM[par->barcode()]<<" E(HAD)="<<simul_sum_energyHAD[par->barcode()]<<endmsg;
   HepMC::GenVertex* outver=par->end_vertex();
   if(outver) {
-    for(HepMC::GenVertex::particles_out_const_iterator pout=outver->particles_out_const_begin();pout!=outver->particles_out_const_end();++pout) {
-      print_par(*pout,log,level+1);
-    }
+  for(HepMC::GenVertex::particles_out_const_iterator pout=outver->particles_out_const_begin();pout!=outver->particles_out_const_end();++pout) {
+  print_par(*pout,log,level+1);
+  }
+  }
   }
-}
 */
 /*
-void FastShowerCellBuilderTool::sum_par(const HepMC::GenParticle* par,MsgStream& log,std::vector<double>& sums,int level)
-{
+  void FastShowerCellBuilderTool::sum_par(const HepMC::GenParticle* par,MsgStream& log,std::vector<double>& sums,int level)
+  {
   sums.resize(3);
   sums[0]=simul_map_energy[par->barcode()];
   sums[1]=simul_map_energyEM[par->barcode()];
   sums[2]=simul_map_energyHAD[par->barcode()];
-  
+
   HepMC::GenVertex* outver=par->end_vertex();
   if(outver) {
-    for(HepMC::GenVertex::particles_out_const_iterator pout=outver->particles_out_const_begin();pout!=outver->particles_out_const_end();++pout) {
-      std::vector<double> sumpar(3);
-      sum_par(*pout,log,sumpar,level+1);
-      sums[0]+=sumpar[0];
-      sums[1]+=sumpar[1];
-      sums[2]+=sumpar[2];
-    }
+  for(HepMC::GenVertex::particles_out_const_iterator pout=outver->particles_out_const_begin();pout!=outver->particles_out_const_end();++pout) {
+  std::vector<double> sumpar(3);
+  sum_par(*pout,log,sumpar,level+1);
+  sums[0]+=sumpar[0];
+  sums[1]+=sumpar[1];
+  sums[2]+=sumpar[2];
+  }
   }
 
   simul_sum_energy[par->barcode()]=sums[0];
   simul_sum_energyEM[par->barcode()]=sums[1];
   simul_sum_energyHAD[par->barcode()]=sums[2];
-}
+  }
 */
 
 bool FastShowerCellBuilderTool::Is_ID_Vertex(HepMC::GenVertex* ver)
@@ -2069,15 +2016,15 @@ FastShowerCellBuilderTool::flag_simul_sate FastShowerCellBuilderTool::Is_below_v
         ++ngamma;
       } else {
         if(absid==11) ++nele;
-         else ++nother;
+        else ++nother;
       }
       ++nout;
     }
-    if(abs(id_in)==11 && nout<=2 && nele==1 && nother==0) { 
+    if(abs(id_in)==11 && nout<=2 && nele==1 && nother==0) {
       //Bremsstrahlung, but bremsphoton might not be stored
       if(par_in->momentum().e()<500) return v14_truth_brems;
     }
-    if(id_in==22 && nout<=2 && nele>=1 && ngamma==0 && nother==0) { 
+    if(id_in==22 && nout<=2 && nele>=1 && ngamma==0 && nother==0) {
       //photon conversion to e+e-, but one e might not be stored
       if(par_in->momentum().e()<500) return v14_truth_conv;
     }
@@ -2106,14 +2053,14 @@ void MC_init_particle_simul_state(MCdo_simul_state& do_simul_state,const MCparti
       if(inver) {
         do_simul_state[inver->barcode()]=1;
       }
-    }  
+    }
   }
 }
 
 void MC_recursive_remove_out_particles(MCdo_simul_state& do_simul_state,HepMC::GenVertex* ver,FastShowerCellBuilderTool::flag_simul_sate simul_state)
 {
   if(ver) {
-//    if(do_simul_state[ver->barcode()]<=0) return;
+    //    if(do_simul_state[ver->barcode()]<=0) return;
     do_simul_state[ver->barcode()]=simul_state;
     for(HepMC::GenVertex::particles_out_const_iterator pout=ver->particles_out_const_begin();pout!=ver->particles_out_const_end();++pout) {
       const HepMC::GenParticle* par=*pout;
@@ -2142,70 +2089,70 @@ void MC_recursive_remove_in_particles(MCdo_simul_state& do_simul_state,HepMC::Ge
 }
 
 /*
-void print_MC_info(MCdo_simul_state& do_simul_state,const MCparticleCollection& particles,MsgStream& log)
-{
+  void print_MC_info(MCdo_simul_state& do_simul_state,const MCparticleCollection& particles,MsgStream& log)
+  {
   log << MSG::VERBOSE <<"print_MC_info: begin"<< endmsg;
   MCparticleCollectionCIter ip;
   for(ip=particles.begin();ip<particles.end();++ip){
-    const HepMC::GenParticle* par=*ip;
-
-    if(log.level()<=MSG::DEBUG) {
-      std::string reason="---";
-      if(do_simul_state[par->barcode()]<=0) {
-        if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::out_of_ID) reason="-ID";
-        if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::non_EM_vertex) reason="-EM";
-        if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::heavy_ion) reason="-HI";
-        if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::pdg_id_unkown) reason="-PI";
-        if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::invisibleArray) reason="-IA";
-        if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::invisibleTruthHelper) reason="-IT";
-        if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::mother_particle) reason="-MO";
-        if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::v14_truth_brems) reason="-BR";
-        if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::v14_truth_conv) reason="-CO";
-      } else {
-        reason="+OK";
-      }  
-      log << MSG::DEBUG<<reason;
+  const HepMC::GenParticle* par=*ip;
+
+  if(log.level()<=MSG::DEBUG) {
+  std::string reason="---";
+  if(do_simul_state[par->barcode()]<=0) {
+  if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::out_of_ID) reason="-ID";
+  if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::non_EM_vertex) reason="-EM";
+  if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::heavy_ion) reason="-HI";
+  if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::pdg_id_unkown) reason="-PI";
+  if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::invisibleArray) reason="-IA";
+  if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::invisibleTruthHelper) reason="-IT";
+  if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::mother_particle) reason="-MO";
+  if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::v14_truth_brems) reason="-BR";
+  if(do_simul_state[par->barcode()]==FastShowerCellBuilderTool::v14_truth_conv) reason="-CO";
+  } else {
+  reason="+OK";
+  }
+  log << MSG::DEBUG<<reason;
+
+  log <<": "<<"bc="<<par->barcode()<<" id="<<par->pdg_id()<<" stat="<<par->status()<<" pt="<<par->momentum().perp()<<" eta="<<par->momentum().eta()<<" phi="<<par->momentum().phi();
+  HepMC::GenVertex*  inver =par->production_vertex();
+  HepMC::GenVertex* outver =par->end_vertex();
+  if(inver) {
+  double inr=inver->position().perp();
+  double inz=inver->position().z();
+  log<<" ; r="<<inr<<" z="<<inz<<" phi="<<inver->position().phi()<<" ; ";
+  bool sep=false;
+  for(HepMC::GenVertex::particles_in_const_iterator pin=inver->particles_in_const_begin();pin!=inver->particles_in_const_end();++pin) {
+  const HepMC::GenParticle* invpar=*pin;
+  if(invpar) {
+  if(sep) log<<",";
+  log<<invpar->barcode();
+  if(do_simul_state[invpar->barcode()]<=0) log<<"-";
+  else log<<"+";
+  sep=true;
+  }
+  }
+  }
+  log<<"->"<<par->barcode();
+  if(outver) {
+  log<<"->";
+  bool sep=false;
+  for(HepMC::GenVertex::particles_out_const_iterator pout=outver->particles_out_const_begin();pout!=outver->particles_out_const_end();++pout) {
+  const HepMC::GenParticle* outpar=*pout;
+  if(outpar) {
+  if(sep) log<<",";
+  log<<outpar->barcode();
+  if(do_simul_state[outpar->barcode()]<=0) log<<"-";
+  else log<<"+";
+  sep=true;
+  }
+  }
+  }
+  log<<endmsg;
+  }
+  }
 
-      log <<": "<<"bc="<<par->barcode()<<" id="<<par->pdg_id()<<" stat="<<par->status()<<" pt="<<par->momentum().perp()<<" eta="<<par->momentum().eta()<<" phi="<<par->momentum().phi();
-      HepMC::GenVertex*  inver =par->production_vertex();
-      HepMC::GenVertex* outver =par->end_vertex();
-      if(inver) {
-        double inr=inver->position().perp();
-        double inz=inver->position().z();
-        log<<" ; r="<<inr<<" z="<<inz<<" phi="<<inver->position().phi()<<" ; ";
-        bool sep=false;
-        for(HepMC::GenVertex::particles_in_const_iterator pin=inver->particles_in_const_begin();pin!=inver->particles_in_const_end();++pin) {
-          const HepMC::GenParticle* invpar=*pin;
-          if(invpar) {
-            if(sep) log<<",";
-            log<<invpar->barcode();
-            if(do_simul_state[invpar->barcode()]<=0) log<<"-";
-             else log<<"+";
-            sep=true;
-          }  
-        }
-      }
-      log<<"->"<<par->barcode();
-      if(outver) {
-        log<<"->";
-        bool sep=false;
-        for(HepMC::GenVertex::particles_out_const_iterator pout=outver->particles_out_const_begin();pout!=outver->particles_out_const_end();++pout) {
-          const HepMC::GenParticle* outpar=*pout;
-          if(outpar) {
-            if(sep) log<<",";
-            log<<outpar->barcode();
-            if(do_simul_state[outpar->barcode()]<=0) log<<"-";
-             else log<<"+";
-            sep=true;
-          }  
-        }
-      }  
-      log<<endmsg;
-    }
-  }        
-  
   log << MSG::VERBOSE <<"print_MC_info: end"<< endmsg;
-}
+  }
 */
 
 void FastShowerCellBuilderTool::MC_remove_out_of_ID(MCdo_simul_state& do_simul_state,const MCparticleCollection& particles)
@@ -2226,16 +2173,16 @@ void FastShowerCellBuilderTool::MC_remove_out_of_ID(MCdo_simul_state& do_simul_s
               if(do_simul_state[invpar->barcode()]>0) {
                 ++nin;
                 break;
-              }  
+              }
             }
           }
 
           if(nin>0) {
             MC_recursive_remove_out_particles(do_simul_state,inver,out_of_ID);
-          }  
+          }
         }
       }
-    }  
+    }
   }
 }
 
@@ -2250,12 +2197,12 @@ void FastShowerCellBuilderTool::MC_remove_out_of_EM(MCdo_simul_state& do_simul_s
       HepMC::GenVertex* outver =par->end_vertex();
       if(outver) {
         if(outver->barcode()>=-200000) continue;
-        
+
         if(!Is_EM_Vertex(outver)) {
           MC_recursive_remove_out_particles(do_simul_state,outver,non_EM_vertex);
         }
       }
-    }  
+    }
   }
 }
 
@@ -2270,13 +2217,13 @@ void FastShowerCellBuilderTool::MC_remove_below_v14_truth_cuts(MCdo_simul_state&
       HepMC::GenVertex* outver =par->end_vertex();
       if(outver) {
         if(outver->barcode()>=-200000) continue;
-        
+
         flag_simul_sate reason=Is_below_v14_truth_cuts_Vertex(outver);
         if(reason<0) {
           MC_recursive_remove_out_particles(do_simul_state,outver,reason);
         }
       }
-    }  
+    }
   }
 }
 
@@ -2292,31 +2239,31 @@ void MC_remove_decay_to_simul(MCdo_simul_state& do_simul_state,const MCparticleC
       if(inver) {
         MC_recursive_remove_in_particles(do_simul_state,inver,FastShowerCellBuilderTool::mother_particle);
       }
-    }  
+    }
   }
 }
 
 void FastShowerCellBuilderTool::init_shape_correction()
 {
   if(m_shape_correction.size()==0) return;
-  
+
   ATH_MSG_INFO("Assigning shape correction functions...");
   for(t_map_PSP_ID::iterator iter_id=m_map_ParticleShapeParametrizationMap.begin();
-                             iter_id!=m_map_ParticleShapeParametrizationMap.end();
-                           ++iter_id) {
+      iter_id!=m_map_ParticleShapeParametrizationMap.end();
+      ++iter_id) {
     for(t_map_PSP_calosample::iterator iter_cs=iter_id->second.begin();
-                                       iter_cs!=iter_id->second.end();
-                                     ++iter_cs) {
+        iter_cs!=iter_id->second.end();
+        ++iter_cs) {
       for(t_map_PSP_Energy::iterator iter_E=iter_cs->second.begin();
-                                     iter_E!=iter_cs->second.end();
-                                   ++iter_E) {
+          iter_E!=iter_cs->second.end();
+          ++iter_E) {
         int n_assign=0;
         for(t_map_PSP_DistEta::iterator iter_disteta=iter_E->second.begin();
-                                        iter_disteta<iter_E->second.end();
-                                      ++iter_disteta) {
+            iter_disteta<iter_E->second.end();
+            ++iter_disteta) {
           for(t_shape_correction::iterator corr=m_shape_correction.begin();
-                                           corr<m_shape_correction.end();
-                                         ++corr) {
+              corr<m_shape_correction.end();
+              ++corr) {
             if((*corr)->is_match((*iter_disteta)->id(),
                                  (*iter_disteta)->calosample(),
                                  (*iter_disteta)->E(),
@@ -2326,11 +2273,11 @@ void FastShowerCellBuilderTool::init_shape_correction()
               ++n_assign;
             }
           }
-        } 
+        }
         if(n_assign>0) {
           ATH_MSG_DEBUG("  ID="<<iter_id->first<< " calosample="<<iter_cs->first<< " E="<<iter_E->first
-                      <<" : #shape corrections="<<n_assign);
-        }  
+                        <<" : #shape corrections="<<n_assign);
+        }
       }
     }
   }
@@ -2342,36 +2289,36 @@ StatusCode FastShowerCellBuilderTool::process(CaloCellContainer* theCellContaine
     init_shape_correction();
     m_is_init_shape_correction=true;
   }
-  
+
   ATH_MSG_DEBUG("Executing start calo size=" <<theCellContainer->size()<<" Event="<<m_nEvent);
-  
+
   if(setupEvent().isFailure() ) {
-   ATH_MSG_ERROR("setupEvent() failed");
-   return StatusCode::FAILURE;
+    ATH_MSG_ERROR("setupEvent() failed");
+    return StatusCode::FAILURE;
   }
 
   //FastCaloSimIsGenSimulStable ifs;
   //TruthHelper::IsGenNonInteracting invisible;
-  
+
   MCparticleCollection particles;
   MCparticleCollection Simulparticles;
   MCdo_simul_state     do_simul_state;
 
   const McEventCollection* mcCollptr;
   if ( evtStore()->retrieve(mcCollptr, m_mcLocation).isFailure() ) {
-     ATH_MSG_ERROR("Could not retrieve McEventCollection");
-     return StatusCode::FAILURE;
+    ATH_MSG_ERROR("Could not retrieve McEventCollection");
+    return StatusCode::FAILURE;
   }
 
   // initialize a pileup type helper object
   //PileUpType pileupType( mcCollptr );
- 
+
   ATH_MSG_DEBUG("Start getting particles");
- 
+
   // pileupType.signal_particles(particles, isStable);
   //pileupType.signal_particles(particles, ifs);
   //ZH 28.07.2014 Try using TruthUtils instead:
- 
+
   if (mcCollptr->size() >0)
     {
       HepMC::GenEvent::particle_const_iterator istart = mcCollptr->at(0)->particles_begin();
@@ -2384,7 +2331,7 @@ StatusCode FastShowerCellBuilderTool::process(CaloCellContainer* theCellContaine
       //std::cout <<std::endl;
     }
   particles = MC::filter_keep(particles, FastCaloSimIsGenSimulStable);
-  
+
 
   //sc = m_gentesIO->getMC(particles, &ifs, m_mcLocation );
   //if ( sc.isFailure() ) {
@@ -2401,14 +2348,14 @@ StatusCode FastShowerCellBuilderTool::process(CaloCellContainer* theCellContaine
     }
   } else {
     ATH_MSG_DEBUG("Could not find "<<m_MuonEnergyInCaloContainer<<" in SG ");
-  }  
+  }
 
   MC_init_particle_simul_state(do_simul_state,particles);
   if(m_simul_ID_only) MC_remove_out_of_ID(do_simul_state,particles);
   if(m_simul_ID_v14_truth_cuts) MC_remove_below_v14_truth_cuts(do_simul_state,particles);
   if(m_simul_EM_geant_only) MC_remove_out_of_EM(do_simul_state,particles);
   MC_remove_decay_to_simul(do_simul_state,particles);
-  
+
   MCparticleCollectionCIter ip;
   int indpar=0;
   ATH_MSG_DEBUG("start finding partilces n="<<particles.size());
@@ -2439,8 +2386,8 @@ StatusCode FastShowerCellBuilderTool::process(CaloCellContainer* theCellContaine
       if(range.first==range.second) {
         do_simul_state[par->barcode()]=0;
         ATH_MSG_DEBUG("#="<<indpar<<": id="<<par->pdg_id()<<" stat="<<par->status()<<" bc="<<par->barcode()
-                    <<" pt="<<par->momentum().perp()<<" eta="<<par->momentum().eta()<<" phi="<<par->momentum().phi()
-                    << " : no calo energy deposit");
+                      <<" pt="<<par->momentum().perp()<<" eta="<<par->momentum().eta()<<" phi="<<par->momentum().phi()
+                      << " : no calo energy deposit");
       } else {
         if(msgLvl(MSG::DEBUG)) {
           for(BarcodeEnergyDepositMap::iterator i=range.first;i!=range.second;++i) {
@@ -2452,8 +2399,8 @@ StatusCode FastShowerCellBuilderTool::process(CaloCellContainer* theCellContaine
             msg()<< endmsg;
           }
         }
-      } 
-    }  
+      }
+    }
 
     if(msgLvl(MSG::DEBUG)) {
       std::string reason="---";
@@ -2469,7 +2416,7 @@ StatusCode FastShowerCellBuilderTool::process(CaloCellContainer* theCellContaine
         if(do_simul_state[par->barcode()]==v14_truth_conv) reason="-CO";
       } else {
         reason="+OK";
-      }  
+      }
       msg(MSG::DEBUG)<<reason;
 
       msg()<<indpar<<": id="<<par->pdg_id()<<" stat="<<par->status()<<" pt="<<par->momentum().perp()<<" eta="<<par->momentum().eta()<<" phi="<<par->momentum().phi();
@@ -2486,7 +2433,7 @@ StatusCode FastShowerCellBuilderTool::process(CaloCellContainer* theCellContaine
             if(sep) msg()<<",";
             msg()<<invpar->barcode();
             sep=true;
-          }  
+          }
         }
       }
       msg()<<"->"<<par->barcode();
@@ -2499,37 +2446,37 @@ StatusCode FastShowerCellBuilderTool::process(CaloCellContainer* theCellContaine
             if(sep) msg()<<",";
             msg()<<outpar->barcode();
             sep=true;
-          }  
+          }
         }
-      }  
+      }
       msg()<<endmsg;
     }
 
     if(do_simul_state[par->barcode()]<=0) {
       continue;
     }
-    
+
     ++indpar;
-    
-//    if(DoParticleSimul(par,log)) {
+
+    //    if(DoParticleSimul(par,log)) {
     {
-//      log<<MSG::DEBUG<<"-> OK for simul"<<endmsg;
+      //      log<<MSG::DEBUG<<"-> OK for simul"<<endmsg;
       Simulparticles.push_back(par);
-//      if(Is_Particle_from_pdgid(par,log,15,1)) log<<MSG::INFO<<""<<endmsg;
-      
-//      deflectParticle(particlesAtCal,par);
-    }  
-  }        
+      //      if(Is_Particle_from_pdgid(par,log,15,1)) log<<MSG::INFO<<""<<endmsg;
+
+      //      deflectParticle(particlesAtCal,par);
+    }
+  }
   ATH_MSG_DEBUG("finished finding particles");
-  
+
   if(m_storeFastShowerInfo)
-  {
-    ATH_MSG_DEBUG("Creating and registering the FastShowerInfoContainer with key " << m_FastShowerInfoContainerKey);
-    m_FastShowerInfoContainer = new FastShowerInfoContainer();
-    evtStore()->record( m_FastShowerInfoContainer, m_FastShowerInfoContainerKey);
-//     log << MSG::DEBUG << m_storeGate->dump() << endmsg;
-  }
-  
+    {
+      ATH_MSG_DEBUG("Creating and registering the FastShowerInfoContainer with key " << m_FastShowerInfoContainerKey);
+      m_FastShowerInfoContainer = new FastShowerInfoContainer();
+      evtStore()->record( m_FastShowerInfoContainer, m_FastShowerInfoContainerKey);
+      //     log << MSG::DEBUG << m_storeGate->dump() << endmsg;
+    }
+
   MCparticleCollectionCIter fpart = Simulparticles.begin();
   MCparticleCollectionCIter lpart = Simulparticles.end();
 
@@ -2547,45 +2494,45 @@ StatusCode FastShowerCellBuilderTool::process(CaloCellContainer* theCellContaine
       ++stat_npar_nOK;
     } else {
       ++stat_npar_OK;
-    } 
+    }
 
     for(std::vector<Trk::HitInfo>::iterator it = hitVector->begin();it < hitVector->end();++it)  {
       if((*it).trackParms) {
         delete (*it).trackParms;
         (*it).trackParms=0;
-      }  
+      }
     }
     delete hitVector;
 
     ++stat_npar;
   }
   //std::cout <<"ZH Processed: "<<stat_npar<<"(ok: "<<stat_npar_nOK<<")"<<std::endl;
-/*
-  MCparticleCollection all_particles;
-  log <<MSG::DEBUG<<"Start getting all particles"<<endmsg;
-  sc = m_gentesIO->getMC(all_particles, m_mcLocation );
+  /*
+    MCparticleCollection all_particles;
+    log <<MSG::DEBUG<<"Start getting all particles"<<endmsg;
+    sc = m_gentesIO->getMC(all_particles, m_mcLocation );
 
-  if ( sc.isFailure() ) {
+    if ( sc.isFailure() ) {
     log << MSG::ERROR << "getMC from "<<m_mcLocation<<" failed "<< endmsg;
     return StatusCode::FAILURE;
-  }
-  
-  log <<MSG::INFO<<"Got all particles n="<<all_particles.size()<<endmsg;
-  for(ip=all_particles.begin(); ip<all_particles.end(); ++ip){
+    }
+
+    log <<MSG::INFO<<"Got all particles n="<<all_particles.size()<<endmsg;
+    for(ip=all_particles.begin(); ip<all_particles.end(); ++ip){
     const HepMC::GenParticle* par=*ip;
     if(abs(par->pdg_id())!=15) continue;
     std::vector<double> sums(3);
     sums[0]=sums[1]=sums[2]=0;
     sum_par(par,log,sums,0);
     print_par(par,log,0);
-  }
-*/          
+    }
+  */
 
   ATH_MSG_DEBUG("Executing finished calo size=" <<theCellContainer->size()<<"; "<<stat_npar<<" particle(s), "<<stat_npar_OK<<" with sc=SUCCESS");
 
   if(releaseEvent().isFailure() ) {
-   ATH_MSG_ERROR("releaseEvent() failed");
-   return StatusCode::FAILURE;
+    ATH_MSG_ERROR("releaseEvent() failed");
+    return StatusCode::FAILURE;
   }
 
   return StatusCode::SUCCESS;
@@ -2600,11 +2547,11 @@ StatusCode FastShowerCellBuilderTool::setupEvent()
   }
   gRandom->SetSeed(rseed);
   m_rndm->SetSeed(rseed);
-  
+
   //if(gRandom) log<<" seed(gRandom="<<gRandom->ClassName()<<")="<<gRandom->GetSeed();
   //if(m_rndm)  log<<" seed(m_rndm="<<m_rndm->ClassName()<<")="<<m_rndm->GetSeed();
   //log<< endmsg;
-  
+
   ++m_nEvent;
 
   m_E_tot_em=0;
@@ -2616,7 +2563,7 @@ StatusCode FastShowerCellBuilderTool::setupEvent()
     m_E_lost_sample[i]=0;
     m_Et_tot_sample[i]=0;
     m_Et_lost_sample[i]=0;
-  }  
+  }
 
   m_simul_map_energy.clear();
   m_simul_map_energyEM.clear();
@@ -2637,16 +2584,16 @@ StatusCode FastShowerCellBuilderTool::releaseEvent()
       ATH_MSG_WARNING("  Event summary sample "<<sample<<" : etlost="<<m_Et_lost_sample[sample]<<" elost="<<m_E_lost_sample[sample]);
     } else {
       ATH_MSG_DEBUG("  Event summary sample "<<sample<<" : etlost="<<m_Et_lost_sample[sample]<<" elost="<<m_E_lost_sample[sample]);
-    }  
-  }  
+    }
+  }
 
   return StatusCode::SUCCESS;
 }
 
 
 /*
-void FastShowerCellBuilderTool::deflectParticles(ITransportedParticleCollection &itpc)
-{
+  void FastShowerCellBuilderTool::deflectParticles(ITransportedParticleCollection &itpc)
+  {
   MsgStream log( msgSvc(), name() );
   log << MSG::DEBUG << "FastShowerCellBuilderTool deflectParticles()" << endmsg;
 
@@ -2662,16 +2609,16 @@ void FastShowerCellBuilderTool::deflectParticles(ITransportedParticleCollection
 
   MCparticleCollectionCIter ip= p.begin();
   for(; ip<p.end(); ++ip){
-    deflectParticle(itpc,*ip);
-  }        
-}
+  deflectParticle(itpc,*ip);
+  }
+  }
 
-void FastShowerCellBuilderTool::deflectParticle(Atlfast::ITransportedParticleCollection &itpc,const HepMC::GenParticle* par)
-{
+  void FastShowerCellBuilderTool::deflectParticle(Atlfast::ITransportedParticleCollection &itpc,const HepMC::GenParticle* par)
+  {
   ITransportedParticle *itp = new TransportedHelixParticle(par);
   itp->deflect();
   itpc.push_back(itp);
-}
+  }
 
 */
 
@@ -2680,9 +2627,9 @@ std::vector<Trk::HitInfo>* FastShowerCellBuilderTool::caloHits(const HepMC::GenP
   // Start calo extrapolation
   ATH_MSG_DEBUG ("[ fastCaloSim transport ] processing particle "<<part.pdg_id() );
 
-  std::vector<Trk::HitInfo>*     hitVector =  new std::vector<Trk::HitInfo>;   
+  std::vector<Trk::HitInfo>*     hitVector =  new std::vector<Trk::HitInfo>;
 
-  int     pdgId    = part.pdg_id(); 
+  int     pdgId    = part.pdg_id();
   double  charge   = HepPDT::ParticleID(pdgId).charge();
 
   // particle Hypothesis for the extrapolation
@@ -2699,7 +2646,7 @@ std::vector<Trk::HitInfo>* FastShowerCellBuilderTool::caloHits(const HepMC::GenP
 
   if (vtx) {
     //const HepMC::ThreeVector vtxPos(vtx->point3d());
-    pos = Amg::Vector3D( vtx->point3d().x(),vtx->point3d().y(), vtx->point3d().z()); 
+    pos = Amg::Vector3D( vtx->point3d().x(),vtx->point3d().y(), vtx->point3d().z());
   }
 
   ATH_MSG_DEBUG( "[ fastCaloSim transport ] starting transport from position "<< pos );
@@ -2709,8 +2656,8 @@ std::vector<Trk::HitInfo>* FastShowerCellBuilderTool::caloHits(const HepMC::GenP
   // input parameters : curvilinear parameters
   Trk::CurvilinearParameters inputPar(pos,mom,charge);
 
-  // stable vs. unstable check : ADAPT for FASTCALOSIM 
-  //double freepath = ( !m_particleDecayHelper.empty()) ? m_particleDecayHelper->freePath(isp) : - 1.; 
+  // stable vs. unstable check : ADAPT for FASTCALOSIM
+  //double freepath = ( !m_particleDecayHelper.empty()) ? m_particleDecayHelper->freePath(isp) : - 1.;
   double freepath = -1.;
   //ATH_MSG_VERBOSE( "[ fatras transport ] Particle free path : " << freepath);
   // path limit -> time limit  ( TODO : extract life-time directly from decay helper )
@@ -2721,16 +2668,16 @@ std::vector<Trk::HitInfo>* FastShowerCellBuilderTool::caloHits(const HepMC::GenP
   // beta calculated here for further use in validation
   double mass = m_particleMasses.mass[pHypothesis];
   double mom = isp.momentum().mag();
-  double beta = mom/sqrt(mom*mom+mass*mass); 
+  double beta = mom/sqrt(mom*mom+mass*mass);
 
   if ( tDec>0.) {
-    tDec = tDec/beta/CLHEP::c_light + isp.timeStamp();
-    decayProc = 201;                
+  tDec = tDec/beta/CLHEP::c_light + isp.timeStamp();
+  decayProc = 201;
   }
   */
 
   Trk::TimeLimit timeLim(tDec,0.,decayProc);        // TODO: set vertex time info
-  
+
   // prompt decay ( uncomment if unstable particles used )
   //if ( freepath>0. && freepath<0.01 ) {
   //  if (!m_particleDecayHelper.empty()) {
@@ -2743,8 +2690,8 @@ std::vector<Trk::HitInfo>* FastShowerCellBuilderTool::caloHits(const HepMC::GenP
   // presample interactions - ADAPT FOR FASTCALOSIM
   Trk::PathLimit pathLim(-1.,0);
   //if (absPdg!=999 && pHypothesis<99) pathLim = m_samplingTool->sampleProcess(mom,isp.charge(),pHypothesis);
-     
-  Trk::GeometrySignature nextGeoID=Trk::Calo; 
+
+  Trk::GeometrySignature nextGeoID=Trk::Calo;
 
   // first extrapolation to reach the ID boundary
 
@@ -2759,16 +2706,16 @@ std::vector<Trk::HitInfo>* FastShowerCellBuilderTool::caloHits(const HepMC::GenP
   if (m_caloEntrance && m_caloEntrance->inside(pos,0.001) &&
       !m_extrapolator->trackingGeometry()->atVolumeBoundary(pos,m_caloEntrance,0.001)) {
 
-    std::vector<Trk::HitInfo>*     dummyHitVector = 0;   
+    std::vector<Trk::HitInfo>*     dummyHitVector = 0;
     if ( charge==0 ) {
-    
+
       caloEntry = m_extrapolator->transportNeutralsWithPathLimit(inputPar,pathLim,timeLim,
-				        Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);  
- 
+                                                                 Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);
+
     } else {
-          
+
       caloEntry = m_extrapolator->extrapolateWithPathLimit(inputPar,pathLim,timeLim,
-					Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);
+                                                           Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);
     }
   } else caloEntry=&inputPar;
 
@@ -2777,28 +2724,27 @@ std::vector<Trk::HitInfo>* FastShowerCellBuilderTool::caloHits(const HepMC::GenP
     const Trk::TrackParameters* eParameters = 0;
 
     // save Calo entry hit (fallback info)
-    hitVector->push_back(Trk::HitInfo(caloEntry->clone(),timeLim.time,nextGeoID,0.));  
+    hitVector->push_back(Trk::HitInfo(caloEntry->clone(),timeLim.time,nextGeoID,0.));
 
     ATH_MSG_DEBUG( "[ fastCaloSim transport ] starting Calo transport from position "<< pos );
-    
+
     if ( charge==0 ) {
-    
+
       eParameters = m_extrapolator->transportNeutralsWithPathLimit(*caloEntry,pathLim,timeLim,
-					      Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);  
+                                                                   Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);
     } else {
-      
+
       eParameters = m_extrapolator->extrapolateWithPathLimit(*caloEntry,pathLim,timeLim,
-					      Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);   
+                                                             Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);
     }
 
     // save Calo exit hit (fallback info)
-    if (eParameters) hitVector->push_back(Trk::HitInfo(eParameters,timeLim.time,nextGeoID,0.)); 
-  
+    if (eParameters) hitVector->push_back(Trk::HitInfo(eParameters,timeLim.time,nextGeoID,0.));
+
     //delete eParameters;   // HitInfo took ownership
 
-  } 
-   
+  }
+
   return hitVector;
 
 }
- 
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.cxx
index 6ee7b3a918bed3889f962de51a5a1eaca99a830b..53d2f0bafc1379a678fd131c03594ae2d517520e 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.cxx
@@ -272,8 +272,6 @@ std::vector<Trk::HitInfo>* FastCaloSimCaloExtrapolation::caloHits(const TFCSTrut
         }
     }
 
-  std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
-
   std::vector<Trk::HitInfo>::iterator it2 = hitVector->begin();
   while(it2 < hitVector->end() )
     {
diff --git a/Tools/DirectIOART/README.md b/Tools/DirectIOART/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..de314f6af076e482fbbf94ea4182171a10e27015
--- /dev/null
+++ b/Tools/DirectIOART/README.md
@@ -0,0 +1,125 @@
+# DirectIOART - Testing direct I/O in recent ATLAS offline software releases using ART (rel21)
+## The DirectIOART package
+DirectIOART is a package meant for testing and monitoring file access via direct I/O in (almost) all recent *ATLAS* offline software releases (**only** release 21 and master) making use of the ART ([*ATLAS* Release Tester](https://twiki.cern.ch/twiki/bin/view/AtlasComputing/ART)) framework. Its tests range from simple `TFile::Open` command to more involved `Reco_tf.py` reconstruction or derivation tests as well as small analysis algorithms. Each test is performed three times, in order to test three different protocols:
+* **DAVS**  (davs://...)
+* **HTTPS**  (https://...)
+* **ROOT**  (root://...)
+
+#### Package structure
+The actual tests are implemented in small bash and python scripts stored in the `test/` folder. Some of them need additional code, namely athena job options, which can be found in the `share/` folder. The main directory contains a CMakeLists.txt file which does all the necessary configurations during build time.
+Detailed lists of the tests that are performed within the particular software releases and the input files are given below.
+##### Tests:
+* **TFile::Open** (using an AOD input file)
+  * master/Athena
+  * 21.0/Athena
+  * 21.0/AthSimulation
+  * 21.2/AthAnalysis
+  * 21.2/AthDerivation
+  * 21.2/AnalysisBase
+  * 21.2/AnalysisTop
+  * 21.3/Athena
+  * 21.9/Athena
+* **`Reco_tf.py`** with RAW input file:
+  * 21.0/Athena
+  * 21.0/AthenaMP
+* **`Reco_tf.py`** with RDO input file:
+  * 21.0/Athena
+  * 21.0/AthenaMP
+* **`Reco_tf.py`** with AOD input file:
+  * 21.2/AthDerivation
+* **Analysis algorithm (`ParticleSelectionAlg`)** with AOD input file:
+  * 21.2/AthAnalysis
+* **`xAODChecker`** with DAOD input files:
+  * 21.2/AnalysisBase
+
+**Note:** For each test three test scripts have been generated except for the  `TFile::Open` test. At the moment the DirectIOART package contains 25 tests in total that are individually submitted.
+
+##### Input files:
+* **AOD** input file:
+  * mc15_13TeV:AOD.05536542._000001.pool.root.1 from dataset mc15_13TeV:mc15_13TeV.423202.Pythia8B_A14_CTEQ6L1_Jpsie3e13.merge.AOD.e3869_s2608_s2183_r6630_r6264_tid05536542_00
+* **DAOD** input file:
+  * data18_13TeV:DAOD_MUON0.14316152._000001.pool.root.1 from dataset data18_13TeV:data18_13TeV.00348709.physics_Main.deriv.DAOD_MUON0.f937_m1972_p3553_tid14316152_00
+* **RAW** input file:
+  * data15_13TeV:data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data from dataset data15_13TeV:data15_13TeV.00284285.physics_Main.daq.RAW
+* **RDO** input file:
+  * mc16_13TeV:RDO.11373415._000001.pool.root.1 from dataset mc16_13TeV:mc16_13TeV.361108.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Ztautau.recon.RDO.e3601_s3126_r9546_tid11373415_00
+
+**Note:** All input files but one are stored in the ART input container (`user.artprod:user.artprod.input.container`), whereas the AOD file is from the Hammercloud input container (`hc_test:hc_test.aft`).
+#### Creating (new) ART tests
+All test scripts kept in `test/` can be produced with the `generateARTtests.py` python script. It contains all relevant TURLs used within the test scripts. So, in order to create entirely new tests or replace the current input files by other/newer ones, this can be easily done by just modifying `generateARTtests.py`. It also takes care of specifying which tests will be run by which software release. This can be done with the ART header keyword `# art-include:` followed by the respective branch and software project, e.g.
+```
+# art-include: 21.2/AthAnalysis
+```
+## Running in *ATLAS* nightlies
+After a nightly build is done, the athena repository is searched for all the available grid-type ART jobs which subsequently are submitted to the grid. This must **NOT** be done by users! All (including the sequence tag) is taken CARE of by gitlab-ci, so as a user you have nothing more to do but to get your tests into the athena repository.
+#### ART results
+Usually, the ART results are downloaded by request to a specific EOS area: `/eos/atlas/atlascerngroupdisk/data-art/grid-output/`.
+#### Displaying ART jobs
+All the necessary information for a given job, panda ID, job name, package name and nightly branch environment variables, are sent by ART to the bigpanda. The results from the grid jobs are displayed in the so-called [ART display](https://bigpanda.cern.ch/art/), where you can select a specific package, branch and nightly tag, respectively.
+## Running manually
+When developing new ART tests you might be interested in testing your code before submitting a new merge request and wait until your latest changes appear on the [ART display](https://bigpanda.cern.ch/art/). How to do so is shown to you by the following instructions.
+#### Setup
+To run the DirectIOART package by yourself, if you're not working on `lxplus`, first you have to set up the ATLAS user interface `ATLASLocalRootBase` (make sure your machine has access to `cvmfs`). In addition, set up git and PanDA before continuing with anything else (you will be needing it later on):
+```
+export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
+source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh
+lsetup git
+lsetup panda
+```
+Now, set up a new and clean work area. Therein, we need three empty folders:
+```
+mkdir TestingDirectIOART/
+cd TestingDirectIOART/
+mkdir build/ source/ run/
+```
+Afterwards, go to the `build/` directory and set up the *ATLAS* software release and version in which you want to launch your tests (as an example, we take **AthAnalysis**):
+```
+cd build/
+acmSetup 21.2,AthAnalysis,latest
+```
+For getting the DirectIOART git repository in there, do a "sparse checkout" of the athena repository with `acm` (requires forking the atlas/athena repository first, as described [here](https://atlassoftwaredocs.web.cern.ch/gittutorial/gitlab-fork)):
+```
+acm sparse_clone_project athena
+```
+This will create a working copy of the ATLAS Offline Git repository (it might take a while) and setup a sparse checkout but doesn’t check out any packages yet. It will also setup your personal fork of the athena repository as `origin` and the main repository as `upstream`. On top of that, `acm` makes sure that you are in the branch appropriate for the release you've set up locally and that everything is up-to-date with the upstream repository. Note that outside of `lxplus` you may have to do this sparse checkout differently (if you don't have a valid kerberos ticket for your CERN credentials), for example via ssh authentication (where `YOUR_GITLAB_NAME` is your gitlab user name):
+```
+acm sparse_clone_project ssh://git@gitlab.cern.ch:7999/YOUR_GITLAB_NAME/athena.git
+```
+
+In order to add the DirectIOART package to your checkout, execute
+```
+acm add_pkg athena/Tools/DirectIOART
+```
+This will checkout the DirectIOART package (the full path resolves to `Tools/DirectIOART/`), but leaves the other parts out of the work tree. Use `acm add_pkg` to add as many packages as you like and `acm rm_pkg` to remove them. Note that `acm` will also take care of any necessary entries in the `package_filters.txt` file, which is used by cmake to filter packages for the build.
+
+After that, you should compile your code, using
+```
+acm compile
+```
+
+After all this worked, go to the `run/` directory of your work area in order to launch the ART tests (as described in the following sections):
+```
+cd ../../run/
+```
+#### Validating ART tests
+Once the DirectIOART package has been properly setup, the test scripts can be validated by executing the following command:
+```
+art.py validate -v ../source/athena/Tools/DirectIOART
+```
+`"art.py"` calls the ART script which is doing all the hard work. As positional arguments you have to provide the path to the directory containing the `test/` folder with all the test scripts in it (e.g. `"../source/DirectIOART/"`). With the keyword `"validate"` the validation procedure will be initiated.  Finally, with the `"-v"` flag the verbosity is turned on in order to get a more detailed terminal output.
+#### Running locally
+For running the tests on your local machine, use the following command:
+```
+art.py run --type=grid -v ../source/athena/Tools/DirectIOART/ .
+```
+After calling `"art.py"`, the keyword `"run"` tells ART to run the tests locally. Again, the `"../source.DirectIOART/"` path has to be given, followed by the so-called sequence tag (`"."`) which in this case is just the current directory `run/`. This means, that all the output created by the ART test will go there. In addition, one has to specify the type of the ART tests, which is for the DirectIOART package `"grid"`.
+The results of all tests are written into a JSON file (`status.json`) containing information about the job (exit code, job name, etc.). Furthermore, for each test script an output directory is created, in which all detailed output (`stdout.txt`, `stderr.txt`, `PoolFileCatalog.xml`, output ROOT files, log files etc.) are stored. 
+#### Running on the grid
+In order to send jobs from the DirectIOART package to the grid instead of running them locally, type the following command:
+```
+art.py grid -v ../source/athena/Tools/DirectIOART/ DirectIOART_20180724_1
+```
+After calling `"art.py"`, the keyword `"grid"` tells ART to prepare for grid submission. Again, the `"../source.DirectIOART/"` path has to be given, but now with a sequence tag which is composed of, firstly, the package name, secondly, the submission date, and third, a counting index. Every `"art.py grid ..."` command will create a separate job containing all executed tests as single tasks. Actually, what the sequence tag looks like doesn't matter as long as it is unique, since it will be part of the grid job's output name as displayed on your [bigpanda](https://bigpanda.cern.ch/) page, e.g.:
+```
+user.flfische.atlas.21.2.AnalysisBase.x86_64-slc6-gcc62-opt.2018-07-04T0335.DirectIOART_20180706_2.DirectIOART/
+```
diff --git a/Tools/DirectIOART/generateARTtests.py b/Tools/DirectIOART/generateARTtests.py
index fcf07f297ea51b4086b4009ce26193aff4c0d011..59d29b1b1190c9107504c27c213f9fc3fcdca9b6 100755
--- a/Tools/DirectIOART/generateARTtests.py
+++ b/Tools/DirectIOART/generateARTtests.py
@@ -2,11 +2,18 @@
 
 import os
 
+DAOD_FILE = "data18_13TeV:DAOD_MUON0.14316152._000001.pool.root.1"
 RAW_FILE = "data15_13TeV:data15_13TeV.00284285.physics_Main.daq.RAW"
 RDO_FILE = "mc16_13TeV:mc16_13TeV.361108.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Ztautau.recon.RDO.e3601_s3126_r9546"
 HAMMERCLOUD_FILE = "mc15_13TeV.423202.Pythia8B_A14_CTEQ6L1_Jpsie3e13.merge.AOD.e3869_s2608_s2183_r6630_r6264" #NOTE: needs update to mc16(?)
 PROJECTS = ["AthAnalysis", "AthDerivation", "AthSimulation", "Athena", "AnalysisBase"]
 
+XAODCHECKER_TURLS = {
+  "ROOT"  : "root://lcg-lrz-rootd.grid.lrz.de:1094/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data18_13TeV/e6/c2/DAOD_MUON0.14316152._000001.pool.root.1", # LRZ-LMU,
+  "DAVS"  : "davs://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data18_13TeV/e6/c2/DAOD_MUON0.14316152._000001.pool.root.1",   # LRZ-LMU
+  "HTTPS" : "https://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data18_13TeV/e6/c2/DAOD_MUON0.14316152._000001.pool.root.1",  # LRZ-LMU
+}
+
 RECO_TF_TURLS = {
   "RDO" : (
     {"ROOT"  : "root://lcg-lrz-rootd.grid.lrz.de:1094/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/mc16_13TeV/90/96/RDO.11373415._000001.pool.root.1"}, # LRZ-LMU
@@ -22,7 +29,8 @@ RECO_TF_TURLS = {
 
 TFILE_OPEN_TURLs = [
   {"ROOT":
-    ("root://lcg-lrz-rootd.grid.lrz.de:1094/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",            # LRZ-LMU
+    (
+     "root://lcg-lrz-rootd.grid.lrz.de:1094/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",            # LRZ-LMU
      "root://grid-dc.rzg.mpg.de:1094//pnfs/rzg.mpg.de/data/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",                       # MPPMU
      "root://dcache-atlas-xrootd.desy.de:1094//pnfs/desy.de/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",                      # DESY-Hamburg
      "root://lcg-se0.ifh.de:1094//pnfs/ifh.de/data/atlas/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",                                   # DESY-Zeuthen
@@ -33,7 +41,8 @@ TFILE_OPEN_TURLs = [
     )
   },
   {"DAVS":
-    ("davs://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",             # LRZ-LMU
+    (
+     "davs://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",             # LRZ-LMU
      "davs://grid-dav.rzg.mpg.de:2880/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",                                           # MPPMU
      "davs://dcache-atlas-webdav.desy.de:2880/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",                                         # DESY-Hamburg
      "davs://lcg-se0.ifh.de:2880/pnfs/ifh.de/data/atlas/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",                                   # DESY-Zeuthen
@@ -44,7 +53,8 @@ TFILE_OPEN_TURLs = [
     )
   },
   {"HTTPS":
-    ("https://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",             # LRZ-LMU
+    (
+     "https://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",             # LRZ-LMU
      "https://grid-dav.rzg.mpg.de:2880/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",                                           # MPPMU
      "https://dcache-atlas-webdav.desy.de:2880/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",                                         # DESY-Hamburg
      "https://lcg-se0.ifh.de:2880/pnfs/ifh.de/data/atlas/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1",                                   # DESY-Zeuthen
@@ -61,15 +71,16 @@ def write_RecoTF(opts):
   if "Athena" in opts.athena_project:
     # loop over turl list of RDO input files
     for item in RECO_TF_TURLS["RDO"]:
-      name = os.path.join("test", "test_directioart_athena_recotf_with_rdo_" + item.keys()[0].lower() + ".sh")
-      print "\tGenerating ...",name
+      name = os.path.join("test", "test_directioart_athena_recotf_with_rdo_{}.sh".format(item.keys()[0].lower()))
+      print("\tGenerating ... {}".format(name))
       outfile = open(name,'w')
       # generate test scripts
       outstring = """#!/bin/bash\n
-# art-description: DirectIOART Athena inputFile:RDO protocol={protocol}
+# art-description: DirectIOART Athena Reco_tf.py inputFile:RDO protocol={protocol}
 # art-type: grid
 # art-output: *.pool.root
-# art-include: 21.0/Athena\n
+# art-include: 21.0/Athena
+# art-include: master/Athena\n
 set -e\n
 Reco_tf.py --AMI q221 --inputRDOFile {turl} --outputRDO_TRIGFile art.pool.root\n
 echo \"art-result: $? DirectIOART_Athena_RecoTF_inputRDO_protocol_{protocol}\"""".format(turl=item.values()[0], protocol=item.keys()[0])
@@ -78,15 +89,16 @@ echo \"art-result: $? DirectIOART_Athena_RecoTF_inputRDO_protocol_{protocol}\"""
       os.system("chmod +x " + name)
       # if AthenaMP
       if opts.mp:
-        name = os.path.join("test", "test_directioart_athenamp_recotf_with_rdo_" + item.keys()[0].lower() + ".sh")
-        print "\tGenerating ...",name
+        name = os.path.join("test", "test_directioart_athenamp_recotf_with_rdo_{}.sh".format(item.keys()[0].lower()))
+        print("\tGenerating ... {}".format(name))
         outfile = open(name,'w')
         # generate test scripts
         outstring = """#!/bin/bash\n
-# art-description: DirectIOART AthenaMP inputFile:RDO protocol={protocol}
+# art-description: DirectIOART AthenaMP Reco_tf.py inputFile:RDO protocol={protocol}
 # art-type: grid
 # art-output: *.pool.root
-# art-include: 21.0/Athena\n
+# art-include: 21.0/Athena
+# art-include: master/Athena\n
 set -e\n
 export ATHENA_PROC_NUMBER=2
 Reco_tf.py --AMI q221 --inputRDOFile {turl} --outputRDO_TRIGFile art.pool.root\n
@@ -97,15 +109,16 @@ echo \"art-result: $? DirectIOART_AthenaMP_RecoTF_inputRDO_protocol_{protocol}\"
     
     # loop over turl list if RAW input files
     for item in RECO_TF_TURLS["RAW"]:
-      name = os.path.join("test", "test_directioart_athena_recotf_with_raw_" + item.keys()[0].lower() + ".sh")
-      print "\tGenerating ...",name
+      name = os.path.join("test", "test_directioart_athena_recotf_with_raw_{}.sh".format(item.keys()[0].lower()))
+      print("\tGenerating ... {}".format(name))
       outfile = open(name,'w')
       # generate test scripts
       outstring = """#!/bin/bash\n
 # art-description: DirectIOART Athena Reco_tf.py inputFile:RAW protocol={protocol}
 # art-type: grid
 # art-output: *.pool.root
-# art-include: 21.0/Athena\n
+# art-include: 21.0/Athena
+# art-include: master/Athena\n
 set -e\n
 Reco_tf.py --AMI q431 --inputBSFile {turl} --outputESDFile art.pool.root\n
 echo \"art-result: $? DirectIOART_Athena_RecoTF_inputBS_protocol_{protocol}\"""".format(turl=item.values()[0], protocol=item.keys()[0])
@@ -114,15 +127,16 @@ echo \"art-result: $? DirectIOART_Athena_RecoTF_inputBS_protocol_{protocol}\""""
       os.system("chmod +x " + name)
       # if AthenaMP
       if opts.mp:
-        name = os.path.join("test", "test_directioart_athenamp_recotf_with_raw_" + item.keys()[0].lower() + ".sh")
-        print "\tGenerating ...",name
+        name = os.path.join("test", "test_directioart_athenamp_recotf_with_raw_{}.sh".format(item.keys()[0].lower()))
+        print("\tGenerating ... {}".format(name))
         outfile = open(name,'w')
         # generate test scripts
         outstring = """#!/bin/bash\n
 # art-description: DirectIOART AthenaMP Reco_tf.py inputFile:RAW protocol={protocol}
 # art-type: grid
 # art-output: *.pool.root
-# art-include: 21.0/Athena\n
+# art-include: 21.0/Athena
+# art-include: master/Athena\n
 set -e\n
 export ATHENA_PROC_NUMBER=2
 Reco_tf.py --AMI q431 --inputBSFile {turl} --outputESDFile art.pool.root\n
@@ -137,12 +151,12 @@ echo \"art-result: $? DirectIOART_AthenaMP_RecoTF_inputBS_protocol_{protocol}\""
     for i in xrange(len(TFILE_OPEN_TURLs)):
       # get values of dictionaries
       for key, value in TFILE_OPEN_TURLs[i].items():
-        name = os.path.join("test", "test_directioart_athderivation_recotf_with_aod_" + key.lower() + ".sh")
-        print "\tGenerating ...",name
+        name = os.path.join("test", "test_directioart_athderivation_recotf_with_aod_{}.sh".format(key.lower()))
+        print("\tGenerating ... {}".format(name))
         outfile = open(name,'w')
         # generate test scripts
         outstring = """#!/bin/bash\n
-# art-description: DirectIOART AthDerivation inputFile:RDO protocol={protocol} reductionConf:TEST1
+# art-description: DirectIOART AthDerivation Reco_tf.py inputFile:RDO protocol={protocol} reductionConf:TEST1
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.2/AthDerivation\n
@@ -158,8 +172,8 @@ def write_AthAnalysis_TestAlg():
   for i in xrange(len(TFILE_OPEN_TURLs)):
     # get values of dictionaries
     for key, value in TFILE_OPEN_TURLs[i].items():
-      name = os.path.join("test", "test_directioart_athanalysis_alg_" + key.lower() + ".sh")
-      print "\tGenerating ...",name
+      name = os.path.join("test", "test_directioart_athanalysis_alg_{}.sh".format(key.lower()))
+      print("\tGenerating ... {}".format(name))
       outfile = open(name,'w')
       # generate tests scripts
       outstring = """#!/bin/bash\n
@@ -174,15 +188,50 @@ echo \"art-result: $? DirectIOART_AthAnalysis_ParticleSelectionAlg_protocol_{pro
       outfile.close()
       os.system("chmod +x " + name)
 
+def write_AnalysisBase_xAODChecker():
+  #loop over turl list
+  for key, value in XAODCHECKER_TURLS.items():
+    name = os.path.join("test", "test_directioart_analysisbase_xaodchecker_{}.sh".format(key.lower()))
+    print("\tGenerating ... {}".format(name))
+    outfile = open(name,'w')
+    # generate test scripts
+    outstring = """#!/bin/bash\n
+# art-description: DirectIOART AnalysisBase xAODChecker protocol={protocol}
+# art-type: grid
+# art-include: 21.2/AnalysisBase\n
+set -e\n
+xAODChecker {turl}\n
+echo \"art-result: $? DirectIOART_AnalysisBase_xAODChecker_protocol_{protocol}\"\n
+PFC_FILE=PoolFileCatalog.xml
+touch $PFC_FILE
+echo \"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\" standalone=\\"no\\" ?>\" >> $PFC_FILE
+echo \"<!-- Edited By POOL -->\" >> $PFC_FILE
+echo \"<!DOCTYPE POOLFILECATALOG SYSTEM \\"InMemory\\">\" >> $PFC_FILE
+echo \"<POOLFILECATALOG>\" >> $PFC_FILE
+echo \"\" >> $PFC_FILE
+echo \"</POOLFILECATALOG>\" >> $PFC_FILE""".format(turl=value, protocol=key)
+    outfile.write(outstring)
+    outfile.close()
+    os.system("chmod +x " + name)
+
 def writeTFileOpen():
   name = os.path.join("test", "test_directioart_tfileopen.py")
-  print "\tGenerating ...",name
+  print("\tGenerating ... {}".format(name))
   outfile = open(name,'w')
 
   # generate frame of test scripts
   outstring = """#!/usr/bin/env python\n
 # art-description: DirectIOART TFile::Open
-# art-type: grid\n
+# art-type: grid
+# art-include master/Athena
+# art-include 21.0/Athena
+# art-include 21.0/AthSimulation
+# art-include 21.2/AthAnalysis
+# art-include 21.2/AthDerivation
+# art-include 21.2/AnalysisBase
+# art-include 21.2/AnalysisTop
+# art-include 21.3/Athena
+# art-include 21.9/Athena\n
 import ROOT
 import os\n"""
   # loop over turl list
@@ -251,9 +300,12 @@ def main():
   
   if "Athena" in opts.athena_project or "AthDerivation" in opts.athena_project:
     write_RecoTF(opts)
+  
+  if "AnalysisBase" in opts.athena_project:
+    write_AnalysisBase_xAODChecker()
 
 if __name__ == "__main__":
   try:
     main()
   except KeyboardInterrupt:
-    print "\nexiting"
\ No newline at end of file
+    print "\nexiting"
diff --git a/Tools/DirectIOART/test/test_directioart_analysisbase_xaodchecker_davs.sh b/Tools/DirectIOART/test/test_directioart_analysisbase_xaodchecker_davs.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c4306e3f52172c33b418c0a2a38d91fa4cbd38fc
--- /dev/null
+++ b/Tools/DirectIOART/test/test_directioart_analysisbase_xaodchecker_davs.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# art-description: DirectIOART AnalysisBase xAODChecker protocol=DAVS
+# art-type: grid
+# art-include: 21.2/AnalysisBase
+
+set -e
+
+xAODChecker davs://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data18_13TeV/e6/c2/DAOD_MUON0.14316152._000001.pool.root.1
+
+echo "art-result: $? DirectIOART_AnalysisBase_xAODChecker_protocol_DAVS"
+
+PFC_FILE=PoolFileCatalog.xml
+touch $PFC_FILE
+echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>" >> $PFC_FILE
+echo "<!-- Edited By POOL -->" >> $PFC_FILE
+echo "<!DOCTYPE POOLFILECATALOG SYSTEM \"InMemory\">" >> $PFC_FILE
+echo "<POOLFILECATALOG>" >> $PFC_FILE
+echo "" >> $PFC_FILE
+echo "</POOLFILECATALOG>" >> $PFC_FILE
\ No newline at end of file
diff --git a/Tools/DirectIOART/test/test_directioart_analysisbase_xaodchecker_https.sh b/Tools/DirectIOART/test/test_directioart_analysisbase_xaodchecker_https.sh
new file mode 100755
index 0000000000000000000000000000000000000000..73877cbec82db799c38f1d46a6daec5a27b82580
--- /dev/null
+++ b/Tools/DirectIOART/test/test_directioart_analysisbase_xaodchecker_https.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# art-description: DirectIOART AnalysisBase xAODChecker protocol=HTTPS
+# art-type: grid
+# art-include: 21.2/AnalysisBase
+
+set -e
+
+xAODChecker https://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data18_13TeV/e6/c2/DAOD_MUON0.14316152._000001.pool.root.1
+
+echo "art-result: $? DirectIOART_AnalysisBase_xAODChecker_protocol_HTTPS"
+
+PFC_FILE=PoolFileCatalog.xml
+touch $PFC_FILE
+echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>" >> $PFC_FILE
+echo "<!-- Edited By POOL -->" >> $PFC_FILE
+echo "<!DOCTYPE POOLFILECATALOG SYSTEM \"InMemory\">" >> $PFC_FILE
+echo "<POOLFILECATALOG>" >> $PFC_FILE
+echo "" >> $PFC_FILE
+echo "</POOLFILECATALOG>" >> $PFC_FILE
\ No newline at end of file
diff --git a/Tools/DirectIOART/test/test_directioart_analysisbase_xaodchecker_root.sh b/Tools/DirectIOART/test/test_directioart_analysisbase_xaodchecker_root.sh
new file mode 100755
index 0000000000000000000000000000000000000000..1f34aa4997935faf9596fb24755e13db106e2330
--- /dev/null
+++ b/Tools/DirectIOART/test/test_directioart_analysisbase_xaodchecker_root.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# art-description: DirectIOART AnalysisBase xAODChecker protocol=ROOT
+# art-type: grid
+# art-include: 21.2/AnalysisBase
+
+set -e
+
+xAODChecker root://lcg-lrz-rootd.grid.lrz.de:1094/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data18_13TeV/e6/c2/DAOD_MUON0.14316152._000001.pool.root.1
+
+echo "art-result: $? DirectIOART_AnalysisBase_xAODChecker_protocol_ROOT"
+
+PFC_FILE=PoolFileCatalog.xml
+touch $PFC_FILE
+echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>" >> $PFC_FILE
+echo "<!-- Edited By POOL -->" >> $PFC_FILE
+echo "<!DOCTYPE POOLFILECATALOG SYSTEM \"InMemory\">" >> $PFC_FILE
+echo "<POOLFILECATALOG>" >> $PFC_FILE
+echo "" >> $PFC_FILE
+echo "</POOLFILECATALOG>" >> $PFC_FILE
\ No newline at end of file
diff --git a/Tools/DirectIOART/test/test_directioart_athderivation_recotf_with_aod_davs.sh b/Tools/DirectIOART/test/test_directioart_athderivation_recotf_with_aod_davs.sh
index 288c053bc93ea789f53efeac3b3ec32ae6b31101..c32dfe35bd06a167b9621d2927a5e1a364c8f058 100755
--- a/Tools/DirectIOART/test/test_directioart_athderivation_recotf_with_aod_davs.sh
+++ b/Tools/DirectIOART/test/test_directioart_athderivation_recotf_with_aod_davs.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# art-description: DirectIOART AthDerivation inputFile:RDO protocol=DAVS reductionConf:TEST1
+# art-description: DirectIOART AthDerivation Reco_tf.py inputFile:RDO protocol=DAVS reductionConf:TEST1
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.2/AthDerivation
diff --git a/Tools/DirectIOART/test/test_directioart_athderivation_recotf_with_aod_https.sh b/Tools/DirectIOART/test/test_directioart_athderivation_recotf_with_aod_https.sh
index 9f6cc19967e8163ec2be950607ec96805a5ba4b3..4b4eabf1bfdbcf6b1f96bc00c782fb7fdef15d6e 100755
--- a/Tools/DirectIOART/test/test_directioart_athderivation_recotf_with_aod_https.sh
+++ b/Tools/DirectIOART/test/test_directioart_athderivation_recotf_with_aod_https.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# art-description: DirectIOART AthDerivation inputFile:RDO protocol=HTTPS reductionConf:TEST1
+# art-description: DirectIOART AthDerivation Reco_tf.py inputFile:RDO protocol=HTTPS reductionConf:TEST1
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.2/AthDerivation
diff --git a/Tools/DirectIOART/test/test_directioart_athderivation_recotf_with_aod_root.sh b/Tools/DirectIOART/test/test_directioart_athderivation_recotf_with_aod_root.sh
index 32f3acf361111c5ffa15c84e9aea18b980ed4e0a..b05d48e4add72c1dcc634d9e99873c0f5fab7c6c 100755
--- a/Tools/DirectIOART/test/test_directioart_athderivation_recotf_with_aod_root.sh
+++ b/Tools/DirectIOART/test/test_directioart_athderivation_recotf_with_aod_root.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# art-description: DirectIOART AthDerivation inputFile:RDO protocol=ROOT reductionConf:TEST1
+# art-description: DirectIOART AthDerivation Reco_tf.py inputFile:RDO protocol=ROOT reductionConf:TEST1
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.2/AthDerivation
diff --git a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_davs.sh b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_davs.sh
index 3a79ded14240676d3d4bef5f78db6a3aa13a6d4f..022f321f883b602e4a1725aabaf5e59eebc60232 100755
--- a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_davs.sh
+++ b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_davs.sh
@@ -4,6 +4,7 @@
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.0/Athena
+# art-include: master/Athena
 
 set -e
 
diff --git a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_https.sh b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_https.sh
index 481c61f7f6953542cc6cccd403b31f2a7f9e72e4..1bf2f48c64e45c7117a8c522686b96f5af9534e9 100755
--- a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_https.sh
+++ b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_https.sh
@@ -4,6 +4,7 @@
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.0/Athena
+# art-include: master/Athena
 
 set -e
 
diff --git a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_root.sh b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_root.sh
index d69547239685523892783fd333789c604e45194c..29db30e95d4f36017a0b8329739cccba0d8dbe5c 100755
--- a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_root.sh
+++ b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_root.sh
@@ -4,6 +4,7 @@
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.0/Athena
+# art-include: master/Athena
 
 set -e
 
diff --git a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_rdo_davs.sh b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_rdo_davs.sh
index 11dc429b2882f1ba306504f9a89a6aeb9806f575..19b6ce8cbe58218c395c9d7fcfc014b871fc05dc 100755
--- a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_rdo_davs.sh
+++ b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_rdo_davs.sh
@@ -1,9 +1,10 @@
 #!/bin/bash
 
-# art-description: DirectIOART Athena inputFile:RDO protocol=DAVS
+# art-description: DirectIOART Athena Reco_tf.py inputFile:RDO protocol=DAVS
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.0/Athena
+# art-include: master/Athena
 
 set -e
 
diff --git a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_rdo_https.sh b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_rdo_https.sh
index eed46fc8e24a75f31c493eb376db07aedac6d1cc..cf4d44989e543c9ae84c3352bbd34a768bbf578e 100755
--- a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_rdo_https.sh
+++ b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_rdo_https.sh
@@ -1,9 +1,10 @@
 #!/bin/bash
 
-# art-description: DirectIOART Athena inputFile:RDO protocol=HTTPS
+# art-description: DirectIOART Athena Reco_tf.py inputFile:RDO protocol=HTTPS
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.0/Athena
+# art-include: master/Athena
 
 set -e
 
diff --git a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_rdo_root.sh b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_rdo_root.sh
index b24c72ecc42a8c1b307341ce8db3aac23076c241..0c68abb50a389a9904c60ced2f17b82bc41f5b80 100755
--- a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_rdo_root.sh
+++ b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_rdo_root.sh
@@ -1,9 +1,10 @@
 #!/bin/bash
 
-# art-description: DirectIOART Athena inputFile:RDO protocol=ROOT
+# art-description: DirectIOART Athena Reco_tf.py inputFile:RDO protocol=ROOT
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.0/Athena
+# art-include: master/Athena
 
 set -e
 
diff --git a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_davs.sh b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_davs.sh
index 6e0e7d82728c06516ecc1c40c8e59844dbe9c93c..bf779a011ce050b80bc56bf987b6dc1a5ff612b4 100755
--- a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_davs.sh
+++ b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_davs.sh
@@ -4,6 +4,7 @@
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.0/Athena
+# art-include: master/Athena
 
 set -e
 
diff --git a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_https.sh b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_https.sh
index ae565d9212cbb0e2e8d7aafc57c06493c16c1be5..5e19d2cfd436e12eb846a0f9e962ed42f0d10134 100755
--- a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_https.sh
+++ b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_https.sh
@@ -4,6 +4,7 @@
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.0/Athena
+# art-include: master/Athena
 
 set -e
 
diff --git a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_root.sh b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_root.sh
index d978d2b0270c852256d53c949517ebd7a67a0cbd..cd3b4a7da69c98b517899cfb372397d779bafb0f 100755
--- a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_root.sh
+++ b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_root.sh
@@ -4,6 +4,7 @@
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.0/Athena
+# art-include: master/Athena
 
 set -e
 
diff --git a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_rdo_davs.sh b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_rdo_davs.sh
index a8fffc1f4f715b02c1d336f7eac21b7a5a175b83..73c39c6b470fb68178429085365073327aa44747 100755
--- a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_rdo_davs.sh
+++ b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_rdo_davs.sh
@@ -1,9 +1,10 @@
 #!/bin/bash
 
-# art-description: DirectIOART AthenaMP inputFile:RDO protocol=DAVS
+# art-description: DirectIOART AthenaMP Reco_tf.py inputFile:RDO protocol=DAVS
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.0/Athena
+# art-include: master/Athena
 
 set -e
 
diff --git a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_rdo_https.sh b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_rdo_https.sh
index e46bf88196d5fe36a317bc7e51cb9df12ba56fe3..1f56f36ac9c59319029448b6bb6f5d6b2886e860 100755
--- a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_rdo_https.sh
+++ b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_rdo_https.sh
@@ -1,9 +1,10 @@
 #!/bin/bash
 
-# art-description: DirectIOART AthenaMP inputFile:RDO protocol=HTTPS
+# art-description: DirectIOART AthenaMP Reco_tf.py inputFile:RDO protocol=HTTPS
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.0/Athena
+# art-include: master/Athena
 
 set -e
 
diff --git a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_rdo_root.sh b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_rdo_root.sh
index 6bea5ab7996713459e287d41903671853191f541..56bbfeb3c6289b3bf89a5f9e8fd8e536bc2bf9b9 100755
--- a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_rdo_root.sh
+++ b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_rdo_root.sh
@@ -1,9 +1,10 @@
 #!/bin/bash
 
-# art-description: DirectIOART AthenaMP inputFile:RDO protocol=ROOT
+# art-description: DirectIOART AthenaMP Reco_tf.py inputFile:RDO protocol=ROOT
 # art-type: grid
 # art-output: *.pool.root
 # art-include: 21.0/Athena
+# art-include: master/Athena
 
 set -e
 
diff --git a/Tools/DirectIOART/test/test_directioart_tfileopen.py b/Tools/DirectIOART/test/test_directioart_tfileopen.py
index 982d4bc4dfcec167e00bfd49e7e2d684b4deb31f..5cbfcfae4319517041fa2fe1411e255911ff01f6 100755
--- a/Tools/DirectIOART/test/test_directioart_tfileopen.py
+++ b/Tools/DirectIOART/test/test_directioart_tfileopen.py
@@ -2,6 +2,15 @@
 
 # art-description: DirectIOART TFile::Open
 # art-type: grid
+# art-include master/Athena
+# art-include 21.0/Athena
+# art-include 21.0/AthSimulation
+# art-include 21.2/AthAnalysis
+# art-include 21.2/AthDerivation
+# art-include 21.2/AnalysisBase
+# art-include 21.2/AnalysisTop
+# art-include 21.3/Athena
+# art-include 21.9/Athena
 
 import ROOT
 import os
@@ -16,7 +25,7 @@ if f: print("art-result: 0 DirectIOART_TFileOpen_protocol_DAVS")
 else: print("art-result: 1 DirectIOART_TFileOpen_protocol_DAVS")
 del f
 
-f = ROOT.TFile.Open("https://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https://grid-dav.rzg.mpg.de:2880/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https://dcache-atlas-webdav.desy.de:2880/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https://lcg-se0.ifh.de:2880/pnfs/ifh.de/data/atlas/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https ://atlaswebdav-kit.gridka.de:2880/pnfs/gridka.de/atlas/disk-only/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https://webdav.bfg.uni-freiburg.de:2880/pnfs/bfg.uni-freiburg.de/data/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https://se-goegrid.gwdg.de:2880/pnfs/gwdg.de/data/atlas/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https://grid-se.physik.uni-wuppertal.de:2881/pnfs/physik.uni-wuppertal.de/data/atlas/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1")
+f = ROOT.TFile.Open("https://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https://grid-dav.rzg.mpg.de:2880/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https://dcache-atlas-webdav.desy.de:2880/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https://lcg-se0.ifh.de:2880/pnfs/ifh.de/data/atlas/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https://atlaswebdav-kit.gridka.de:2880/pnfs/gridka.de/atlas/disk-only/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https://webdav.bfg.uni-freiburg.de:2880/pnfs/bfg.uni-freiburg.de/data/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https://se-goegrid.gwdg.de:2880/pnfs/gwdg.de/data/atlas/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1 | https://grid-se.physik.uni-wuppertal.de:2881/pnfs/physik.uni-wuppertal.de/data/atlas/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1")
 if f: print("art-result: 0 DirectIOART_TFileOpen_protocol_HTTPS")
 else: print("art-result: 1 DirectIOART_TFileOpen_protocol_HTTPS")
 del f
diff --git a/Tools/FullChainTests/CMakeLists.txt b/Tools/FullChainTests/CMakeLists.txt
deleted file mode 100644
index 6706181396be87d5fae1c822989346e8ab6864b9..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-################################################################################
-# Package: FullChainTests
-################################################################################
-
-# Declare the package name:
-atlas_subdir( FullChainTests )
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          TestPolicy )
-
-# Install files from the package:
-atlas_install_python_modules( python/*.py )
-atlas_install_runtime( test/FullChainTests_TestConfiguration.xml test/*.cfg )
-atlas_install_scripts( scripts/*.py scripts/*.sh )
-
diff --git a/Tools/FullChainTests/TODOLIST b/Tools/FullChainTests/TODOLIST
deleted file mode 100644
index eab430096f8e7afd780203ea6694ff32734935f6..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/TODOLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-26-11-2011 Serhat Istin
-
-consider to use GetCommand.py properly 
diff --git a/Tools/FullChainTests/python/TrfBuilder.py b/Tools/FullChainTests/python/TrfBuilder.py
deleted file mode 100644
index bbdbd7ed95c17a7ef06db68910080737541927f2..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/python/TrfBuilder.py
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-# -*- coding: utf-8 -*-
-# A Job Transformation builder class. The class reads a configuration file and builds
-# corresponding job transformation commands .
-# Supported commands are Generate_tf.py','AtlasG4_trf.py','Digi_trf.py','Reco_trf.py'
-
-# Configuration files have sections and each section has several settings.
-# Section names should be 'AtlasG4_trf.py','Digi_trf.py','Reco_trf.py' Not all sections have to be implemented in a cfg file
-
-# To-Do:
-# if a section is absent and the command corresponding to this section is tried to be built an error should be thrown
-# implement a reverse enginnering method to succesfully build commands from AMI's GetCommand.py (remember GetCommand.py returns some wrong chars such as whitespace etc...)
-
-# author : Serhat Istin
-# ....:istin@cern.ch
-
-import ConfigParser
-import string
-import copy
-import os
-
-
-class TrfBuilder:
-
-  # implement a constructor
-
-    def __init__(self, cfgFile):  # construct with a config file
-        self.filename = cfgFile
-        self.trfCommands = ['Generate_tf.py', 'AtlasG4_trf.py',
-                            'Digi_tf.py', 'Reco_tf.py']
-        self.DigiRecoConfig = ConfigParser.ConfigParser()
-        self.commandList = []
-        if not os.path.isfile(cfgFile):  # check if file exists first
-            print 'TrfBuilder: ERROR:: ConfigFile ' + cfgFile \
-                + ' Does Not Exist'
-            os.sys.exit(-1)
-
-        self.DigiRecoConfig.optionxform = str  # set this flag in order to use upper-lower case distinction
-        self.DigiRecoConfig.read(cfgFile)  # parse the configuration file
-
-  # implement a function which reads the corresponding settings block from tyhe cfg file and returns the command
-
-    def buildCommand(self, sectionName):
-        pfx = copy.copy(sectionName)  # copy it not to alter sectionName as python uses ref variables
-        pfx += ' '
-        sectionCounter = 0
-        if sectionName in self.trfCommands:
-            for section in self.DigiRecoConfig.sections():  # loop over all sections in the file
-                if section == sectionName:  # take only our section for sectionName into account
-                    sectionCounter = sectionCounter + 1
-                    for option in self.DigiRecoConfig.options(section):  # loop over all settings in specified our section
-                        # To support multiple values --preExec "AAA:aaa" "BBB:bbb":
-                        pfx += ' --' + option + ' ' \
-                            + self.DigiRecoConfig.get(section, option) \
-                            + ' '
-            if sectionCounter == 0:
-                print 'TrfBuilder: ERROR:: File Error .No such section: ' \
-                    + sectionName + ' in the file: ' + self.filename
-                os.sys.exit(-1)
-        else:
-
-         # throw an error if something non-sense is supplied by the user
-
-            print 'TrfBuilder: ERROR:: Invalid Command Type: ' \
-                + sectionName
-            os.sys.exit(-1)
-        self.commandList.append(pfx)
-        return pfx
-
-  # implement a method to dump all sections to the screen
-
-    def printSections(self):
-        for section in self.DigiRecoConfig.sections():
-            print section
-
-  # implement a method to write the command into a file
-
-    def write(self, sectionName, filename):
-        command = self.buildCommand(sectionName)
-        file = open(filename, 'w')
-        file.write(command)
-
-    def buildAll(self):
-        for sectionName in self.DigiRecoConfig.sections():
-            self.buildCommand(sectionName)
-
-    def writeAll(self, filename):
-        file = open(filename, 'w')
-        self.filename.write(comandList)
-
-
diff --git a/Tools/FullChainTests/python/__init__.py b/Tools/FullChainTests/python/__init__.py
deleted file mode 100644
index 74583d364ec2ca794156596c7254d9b234a940c6..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/python/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
diff --git a/Tools/FullChainTests/python/readconfig.py b/Tools/FullChainTests/python/readconfig.py
deleted file mode 100644
index f8e40d63625faa001a57931daeb6be219c4e022f..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/python/readconfig.py
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-class readconfig:
-    def __init__(self,confile):
-        com=open(confile).readlines()
-        for i in range(0,com.count('\n')):
-            com.remove('\n')
-        self.myDict={}
-        self.off1=123456
-        self.off2=2345678
-        for ll in com:
-            # split at the first "="
-            nn=ll.find("=")
-            if nn != -1:
-                lft=ll[0:nn].lstrip(' ')
-                rgt=ll[nn+1:len(ll)].rstrip('<BR>\n')
-                # Now do the crazy modifications
-                for i in range(0,len(lft.split(";"))):
-                    lft1=lft.split(";")[i]
-                    rgt1=rgt.split(";")[i]
-                    self.myDict[lft1]=self.pavelConvert(rgt1)
-        print self.myDict   
-    def pavelConvert(self,cmd):
-        cmd=cmd.replace(" ",",")
-        cmd=cmd.replace("%3B",";")        
-        return cmd
-
-    def setDigitOffset(self,off1=123456,off2=2345678):
-        # To set digitization digits offset, untouched in testing
-        self.off1=off1
-        self.off2=off2
- 
-    def setEventNumber(self,evnt):
-        self.myDict["events per job"]=evnt
-
-    def listTrfs(self):
-        allowedTrfs=['Reco_trf.py','Digi_trf.py','csc_digi_trf.py']
-        trfs=self.myDict["transfromation"].split(",")
-        goodTrfs=[]
-        for trf in trfs:
-            if trf in allowedTrfs:
-                goodTrfs.append(trf)
-        return goodTrfs
-      
-    def outputFormats(self):
-        return self.myDict["formats"].split(",")
-
-    def DBRelease(self):
-        return "DBRelease-"+self.myDict["DBRelease"]+".tar.gz"
- 
-    def eventsPerJob(self):   
-        return int(self.myDict["events per job"])
-
-    def readDict(self,tag):
-        if tag in self.myDict.keys():
-            return self.myDict[tag]
-        else:
-            return None
-
-    def digitTrf(self,myInput,myOutput="output.TMP.RDO.pool.root"):
-        if 'Digi_trf.py' not in self.listTrfs():
-            return 'ERROR'
-        myDict=self.myDict
-        # Here we reverse engineer the trf:
-        allSet=[]
-        # input file:
-        allSet.append(" inputHitsFile="+myInput)
-        # output file
-        allSet.append(" outputRDOFile="+myOutput)
-        # number of events
-        allSet.append(" maxEvents="+myDict["events per job"])
-        #Events to skip (set to zero for digi/reco)
-        allSet.append(" skipEvents=0")
-        #Geometry version
-        allSet.append(" geometryVersion="+myDict["geometryVersion"])
-        print 'appended geometry versin in digitTrf'
-        # Digit offset
-        allSet.append(" digiSeedOffset1="+str(self.off1)+" digiSeedOffset2="+str(self.off2))
-        # MB input (assume no pileup for the time being!)
-        if myDict["minbiasHits"] != "NONE":
-            allSet.append(" minbiasHitsFile="+myDict["minbiasHits"])
-
-        # job Config
-#        allSet.append(" JobConfig="+myDict["JobConfig"])
-        # Trigger config (set to None for digitisation)
-        allSet.append(" triggerConfig=DEFAULT")
-        # DB release
-        allSet.append(" DBRelease=DBRelease-"+myDict["DBRelease"]+".tar.gz")
-        # Conditions
-        allSet.append(" conditionsTag="+myDict["conditionsTag"])
-        # Random service
-#        allSet.append(" digiRndmSvc="+myDict["DigiRndmSvc"])
-        # sampling db
- #       allSet.append(" samplingFractionDbTag="+myDict["SamplingFractionDbTag"])
-        # Calo Digit setting
-#        allSet.append(" AddCaloDigi="+myDict["AddCaloDigi"])
-        # noise setting
-#        allSet.append(" doAllNoise="+myDict["NoiseControl"])
-        # athena options and ignore errors, later please
-        digicmd="Digi_trf.py "
-        for settg in allSet:
-            digicmd += settg
-        return digicmd
-
-    def recoTrf(self,myInput,myOutput="output.TMP",myRN="000000"):
-        if 'Reco_trf.py' not in self.listTrfs():
-            return 'ERROR'
-        myDict=self.myDict
-        # Here we reverse engineer the trf:
-        allSet=[]
-        # Pre include
-#        if myDict["preInclude"] != "NONE":
-#            allSet.append(" preInclude="+myDict["preInclude"])
-        # Pre exec
-#        if myDict["preExec"] != "NONE":
-#            allSet.append(" preExec='"+myDict["preExec"]+"'")
-        # Post include
-#        if myDict["postInclude"] != "NONE":
-#            allSet.append(" postInclude="+myDict["postInclude"])
-        # Post Exec
-#        if myDict["postExec"] != "NONE":
-#            allSet.append(" postExec='"+myDict["postExec"]+"'")    
-        # input file:
-        allSet.append(" inputRDOFile="+myInput)
-        # run number:
-        allSet.append(" RunNumber="+myRN)
-        # OutputESD file
-        if "ESD" in self.outputFormats():
-            allSet.append(" outputESDFile="+myOutput+".ESD.pool.root")
-        # OutputAOD file
-        if "AOD" in self.outputFormats():
-            allSet.append(" outputAODFile="+myOutput+".AOD.pool.root")
-        # Output HIST file
-        if "HIST" in self.outputFormats():
-            allSet.append(" HIST="+myOutput+".HIST.root")
-        # Output NTUP_PIXELCALIB file
-        if "NTUP_PIXELCALIB" in self.outputFormats():
-            allSet.append(" outputPixelCalibNtup="+myOutput+".NTUP_PIXELCALIB.root")
-        # Output NTUP_MUONCALIB file
-        if "NTUP_MUONCALIB" in self.outputFormats():
-            allSet.append(" outputMuonCalibNtup="+myOutput+".NTUP_MUONCALIB.root")
-        # Output TAG_COMM file
-        if "TAG_COMM" in self.outputFormats():
-            allSet.append(" outputTAGComm="+myOutput+".TAG_COMM.pool.root")
-        # Output NTUP_TRIG file
-        if "NTUP_TRIG" in self.outputFormats():
-            allSet.append(" outputNTUP_TRIG="+myOutput+".NTUP_TRIG.root")
-
-        allSet.append(" autoConfiguration='everything'")
-        # number of events
-        allSet.append(" maxEvents="+myDict["events per job"])
-        #Events to skip (set to zero for digi/reco)
-        allSet.append(" skipEvents=0")
-        #Geometry version
-#        allSet.append(" geometryVersion="+myDict["geometryVersion"])
-        #AMI tag
-#        allSet.append(" AMITag="+myDict["AMITag"])
-        # Trigger config
-#        allSet.append(" triggerConfig='"+myDict["triggerConfig"]+"'")
-        # DB release
-#        allSet.append(" DBRelease=DBRelease-"+myDict["DBRelease"]+".tar.gz")
-        # Conditions
-#        allSet.append(" conditionsTag="+myDict["conditionsTag"])
-        #ignore
-#        allSet.append(" --ignoreerrors="+myDict["--ignoreerrors"])
-        # autoconfiguration
-        if "autoConfiguration" in myDict.keys():
-            allSet.append(" autoConfiguration="+myDict["autoConfiguration"])
-
-        recocmd='Reco_trf.py'
-        for settg in allSet:
-            recocmd += settg
-        return recocmd
-
diff --git a/Tools/FullChainTests/scripts/BCTTestViaFCT_digi.sh b/Tools/FullChainTests/scripts/BCTTestViaFCT_digi.sh
deleted file mode 100755
index baf118548655825e78a4473ffe3e5451b0c15183..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/scripts/BCTTestViaFCT_digi.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#avoids ROOT crash
-export ROOTENV_NO_HOME=1
-nightlyType=`echo $GAUDISVCROOT | sed 's/\// \/ /g' | gawk '{ print $(NF-6) }'`
-GetCommand.py AMI=d572 | grep Digi | grep -v INFO | sed 's/LowPtMinbiasHitsFile=mc11_7TeV.108118.Pythia8_minbias_Inelastic_low.merge.HITS.e816_s1299_s1303/LowPtMinbiasHitsFile=root:\/\/eosatlas\/\/eos\/atlas\/atlascerngroupdisk\/proj-sit\/digitization\/RTT\/mc11a\/mc11_7TeV.108118.Pythia8_minbias_Inelastic_low.merge.HITS.e816_s1268_s1269_s1259\/HITS.475989._001423.pool.root.1/g' | sed 's/HighPtMinbiasHitsFile=mc11_7TeV.108119.Pythia8_minbias_Inelastic_high.merge.HITS.e848_s1299_s1303/HighPtMinbiasHitsFile=root:\/\/eosatlas\/\/eos\/atlas\/atlascerngroupdisk\/proj-sit\/digitization\/RTT\/mc11a\/mc11_7TeV.108119.Pythia8_minbias_Inelastic_high.merge.HITS.e848_s1299_s1303\/HITS.500616._001496.pool.root.1/g' | sed "s/inputHitsFile=root:\/\/castoratlas\/\/castor\/cern.ch\/atlas\/atlascerngroupdisk\/proj-sit\/digitization\/RTT\/mc10\/mc10_7TeV.105200.T1_McAtNlo_Jimmy.simul.HITS.e598_s933_tid168076_00\/HITS.168076._008421.pool.root.1/inputHitsFile=\/afs\/cern.ch\/atlas\/project\/RTT\/prod\/Results\/fct\/chainstore\/$nightlyType\/$CMTCONFIG\/AtlasProduction\/Tools\/FullChainTests\/BCTTestViaFCT\/BCTTestViaFCT_Hits.pool.root/g" | sed "s/preExec="\'"from,Digitization.DigitizationFlags,import,digitizationFlags,digitizationFlags.overrideMetadata%2B=\[\"SimLayout\"\]"\'"/preExec="\'"from Digitization.DigitizationFlags import digitizationFlags; digitizationFlags.overrideMetadata=\[\"SimLayout\"\]"\'"/g" | sed 's/LowPtMinBias=39.95132/LowPtMinBias=15/g' | sed 's/outputRDOFile=myRDO.pool.root/outputRDOFile=BCTTestViaFCT_RDO.pool.root/g' >& marksTESTBCT_Digi_Via_FCTScript.sh
-chmod +x marksTESTBCT_Digi_Via_FCTScript.sh
-./marksTESTBCT_Digi_Via_FCTScript.sh
-rm -rf marksTESTBCT_Digi_Via_FCTScript.sh
\ No newline at end of file
diff --git a/Tools/FullChainTests/scripts/BCTTestViaFCT_sim.sh b/Tools/FullChainTests/scripts/BCTTestViaFCT_sim.sh
deleted file mode 100755
index 757975e3cc2750c6f1f60fdf6616bb96668b6435..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/scripts/BCTTestViaFCT_sim.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#avoids ROOT crash
-export ROOTENV_NO_HOME=1
-#generate command we want
-nightlyType=`echo $GAUDISVCROOT | sed 's/\// \/ /g' | gawk '{ print $(NF-6) }'`
-GetCommand.py AMI=q400 >&  marksTESTBCT_Via_FCTScript.sh
-chmod +x marksTESTBCT_Via_FCTScript.sh
-./marksTESTBCT_Via_FCTScript.sh
-rm -rf marksTESTBCT_Via_FCTScript.sh
-
diff --git a/Tools/FullChainTests/scripts/fct_digi.py b/Tools/FullChainTests/scripts/fct_digi.py
deleted file mode 100755
index 971a8143eae3c97c23778d91e5e2533329c2c35b..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/scripts/fct_digi.py
+++ /dev/null
@@ -1,208 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import sys,datetime,time
-import os, os.path
-import glob,shutil
-import getopt
-
-# Usage String
-usage='Usage: fct_digi.py <-c config_file> [-l (local), use this if want to use local machine] [-o outputFile][-e events] [-f inputhitsfile] '
-
-print 'Starting fct_digi: ',datetime.datetime.now()
-
-if len(sys.argv) < 2:
-    print usage
-    sys.exit(1)
-
-# This section deals with the arguments -c, -e and -l
-##########################################
-try:
-    opts, args = getopt.getopt(sys.argv[1:], "hc:e:o:f:l", ["help","config_file=","events=","output=","inputhitsfile=","local"])
-except getopt.GetoptError, err:
-    print 'Error! Incorrect arguments specified.'
-    print usage
-    sys.exit(2)
-local = None
-myInputEvents = None
-myDir = None
-inputhitsfile = "test"
-
-print "inputhitsfile = " + inputhitsfile
-
-for o, a in opts:
-    if o in ("-h", "--help"):
-        print usage
-        sys.exit()
-    elif o in ("-c", "--config_file"):
-        config_file = a
-    elif o in ("-o", "--output"):
-        myDir = a
-    elif o in ("-e", "--events"):
-        myInputEvents = a
-    elif o in ("-f", "--inputhitsfile"):
-        inputhitsfile = a
-    elif o in ("-l", "--local"):
-        print "localset"
-        local = ""
-    else:
-        assert False, "unhandled option"
-
-
-
-############################################
-
-print "inputhitsfile2 = " + inputhitsfile
-
-# Specify the parent directory.
-
-parentDir='/afs/cern.ch/atlas/offline/external/FullChainTest/rec_input/'
-
-# Print where I am...
-
-workdir=rttdir=os.getcwd()
-print 'The script fct_digi.py is working in the directory '+rttdir
-
-# Get the config file into the rtt directory
-
-configcommand = 'get_files -data '+config_file
-os.system(configcommand)
-
-# Open config file and read config
-
-config_file=open(config_file)
-
-myinputHitsFile=config_file.readline()
-myoutputRDOFile=config_file.readline()
-#myoutputRDOFile=myoutputRDOFile[0:len(myoutputRDOFile)-1]
-mymaxEvents=config_file.readline()
-mymaxEvents=mymaxEvents[0:len(mymaxEvents)-1]
-myskipEvents=config_file.readline()
-myskipEvents=myskipEvents[0:len(myskipEvents)-1]
-mygeometryVersion=config_file.readline()
-mygeometryVersion=mygeometryVersion[0:len(mygeometryVersion)-1]
-mydigiSeedOffset1=config_file.readline()
-mydigiSeedOffset1=mydigiSeedOffset1[0:len(mydigiSeedOffset1)-1]
-mydigiSeedOffset2=config_file.readline()
-mydigiSeedOffset2=mydigiSeedOffset2[0:len(mydigiSeedOffset2)-1]
-myminbiasHitsFile=config_file.readline()
-myminbiasHitsFile=myminbiasHitsFile[0:len(myminbiasHitsFile)-1]
-myjobConfig=config_file.readline()
-myjobConfig=myjobConfig[0:len(myjobConfig)-1]
-mytriggerConfig=config_file.readline()
-mytriggerConfig=mytriggerConfig[0:len(mytriggerConfig)-1]
-myDBRelease=config_file.readline()
-myDBRelease=myDBRelease[0:len(myDBRelease)-1]
-myconditionsTag=config_file.readline()
-myconditionsTag=myconditionsTag[0:len(myconditionsTag)-1]
-
-# Set up maxEvents - either from config or -e input if given 
-if myInputEvents is not None:
-    mymaxEvents='maxEvents='+myInputEvents
-
-# Set up indputFile command if there is no -i specified
-if myDir is None:
-    myoutputRDOFile=myoutputRDOFile[0:len(myoutputRDOFile)-1]
-
-# Set up indputRDOFile command if there is -i specified
-else:
-    myoutputRDOFile='outputRDOFile='+myDir
-    
-    
-if local is not None:
-    print "Fetching HITS files starting",datetime.datetime.now()
-    workdir = os.getcwd()
-    if "WORKDIR" in os.environ: workdir = os.environ["WORKDIR"]
-    print "Working directory is",workdir
-    os.chdir(workdir)
-
-    noFiles=(int(mymaxEvents[10:len(mymaxEvents)])-1) / 10 + 1
-#    noFiles=(int(mymaxEvents[10:len(mymaxEvents)])-1) / 25 + 1
-
-    for i in range(1, noFiles+1):
-        copycmd = ""
-        if len(str(i))==1:
-            copycmd = "cp " + inputhitsfile + "  HITS.094777._00000"+str(i)+".pool.root.1"
-        if len(str(i))==2:
-            copycmd = "cp " + inputhitsfile + "  HITS.094777._0000"+str(i)+".pool.root.1"
-        if len(str(i))==3:
-            copycmd = "cp " + inputhitsfile + "  HITS.094777._000"+str(i)+".pool.root.1"
-        if len(str(i))==4:
-            copycmd = "cp " + inputhitsfile + "  HITS.094777._00"+str(i)+".pool.root.1"
-        os.system(copycmd)
-        print copycmd
-
-    
-#    for i in range(1, noFiles+1):
-#        copycmd = ""
-#        if len(str(i))==1:
-#            copycmd = "cp /afs/cern.ch/atlas/project/RTT/prod/Results/fct/chainstore/dev/i686-slc5-gcc43-opt/AtlasProduction/Tools/FullChainTests/TopChainJob/CSC.005200.T1_McAtNlo_Jimmy.HITS.pool.root  HITS.094777._00000"+str(i)+".pool.root.1"
-#        if len(str(i))==2:
-#            copycmd = "cp /afs/cern.ch/atlas/project/RTT/prod/Results/fct/chainstore/dev/i686-slc5-gcc43-opt/AtlasProduction/Tools/FullChainTests/TopChainJob/CSC.005200.T1_McAtNlo_Jimmy.HITS.pool.root  HITS.094777._0000"+str(i)+".pool.root.1"
-#        if len(str(i))==3:
-#            copycmd = "cp /afs/cern.ch/atlas/project/RTT/prod/Results/fct/chainstore/dev/i686-slc5-gcc43-opt/AtlasProduction/Tools/FullChainTests/TopChainJob/CSC.005200.T1_McAtNlo_Jimmy.HITS.pool.root  HITS.094777._000"+str(i)+".pool.root.1"
-#        if len(str(i))==4:
-#            copycmd = "cp /afs/cern.ch/atlas/project/RTT/prod/Results/fct/chainstore/dev/i686-slc5-gcc43-opt/AtlasProduction/Tools/FullChainTests/TopChainJob/CSC.005200.T1_McAtNlo_Jimmy.HITS.pool.root  HITS.094777._00"+str(i)+".pool.root.1"         
-#        os.system(copycmd)
-#        print copycmd
-
-    print "Fetching HITS files finished",datetime.datetime.now()
-    print
-
-
-# Set up inputFile command if there is no -l specified
-if local is None:
-    myDir=myinputHitsFile.replace('inputHitsFile=','')
-    myDir=myDir[0:len(myDir)-1]
-    myFiles=glob.glob(parentDir+myDir+'/*.root.*')
-    if not myFiles:
-        print 'Error! No files found in specified directory '+parentDir+myDir
-        sys.exit(1)
-    filelist=''
-    for myFile in myFiles:
-        filelist+=myFile+','
-    filelist=filelist[0:len(filelist)-1]
-    myinputHitsFile='inputHitsFile='+filelist
-
-# Set up inputHitsFile command if there is -l specified
-else:
-    myFiles=glob.glob('HITS*.root.*')
-    if not myFiles:
-        print 'Error! No HITS files found in directory' 
-        sys.exit(1)
-    filelist=''
-    for myFile in myFiles:
-        filelist+=myFile+','
-    filelist=filelist[0:len(filelist)-1]
-    myinputHitsFile='inputHitsFile='+filelist
-
-# The command
-mycommand='Digi_trf.py '+myinputHitsFile+' '+myoutputRDOFile+' '+mymaxEvents+' '+myskipEvents+' '+mygeometryVersion+' '+mydigiSeedOffset1+' '+mydigiSeedOffset2+' '+myminbiasHitsFile+' '+myDBRelease+' '+myconditionsTag
-#mycommand='Digi_trf.py '+myinputHitsFile+' '+myoutputRDOFile+' '+mymaxEvents+' '+myskipEvents+' '+mygeometryVersion+' '+mydigiSeedOffset1+' '+mydigiSeedOffset2+' '+myminbiasHitsFile+' '+myjobConfig+' '+mytriggerConfig+' '+myDBRelease+' '+myconditionsTag
-    
-# Execute the command
-print 'The command I am using is: '
-print mycommand
-print
-os.system(mycommand)
-
-if local is not None:
-    # Copy files back to RTT directory... 
-    print
-    print "Copying files back to RTT working directory ",datetime.datetime.now()
-    print "workdir is "+workdir+", rttdir is "+rttdir
-    print
-    for filename in os.listdir(workdir):
-        test = filename.startswith('HITS')
-        if not test:
-            try:
-                shutil.copyfile(workdir+'/'+filename,rttdir+'/'+filename)
-            except:
-                print "Cannot copy file "+filename
-    print "Finished copy ",datetime.datetime.now()
-    print
-
-print 
-print 'Finished fct_digi: ',datetime.datetime.now()
-print
diff --git a/Tools/FullChainTests/scripts/fct_digireco.py b/Tools/FullChainTests/scripts/fct_digireco.py
deleted file mode 100755
index e415b0303f5e5002a2ca14eb0a0969961aaf0091..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/scripts/fct_digireco.py
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import sys,datetime,time
-import os, os.path
-import glob,shutil
-import getopt
-
-#setup eos command. eos is an alias so it will not work in os.popen() as a command.
-eos="/afs/cern.ch/project/eos/installation/0.1.0-22d/bin/eos.select"
-
-print "We will use eos command from : "+eos
-
-# Usage String
-usage='Usage: fct_digireco.py <-c config_file> [-i inputdataset] [-o outputfile] [-f firstfile] [-n neventsperfile] [-r runnumber]'
-
-print 'Starting fct_digi: ',datetime.datetime.now()
-
-if len(sys.argv) < 2:
-    print usage
-    sys.exit(1)
-
-# This section deals with the arguments -c, -e, -o, -f, -n, -r
-##########################################
-try:
-    opts, args = getopt.getopt(sys.argv[1:], "hc:i:o:f:n:r:e:", ["help","config_file=","events=","local"])
-except getopt.GetoptError, err:
-    print 'Error! Incorrect arguments specified.'
-    print usage
-    sys.exit(2)
-
-myInputDataset='105200/valid1.105200.T1_McAtNlo_Jimmy.simul.HITS.e380_s610_tid094777'
-myOutputFile = 'TopRecoLong'
-myFirstFile=1
-myEventsPerFile=2000
-config_file=None
-event_number=None
-
-for o, a in opts:
-    if o in ("-h", "--help"):
-        print usage
-        sys.exit()
-    elif o in ("-c", "--config_file"):
-        config_file = a
-    elif o in ("-i", "--inputdataset"):
-        myInputDataset = a
-    elif o in ("-o", "--output"):
-        myOutputFile = a
-    elif o in ("-f", "--firstfile"):
-        myFirstFile = a
-    elif o in ("-n", "--neventsperfile"):
-        myEventsPerFile = int(a)
-    elif o in ("-r", "--runnumber"):
-        rn = a
-    elif o in ("-e", "--events"):
-        event_number = a
-    else:
-        assert False, "unhandled option"
-
-############################################
-# Open config file and read config
-from FullChainTests.readconfig import readconfig
-a=readconfig(config_file)
-
-# Reset event number
-if event_number != None:
-    a.setEventNumber(event_number)
-
-# Specify the parent directory for input files
-# castorinputdir="/castor/cern.ch/grid/atlas/atlasgroupdisk/proj-sit/fct/rec_input/"+myInputDataset+"/"
-castorinputdir=myInputDataset+"/"
-print 'castorinputdir = ' + castorinputdir
-
-if len(os.popen(eos+" ls "+castorinputdir).readlines()) == 0:
-    print 'Specified dataset does not exist'
-    sys.exit(1)
-
-
-
-print 'DataSet exists'
-# use the day of the week
-fuid=os.popen("echo $AtlasVersion").readline()
-
-
-# Change to workernode directory, but keep track of RTT dir
-workdir=rttdir=os.getcwd()
-print 'The script fct_digireco.py is working in the directory '+rttdir
-if "WORKDIR" in os.environ: workdir = os.environ["WORKDIR"]
-print "Working directory is",workdir
-os.chdir(workdir)
-
-# Specify parent directory for DBRelease and check if the DBRelease is there
-# Also look into the unvalidated caches
-DBpath='/afs/cern.ch/atlas/www/GROUPS/DATABASE/pacman4/DBRelease/'
-DBunvalidpath='/afs/cern.ch/atlas/www/GROUPS/DATABASE/pacman4/DBRelease-unvalidated/'
-print a.DBRelease()
-if a.DBRelease() in os.listdir(DBpath):
-    print "linking DB Release to default cache"
-    os.system('ln -s '+DBpath+a.DBRelease()+' .')
-#elif 'DBRelease-'+a.DBRelease()+'.tar.gz' in os.listdir(DBunvalidpath):
-elif a.DBRelease() in os.listdir(DBunvalidpath):
-    print "linking DB Release to unvalidated cache"
-    os.system('ln -s '+DBunvalidpath+a.DBRelease()+' .')
-else:
-    print 'DBRelease  '+a.DBRelease()+' does not exist!'
-    sys.exit(1)
-
-
-# Get files from castor
-noFiles=(a.eventsPerJob()-1)/myEventsPerFile+1
-myFiles=os.popen(eos+" ls "+castorinputdir).readlines()
-print "Number of files: " + str(noFiles)
-for i in range(int(myFirstFile), int(myFirstFile)+noFiles):
-    copycmd="xrdcp root://eosatlas.cern.ch/"+castorinputdir+myFiles[i-1].rstrip('\n')+" ."
-    print "print copycmd: " + copycmd
-    os.system(copycmd)
-
-print "Fetching input files finished",datetime.datetime.now()
-print
-
-
-myFiles=glob.glob('HITS*.root.*')
-if not myFiles:
-    print 'Error! No HITS files found in directory' 
-    sys.exit(1)
-filelist=''
-myFiles.sort()
-for myFile in myFiles:
-    filelist+=myFile+','
-filelist=filelist[0:len(filelist)-1]
-
-# Handle file outputs
-myRDOFile = myOutputFile+'.RDO.pool.root'
-myESDFile = myOutputFile+'.ESD.pool.root'
-myAODFile = myOutputFile+'.AOD.pool.root'
-myHISTFile = myOutputFile+'HIST.root'
-
-mycommand=a.digitTrf(filelist,myRDOFile)
-print 'The command I am using for digi is: '
-print mycommand
-print
-os.system(mycommand)
-
-mycommand=a.recoTrf(myRDOFile,myOutputFile,rn)   
-print 'The command I am using for reco is: '
-print mycommand
-print
-os.system(mycommand)
-
-
-# Get rid of unwanted files
-
-myDelFiles=['RDO','ESD','HIST','NTUP_PIXELCALIB','NTUP_TRIG']
-for delFile in myDelFiles:
-    print "Removing all files containing ."+delFile+". in their file name"
-    os.system("rm *."+delFile+".*")
-
-# Direct castor archive
-
-myArchiveCastor=['AOD']
-for ff in myArchiveCastor:
-    ff=ff.rstrip('\n')
-    castorbase="/eos/atlas/atlascerngroupdisk/proj-sit/fct/rec_output/"+fuid+"/"+ff
-    print "Copying files of type "+ff+" to castor location "+castorbase
-    for aa in os.popen("ls *"+ff+"*.root").readlines():
-        aa=aa.rstrip('\n')
-        os.system("xrdcp "+aa+" root://eosatlas.cern.ch/"+castorbase)
-        os.system("rm "+aa)
-
-# Copy files back to RTT directory... 
-print
-print "Copying files back to RTT working directory ",datetime.datetime.now()
-print "workdir is "+workdir+", rttdir is "+rttdir
-print
-for filename in os.listdir(workdir):
-    test = filename.startswith('HITS')
-    if not test:
-        try:
-            shutil.copyfile(workdir+'/'+filename,rttdir+'/'+filename)
-        except:
-            print "Cannot copy file "+filename
-print "Finished copy ",datetime.datetime.now()
-print
-
-print 
-print 'Finished fct_digireco: ',datetime.datetime.now()
-print
diff --git a/Tools/FullChainTests/scripts/fct_reco.py b/Tools/FullChainTests/scripts/fct_reco.py
deleted file mode 100755
index 2bb22fde54b7d11036f1b54f8655000c8afcdd10..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/scripts/fct_reco.py
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import sys,datetime,time
-import os, os.path
-import glob,shutil
-import getopt
-
-# Usage String
-usage='Usage: fct_reco.py <-c config_file> [-l (local), use this if want to use local machine] [-i inputFileName] [-o outputFileName] [-e nEvents]'
-
-if len(sys.argv) < 2:
-    print usage
-    sys.exit(1)
-
-# This section deals with the arguments -c, -l, -i and -e
-##########################################
-try:
-    opts, args = getopt.getopt(sys.argv[1:], "hc:e:i:o:l", ["help","config_file=","events=","input=","output=","local"])
-except getopt.GetoptError, err:
-    print 'Error! Incorrect arguments specified.'
-    print usage
-    sys.exit(2)
-myDir = None
-myDirOut = None
-myInputEvents = None
-local = None
-for o, a in opts:
-    if o in ("-h", "--help"):
-        print usage
-        sys.exit()
-    elif o in ("-c", "--config_file"):
-        config_file = a
-    elif o in ("-l", "--local"):
-        local = ""
-    elif o in ("-i", "--input"):
-        myDir = a
-    elif o in ("-o", "--output"):
-        myDirOut = a
-    elif o in ("-e", "--events"):
-        myInputEvents = a
-    else:
-        assert False, "unhandled option"
-
-############################################
-
-# Specify the parent directory.
-
-parentDir='/afs/cern.ch/atlas/offline/external/FullChainTest/rec_input/'
-
-# Print where I am to check config file opening...
-workdir=rttdir=os.getcwd()
-print 'The script fct_reco.py is working in the directory '+rttdir
-
-# Get the config file into the working directory
-
-configcommand = 'get_files -data '+config_file
-os.system(configcommand)
-
-# Open config file and read config
-
-config_file=open(config_file)
-
-myinputRDOFile=config_file.readline()
-myoutputESDFile=config_file.readline()
-myoutputESDFile=myoutputESDFile[0:len(myoutputESDFile)-1]
-myoutputAODFile=config_file.readline()
-#myoutputAODFile=myoutputAODFile[0:len(myoutputAODFile)-1]
-myntupleFile=config_file.readline()
-myntupleFile=myntupleFile[0:len(myntupleFile)-1]
-mymaxEvents=config_file.readline()
-mymaxEvents=mymaxEvents[0:len(mymaxEvents)-1]
-myskipEvents=config_file.readline()
-myskipEvents=myskipEvents[0:len(myskipEvents)-1]
-mygeometryVersion=config_file.readline()
-mygeometryVersion=mygeometryVersion[0:len(mygeometryVersion)-1]
-mytriggerConfig=config_file.readline()
-mytriggerConfig=mytriggerConfig[0:len(mytriggerConfig)-1]
-myDBRelease=config_file.readline()
-myDBRelease=myDBRelease[0:len(myDBRelease)-1]
-myconditionsTag=config_file.readline()
-myconditionsTag=myconditionsTag[0:len(myconditionsTag)-1]
-
-if local is not None:
-    if "WORKDIR" in os.environ: workdir = os.environ["WORKDIR"]
-    print "Working directory is",workdir
-    os.chdir(workdir)
-
-
-# Set up outputFile command if there is no -o specified
-if myDirOut is None:
-    myoutputAODFile=myoutputAODFile[0:len(myoutputAODFile)-1]
-# Set up outputAODFile command if there is -o specified
-else:
-    myoutputAODFile='outputAODFile='+myDirOut
-
-# Set up indputFile command if there is no -i specified
-if myDir is None:
-    myDir=myinputRDOFile.replace('inputRDOFile=','')
-    myDir=myDir[0:len(myDir)-1]
-    myFiles=glob.glob(parentDir+myDir+'/*.root.*')
-    if not myFiles:
-        print 'Error! No files found in specified directory '+parentDir+myDir
-        sys.exit(1)
-    filelist=''
-    for myFile in myFiles:
-        filelist+=myFile+','
-    filelist=filelist[0:len(filelist)-1]
-    myinputRDOFile='inputRDOFile='+filelist
-
-# Set up indputRDOFile command if there is -i specified
-else:
-    myinputRDOFile='inputRDOFile='+myDir
-
-# Set up maxEvents - either from config or -e input if given 
-if myInputEvents is not None:
-    mymaxEvents='maxEvents='+myInputEvents
-
-# The command
-mycommand='Reco_trf.py '+myinputRDOFile+' '+myoutputESDFile+' '+myoutputAODFile+' '+myntupleFile+' '+mymaxEvents+' '+myskipEvents+' '+mygeometryVersion+' '+mytriggerConfig+' '+myDBRelease+' '+myconditionsTag
-
-# Execute the command
-print 'The command I am using is: '
-print mycommand
-os.system(mycommand)
-
-if local is not None:
-    # Copy files back to RTT directory...
-    print
-    print "Copying files back to RTT working directory ",datetime.datetime.now()
-    print "workdir is "+workdir+", rttdir is "+rttdir
-    print
-    for filename in os.listdir(workdir):
-        test = filename.startswith('HITS')
-        if not test:
-            try:
-                shutil.copyfile(workdir+'/'+filename,rttdir+'/'+filename)
-            except:
-                print "Cannot copy file "+filename
-    print "Finished copy ",datetime.datetime.now()
-    print
-
-print
-print 'Finished fct_reco: ',datetime.datetime.now()
-print 
diff --git a/Tools/FullChainTests/scripts/fct_trf.py b/Tools/FullChainTests/scripts/fct_trf.py
deleted file mode 100755
index f2b622bf72f98210bf6b753be264ec0b324c33ad..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/scripts/fct_trf.py
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-
-# A command line utility to executr job transformations from a configuration file 
-
-
-#author : Serhat Istin
-#mail	: istin@cern.ch
-
-
-#This code builds a set of job transformation(s) from a configuration file and executes it. Supported trf's are : 'generate_tf.py','AtlasG4_trf.py','Digi_trf.py','Reco_trf.py' 
-#For an example configuration see : example.cfg
-
-#There are several command line arguments. However only 2 of them are mandatory. (--config and trf type(s) --runDigi --runReco etc ... are mandatories )
-
-# Trfs in a cfg file can be run individually or all of them can be run consecutively. This is a nice feature to implement a custom chain in a single cfg file
-
-#IMPORTANT : Please note that no matter in what order trf-type sections in the cfg file are , they will be executed in the order evgen->simu->digi->reco if more than one type of trf s are supplied from commandline
-
-
-from FullChainTests.TrfBuilder import TrfBuilder
-
-
-#from TrfBuilder import TrfBuilder
-
-import optparse
-import os
-import subprocess
-
-myoptparser = optparse.OptionParser()
-
-myoptparser.add_option('-c', '--config',help="trf configuration file (Mandatory)",dest="c",metavar='FILE')
-myoptparser.add_option('-e','--runEvgen',help='Run event generation ',dest='e',metavar='flag',action='store_true')
-myoptparser.add_option('-s','--runSimu',help='Run G4 simulation ',dest='s',metavar='flag',action='store_true')
-myoptparser.add_option('-d','--runDigi',help='Run digitisation ',dest='d',metavar='flag',action='store_true')
-myoptparser.add_option('-r','--runReco',help='Run reconstruction',dest='r',metavar='flag',action='store_true')
-myoptparser.add_option('-w','--writeCommand',help='write trf command(s) in a file',dest='w',metavar='FILE')
-
-#parse the command line
-(options, args) = myoptparser.parse_args()
-
-
-#if no input config file is supplied print help and exit
-if options.c is None:
-  print "fct_trf: Command line Error .... No config File is supplied"
-  myoptparser.print_help()
-  os.sys.exit(-1)
-
-command=''#trf command to execute
-
-#get cfg file from commandline
-cfgfile=options.c
-
-#parse the file
-myconfig=TrfBuilder(cfgfile)
-
-#handle command line arguments here 
-if options.e:
-  print 'fct_trf: INFO:: Will run evgen...'
-  command=myconfig.buildCommand("generate_tf.py")
-if options.s:
-  print 'fct_trf: INFO:: Will run simu...'
-  command=myconfig.buildCommand("AtlasG4_trf.py")
-if options.d:
-  print 'fct_trf: INFO:: Will run digi...'
-  command=myconfig.buildCommand("Digi_tf.py")
-if options.r:
-  print 'fct_trf: INFO:: Will run reco...'
-  command=myconfig.buildCommand("Reco_tf.py")
-  
-if not (options.s or options.e or options.r or options.d):
-  print "fct_trf: INFO:: Command Line Error... No trf type is supplied"
-  myoptparser.print_help()
-  os.sys.exit(-1)
-
-if options.w:
-  print 'fct_trf: INFO:: Trf Command will be writen to file: '+options.w
-  ofile=open(options.w,'w')
-  for i in range(0,len(myconfig.commandList)):
-    ofile.write(myconfig.commandList[i]+'\n')
-  ofile.close()
-
-#execute all commands in commandList. Take care of process exit codes
-
-summarycode=0
-for command in myconfig.commandList:
-  print 'fct_trf: INFO:: Executing Command:'+command
-  statcode=subprocess.call(command,shell=True)
-  summarycode=summarycode+statcode
-  if statcode!=0:
-    print "fct_trf: ERROR : command failed."
-  print 'fct_trf: INFO:: Finished executing command:'+command
-
-if summarycode!=0:
-  print "fct_trf :SUMMARY: fct_trf failed: Exiting with status code: "+str(summarycode)
-  os.sys.exit(summarycode)
-else:
-  print "fct_trf :SUMMARY: All went OK. Exiting with status code: "+str(statcode)
-  os.sys.exit(summarycode)
diff --git a/Tools/FullChainTests/test/FullChainTests_TestConfiguration.xml b/Tools/FullChainTests/test/FullChainTests_TestConfiguration.xml
deleted file mode 100644
index 236d21697a4627e3a6bb8188ec12b2e54cdde174..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/test/FullChainTests_TestConfiguration.xml
+++ /dev/null
@@ -1,347 +0,0 @@
-<?xml version="1.0"?>
-<!-- MB: Search for RUNNUMBER to replace the run input collections and setting -->
-<!-- MB: xml file validation: http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/onlineValidation/validator.html -->
-<!-- <!DOCTYPE unifiedTestConfiguration SYSTEM "https://test-rtt.web.cern.ch/test-rtt/brinick/Results/unifiedTestConfiguration.dtd"> --> <!-- xmltest
-                                                                                                                                           -->
-<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> <!-- official -->
-
-<unifiedTestConfiguration>
-  <atn/>
-  <kv/>
-  <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt">
-    <rttContactPerson>
-      Serhat Istin
-    </rttContactPerson>
-    <mailto>
-      istin@cern.ch
-    </mailto>
-    <refRelease>
-      18.X.0
-    </refRelease>
-    <jobList>
-
-      <!-- COSMICS CHAIN -->
-	  <!-- retire the chain, not useful for Prod rel -->
-          <!-- Run Simulation -->
-          <!-- Run Digitisation -->
-          <!-- Run Reconstruction -->
-		  <!-- retired, cosmics trigger menu is not prod rel [ATR-10605] -->
-
-
-      <!-- LONG RECONSTRUCTION CHAIN with fct_trf.py -->
-      <chain>
-        <chainName>digirecoAFSjob</chainName>
-        <sequential>
-          <!-- Run Digitisation and reconstruction with fct_trf -->
-          <chainElement>
-            <jobTransform userJobId="DigiReco_via_fct_trf">
-              <doc>digireco</doc>
-              <jobTransformJobName>MinBias_digi_Reco_trf</jobTransformJobName>
-              <jobTransformCmd>
-                fct_trf.py --config=$(echo $CMAKE_PREFIX_PATH | tr ":" "\n" |  head -n 1)/src/Tools/FullChainTests/test/digireco_MC12.cfg --runDigi --runReco
-              </jobTransformCmd>
-              <group>FCTTransform</group>
-              <queue>long</queue>
-              <batchWallTime>600</batchWallTime>
-            </jobTransform>
-            <chainfileout>
-              digirecoAfs_mc12a.AOD.pool.root
-            </chainfileout>
-          </chainElement>
-        </sequential>
-      </chain>
-
-      <!-- LONG RECONSTRUCTION CHAIN with fct_trf.py -->
-      <chain>
-        <chainName>digirecoAFSjob</chainName>
-        <sequential>
-          <!-- Run Digitisation and reconstruction with fct_trf -->
-          <chainElement>
-            <jobTransform userJobId="DigiReco_via_fct_trf_MC15c">
-              <doc>digireco</doc>
-              <jobTransformJobName>MinBias_digi_Reco_trf</jobTransformJobName>
-              <jobTransformCmd>
-                fct_trf.py --config=$(echo $CMAKE_PREFIX_PATH | tr ":" "\n" |  head -n 1)/src/Tools/FullChainTests/test/digireco_MC15c.cfg --runDigi --runReco
-              </jobTransformCmd>
-              <group>FCTTransform</group>
-              <queue>long</queue>
-              <batchWallTime>600</batchWallTime>
-            </jobTransform>
-            <chainfileout>
-              digirecoAfs_mc15c.AOD.pool.root
-            </chainfileout>
-          </chainElement>
-        </sequential>
-      </chain>
-
-      <!-- MC15c CHAIN -->
-      <chain>
-        <chainName>chainMC15c</chainName>
-		<sequential>
-		<parallel>
-        <!-- Only letters allowed, no white space or punctuation in Name -->
-        <sequential>
-              <!-- Run Event Generation -->
-              <chainElement>
-                <!-- <jobTransform> -->
-                <jobTransform userJobId="chainMC15c_ZhadEvgen">
-                  <doc>evgen</doc>
-                  <jobTransformJobName>Zhad_Generate_tf_e4581</jobTransformJobName>
-                  <jobTransformCmd>
-				  export JODIR=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest;export JOBOPTSEARCHPATH=$JODIR/share/DSID304xxx:$JOBOPTSEARCHPATH; Generate_tf.py --ecmEnergy 13000. --runNumber 304628 --firstEvent 1 --maxEvents 500 --randomSeed 54298752 --jobConfig MC15JobOptions/MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.py --outputEVNTFile MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.EVNT.pool.root --postExec 'TestHepMC.EffFailThreshold=0.50'
-                  </jobTransformCmd>
-                  <group>FCTTransform</group>
-                  <queue>short</queue>
-                  <batchWallTime>300</batchWallTime>
-                  <keepFilePattern>log.*</keepFilePattern>
-                </jobTransform>
-                <chainfileout>
-                  MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.EVNT.pool.root
-                </chainfileout>
-              </chainElement>
-              <!-- Run Simulation -->
-              <chainElement>
-                <jobTransform userJobId="chainMC15c_ZhadSimul">
-                  <doc>simul</doc>
-                  <jobTransformJobName>ZhadSimul_Sim_tf_s2726</jobTransformJobName>
-                  <jobTransformCmd>
-				  Sim_tf.py --conditionsTag "default:OFLCOND-RUN12-SDR-19" --DataRunNumber 222525 --DBRelease "default:current" --geometryVersion "default:ATLAS-R2-2015-03-01-00_VALIDATION" --physicsList FTFP_BERT --postInclude "default:PyJobTransforms/UseFrontier.py" --preInclude "EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py" --runNumber=304628 --simulator MC12G4 --truthStrategy MC15aPlus --inputEVNTFile MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.EVNT.pool.root --outputHITSFile MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.HITS.pool.root --maxEvents 10
-                  </jobTransformCmd>
-                  <group>FCTTransform</group>
-                  <chaindataset_info>
-                    <jobTransformData />
-                    <chaindatasetName>
-                      MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.EVNT.pool.root
-                    </chaindatasetName>
-                    <dataset_info>
-                      <jobTransformData />
-                      <datasetName>
-				        /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FullChainTests/MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.EVNT.pool.root
-                      </datasetName>
-                    </dataset_info>
-                  </chaindataset_info>
-                  <queue>long</queue>
-                  <batchWallTime>
-                    300
-                  </batchWallTime>
-                </jobTransform>
-                <chainfileout>
-                  MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.HITS.pool.root
-                </chainfileout>
-              </chainElement>
-              <!-- Run Digitisation and Reconstruction -->
-              <chainElement>
-                <jobTransform userJobId="chainMC15c_ZhadDigiReco">
-                  <doc>digireco</doc>
-                  <jobTransformJobName>ZhadDigiReco_Reco_tf_r7772</jobTransformJobName>
-                  <jobTransformCmd>
-				  Reco_tf.py --autoConfiguration everything --conditionsTag "default:OFLCOND-MC15c-SDR-09" --digiSteeringConf='StandardSignalOnlyTruth' --geometryVersion "default:ATLAS-R2-2015-03-01-00" --ignorePatterns Py:TrigConf2COOLLib.py --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194 --pileupFinalBunch 6 --postExec "all:CfgMgr.MessageSvc().setError+=[\"HepMcParticleLink\"]" "ESDtoAOD:fixedAttrib=[s if \"CONTAINER_SPLITLEVEL = \'99\'\" not in s else \"\" for s in svcMgr.AthenaPoolCnvSvc.PoolAttributes];svcMgr.AthenaPoolCnvSvc.PoolAttributes=fixedAttrib" --postInclude "default:RecJobTransforms/UseFrontier.py" --preExec "all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)" "RAWtoESD:from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArCellEmMisCalib=False" "ESDtoAOD:TriggerFlags.AODEDMSet=\"AODSLIM\"" --preInclude "HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run284500_v2.py" "RDOtoRDOTrigger:RecExPers/RecoOutputMetadataList_jobOptions.py" --runNumber 304628 --steering "doRDO_TRIG" --triggerConfig "RDOtoRDOTrigger=MCRECO:DBF:TRIGGERDBMC:2046,20,56" --inputHighPtMinbiasHitsFile /afs/cern.ch/atlas/project/rig/referencefiles/mc15_minBias/mc15_13TeV.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2195/HITS.05608152._002335.pool.root.1 --inputLowPtMinbiasHitsFile /afs/cern.ch/atlas/project/rig/referencefiles/mc15_minBias/mc15_13TeV.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2195/HITS.05608147._000125.pool.root.1 --digiSeedOffset1 1 --digiSeedOffset2 2 --inputHITSFile MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.HITS.pool.root --outputAODFile MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.AOD.pool.root --jobNumber 1 --maxEvents 10
-                  </jobTransformCmd>
-                  <group>FCTTransform</group>
-                  <chaindataset_info>
-                    <jobTransformData />
-                    <chaindatasetName>
-                      MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.HITS.pool.root
-                    </chaindatasetName>
-                    <dataset_info>
-                      <jobTransformData />
-                      <datasetName>
-                        /afs/cern.ch/atlas/offline/external/FullChainTest/long/rtt.fallback/MC15/MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.HITS.pool.root
-                      </datasetName>
-                    </dataset_info>
-                  </chaindataset_info>
-                  <queue>long</queue>
-                  <batchWallTime>300</batchWallTime>
-                </jobTransform>
-                <chainfileout>
-                  MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.AOD.pool.root
-                </chainfileout>
-              </chainElement>
-        </sequential>
-
-
-        <sequential>
-              <!-- Minbias Event Generation -->
-              <chainElement>
-                <!-- <jobTransform> -->
-                <jobTransform userJobId="chainMC15c_MinbiasEvgen">
-				<!-- create minbias chain similar to above Zhad r7725 MC15c chain -->
-                  <doc>evgen</doc>
-                  <jobTransformJobName>MinbiasEvgen_r7725</jobTransformJobName>
-                  <jobTransformCmd>
-				  export JODIR=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest;export JOBOPTSEARCHPATH=$JODIR/share/DSID361xxx:$JOBOPTSEARCHPATH; Generate_tf.py --ecmEnergy=13000. --runNumber=361033 --firstEvent=1 --maxEvents=5000 --randomSeed=8917284 --jobConfig=MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.py --outputEVNTFile=MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.EVNT.pool.root
-                  </jobTransformCmd>
-                  <group>FCTTransform</group>
-                  <queue>short</queue>
-                  <batchWallTime>300</batchWallTime>
-                  <keepFilePattern>log.*</keepFilePattern>
-                </jobTransform>
-                <chainfileout>
-                  MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.EVNT.pool.root
-                </chainfileout>
-              </chainElement>
-              <!-- Run Simulation -->
-              <chainElement>
-                <jobTransform userJobId="chainMC15c_MinbiasSimul">
-                  <doc>simul</doc>
-                  <jobTransformJobName>MinbiasSimul_r7725</jobTransformJobName>
-                  <jobTransformCmd>
-				  Sim_tf.py --conditionsTag "default:OFLCOND-RUN12-SDR-19" --DataRunNumber 222525 --DBRelease "default:current" --geometryVersion "default:ATLAS-R2-2015-03-01-00_VALIDATION" --physicsList FTFP_BERT --postInclude "default:PyJobTransforms/UseFrontier.py" --preInclude "EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py" --runNumber=304628 --simulator MC12G4 --truthStrategy MC15aPlus --inputEVNTFile MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.EVNT.pool.root --outputHITSFile MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.HITS.pool.root --maxEvents=10
-                  </jobTransformCmd>
-                  <group>FCTTransform</group>
-                  <chaindataset_info>
-                    <jobTransformData />
-                    <chaindatasetName>
-                      MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.EVNT.pool.root
-                    </chaindatasetName>
-                    <dataset_info>
-                      <jobTransformData />
-                      <datasetName>
-                        <!-- /afs/cern.ch/atlas/offline/external/FullChainTest/long/rtt.fallback/MC12/MC12.108351.pythia_minbias.8TeV.EVNT.pool.root -->
-						/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.EVNT.pool.root
-                      </datasetName>
-                    </dataset_info>
-                  </chaindataset_info>
-                  <queue>long</queue>
-                  <batchWallTime>
-                    300
-                  </batchWallTime>
-                </jobTransform>
-                <chainfileout>
-                  MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.HITS.pool.root
-                </chainfileout>
-              </chainElement>
-
-			  <!-- cavern output missing in output, 20.7 ok in ATLASSIM-3214 -->
-              <chainElement>
-                <jobTransform userJobId="chainMC15c_minbiasEvt2CavernEvt">
-                  <doc>evgen</doc>
-                  <jobTransformJobName>minbiasEvt2CavernEvt_r7725</jobTransformJobName>
-                  <jobTransformCmd>
-				  AtlasG4_tf.py --inputEVNTFile 'MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.EVNT.pool.root' --outputHITSFile 'discard.HITS.pool.root' --outputEVNT_TRFile 'MC15.cavbg13TeV.EVNT.pool.root' --maxEvents 10 --skipEvents 0 --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --DataRunNumber='222525' --physicsList 'FTFP_BERT' --randomSeed 5678 --preInclude 'SimulationJobOptions/preInclude.G4WriteCavern.py' --postInclude 'PyJobTransforms/UseFrontier.py'
-                  </jobTransformCmd>
-                  <group>FCTTransform</group>
-                  <chaindataset_info>
-                    <jobTransformData />
-                    <chaindatasetName>
-                      MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.EVNT.pool.root
-                    </chaindatasetName>
-                    <dataset_info>
-                      <jobTransformData />
-                      <datasetName>
-                        /afs/cern.ch/atlas/offline/external/FullChainTest/long/rtt.fallback/MC12/MC12.108351.pythia_minbias.8TeV.EVNT.pool.root
-                      </datasetName>
-                    </dataset_info>
-                  </chaindataset_info>
-                  <queue>long</queue>
-                  <batchWallTime>300</batchWallTime>
-                </jobTransform>
-                <chainfileout>
-                  MC15.cavbg13TeV.EVNT.pool.root
-                </chainfileout>
-              </chainElement>
-              <!-- Run Simulation -->
-              <chainElement>
-                <jobTransform userJobId="chainMC15c_cavernSimul">
-                  <doc>simul</doc>
-                  <jobTransformJobName>cavernSimul_r7725</jobTransformJobName>
-                  <jobTransformCmd>
-				  Sim_tf.py --simulator 'MC12G4' --inputEVNT_TRFile 'MC15.cavbg13TeV.EVNT.pool.root' --outputHITSFile 'MC15.cavbg13TeV.HITS.pool.root' --maxEvents -1 --skipEvents 0 --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --enableLooperKiller 'True' --randomSeed 8765 --preInclude 'TRtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.G4ReadCavern.py' --postInclude 'PyJobTransforms/UseFrontier.py' --ignorePatterns='ToolSvc.ISFG4.+ERROR\s+ISF_to_G4Event.+article.conversion.failed'
-                  </jobTransformCmd>
-                  <group>FCTTransform</group>
-                  <chaindataset_info>
-                    <jobTransformData />
-                    <chaindatasetName>
-                      MC15.cavbg13TeV.EVNT.pool.root
-                    </chaindatasetName>
-                    <dataset_info>
-                      <jobTransformData />
-                      <datasetName>
-                        /afs/cern.ch/atlas/offline/external/FullChainTest/long/rtt.fallback/MC12/MC12.cavbg8TeV.EVNT.pool.root
-                      </datasetName>
-                    </dataset_info>
-                  </chaindataset_info>
-                  <queue>long</queue>
-                  <batchWallTime>300</batchWallTime>
-                </jobTransform>
-                <chainfileout>
-                  MC15.cavbg13TeV.HITS.pool.root
-                </chainfileout>
-              </chainElement>
-        </sequential>
-		</parallel>
-
-          <!-- Pileup DIY -->
-          <!-- Run DigiReco -->
-          <chainElement>
-            <jobTransform userJobId="chainMC15c_pileupDigiReco">
-              <doc>digireco</doc>
-              <jobTransformJobName>pileupDigiReco_endofchain</jobTransformJobName>
-              <jobTransformCmd>
-			  Reco_tf.py --inputHITSFile MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.HITS.pool.root --outputRDOFile MC15.Pileup.RDO.pool.root --outputESDFile 'MC15.Pileup.ESD.pool.root' --outputAODFile 'MC15.Pileup.AOD.pool.root' --maxEvents 2 --jobNumber 1 --skipEvents 0 --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag 'OFLCOND-RUN12-SDR-21' --DataRunNumber='222525' --digiSeedOffset1 123456 --digiSeedOffset2 2345678 --LowPtMinbiasHitsFile 'MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.HITS.pool.root' --cavernHitsFile 'MC15.cavbg13TeV.HITS.pool.root' --preInclude 'HITtoRDO:SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,Digitization/ForceUseOfPileUpTools.py,RunDependentSimData/configLumi_run284500_v2.py' --postInclude 'PyJobTransforms/UseFrontier.py'
-              </jobTransformCmd>
-              <group>FCTTransform</group>
-              <chaindataset_info>
-                <jobTransformData />
-                <chaindatasetName>
-                  MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.HITS.pool.root
-                </chaindatasetName>
-                <dataset_info>
-                  <jobTransformData />
-                  <datasetName>
-                    /afs/cern.ch/atlas/offline/external/FullChainTest/long/rtt.fallback/MC12/MC12.147818.Pythia8_AU2CTEQ6L1_Ztautau.8TeV.HITS.pool.root
-                  </datasetName>
-                </dataset_info>
-              </chaindataset_info>
-              <chaindataset_info>
-                <jobTransformData />
-                <chaindatasetName>
-                  MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.HITS.pool.root
-                </chaindatasetName>
-                <dataset_info>
-                  <jobTransformData />
-                  <datasetName>
-                    /afs/cern.ch/atlas/offline/external/FullChainTest/long/rtt.fallback/MC12/MC12.108351.pythia_minbias.8TeV.HITS.pool.root
-                  </datasetName>
-                </dataset_info>
-              </chaindataset_info>
-              <chaindataset_info>
-                <jobTransformData />
-                <chaindatasetName>
-                  MC15.cavbg13TeV.HITS.pool.root
-                </chaindatasetName>
-                <dataset_info>
-                  <jobTransformData />
-                  <datasetName>
-                    /afs/cern.ch/atlas/offline/external/FullChainTest/long/rtt.fallback/MC12/MC12.cavbg8TeV.HITS.pool.root
-                  </datasetName>
-                </dataset_info>
-              </chaindataset_info>
-              <queue>long</queue>
-              <batchWallTime>300</batchWallTime>
-            </jobTransform>
-            <chainfileout>
-              MC15.Pileup.AOD.pool.root
-            </chainfileout>
-          </chainElement>
-      </chain>
-
-    </jobList>
-    <jobGroups>
-      <jobGroup name="FCTTransform" parent="Transform">
-        <keepFilePattern>
-          *.root
-        </keepFilePattern>
-        <keepFilePattern>
-          *.pdf
-        </keepFilePattern>
-        <keepFilePattern>
-          *.log
-        </keepFilePattern>
-        <keepFilePattern>
-          log.*
-        </keepFilePattern>
-      </jobGroup>
-    </jobGroups>
-  </rtt>
-</unifiedTestConfiguration>
diff --git a/Tools/FullChainTests/test/RecoOnly_top_digi.cfg b/Tools/FullChainTests/test/RecoOnly_top_digi.cfg
deleted file mode 100644
index 29de9f040b30f48c73c934493e3e5ce9962e8ac7..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/test/RecoOnly_top_digi.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-inputHitsFile=5200/valid1.105200.T1_McAtNlo_Jimmy.simul.HITS.e380_s610_tid094777
-outputRDOFile=TopRecoLong.RDO.pool.root
-maxEvents=1000
-skipEvents=0
-geometryVersion=ATLAS-GEO-16-00-00
-digiSeedOffset1=123456
-digiSeedOffset2=2345678
-NDMinbiasHitsFile=NONE
-DBRelease=/afs/cern.ch/atlas/www/GROUPS/DATABASE/pacman4/DBRelease/DBRelease-pcache-current.tar.gz
-conditionsTag=OFLCOND-SDR-BS7T-02
-
diff --git a/Tools/FullChainTests/test/RecoOnly_top_reco.cfg b/Tools/FullChainTests/test/RecoOnly_top_reco.cfg
deleted file mode 100644
index 1d2d2cf83c8a0facbb692e102f634a35731e6918..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/test/RecoOnly_top_reco.cfg
+++ /dev/null
@@ -1,9 +0,0 @@
-inputRDOFile=5200/valid1.105200.T1_McAtNlo_Jimmy.digit.RDO.e380_s577_tid078592
-outputESDFile=TopRecoLong.ESD.pool.root
-outputAODFile=TopRecoLong.AOD.pool.root
-outputCBNTFile=TopRecoLong.ntup.root
-maxEvents=1000
-skipEvents=0
-geometryVersion=ATLAS-GEO-16-00-00
-DBRelease=/afs/cern.ch/atlas/www/GROUPS/DATABASE/pacman4/DBRelease/DBRelease-pcache-current.tar.gz
-conditionsTag=OFLCOND-SDR-BS7T-02
diff --git a/Tools/FullChainTests/test/digireco.cfg b/Tools/FullChainTests/test/digireco.cfg
deleted file mode 100644
index 0f6fa05dd6371f727fab2b1c563b3889d4eb9f0b..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/test/digireco.cfg
+++ /dev/null
@@ -1,29 +0,0 @@
-#Digitisation section
-[Digi_trf.py]
-outputRDOFile=myRDO.pool.root
-digiSeedOffset1=1
-digiSeedOffset2=2
-inputHitsFile=root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.105200.T1_McAtNlo_Jimmy.merge.HITS.e835_s1310_s1300/HITS.508808._000857.pool.root.1
-numberOfHighPtMinBias=0.01217
-numberOfLowPtMinBias=9.98783
-jobNumber=0
-conditionsTag=OFLCOND-SDR-BS7T-05-14
-skipEvents=0
-preInclude=SimulationJobOptions/preInclude.PileUpBunchTrains2011Config6_DigitConfig.py,RunDependentSimData/configLumi_mc11a_v3.py
-postExec=ToolSvc.LArAutoCorrTotalToolDefault.NMinBias=0
-preExec='from Digitization.DigitizationFlags import digitizationFlags;digitizationFlags.overrideMetadata=["SimLayout","PhysicsList"]'
-LowPtMinbiasHitsFile=root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108118.Pythia8_minbias_Inelastic_low.merge.HITS.e816_s1299_s1303/HITS.500617._000382.pool.root.1,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108118.Pythia8_minbias_Inelastic_low.merge.HITS.e816_s1299_s1303/HITS.500617._001308.pool.root.1,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108118.Pythia8_minbias_Inelastic_low.merge.HITS.e816_s1299_s1303/HITS.500617._001883.pool.root.1,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108118.Pythia8_minbias_Inelastic_low.merge.HITS.e816_s1299_s1303/HITS.500617._001944.pool.root.1
-HighPtMinbiasHitsFile=root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108119.Pythia8_minbias_Inelastic_high.merge.HITS.e848_s1299_s1303/HITS.500616._001496.pool.root.1,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108119.Pythia8_minbias_Inelastic_high.merge.HITS.e848_s1299_s1303/HITS.500616._002374.pool.root.1,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108119.Pythia8_minbias_Inelastic_high.merge.HITS.e848_s1299_s1303/HITS.500616._007836.pool.root.1,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108119.Pythia8_minbias_Inelastic_high.merge.HITS.e848_s1299_s1303/HITS.500616._009288.pool.root.1
-geometryVersion=ATLAS-GEO-18-01-01
-DataRunNumber=-1
-maxEvents=10
-
-#Reconstruction Section
-[Reco_trf.py]
-outputESDFile=serhat_ESD.pool.root
-autoConfiguration=everything
-triggerConfig=MCRECO:DB:TRIGGERDBMC:295,134,239
-postExec='RegSelSvc=topSequence.allConfigurables.get("RegSelSvcDefault");RegSelSvc.DeltaZ=225*Units.mm'
-outputAODFile=digirecoAfs_mc11a.AOD.pool.root
-preExec='TriggerFlags.AODEDMSet="AODSLIM";rec.Commissioning.set_Value_and_Lock(True);jobproperties.Beam.energy.set_Value_and_Lock(3500*Units.GeV);muonRecFlags.writeSDOs=True;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(8.0);jobproperties.Beam.bunchSpacing.set_Value_and_Lock(50);AODFlags.TrackParticleSlimmer=True;from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import L2IDTrackingCuts;L2IDTrackingCuts.setRegSelZmax(225*Units.mm)'
-inputRDOFile=myRDO.pool.root
diff --git a/Tools/FullChainTests/test/digireco_MC12.cfg b/Tools/FullChainTests/test/digireco_MC12.cfg
deleted file mode 100644
index 4d1361b85b5c2e5345af975861ffc50976f96bd4..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/test/digireco_MC12.cfg
+++ /dev/null
@@ -1,30 +0,0 @@
-#Digitisation section
-[Digi_tf.py]
-outputRDOFile=myRDO.pool.root
-digiSeedOffset1=1
-digiSeedOffset2=2
-inputHitsFile=root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.105200.T1_McAtNlo_Jimmy.merge.HITS.e835_s1310_s1300/HITS.508808._000857.pool.root.1
-numberOfHighPtMinBias=0.01217
-numberOfLowPtMinBias=9.98783
-jobNumber=1
-conditionsTag=OFLCOND-RUN12-SDR-31
-skipEvents=0
-preInclude=SimulationJobOptions/preInclude.PileUpBunchTrains2011Config6_DigitConfig.py,RunDependentSimData/configLumi_mc11a_v3.py
-postExec=ToolSvc.LArAutoCorrTotalToolDefault.NMinBias=0
-preExec='from Digitization.DigitizationFlags import digitizationFlags;digitizationFlags.overrideMetadata=["SimLayout","PhysicsList"]'
-LowPtMinbiasHitsFile=root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108118.Pythia8_minbias_Inelastic_low.merge.HITS.e816_s1299_s1303/HITS.500617._000382.pool.root.1,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108118.Pythia8_minbias_Inelastic_low.merge.HITS.e816_s1299_s1303/HITS.500617._001308.pool.root.1,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108118.Pythia8_minbias_Inelastic_low.merge.HITS.e816_s1299_s1303/HITS.500617._001883.pool.root.1,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108118.Pythia8_minbias_Inelastic_low.merge.HITS.e816_s1299_s1303/HITS.500617._001944.pool.root.1
-HighPtMinbiasHitsFile=root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108119.Pythia8_minbias_Inelastic_high.merge.HITS.e848_s1299_s1303/HITS.500616._001496.pool.root.1,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108119.Pythia8_minbias_Inelastic_high.merge.HITS.e848_s1299_s1303/HITS.500616._002374.pool.root.1,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108119.Pythia8_minbias_Inelastic_high.merge.HITS.e848_s1299_s1303/HITS.500616._007836.pool.root.1,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc11a/mc11_7TeV.108119.Pythia8_minbias_Inelastic_high.merge.HITS.e848_s1299_s1303/HITS.500616._009288.pool.root.1
-geometryVersion=ATLAS-R2-2015-03-01-00
-maxEvents=10
-
-#Reconstruction Section
-[Reco_tf.py]
-outputESDFile=serhat_ESD.pool.root
-autoConfiguration=everything
-#triggerConfig=MCRECO:MC_pp_v3_tight_mc_prescale
-# there is no more pre-scale menus
-triggerConfig=MCRECO:MC_pp_v5
-postExec='RegSelSvc=topSequence.allConfigurables.get("RegSelSvcDefault");RegSelSvc.DeltaZ=225*Units.mm'
-outputAODFile=digirecoAfs_mc12a.AOD.pool.root
-preExec='TriggerFlags.AODEDMSet="AODSLIM";rec.Commissioning.set_Value_and_Lock(True);jobproperties.Beam.energy.set_Value_and_Lock(3500*Units.GeV);muonRecFlags.writeSDOs=True;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(8.0);jobproperties.Beam.bunchSpacing.set_Value_and_Lock(50);AODFlags.TrackParticleSlimmer=True;from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import L2IDTrackingCuts;L2IDTrackingCuts.setRegSelZmax(225*Units.mm)'
-inputRDOFile=myRDO.pool.root
diff --git a/Tools/FullChainTests/test/digireco_MC15c.cfg b/Tools/FullChainTests/test/digireco_MC15c.cfg
deleted file mode 100644
index a17704f05914a8453834b5547db60be286485c51..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/test/digireco_MC15c.cfg
+++ /dev/null
@@ -1,33 +0,0 @@
-# based on r7725
-# do sequentially HITS-RDO and RDO-ESD/AOD
-
-#Digitisation section
-[Digi_tf.py]
-outputRDOFile=myRDO.pool.root
-digiSeedOffset1=1
-digiSeedOffset2=2
-#inputHitsFile=/tmp/xiaohu/mc15_13TeV.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.merge.HITS.e3698_s2608_s2183/HITS.05271163._002032.pool.root.1
-inputHitsFile=/afs/cern.ch/atlas/project/rig/referencefiles/mc15/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s2887_tid08170896_00/HITS.08170896._001944.pool.root.1
-numberOfHighPtMinBias=0.12268057
-numberOfLowPtMinBias=39.8773194
-jobNumber=1
-conditionsTag=default:OFLCOND-MC15c-SDR-09
-skipEvents=0
-preInclude="HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run284500_v2.py"
-preExec="all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)"
-postExec="all:CfgMgr.MessageSvc().setError+=[\"HepMcParticleLink\"]" 
-LowPtMinbiasHitsFile=/afs/cern.ch/atlas/project/rig/referencefiles/mc15_minBias/mc15_13TeV.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2195/HITS.05608147._000125.pool.root.1
-HighPtMinbiasHitsFile=/afs/cern.ch/atlas/project/rig/referencefiles/mc15_minBias/mc15_13TeV.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2195/HITS.05608152._002335.pool.root.1
-geometryVersion=ATLAS-R2-2015-03-01-00
-maxEvents=10
-
-#Reconstruction Section
-[Reco_tf.py]
-inputRDOFile=myRDO.pool.root
-outputESDFile=serhat_ESD.pool.root
-autoConfiguration=everything
-triggerConfig=RDOtoRDOTrigger=MCRECO:DBF:TRIGGERDBMC:2046,20,48
-preExec="RAWtoESD:from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArCellEmMisCalib=False" "ESDtoAOD:TriggerFlags.AODEDMSet=\"AODSLIM\""
-preInclude="RDOtoRDOTrigger:RecExPers/RecoOutputMetadataList_jobOptions.py"
-postExec="ESDtoAOD:fixedAttrib=[s if \"CONTAINER_SPLITLEVEL = \'99\'\" not in s else \"\" for s in svcMgr.AthenaPoolCnvSvc.PoolAttributes];svcMgr.AthenaPoolCnvSvc.PoolAttributes=fixedAttrib"
-outputAODFile=digirecoAfs_mc15c.AOD.pool.root
diff --git a/Tools/FullChainTests/test/test_8tevminbias_evgenreco.sh b/Tools/FullChainTests/test/test_8tevminbias_evgenreco.sh
deleted file mode 100755
index e0eb6b58ebf652d59753891cd886c139cbc343e1..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/test/test_8tevminbias_evgenreco.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-#
-# art-description: evgen
-# art-type: grid
-
-export JODIR=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC14JobOptions/latest;export JOBOPTSEARCHPATH=$JODIR/share/tests:$JOBOPTSEARCHPATH;Generate_tf.py --ecmEnergy=8000. --runNumber=108351 --firstEvent=1 --maxEvents=5000 --randomSeed=54298752 --jobConfig=MC14.108351.Pythia8_A2CTEQ6L1_minbias_inelastic.py --outputEVNTFile=MC14.108351.pythia_minbias.8TeV.EVNT.pool.root
-
-#
-Sim_tf.py --simulator 'MC12G4' --inputEVNTFile 'MC14.108351.pythia_minbias.8TeV.EVNT.pool.root' --outputHitsFile 'MC14.108351.pythia_minbias.8TeV.HITS.pool.root' --maxEvents 10 --skipEvents 0 --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag 'OFLCOND-RUN12-SDR-21' --DataRunNumber '222222' --physicsList 'FTFP_BERT' --enableLooperKiller 'True' --randomSeed 54298752 --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' --postInclude 'PyJobTransforms/UseFrontier.py' --ignorePatterns='ToolSvc.ISFG4.+ERROR\s+ISF_to_G4Event.+article.conversion.failed'
-
-#
-Digi_tf.py --inputHITSFile 'MC14.108351.pythia_minbias.8TeV.HITS.pool.root' --outputRDOFile 'MC14.108351.pythia_minbias.8TeV.RDO.pool.root' --maxEvents '10' --skipEvents '0' --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag=OFLCOND-RUN12-SDR-31 --digiSeedOffset1 123456 --digiSeedOffset2 2345678 --postInclude 'PyJobTransforms/UseFrontier.py'
-
-#
-Reco_tf.py --inputRDOFile 'MC14.108351.pythia_minbias.8TeV.RDO.pool.root' --outputESDFile 'MC14.108351.pythia_minbias.8TeV.ESD.pool.root' --outputAODFile 'MC14.108351.pythia_minbias.8TeV.AOD.pool.root' --maxEvents 10 --skipEvents 0 --autoConfiguration 'everything' --postInclude 'PyJobTransforms/UseFrontier.py'
-
diff --git a/Tools/FullChainTests/test/test_digireco_via_fct_trf.sh b/Tools/FullChainTests/test/test_digireco_via_fct_trf.sh
deleted file mode 100755
index 15f0324945855c1578f0c27cc6279e790cb1ff41..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/test/test_digireco_via_fct_trf.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-#
-# art-description: digireco
-# art-type: grid
-
-fct_trf.py --config=$(echo $CMAKE_PREFIX_PATH | tr ":" "\n" |  head -n 1)/src/Tools/FullChainTests/test/digireco_MC12.cfg --runDigi --runReco
-
diff --git a/Tools/FullChainTests/test/test_digireco_via_fct_trf_mc15c.sh b/Tools/FullChainTests/test/test_digireco_via_fct_trf_mc15c.sh
deleted file mode 100755
index 0116b18fd84c787dd6dc18329240fff7d6b640b9..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/test/test_digireco_via_fct_trf_mc15c.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-#
-# art-description: digireco
-# art-type: grid
-
-fct_trf.py --config=$(echo $CMAKE_PREFIX_PATH | tr ":" "\n" |  head -n 1)/src/Tools/FullChainTests/test/digireco_MC15c.cfg --runDigi --runReco
-
diff --git a/Tools/FullChainTests/test/test_pileup_evgenreco_8TeV.sh b/Tools/FullChainTests/test/test_pileup_evgenreco_8TeV.sh
deleted file mode 100755
index 830dc63b9b2f7f8400bfc83c01e5ebadae47a1f9..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/test/test_pileup_evgenreco_8TeV.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# art-description: evgen to reco
-# art-type: grid
-
-export JODIR=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC14JobOptions/latest;export JOBOPTSEARCHPATH=$JODIR/share/tests:$JOBOPTSEARCHPATH;Generate_tf.py --ecmEnergy=8000. --runNumber=147818 --firstEvent=1 --maxEvents=5000 --randomSeed=54298752 --jobConfig=MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.py --outputEVNTFile=MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.8TeV.EVNT.pool.root --postExec='TestHepMC.EffFailThreshold=0.50'
-
-Sim_tf.py --simulator 'MC12G4' --inputEVNTFile 'MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.8TeV.EVNT.pool.root' --outputHitsFile 'MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.8TeV.HITS.pool.root' --maxEvents 10 --skipEvents 0 --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag 'OFLCOND-RUN12-SDR-21' --DataRunNumber '222222' --physicsList 'FTFP_BERT' --randomSeed 54298752 --enableLooperKiller 'True' --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' --postInclude 'PyJobTransforms/UseFrontier.py' --ignorePatterns 'ToolSvc.ISFG4.+ERROR\s+ISF_to_G4Event.+article.conversion.failed'
-
-####  To provide LowPtMinbiasHitsFile file to the Digi.
-#
-export JODIR=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC14JobOptions/latest;export JOBOPTSEARCHPATH=$JODIR/share/tests:$JOBOPTSEARCHPATH;Generate_tf.py --ecmEnergy=8000. --runNumber=108351 --firstEvent=1 --maxEvents=5000 --randomSeed=54298752 --jobConfig=MC14.108351.Pythia8_A2CTEQ6L1_minbias_inelastic.py --outputEVNTFile=MC14.108351.pythia_minbias.8TeV.EVNT.pool.root
-
-#
-Sim_tf.py --simulator 'MC12G4' --inputEVNTFile 'MC14.108351.pythia_minbias.8TeV.EVNT.pool.root' --outputHitsFile 'MC14.108351.pythia_minbias.8TeV.HITS.pool.root' --maxEvents 10 --skipEvents 0 --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag 'OFLCOND-RUN12-SDR-21' --DataRunNumber '222222' --physicsList 'FTFP_BERT' --enableLooperKiller 'True' --randomSeed 54298752 --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' --postInclude 'PyJobTransforms/UseFrontier.py' --ignorePatterns='ToolSvc.ISFG4.+ERROR\s+ISF_to_G4Event.+article.conversion.failed'
-
-# To provide cavernHitsFile to the Digi.
-AtlasG4_tf.py --inputEVNTFile 'MC14.108351.pythia_minbias.8TeV.EVNT.pool.root' --outputHITSFile 'discard.HITS.pool.root' --outputEVNT_TRFile 'MC14.cavbg8TeV.EVNT.pool.root' --maxEvents 5 --skipEvents 0 --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag 'OFLCOND-RUN12-SDR-21' --DataRunNumber='222222' --physicsList 'FTFP_BERT' --randomSeed 5678 --postInclude 'PyJobTransforms/UseFrontier.py'
-
-#
-Sim_tf.py --simulator 'MC12G4' --inputEVNT_TRFile 'MC14.cavbg8TeV.EVNT.pool.root' --outputHITSFile 'MC14.cavbg8TeV.HITS.pool.root' --maxEvents -1 --skipEvents 0 --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag 'OFLCOND-RUN12-SDR-21' --DataRunNumber '222222' --physicsList 'FTFP_BERT' --enableLooperKiller 'True' --randomSeed 8765 --preInclude 'TRtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.G4ReadCavern.py' --postInclude 'PyJobTransforms/UseFrontier.py' --ignorePatterns='ToolSvc.ISFG4.+ERROR\s+ISF_to_G4Event.+article.conversion.failed'
-
-
-##########
-Digi_tf.py --inputHITSFile MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.8TeV.HITS.pool.root --outputRDOFile MC14.Pileup.RDO.pool.root --maxEvents 2 --skipEvents 0 --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag 'OFLCOND-RUN12-SDR-21' --DataRunNumber='222222' --digiSeedOffset1 123456 --digiSeedOffset2 2345678 --LowPtMinbiasHitsFile 'MC14.108351.pythia_minbias.8TeV.HITS.pool.root' --cavernHitsFile 'MC14.cavbg8TeV.HITS.pool.root' --preInclude 'HITtoRDO:SimulationJobOptions/preInclude.Lumi001DigitConfig_450ns.py,Digitization/ForceUseOfPileUpTools.py' --postInclude 'PyJobTransforms/UseFrontier.py'
-
-#
-Reco_tf.py --inputRDOFile 'MC14.Pileup.RDO.pool.root' --outputESDFile 'MC14.Pileup.ESD.pool.root' --outputAODFile 'MC14.Pileup.AOD.pool.root' --maxEvents 2 --skipEvents 0 --autoConfiguration 'everything' --preExec 'muonCnvFlags.RpcCablingMode="new"'
diff --git a/Tools/FullChainTests/test/test_pileup_evgenreco_mc15c.sh b/Tools/FullChainTests/test/test_pileup_evgenreco_mc15c.sh
deleted file mode 100755
index 74fa53ff8acf0bf891b283d1ae336f304216d378..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/test/test_pileup_evgenreco_mc15c.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-#
-# art-description: evgen to reco
-# art-type: grid
-
-function findinput(){
-  if [ ! -f $1 ]; then
-    echo $2
-  else
-    echo $1
-  fi
-}
-
-# INPUTS and backups
-MY_EVGEN_zhad='MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.EVNT.pool.root'
-BK_EVGEN_zhad='/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FullChainTests/MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.EVNT.pool.root'
-
-MY_EVGEN_minbias='MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.EVNT.pool.root'
-BK_EVGEN_minbias='/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.EVNT.pool.root'
-
-
-export JODIR=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest;export JOBOPTSEARCHPATH=$JODIR/share/DSID304xxx:$JOBOPTSEARCHPATH; Generate_tf.py --ecmEnergy 13000. --runNumber 304628 --firstEvent 1 --maxEvents 10 --randomSeed 54298752 --jobConfig MC15JobOptions/MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.py --outputEVNTFile ${MY_EVGEN_zhad} --postExec 'TestHepMC.EffFailThreshold=0.50'
-
-# check EVGEN output OK
-MY_EVGEN_zhad=$(findinput MY_EVGEN_zhad BK_EVGEN_zhad)
-
-#
-Sim_tf.py --conditionsTag "default:OFLCOND-RUN12-SDR-19" --DataRunNumber 222525 --DBRelease "current" --geometryVersion "default:ATLAS-R2-2015-03-01-00_VALIDATION" --physicsList FTFP_BERT --postInclude "default:PyJobTransforms/UseFrontier.py" --preInclude "EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py" --runNumber=304628 --simulator MC12G4 --truthStrategy MC15aPlus --inputEVNTFile ${MY_EVGEN_zhad} --outputHITSFile MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.HITS.pool.root --maxEvents 10
-
-#### To provide input for the LowPtMinbiasHitsFile in Reco
-#
-export JODIR=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest;export JOBOPTSEARCHPATH=$JODIR/share/DSID361xxx:$JOBOPTSEARCHPATH; Generate_tf.py --ecmEnergy=13000. --runNumber=361033 --firstEvent=1 --maxEvents=5000 --randomSeed=8917284 --jobConfig=MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.py --outputEVNTFile=${MY_EVGEN_minbias}
-
-# check EVGEN output OK
-MY_EVGEN_minbias=$(findinput MY_EVGEN_minbias BK_EVGEN_minbias)
-
-#
-Sim_tf.py --conditionsTag "default:OFLCOND-RUN12-SDR-19" --DataRunNumber 222525 --DBRelease "current" --geometryVersion "default:ATLAS-R2-2015-03-01-00_VALIDATION" --physicsList FTFP_BERT --postInclude "default:PyJobTransforms/UseFrontier.py" --preInclude "EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py" --runNumber=304628 --simulator MC12G4 --truthStrategy MC15aPlus --inputEVNTFile ${MY_EVGEN_minbias} --outputHITSFile MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.HITS.pool.root --maxEvents=10
-
-##### To provide input for the cavernHitsFile
-AtlasG4_tf.py --inputEVNTFile ${MY_EVGEN_minbias} --outputHITSFile 'discard.HITS.pool.root' --outputEVNT_TRFile 'MC15.cavbg13TeV.EVNT.pool.root' --maxEvents 10 --skipEvents 0 --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --DataRunNumber='222525' --physicsList 'FTFP_BERT' --randomSeed 5678 --preInclude 'SimulationJobOptions/preInclude.G4WriteCavern.py' --postInclude 'PyJobTransforms/UseFrontier.py'
-
-#
-Sim_tf.py --simulator 'MC12G4' --inputEVNT_TRFile 'MC15.cavbg13TeV.EVNT.pool.root' --outputHITSFile 'MC15.cavbg13TeV.HITS.pool.root' --maxEvents -1 --skipEvents 0 --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --enableLooperKiller 'True' --randomSeed 8765 --preInclude 'TRtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.G4ReadCavern.py' --postInclude 'PyJobTransforms/UseFrontier.py' --ignorePatterns='ToolSvc.ISFG4.+ERROR\s+ISF_to_G4Event.+article.conversion.failed'
-
-
-#### Reco
-Reco_tf.py --inputHITSFile MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.HITS.pool.root --outputRDOFile MC15.Pileup.RDO.pool.root --outputESDFile 'MC15.Pileup.ESD.pool.root' --outputAODFile 'MC15.Pileup.AOD.pool.root' --maxEvents 2 --jobNumber 1 --skipEvents 0 --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag 'OFLCOND-RUN12-SDR-21' --DataRunNumber='222525' --digiSeedOffset1 123456 --digiSeedOffset2 2345678 --LowPtMinbiasHitsFile 'MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.13TeV.HITS.pool.root' --cavernHitsFile 'MC15.cavbg13TeV.HITS.pool.root' --preInclude 'HITtoRDO:SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,Digitization/ForceUseOfPileUpTools.py,RunDependentSimData/configLumi_run284500_v2.py' --postInclude 'PyJobTransforms/UseFrontier.py'
-
diff --git a/Tools/FullChainTests/test/test_zhad_evgenreco_mc15c.sh b/Tools/FullChainTests/test/test_zhad_evgenreco_mc15c.sh
deleted file mode 100755
index 99059f39de7a1a558993649a5b02c3ce725749d7..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/test/test_zhad_evgenreco_mc15c.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-#
-# art-description: evgen to reco
-# art-type: grid
-
-function findinput(){
-  if [ ! -f $1 ]; then
-    echo $2
-  else
-    echo $1
-  fi
-}
-
-# INPUTS and backups
-MY_EVGEN='MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.EVNT.pool.root'
-BK_EVGEN='/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FullChainTests/MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.EVNT.pool.root'
-
-#
-export JODIR=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest;export JOBOPTSEARCHPATH=$JODIR/share/DSID304xxx:$JOBOPTSEARCHPATH; Generate_tf.py --ecmEnergy 13000. --runNumber 304628 --firstEvent 1 --maxEvents 10 --randomSeed 54298752 --jobConfig MC15JobOptions/MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.py --outputEVNTFile ${MY_EVGEN} --postExec 'TestHepMC.EffFailThreshold=0.50'
-
-
-# check EVGEN output OK
-MY_EVGEN=$(findinput MY_EVGEN BK_EVGEN)
-
-#
-Sim_tf.py --conditionsTag "default:OFLCOND-RUN12-SDR-19" --DataRunNumber 222525 --DBRelease "current" --geometryVersion "default:ATLAS-R2-2015-03-01-00_VALIDATION" --physicsList FTFP_BERT --postInclude "default:PyJobTransforms/UseFrontier.py" --preInclude "EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py" --runNumber=304628 --simulator MC12G4 --truthStrategy MC15aPlus --inputEVNTFile ${MY_EVGEN} --outputHITSFile MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.HITS.pool.root --maxEvents 10
-
-#
-Reco_tf.py --autoConfiguration everything --conditionsTag "default:OFLCOND-MC15c-SDR-09" --digiSteeringConf='StandardSignalOnlyTruth' --geometryVersion "default:ATLAS-R2-2015-03-01-00" --ignorePatterns Py:TrigConf2COOLLib.py --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194 --pileupFinalBunch 6 --postExec "all:CfgMgr.MessageSvc().setError+=[\"HepMcParticleLink\"]" "ESDtoAOD:fixedAttrib=[s if \"CONTAINER_SPLITLEVEL = \'99\'\" not in s else \"\" for s in svcMgr.AthenaPoolCnvSvc.PoolAttributes];svcMgr.AthenaPoolCnvSvc.PoolAttributes=fixedAttrib" --postInclude "default:RecJobTransforms/UseFrontier.py" --preExec "all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)" "RAWtoESD:from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArCellEmMisCalib=False" "ESDtoAOD:TriggerFlags.AODEDMSet=\"AODSLIM\"" --preInclude "HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run284500_v2.py" "RDOtoRDOTrigger:RecExPers/RecoOutputMetadataList_jobOptions.py" --runNumber 304628 --steering "doRDO_TRIG" --triggerConfig "RDOtoRDOTrigger=MCRECO:DBF:TRIGGERDBMC:2046,20,56" --inputHighPtMinbiasHitsFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FullChainTests/HITS.05608152._002335.pool.root.1 --inputLowPtMinbiasHitsFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FullChainTests/HITS.05608147._000125.pool.root.1 --digiSeedOffset1 1 --digiSeedOffset2 2 --inputHITSFile MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.HITS.pool.root --outputAODFile MC15.304628.Pythia8EvtGen_A14NNPDF23LO_ZHad_280_500.13TeV.AOD.pool.root --jobNumber 1 --maxEvents 10
-
-
diff --git a/Tools/FullChainTests/test/test_ztautau_evgenreco.sh b/Tools/FullChainTests/test/test_ztautau_evgenreco.sh
deleted file mode 100755
index 4eadac10e8a2c5787bfb5ab1abe004e77697f33a..0000000000000000000000000000000000000000
--- a/Tools/FullChainTests/test/test_ztautau_evgenreco.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-#
-# art-description: evgen to reco
-# art-type: grid
-
-export JODIR=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC14JobOptions/latest;export JOBOPTSEARCHPATH=$JODIR/share/tests:$JOBOPTSEARCHPATH;Generate_tf.py --ecmEnergy=8000. --runNumber=147818 --firstEvent=1 --maxEvents=5000 --randomSeed=54298752 --jobConfig=MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.py --outputEVNTFile=MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.8TeV.EVNT.pool.root --postExec='TestHepMC.EffFailThreshold=0.50'
-
-Sim_tf.py --simulator 'MC12G4' --inputEVNTFile 'MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.8TeV.EVNT.pool.root' --outputHitsFile 'MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.8TeV.HITS.pool.root' --maxEvents 10 --skipEvents 0 --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag 'OFLCOND-RUN12-SDR-21' --DataRunNumber '222222' --physicsList 'FTFP_BERT' --randomSeed 54298752 --enableLooperKiller 'True' --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' --postInclude 'PyJobTransforms/UseFrontier.py' --ignorePatterns 'ToolSvc.ISFG4.+ERROR\s+ISF_to_G4Event.+article.conversion.failed'
-
-Digi_tf.py --inputHITSFile 'MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.8TeV.HITS.pool.root' --outputRDOFile 'MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.8TeV.RDO.pool.root' --maxEvents 10 --skipEvents 0 --geometryVersion 'ATLAS-R2-2015-03-01-00' --digiSeedOffset1 123456 --digiSeedOffset2 2345678 --conditionsTag 'OFLCOND-RUN12-SDR-31' --postInclude 'PyJobTransforms/UseFrontier.py'
-
-#
-Reco_tf.py --inputRDOFile 'MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.8TeV.RDO.pool.root' --outputESDFile 'MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.8TeV.ESD.pool.root' --outputAODFile 'MC14.147818.Pythia8_AU2CTEQ6L1_Ztautau.8TeV.AOD.pool.root' --maxEvents 10 --skipEvents 0 --autoConfiguration 'everything'
-
diff --git a/Tools/PyJobTransforms/python/trfExe.py b/Tools/PyJobTransforms/python/trfExe.py
index e046bb1baa4d26cb379a3aad8e1233dbf4269eb4..0b420f93576138292bef7c1a84f95beaba4983a7 100755
--- a/Tools/PyJobTransforms/python/trfExe.py
+++ b/Tools/PyJobTransforms/python/trfExe.py
@@ -1859,11 +1859,8 @@ class archiveExecutor(scriptExecutor):
         self.setPreExeStart()
         self._memMonitor = False
 
-        if 'exe' in self.conf.argdict:
-            self._exe = self.conf.argdict['exe']
-
         #unpack archived inputs
-        import tarfile, zipfile
+        import zipfile
         if 'inputDataFile' in self.conf.argdict:
             for f in self.conf.argdict['inputDataFile'].value:
                 if zipfile.is_zipfile(f):
@@ -1871,57 +1868,9 @@ class archiveExecutor(scriptExecutor):
                     print 'Extracting input zip file {0} to temporary directory {1}'.format(f,'tmp')
                     archive.extractall('tmp')
                     archive.close()
-                elif tarfile.is_tarfile(f):
-                    archive = tarfile.open(f, 'r:*')
-                    print 'Extracting input tar file {0} to temporary directory {1}'.format(f,'tmp')
-                    archive.extractall('tmp')
-                    archive.close()
-
-        #proceed to archive
-        if self._exe == 'tar':
-            #this is needed to keep the transform from scheduling two sub-steps
-            if 'outputArchFile' not in self.conf.argdict:
-                raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_ARG_MISSING'), 'Missing output file name')
-
-            self._cmd = ['python']
-            try:
-                with open('tar_wrapper.py', 'w') as tar_wrapper:
-                    print >> tar_wrapper, "import zipfile, tarfile, os, shutil"
-                    if os.path.exists(self.conf.argdict['outputArchFile'].value[0]):
-                        #appending input file(s) to existing archive. Compressed writing in append mode is not possible
-                        print >> tar_wrapper, "tar = tarfile.open('{}', 'a:')".format(self.conf.argdict['outputArchFile'].value[0])
-                    else:
-                        #creating new archive
-                        if 'compressionType' in self.conf.argdict:
-                            if self.conf.argdict['compressionType'] == 'gzip':
-                                print >> tar_wrapper, "tar = tarfile.open('{}', 'w:gz')".format(self.conf.argdict['outputArchFile'].value[0])
-                            elif self.conf.argdict['compressionType'] == 'bzip2':
-                                  print >> tar_wrapper, "tar = tarfile.open('{}', 'w:bz2')".format(self.conf.argdict['outputArchFile'].value[0])
-                            elif self.conf.argdict['compressionType'] == 'none':
-                                  print >> tar_wrapper, "tar = tarfile.open('{}', 'w:')".format(self.conf.argdict['outputArchFile'].value[0])
-                    print >> tar_wrapper, "for f in {}:".format(self.conf.argdict['inputDataFile'].value)
-                    print >> tar_wrapper, "    if not zipfile.is_zipfile(f) and not tarfile.is_tarfile(f):"
-                    print >> tar_wrapper, "        print 'Tarring {}'.format(os.path.basename(f))"
-                    print >> tar_wrapper, "        tar.add(f)"
-                    print >> tar_wrapper, "if os.path.isdir('tmp'):"
-                    print >> tar_wrapper, "    for root, dirs, files in os.walk('tmp'):"
-                    print >> tar_wrapper, "        for name in files:"
-                    print >> tar_wrapper, "            print 'Tarring {}'.format(name)"
-                    print >> tar_wrapper, "            tar.add(os.path.join(root, name),name)"
-                    print >> tar_wrapper, "    shutil.rmtree('tmp')"
-                    print >> tar_wrapper, "tar.close()"
-                os.chmod('tar_wrapper.py', 0755)
-            except (IOError, OSError) as e:
-                errMsg = 'error writing tar wrapper {fileName}: {error}'.format(fileName = 'tar_wrapper.py',
-                    error = e
-                )
-                msg.error(errMsg)
-                raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_EXEC_SETUP_WRAPPER'),
-                    errMsg
-                )
-            self._cmd.append('tar_wrapper.py')
 
-        elif self._exe == 'zip':
+        #archiving
+        if self._exe == 'zip':
             if 'outputArchFile' not in self.conf.argdict:
                 raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_ARG_MISSING'), 'Missing output file name')
 
@@ -1936,9 +1885,12 @@ class archiveExecutor(scriptExecutor):
                         #creating new archive
                         print >> zip_wrapper, "zf = zipfile.ZipFile('{}', mode='w', allowZip64=True)".format(self.conf.argdict['outputArchFile'].value[0])
                     print >> zip_wrapper, "for f in {}:".format(self.conf.argdict['inputDataFile'].value)
-                    print >> zip_wrapper, "    if not zipfile.is_zipfile(f) and not tarfile.is_tarfile(f):"
+                    print >> zip_wrapper, "    if not zipfile.is_zipfile(f):"
                     print >> zip_wrapper, "        print 'Zipping {}'.format(os.path.basename(f))"
                     print >> zip_wrapper, "        zf.write(f, arcname=os.path.basename(f), compress_type=zipfile.ZIP_STORED)"
+                    print >> zip_wrapper, "    if os.access(f, os.F_OK):"
+                    print >> zip_wrapper, "        print 'Removing input file {}'.format(f)"
+                    print >> zip_wrapper, "        os.unlink(f)"
                     print >> zip_wrapper, "if os.path.isdir('tmp'):"
                     print >> zip_wrapper, "    for root, dirs, files in os.walk('tmp'):"
                     print >> zip_wrapper, "        for name in files:"
@@ -1957,19 +1909,18 @@ class archiveExecutor(scriptExecutor):
                 )
             self._cmd.append('zip_wrapper.py')
 
+        #unarchiving
         elif self._exe == 'unarchive':
-            if not zipfile.is_zipfile(self.conf.argdict['inputArchFile'].value[0]) and not tarfile.is_tarfile(self.conf.argdict['inputArchFile'].value[0]):
-                raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_INPUT_FILE_ERROR'),
-                                                                'The input file is not a zip or tar archive - aborting unpacking')
+            for infile in self.conf.argdict['inputArchFile'].value:
+                 if not zipfile.is_zipfile(infile):
+                     raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_INPUT_FILE_ERROR'),
+                                                                     'An input file is not a zip archive - aborting unpacking')
             self._cmd = ['python']
             try:
                 with open('unarchive_wrapper.py', 'w') as unarchive_wrapper:
-                    print >> unarchive_wrapper, "import zipfile, tarfile"
+                    print >> unarchive_wrapper, "import zipfile"
                     print >> unarchive_wrapper, "for f in {}:".format(self.conf.argdict['inputArchFile'].value)
-                    print >> unarchive_wrapper, "     if zipfile.is_zipfile(f):"
-                    print >> unarchive_wrapper, "         archive = zipfile.ZipFile(f, mode='r')"
-                    print >> unarchive_wrapper, "     elif tarfile.is_tarfile(f):"
-                    print >> unarchive_wrapper, "         archive = tarfile.open(f, 'r:*')"
+                    print >> unarchive_wrapper, "     archive = zipfile.ZipFile(f, mode='r')"
                     print >> unarchive_wrapper, "     path = '{}'".format(self.conf.argdict['path'])
                     print >> unarchive_wrapper, "     print 'Extracting archive {0} to {1}'.format(f,path)"
                     print >> unarchive_wrapper, "     archive.extractall(path)"
diff --git a/Tools/PyJobTransforms/scripts/Archive_tf.py b/Tools/PyJobTransforms/scripts/Archive_tf.py
index 2798ca5be0863301dc24b4fc24754a442662124e..83753708fc520e3bfd8145a1f736edd4453ad54d 100755
--- a/Tools/PyJobTransforms/scripts/Archive_tf.py
+++ b/Tools/PyJobTransforms/scripts/Archive_tf.py
@@ -49,9 +49,6 @@ def addMyArgs(parser):
     # Use arggroup to get these arguments in their own sub-section (of --help)
     parser.defineArgGroup('Archiver', 'Options')
     parser.defineArgGroup('Unarchiver', 'Options')
-    parser.defineArgGroup('Tar archiver', 'Options')
-    parser.add_argument('--exe', group='Archiver',
-                        help='Archiving command, default is zip', choices=['zip', 'tar'])
     parser.add_argument('--inputDataFile', '--inputFile', nargs='+',
                         type=trfArgClasses.argFactory(trfArgClasses.argFile, io='input', type='misc'),
                         help='Input file(s)', group='Archiver')
@@ -63,9 +60,6 @@ def addMyArgs(parser):
     parser.add_argument('--outputArchFile', '--outputFile', 
                         type=trfArgClasses.argFactory(trfArgClasses.argFile, io='output', type='misc'),
                         help='Output archive file', group='Archiver')
-    parser.add_argument('--compressionType', group='Tar archiver',
-                        help='Underlying compression type of tar. The default is none', choices=['gzip', 'bzip2', 'none'],
-                        default='none')
 
 if __name__ == '__main__':
     main()
diff --git a/Tracking/TrkEvent/TrkTruthData/src/TrkTruthDataDict.h b/Tracking/TrkEvent/TrkTruthData/src/TrkTruthDataDict.h
index f0d7d86c953a1ed29290ce957cfdf5a51f06460a..cecd7774bbc528ddcf5adf8d624c2c6154a0aa59 100755
--- a/Tracking/TrkEvent/TrkTruthData/src/TrkTruthDataDict.h
+++ b/Tracking/TrkEvent/TrkTruthData/src/TrkTruthDataDict.h
@@ -19,7 +19,7 @@
  
 namespace 
 {
-  struct temp
+  struct temp_TrkTruthData
   {
     std::pair<Trk::TrackTruthKey,TrackTruth> m_2;
     std::pair<Trk::TrackTruthKey, DetailedTrackTruth > m_4;    
diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/src/TrkTruthTPCnv.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/src/TrkTruthTPCnv.cxx
index d58693d4cd030459b2745d3354a28e90104bee66..89e329e9eb2362ec06376aba0205345155622532 100644
--- a/Tracking/TrkEventCnv/TrkTruthTPCnv/src/TrkTruthTPCnv.cxx
+++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/src/TrkTruthTPCnv.cxx
@@ -5,10 +5,17 @@
 // generate the T/P converter entries
 #include "AthenaKernel/TPCnvFactory.h"
 
+#include "TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p2.h"
+#include "TrkTruthTPCnv/DetailedTrackTruthCollection_p2.h"
 #include "TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p3.h"
 #include "TrkTruthTPCnv/DetailedTrackTruthCollection_p3.h"
 #include "TrkTruthData/DetailedTrackTruthCollection.h"
 
+DECLARE_TPCNV_FACTORY (DetailedTrackTruthCollectionCnv_p2,
+                       DetailedTrackTruthCollection,
+                       Trk::DetailedTrackTruthCollection_p2,
+                       Athena::TPCnvVers::Old)
+
 DECLARE_TPCNV_FACTORY (DetailedTrackTruthCollectionCnv_p3,
                        DetailedTrackTruthCollection,
                        Trk::DetailedTrackTruthCollection_p3,
diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/EnergyLossUpdator.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/EnergyLossUpdator.h
index af2543bee9c9e01f6343665d29e672f83adcc59a..ef6c83823c520da9a7ff09c9b90fd5e7dc729ddc 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/EnergyLossUpdator.h
+++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/EnergyLossUpdator.h
@@ -164,6 +164,8 @@ namespace Trk {
         Units: [MeV]
         */
       double dEdXBetheBloch(const MaterialProperties& mat,
+                            double& transKaz,
+                            double& transTmax,
                             double gamma,
                             double beta,
                             ParticleHypothesis particle=pion) const;
@@ -184,28 +186,13 @@ namespace Trk {
       bool                    m_useTrkUtils;               //!< use eloss parametrisation from TrkUtils MaterialInterAction.h
       bool                    m_gaussianVavilovTheory;     //!< include energy loss straggling or not
       bool                    m_useBetheBlochForElectrons; //!< use adopted bethe bloch for electrons 
-      mutable double          m_transKaz;                  //!< transport kaz for straggling 
-      mutable double          m_transTmax;                 //!< transport Tmax for straggling
       double                  m_stragglingErrorScale;      //!< stragglingErrorScale
       double                  m_mpvScale;                  //!< a scalor that can be introduced for the MPV
       bool                    m_mpvSigmaParametric;        //!< take the (crude) parametric mpv sigma 
       bool                    m_detailedEloss;             //!< provide extended EnergyLoss info 
       bool                    m_optimalRadiation;          //!< use calorimeter more optimal for radiation detection
-
-      static double           s_ka_BetheBloch;          //!< KOverA factor in Bethe-Bloch equation [MeV*cm2/gram]
-      static double           s_eulerConstant;          //!< the euler constant for mip calculations
-
-      static double           s_fwhmToSigma;            //!< 1./[2.*sart(2.*ln(2.))] for fwhm -> sigma
-
-      static double           s_mpv_p0;                 //! variable obtained from a fit to landau distribution for sigma(landau)
-      static double           s_mpv_p1;                 //! variable obtained from a fit to landau distribution for sigma(landau)
-      static double           s_mpv_p2;                 //! variable obtained from a fit to landau distribution for sigma(landau)
-
-      static ParticleMasses   s_particleMasses;         //!< struct of Particle masses                                                        
-                                                      
   };
 
-
 } // end of namespace
 
 
diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h
index 97319abf5374b3ff175ed88a9f94a62953a549ee..35380db968da604b4e1995a1c727190638ea52e2 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h
+++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h
@@ -22,6 +22,8 @@
 // STD
 #include <cstring>
 #include <exception>
+#include <atomic>
+#include <mutex>
 
 #define TRKEXTOOLS_MAXNAVSTEPS 100
 
@@ -145,36 +147,33 @@ namespace Trk {
       bool                                      m_validationMode;            //!< boolean to switch to validation mode
       std::string                               m_validationTreeName;        //!< validation tree name - to be acessed by this from root
       std::string                               m_validationTreeDescription; //!< validation tree description - second argument in TTree
-      std::string                               m_validationTreeFolder;      //!< stream/folder to for the TTree to be written out
-                                                
-                                                
-      TTree*                                    m_validationTree;            //!< Root Validation Tree
-                                                
-      mutable int                               m_boundariesCounter;         //!< counter for boundary surfaces hit   
-                                                
+      std::string                               m_validationTreeFolder;      //!< stream/folder to for the TTree to be written out                                       
+      /* 
+       * Is this really needed? 
+       */ 
+      TTree*                                    m_validationTree;            //!< Root Validation Tree                                             
+      mutable int                               m_boundariesCounter;         //!< counter for boundary surfaces hit                                                   
       mutable int                               m_boundaries;                           //!< associated Ntuple variable
       mutable float                             m_boundaryHitX[TRKEXTOOLS_MAXNAVSTEPS]; //!< x Position of interseciton with BoundarySurface
       mutable float                             m_boundaryHitY[TRKEXTOOLS_MAXNAVSTEPS]; //!< y Position of interseciton with BoundarySurface
       mutable float                             m_boundaryHitR[TRKEXTOOLS_MAXNAVSTEPS]; //!< Radius of interseciton with BoundarySurface
       mutable float                             m_boundaryHitZ[TRKEXTOOLS_MAXNAVSTEPS]; //!< z Position of interseciton with BoundarySurface
-
       // ------ PERFORMANCE STATISTICS -------------------------------- //
 
-      mutable int                               m_forwardCalls;              //!< couter for forward nextBounday calls
-      mutable int                               m_forwardFirstBoundSwitch;   //!< couter for failed first forward nextBounday calls
-      mutable int                               m_forwardSecondBoundSwitch;  //!< couter for failed second forward nextBounday calls
-      mutable int                               m_forwardThirdBoundSwitch;   //!< couter for failed third forward nextBounday calls
+      /* All performance stat counters are atomic (the simplest solution perhaps not the most performant one)*/
+      mutable std::atomic<int>                               m_forwardCalls;              //!< couter for forward nextBounday calls
+      mutable std::atomic<int>                               m_forwardFirstBoundSwitch;   //!< couter for failed first forward nextBounday calls
+      mutable std::atomic<int>                               m_forwardSecondBoundSwitch;  //!< couter for failed second forward nextBounday calls
+      mutable std::atomic<int>                               m_forwardThirdBoundSwitch;   //!< couter for failed third forward nextBounday calls
                                                 
-      mutable int                               m_backwardCalls;             //!< couter for backward nextBounday calls
-      mutable int                               m_backwardFirstBoundSwitch;  //!< couter for failed first backward nextBounday calls
-      mutable int                               m_backwardSecondBoundSwitch; //!< couter for failed second backward nextBounday calls
-      mutable int                               m_backwardThirdBoundSwitch;  //!< couter for failed third backward nextBounday calls
+      mutable std::atomic<int>                               m_backwardCalls;             //!< couter for backward nextBounday calls
+      mutable std::atomic<int>                               m_backwardFirstBoundSwitch;  //!< couter for failed first backward nextBounday calls
+      mutable std::atomic<int>                               m_backwardSecondBoundSwitch; //!< couter for failed second backward nextBounday calls
+      mutable std::atomic<int>                               m_backwardThirdBoundSwitch;  //!< couter for failed third backward nextBounday calls
                                                 
-      mutable int                               m_outsideVolumeCase;         //!< counter for navigation-break in outside volume cases (ovc)
-      mutable int                               m_sucessfulBackPropagation;  //!< counter for sucessful recovery of navigation-break in ovc 
+      mutable std::atomic<int>                               m_outsideVolumeCase;         //!< counter for navigation-break in outside volume cases (ovc)
+      mutable std::atomic<int>                               m_sucessfulBackPropagation;  //!< counter for sucessful recovery of navigation-break in ovc 
 
-      /** static magnetic field properties (empty to fake straight line intersects) */
-      static Trk::MagneticFieldProperties       s_zeroMagneticField;        //!< no magnetic field there
       
       //------------ Magnetic field properties
       bool                                      m_fastField;
diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/EnergyLossUpdator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/EnergyLossUpdator.cxx
index 136b7956852b24a0a7d59cf6e3358a13053c8ecb..d5ef45078cb58254302a4d185d1b56f1335c2642 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/src/EnergyLossUpdator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/EnergyLossUpdator.cxx
@@ -16,19 +16,21 @@
 
 #include <math.h>
 
+namespace{
 // static particle masses
-Trk::ParticleMasses Trk::EnergyLossUpdator::s_particleMasses;
+Trk::ParticleMasses  s_particleMasses{};
 // statics doubles
-double Trk::EnergyLossUpdator::s_ka_BetheBloch = 30.7075 * Gaudi::Units::MeV;
-double Trk::EnergyLossUpdator::s_eulerConstant = 0.577215665; // as given by google.com ;-)
+constexpr double s_ka_BetheBloch = 30.7075 * Gaudi::Units::MeV;
+constexpr double s_eulerConstant = 0.577215665; // as given by google.com ;-)
 
 // from full with at half maximum to sigma for a gaussian
-double Trk::EnergyLossUpdator::s_fwhmToSigma = 0.424;  //   1./(2.*sqrt(2.*log(2.)));
+constexpr double s_fwhmToSigma = 0.424;  //   1./(2.*sqrt(2.*log(2.)));
 
 // mpv to sigma fit values
-double Trk::EnergyLossUpdator::s_mpv_p0 = 4.57270e-02;
-double Trk::EnergyLossUpdator::s_mpv_p1 = 8.11761e-03;
-double Trk::EnergyLossUpdator::s_mpv_p2 = -4.85133e-01;
+constexpr double s_mpv_p0 = 4.57270e-02;
+constexpr double s_mpv_p1 = 8.11761e-03;
+constexpr double s_mpv_p2 = -4.85133e-01;
+}
 
 // constructor
 Trk::EnergyLossUpdator::EnergyLossUpdator(const std::string &t, const std::string &n, const IInterface *p) :
@@ -36,8 +38,6 @@ Trk::EnergyLossUpdator::EnergyLossUpdator(const std::string &t, const std::strin
   m_useTrkUtils(true),
   m_gaussianVavilovTheory(false),
   m_useBetheBlochForElectrons(true),
-  m_transKaz(0.),
-  m_transTmax(0.),
   m_stragglingErrorScale(1.),
   m_mpvScale(0.98),
   m_mpvSigmaParametric(false),
@@ -46,7 +46,6 @@ Trk::EnergyLossUpdator::EnergyLossUpdator(const std::string &t, const std::strin
   declareInterface<Trk::IEnergyLossUpdator>(this);
   // scale from outside
   declareProperty("UseTrkUtils", m_useTrkUtils);
-  declareProperty("BetheBlochKAFactor", s_ka_BetheBloch);
   // some additional setup
   declareProperty("UseGaussVavilovTheory", m_gaussianVavilovTheory);
   declareProperty("UseBetheBlochForElectrons", m_useBetheBlochForElectrons);
@@ -93,10 +92,10 @@ Trk::EnergyLossUpdator::dEdX(const MaterialProperties &mat,
   double beta = p / E;
   double gamma = E / m;
 
-  m_transKaz = 0.;
-  m_transTmax = 0.;
+  double transKaz = 0.;
+  double transTmax = 0.;
   // add ionization and radiation
-  double dEdX = dEdXBetheBloch(mat, beta, gamma, particle) + dEdXBetheHeitler(mat, E, particle);
+  double dEdX = dEdXBetheBloch(mat, transKaz, transTmax,beta, gamma, particle) + dEdXBetheHeitler(mat, E, particle);
 
   // add e+e- pair production and photonuclear effect for muons at energies above 8 GeV
   if ((particle == Trk::muon) && (E > 8000.)) {
@@ -131,10 +130,7 @@ Trk::EnergyLossUpdator::energyLoss(const MaterialProperties &mat,
 
   double deltaE = 0.;
   double sigmaDeltaE = 0.;
-  m_transKaz = 0.;
-  m_transTmax = 0.;
-
-  // preparation
+   // preparation
   double sign = (dir == Trk::oppositeMomentum) ? -1. : 1.;
 
   double pathLength = pathcorrection * mat.thicknessInX0() * mat.x0();
@@ -214,18 +210,21 @@ Trk::EnergyLossUpdator::energyLoss(const MaterialProperties &mat,
   double sigmaDeltaE_ioni = 0.;
   if (particle != Trk::electron || m_useBetheBlochForElectrons) {
     if (!mpvSwitch) {
+  
+      // K A/Z and T max will be returned by the dEdXBetheBloch
+      double transKaz{0};
+      double transTmax{0};
       // use the dEdX function
-      deltaE_ioni = sign * pathLength * dEdXBetheBloch(mat, beta, gamma, particle);
-
+      deltaE_ioni = sign * pathLength * dEdXBetheBloch(mat, transKaz,transTmax,beta, gamma, particle);
       // the different straggling functions
       if (m_gaussianVavilovTheory) {
         // use the Gaussian approximation for the Vavilov Theory
-        double sigmaE2 = m_transKaz * pathLength * m_transTmax * (1. - beta * beta / 2.);
+        double sigmaE2 = transKaz * pathLength * transTmax * (1. - beta * beta / 2.);
         sigmaDeltaE_ioni = sqrt(sigmaE2);
       } else {
-//      Take FWHM maximum of Landau and convert to Gaussian
-//      For the FWHM of the Landau Bichsel/PDG is used: FWHM = 4 xi = 4 m_transKaz * pathLength
-        sigmaDeltaE_ioni = 4. * s_fwhmToSigma * m_transKaz * pathLength;
+        //      Take FWHM maximum of Landau and convert to Gaussian
+        //      For the FWHM of the Landau Bichsel/PDG is used: FWHM = 4 xi = 4 m_transKaz * pathLength
+        sigmaDeltaE_ioni = 4. * s_fwhmToSigma * transKaz * pathLength;
       }
     } else {
       double eta2 = beta * gamma;
@@ -278,6 +277,8 @@ Trk::EnergyLossUpdator::energyLoss(const MaterialProperties &mat,
 
 double
 Trk::EnergyLossUpdator::dEdXBetheBloch(const MaterialProperties &mat,
+                                       double& transKaz,
+                                       double& transTmax,
                                        double beta,
                                        double gamma,
                                        ParticleHypothesis particle) const {
@@ -329,12 +330,12 @@ Trk::EnergyLossUpdator::dEdXBetheBloch(const MaterialProperties &mat,
     // divide by beta^2 for non-electrons
     kaz /= beta * beta;
     // store the transport variables
-    m_transKaz = kaz;
-    m_transTmax = tMax;
+    transKaz = kaz;
+    transTmax = tMax;
     // return
     return kaz * (log(2. * me * eta2 * tMax / (iPot * iPot)) - 2. * (beta * beta) - delta);
   }
-  m_transKaz = kaz;
+  transKaz = kaz;
   // for electrons use slightly different BetheBloch adaption
   // see Stampfer, et al, "Track Fitting With Energy Loss", Comp. Pyhs. Comm. 79 (1994), 157-164
   return kaz * (2. * log(2. * me / iPot) + 3. * log(gamma) - 1.95);
diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/Navigator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/Navigator.cxx
index 616b13bde6f70a7ba406e1582a675be077d5b8f0..ac46382ecec72312f187a5318a479084c37f4248 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/src/Navigator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/Navigator.cxx
@@ -40,8 +40,9 @@
 #include "EventPrimitives/EventPrimitives.h"
 #include "GeoPrimitives/GeoPrimitives.h"
 
-Trk::MagneticFieldProperties Trk::Navigator::s_zeroMagneticField(Trk::NoField);
-
+namespace{
+const Trk::MagneticFieldProperties s_zeroMagneticField(Trk::NoField);
+}
 // constructor
 Trk::Navigator::Navigator(const std::string &t, const std::string &n, const IInterface *p) :
   AthAlgTool(t, n, p),
@@ -63,16 +64,16 @@ Trk::Navigator::Navigator(const std::string &t, const std::string &n, const IInt
   m_boundaryHitY{},
   m_boundaryHitR{},
   m_boundaryHitZ{},
-  m_forwardCalls(0),
-  m_forwardFirstBoundSwitch(0),
-  m_forwardSecondBoundSwitch(0),
-  m_forwardThirdBoundSwitch(0),
-  m_backwardCalls(0),
-  m_backwardFirstBoundSwitch(0),
-  m_backwardSecondBoundSwitch(0),
-  m_backwardThirdBoundSwitch(0),
-  m_outsideVolumeCase(0),
-  m_sucessfulBackPropagation(0),
+  m_forwardCalls{0},
+  m_forwardFirstBoundSwitch{0},
+  m_forwardSecondBoundSwitch{0},
+  m_forwardThirdBoundSwitch{0},
+  m_backwardCalls{0},
+  m_backwardFirstBoundSwitch{0},
+  m_backwardSecondBoundSwitch{0},
+  m_backwardThirdBoundSwitch{0},
+  m_outsideVolumeCase{0},
+  m_sucessfulBackPropagation{0},
   m_fastField(false) {
   declareInterface<INavigator>(this);
   // steering of algorithms
@@ -112,7 +113,7 @@ Trk::Navigator::initialize() {
   }
 
   // the validation setup ----------------------------------------------------------------------------------
-  if (m_validationMode) {
+  if (m_validationMode) { 
     // create the new Tree
     m_validationTree = new TTree(m_validationTreeName.c_str(), m_validationTreeDescription.c_str());
 
@@ -196,7 +197,7 @@ Trk::Navigator::nextBoundarySurface(const Trk::IPropagator &prop,
   }
 
   // debug version
-  ATH_MSG_VERBOSE("  [N] Starting parameters are :" << parms);
+  ATH_MSG_VERBOSE("g  [N] Starting parameters are :" << parms);
 
   // loop over the the boundary surfaces according to the accessor type
   for (surfAcc.begin(); surfAcc.end(); surfAcc.operator ++ ()) {
@@ -226,13 +227,15 @@ Trk::Navigator::nextBoundarySurface(const Trk::IPropagator &prop,
       // ----------------- output to screen if outputLevel() says so --------
 
       // ----------------- record if in validation mode ----------------------
-      if (m_validationMode && m_boundariesCounter < TRKEXTOOLS_MAXNAVSTEPS) {
-        const Amg::Vector3D &posOnBoundary = trackPar->position();
-        m_boundaryHitX[m_boundariesCounter] = posOnBoundary.x();
-        m_boundaryHitY[m_boundariesCounter] = posOnBoundary.y();
-        m_boundaryHitR[m_boundariesCounter] = posOnBoundary.perp();
-        m_boundaryHitZ[m_boundariesCounter] = posOnBoundary.z();
-        m_boundariesCounter++;
+      if (m_validationMode) {
+        if(m_boundariesCounter < TRKEXTOOLS_MAXNAVSTEPS) {
+          const Amg::Vector3D &posOnBoundary = trackPar->position();
+          m_boundaryHitX[m_boundariesCounter] = posOnBoundary.x();
+          m_boundaryHitY[m_boundariesCounter] = posOnBoundary.y();
+          m_boundaryHitR[m_boundariesCounter] = posOnBoundary.perp();
+          m_boundaryHitZ[m_boundariesCounter] = posOnBoundary.z();
+          m_boundariesCounter++;
+        }
       } // ------------------------------------------------------------------
 
       delete trackPar;
@@ -344,13 +347,15 @@ Trk::Navigator::nextTrackingVolume(const Trk::IPropagator &prop,
 
 
       // ----------------- record if in validation mode ----------------------
-      if (m_validationMode && m_boundariesCounter < TRKEXTOOLS_MAXNAVSTEPS) {
-        const Amg::Vector3D &posOnBoundary = trackPar->position();
-        m_boundaryHitX[m_boundariesCounter] = posOnBoundary.x();
-        m_boundaryHitY[m_boundariesCounter] = posOnBoundary.y();
-        m_boundaryHitR[m_boundariesCounter] = posOnBoundary.perp();
-        m_boundaryHitZ[m_boundariesCounter] = posOnBoundary.z();
-        m_boundariesCounter++;
+      if (m_validationMode)  {
+        if(m_boundariesCounter < TRKEXTOOLS_MAXNAVSTEPS){
+          const Amg::Vector3D &posOnBoundary = trackPar->position();
+          m_boundaryHitX[m_boundariesCounter] = posOnBoundary.x();
+          m_boundaryHitY[m_boundariesCounter] = posOnBoundary.y();
+          m_boundaryHitR[m_boundariesCounter] = posOnBoundary.perp();
+          m_boundaryHitZ[m_boundariesCounter] = posOnBoundary.z();
+          m_boundariesCounter++;
+        }
       } // ------------------------------------------------------------------
 
       return Trk::NavigationCell(nextVolume, trackPar, Trk::BoundarySurfaceFace(surfAcc.accessor()));
@@ -653,10 +658,12 @@ Trk::Navigator::closestParameters(const Trk::Track &trk,
 void
 Trk::Navigator::validationAction() const {
   // first record the values
-  if (m_validationTree) {
-    m_boundaries = long(m_boundariesCounter);
-    m_validationTree->Fill();
-    // then reset
+  if(m_validationMode){
+    if (m_validationTree) {
+      m_boundaries = long(m_boundariesCounter);
+      m_validationTree->Fill();
+      // then reset
+    }
     m_boundariesCounter = 0;
   }
 }
diff --git a/Tracking/TrkFitter/TrkFitterUtils/TrkFitterUtils/FitterStatusCode.h b/Tracking/TrkFitter/TrkFitterUtils/TrkFitterUtils/FitterStatusCode.h
index f18f084b8bd4f3b54be10798515b81412cd1fa4f..f3f15ed007c4b578b326ec8faad1d64e0bc7fbb0 100755
--- a/Tracking/TrkFitter/TrkFitterUtils/TrkFitterUtils/FitterStatusCode.h
+++ b/Tracking/TrkFitter/TrkFitterUtils/TrkFitterUtils/FitterStatusCode.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
 */
 
 /***************************************************************************
@@ -65,17 +65,8 @@ public:
         @param code status code according to the enum */
     FitterStatusCode( FitCode );
 
-    //! copy ctor
-    FitterStatusCode( const FitterStatusCode& rhs );
-
-    ~FitterStatusCode();
-
     bool isFailure() const;
 
-    //! Assignment operator.
-    FitterStatusCode& operator=(unsigned long value);
-    FitterStatusCode& operator=(const FitterStatusCode& rhs);
-
     //    /** Comparison operator*/
     //    friend bool operator< ( const FitterStatusCode& a, const FitterStatusCode& b );
 
diff --git a/Tracking/TrkFitter/TrkFitterUtils/src/FitterStatusCode.cxx b/Tracking/TrkFitter/TrkFitterUtils/src/FitterStatusCode.cxx
index b356df91fbaa9f3c19d383b442300563a32ff4fa..9cc4613c008f3b87b00f7c8d381d8e0faf6d6d67 100755
--- a/Tracking/TrkFitter/TrkFitterUtils/src/FitterStatusCode.cxx
+++ b/Tracking/TrkFitter/TrkFitterUtils/src/FitterStatusCode.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
 */
 
 /***************************************************************************
@@ -22,13 +22,6 @@ Trk::FitterStatusCode::FitterStatusCode( FitCode thecode )
         //StatusCode( (thecode>1)?StatusCode::SUCCESS : StatusCode::FAILURE ),
         m_code( thecode ) {}
 
-Trk::FitterStatusCode::FitterStatusCode( const FitterStatusCode& rhs )
-        :
-        //StatusCode( (rhs.m_code>1)?StatusCode::SUCCESS : StatusCode::FAILURE ),
-        m_code( rhs.m_code ) {}
-
-Trk::FitterStatusCode::~FitterStatusCode() {}
-
 bool Trk::FitterStatusCode::isFailure() const {
     if (m_code>1) return true;
     return false;
@@ -42,21 +35,6 @@ Trk::FitterStatusCode::operator StatusCode() const  {
     return StatusCode( (m_code>1)?StatusCode::SUCCESS : StatusCode::FAILURE );
 }
 
-Trk::FitterStatusCode& Trk::FitterStatusCode::operator=(unsigned long value)   {
-    m_code = value;
-    return *this;
-}
-
-Trk::FitterStatusCode& Trk::FitterStatusCode::operator=(const FitterStatusCode& rhs) {
-    // coverity complains about a missing self assigmment protection.
-    // But self assignment of integers is not problematic and
-    // adding a comparison just for this rare case does not seem useful.
-    //if (&rhs != this ) {
-    m_code = rhs.m_code;
-    //}
-    return *this;
-}
-
 unsigned long Trk::FitterStatusCode::getCode() const {
     return m_code;
 }
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardKalmanFitter.cxx b/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardKalmanFitter.cxx
index 56ab84f83d81929831e64d58a9c382d7667b99d0..6b8a765c87100b67467160968a5890a4a305ec55 100755
--- a/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardKalmanFitter.cxx
+++ b/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardKalmanFitter.cxx
@@ -589,10 +589,11 @@ Trk::FitterStatusCode Trk::ForwardKalmanFitter::buildAndAnalyseTrajectory
              || (fabs(testRadius-testPred)>0.5))) {
       ATH_MSG_DEBUG ("Starting driftcircle L/R solving, observed at state " 
                      << predictedState->positionOnTrajectory() << " err="<<testPredErr);
-      FitterStatusCode dafStatus = 
-        m_internalDAF->filterTrajectoryPiece(T, predictedState, updatedPar, predPar, 12,
-                                             controlledMatEffects.particleType());
+
+      m_internalDAF->filterTrajectoryPiece(T, predictedState, updatedPar, predPar, 12, 
+      					   controlledMatEffects.particleType());
     }
+
   }
 
   return Trk::FitterStatusCode::Success;
diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py b/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py
index 21105c6173cb2bfa7f8ba74d42cf4585240ac3b2..113679077f46be393e6231753ec55f1d66cba55a 100755
--- a/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py
+++ b/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py
@@ -1253,7 +1253,7 @@ class TrigCaloCellMakerMT_eGamma (TrigCaloCellMakerMTBase):
 class TrigCaloCellMakerMT_jet (TrigCaloCellMakerFCalMTBase):
     __slots__ = []
     def __init__ (self, name='TrigCaloCellMakerMT_jet', eta_size=64, phi_size=64, doNoise=1, AbsE = False):
-        super(TrigCaloCellMaker_jet, self).__init__(name)
+        super(TrigCaloCellMakerMT_jet, self).__init__(name)
 
         self.eta_size = eta_size
         self.phi_size = phi_size
@@ -1291,14 +1291,14 @@ class TrigCaloCellMakerMT_jet (TrigCaloCellMakerFCalMTBase):
 class TrigCaloCellMakerMT_super (TrigCaloCellMakerMT_jet):
     __slots__ = []
     def __init__ (self, name='TrigCaloCellMakerMT_super', eta_size=64, phi_size=64, doNoise=1, AbsE = False):
-        super(TrigCaloCellMaker_super, self).__init__(name)
+        super(TrigCaloCellMakerMT_super, self).__init__(name)
         self.TrustRoiLimits = True
 
 
 class TrigCaloCellMakerMT_jet_super (TrigCaloCellMakerFCalMTBase):
     __slots__ = []
     def __init__ (self, name='TrigCaloCellMakerMT_jet_super', eta_size=64, phi_size=64, doNoise=1, AbsE = False):
-        super(TrigCaloCellMaker_jet_super, self).__init__(name)
+        super(TrigCaloCellMakerMT_jet_super, self).__init__(name)
 
         self.TrustRoiLimits = True
 
@@ -1362,7 +1362,7 @@ class TrigCaloCellMakerMT_jet_fullcalo (TrigFullCaloCellMakerMTFCalBase):
 
         if doPers:
            self.PersistencyPrescaleFactor=1
-           self.PersistencyKeyName="TrigCaloCellMaker_jet_fullcalo"
+           self.PersistencyKeyName="TrigCaloCellMakerMT_jet_fullcalo"
 
         #self.OutputLevel=INFO
 
diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx
index c97d623c8de26ac90459b40a50bd84f0563f56e0..3eb2077b062642db7dc9aa6485f656dad9f41cdb 100644
--- a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx
+++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx
@@ -55,11 +55,11 @@ StatusCode HLTCaloCellMaker::execute_r( const EventContext& context ) const {
     auto cdv = CxxUtils::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS);
     for( const TrigRoiDescriptor* roiDescriptor : *roiCollection) {
       if ( roiDescriptor->isFullscan() ) {
-	m_dataAccessSvc->loadFullCollections( context, *cdv );
+        ATH_CHECK(m_dataAccessSvc->loadFullCollections( context, *cdv ));
 
       } else {
 	LArTT_Selector<LArCellCont> sel;
-	m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, 2, sel );
+	ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, 2, sel ));
 	for( const auto cell : sel ) {cdv->push_back( cell ); }
       }
       auto ss = cellContainer.record( std::move(cdv) );
@@ -74,12 +74,12 @@ StatusCode HLTCaloCellMaker::execute_r( const EventContext& context ) const {
     for( const TrigRoiDescriptor* roiDescriptor : *roiCollection) {
       if ( roiDescriptor->isFullscan() ) {
 	auto c = std::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS);
-	m_dataAccessSvc->loadFullCollections( context, *c );
+	ATH_CHECK(m_dataAccessSvc->loadFullCollections( context, *c ));
 	cellContainerV->push_back( c.release()->asDataVector() );
 		
       } else {
 	LArTT_Selector<LArCellCont> sel;
-	m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, 2, sel );
+	ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, 2, sel ));
 	auto c = std::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS);
 	int cc(0);
 	for( const auto cell : sel ) {c->push_back( cell ); cc++;}
diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py
index 7110d654903e7cbeb43531d75979210b1d8db94f..c01f6a3ac5bf5dc1d21eb079e0b4bf4ce1e8a8af 100644
--- a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py
+++ b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py
@@ -113,20 +113,18 @@ TrigPhotonPIDBuilder = PublicToolFactory( EMPIDBuilder, name = "TrigPhotonPIDBui
     photonIsEMselectorResultNames = ["Loose","Medium","Tight"],
 )
 
-def appendtoTrigEMTrackMatchBuilder(tool):
-    "add track to calo tool "
-    from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools
-    if not hasattr(tool,"EMExtrapolationTools"):
-        tool += EMExtrapolationTools()
+from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools
+TrigEMExtrapolationTools=EMExtrapolationTools.copyPublic(name="TrigEMExtrapolationTools",
+                                                        useCaching=False)
+
 
 TrigEMTrackMatchBuilder = EMTrackMatchBuilder.copyPublic(
     name = "TrigEMTrackMatchBuilder",
-    postInit=[appendtoTrigEMTrackMatchBuilder],
     broadDeltaEta      = 0.2, #For offline 0.1
     broadDeltaPhi      = 0.2, #For offline 0.15
     useScoring         = False, 
     SecondPassRescale  = False,
-
+    ExtrapolationTool  = TrigEMExtrapolationTools
 )
 
 TrigEMShowerBuilder = EMShowerBuilder.copyPublic(
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h
index 9d81f310967175165605b12b0fdee13d311cafd6..98964798fb3b59def3d556a9e2ae741759e4b966 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h
@@ -163,6 +163,8 @@ namespace TrigL2MuonSA {
     SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_mdtPrepContainerKey{
 	this, "MDTPrepDataContainer","MDT_DriftCircles", "Name of the MDTContainer to read in"};
 
+    Gaudi::Property<bool> m_decodeBS { this, "DecodeBS", true, "Flag to decide whether ot not to run BS->RDO decoding" };
+
     bool m_use_mdtcsm;
     bool m_use_RoIBasedDataAccess;
     bool m_BMGpresent;
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py
index b9df6555f73539e5a9a2007025470e06beb19994..3cfff38387154baab4f830e222155291d0993647 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py
@@ -22,6 +22,12 @@ ToolSvc += rpcDataPreparator
 
 theDataPreparator.RPCDataPreparator = rpcDataPreparator
 
+mdtDataPreparator = TrigL2MuonSA__MdtDataPreparator()
+mdtDataPreparator.DecodeBS = DetFlags.readRDOBS.MDT_on()
+ToolSvc += mdtDataPreparator
+
+theDataPreparator.MDTDataPreparator = mdtDataPreparator
+
 ToolSvc += theDataPreparator
 ToolSvc += thePatternFinder
 ToolSvc += theStationFitter
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx
index 19b7b907d185f59137a3c1423e9e60d8bb575a72..5f07a7e59fdd27c45f64c82e4d9722aa21ef5f92 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx
@@ -97,9 +97,13 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::initialize()
    
    ATH_CHECK( m_storeGateSvc.retrieve() );
 
-   ATH_CHECK( m_mdtRawDataProvider.retrieve() );
-   ATH_MSG_DEBUG("Retrieved tool " << m_mdtRawDataProvider);
-
+   ATH_MSG_DEBUG("Decode BS set to" << m_decodeBS );
+   if ( m_mdtRawDataProvider.retrieve(DisableTool{ !m_decodeBS }).isFailure()) {
+     ATH_MSG_ERROR("Failed to retrieve " << m_mdtRawDataProvider );
+     return StatusCode::FAILURE;
+   } else {
+     ATH_MSG_DEBUG("Retrieved tool " << m_mdtRawDataProvider);
+   }
    //
    std::string serviceName;
 
@@ -422,12 +426,14 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::getMdtCsm(const MdtCsmContainer* pMd
 						      const std::vector<IdentifierHash>& v_idHash,
 						      std::vector<const MdtCsm*>& v_mdtCsms)
 {
-  if( m_mdtRawDataProvider->convert(v_robFragments, v_idHash).isFailure() ) {
-    ATH_MSG_WARNING("Failed to convert MDT CSM hash Ids: ");
-    for(unsigned int i=0; i < v_idHash.size(); i++) {
-      ATH_MSG_WARNING(" " << v_idHash[i]);
+  if ( m_decodeBS ) {
+    if( m_mdtRawDataProvider->convert(v_robFragments, v_idHash).isFailure() ) {
+      ATH_MSG_WARNING("Failed to convert MDT CSM hash Ids: ");
+      for(unsigned int i=0; i < v_idHash.size(); i++) {
+        ATH_MSG_WARNING(" " << v_idHash[i]);
+      }
+      return StatusCode::FAILURE;
     }
-    return StatusCode::FAILURE;
   }
  
   std::vector<uint32_t> v_robIds;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/CaloCellMasking.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/CaloCellMasking.py
index cfc5096d1ab2c7c6e865c0ca6370b7e2c1c7f5e1..851df02f02569c9b90660c366fbf6d9ce565c470 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/CaloCellMasking.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/CaloCellMasking.py
@@ -1,4 +1,3 @@
-
 include.block("TrigT2CaloCommon/CaloCellMasking.py")
 
 from AthenaCommon.AppMgr import ToolSvc #if not already imported
@@ -15,7 +14,6 @@ ToolSvc+=LArBadChannelMasker("LArBadChannelMasker")
 ToolSvc.LArBadChannelMasker.ProblemsToMask=["unstable", "short", "highNoiseHG", "highNoiseMG","highNoiseLG", "problematicForUnknownReason"] #See LArBadChanBitPacking.cxx for the list of strings that can be used.
 ToolSvc.LArBadChannelMasker.DoMasking = True #Masking can easily be turned on and off here.
 #ToolSvc.LArBadChannelMasker.OutputLevel=DEBUG
-ToolSvc.LArBadChannelMasker.TheLArBadChanTool = ToolSvc.MyBadChanTool #Tell the Masker to use the LArBadChanTool that was just configured.
 
 #IOVDbSvc=theApp.service('IOVDbSvc')
 #if ( svcMgr.IOVDbSvc.GlobalTag!="COMCOND-002-00" and svcMgr.IOVDbSvc.GlobalTag!="COMCOND-003-00" and svcMgr.IOVDbSvc.GlobalTag!="COMCOND-004-00" and svcMgr.IOVDbSvc.GlobalTag!="COMCOND-005-00" ):
diff --git a/Trigger/TrigEvent/TrigInDetEventTPCnv/src/TrigVertexCnv_p2.cxx b/Trigger/TrigEvent/TrigInDetEventTPCnv/src/TrigVertexCnv_p2.cxx
index e6d7ca904cd5c1ed646e260e32ffd0b60f8a63d0..d67eb1221db5cc298f97cd40662d701c8552b9be 100644
--- a/Trigger/TrigEvent/TrigInDetEventTPCnv/src/TrigVertexCnv_p2.cxx
+++ b/Trigger/TrigEvent/TrigInDetEventTPCnv/src/TrigVertexCnv_p2.cxx
@@ -5,6 +5,7 @@
 #include "TrigInDetEvent/TrigVertex.h"
 #include "TrigInDetEventTPCnv/TrigVertex_p2.h"
 #include "TrigInDetEventTPCnv/TrigVertexCnv_p2.h"
+#include <fenv.h>
 
 
 //-----------------------------------------------------------------------------
@@ -15,14 +16,24 @@ void TrigVertexCnv_p2::persToTrans( const TrigVertex_p2 *persObj,
 				    MsgStream       &log )
 {
   log << MSG::DEBUG << "TrigVertexCnv_p2::persToTrans called " << endmsg;
-  
+
+  // Disable FPEs for this bit ... avoids crashes when reading some
+  // 16.0.1 data.
+  fenv_t fenv;
+  feholdexcept (&fenv);
+
   transObj->m_x                 = persObj->m_allFloats[0];
   transObj->m_y                 = persObj->m_allFloats[1];
   transObj->m_z                 = persObj->m_allFloats[2];
   transObj->m_mass              = persObj->m_allFloats[3];
   transObj->m_massVar           = persObj->m_allFloats[4];
   for(int i=0;i<6;i++){
-    transObj->m_cov[i]          = persObj->m_allFloats[5+i];
+    if (isnan(persObj->m_allFloats[5+i])) {
+      transObj->m_cov[i]          = 0;
+    }
+    else {
+      transObj->m_cov[i]          = persObj->m_allFloats[5+i];
+    }
   }
   transObj->m_energyFraction    = persObj->m_allFloats[11];
   transObj->m_chiSquared        = persObj->m_allFloats[12];
@@ -31,6 +42,8 @@ void TrigVertexCnv_p2::persToTrans( const TrigVertex_p2 *persObj,
   transObj->m_nDOF              = persObj->m_allInts[1]; 
   transObj->m_algId             = static_cast<TrigVertex::AlgoId>(persObj->m_allInts[2]) ;
   
+  fesetenv (&fenv);
+
   if(&(persObj->m_tracks)!=NULL){  
     m_TrigInDetTrackVectorCnv.persToTrans( &(persObj->m_tracks), &m_trackInVertexVector, log);
     if(m_trackInVertexVector.size() != 0){
diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
index 0fb9490455a244f2ea50a9acb5d92f2db0ef723d..9ab889e79f7744847d946dfdc5b5273970a6474f 100644
--- a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
+++ b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
@@ -183,8 +183,8 @@ 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_pixelLorentzAngleTool{this, "PixelLorentzAngleTool", "PixelLorentzAngleTool", "Tool to retrieve Lorentz angle of Pixel"};
-  ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SCTLorentzAngleTool", "Tool to retrieve Lorentz angle of SCT"};
+  ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool{this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retrieve Lorentz angle of Pixel"};
+  ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retrieve Lorentz angle of SCT"};
 
   double m_trainingBeamspotX;
   double m_trainingBeamspotY;
diff --git a/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_SCTClusterOnTrackTool.h b/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_SCTClusterOnTrackTool.h
index 6da302fe10b93fd26849b13d0e7b745ff52aed31..8c04327df017b60df3c34915afdfa6ed85ede346 100644
--- a/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_SCTClusterOnTrackTool.h
+++ b/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_SCTClusterOnTrackTool.h
@@ -91,7 +91,7 @@ public:
   ///////////////////////////////////////////////////////////////////
 
    ToolHandle<ISCT_ModuleDistortionsTool> m_distortionsTool;
-   ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
+   ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
    SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> m_sctErrorScalingKey
       {this,"SCTErrorScalingKey", "" /* "/Indet/TrkErrorScalingSCT" */, "Key for SCT error scaling conditions data. No error scaling if empty."};
 
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/DumpSp.h b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/DumpSp.h
index 8d07f07a0e2a41fe8ff2f6aa322b32494e00f2f5..6382bbd5d5fb5860ebd60662ae496bb276cdc7b2 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/DumpSp.h
+++ b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/DumpSp.h
@@ -141,7 +141,8 @@ private:
   ServiceHandle<IInDetConditionsSvc>        m_pixelCondSummarySvc; // 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
-  ToolHandle<ISiLorentzAngleTool>           m_pixelLorentzAngleTool{this, "PixelLorentzAngleTool", "PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"};
+  ToolHandle<ISiLorentzAngleTool>           m_pixelLorentzAngleTool{this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"};
+  ToolHandle<ISiLorentzAngleTool>           m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"};
   //#else
     // ToolHandle<Trk::TruthToTrack>             m_truthToTrack; //!< tool to create track parameters from a gen particle
   //#endif
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h
index 538bf0ab135fbdacc9902dfffb49eeef04a38da7..9844bbb6ebabcd19a034b63a52192699f31b48cc 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h
+++ b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h
@@ -14,6 +14,7 @@
 #include "InDetPrepRawData/SCT_ClusterContainer.h"
 
 #include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "SCT_Cabling/ISCT_CablingTool.h"
 #include "StoreGate/ReadCondHandleKey.h"
 
 #include "TrigFTKToolInterfaces/ITrigFTKClusterConverterTool.h"
@@ -31,7 +32,6 @@
 #include <stdint.h>
 
 class IPixelCablingSvc; 
-class ISCT_CablingSvc;
 class StoreGateSvc; 
 class PixelID; 
 class AtlasDetector;
@@ -58,7 +58,7 @@ private:
   ToolHandle<ITrigFTKClusterConverterTool>  m_clusterConverterTool; /** Tool to convert FTKHits to IDClusters */
 
   ServiceHandle<IPixelCablingSvc> m_pix_cabling_svc; 
-  ServiceHandle<ISCT_CablingSvc> m_sct_cabling_svc; // Although SCT_CablingSvc migrated to SCT_CablingTool, this class accesses SCT cabling during initialization.
+  ToolHandle<ISCT_CablingTool> m_sct_cablingToolCB; // This class accesses SCT cabling during initialization.
 
   // Needed to retrieve m_pixelId in order to get the barrel_ec, phi/eta_modules etc.
 
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx b/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx
index 22fd5e5c8db2eec6d52bdf4abf0a7ea818f1f1a6..630a564a7c92d481dc59eb6bf8128941e635b575 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx
+++ b/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx
@@ -217,7 +217,7 @@ DumpSp::initialize()
   //   ATH_MSG_FATAL("Failed to retrieve tool " << m_holeSearchTool);
   //   return StatusCode::FAILURE;
   // }
-  
+
   if( service("DetectorStore",m_detStore).isFailure() ) {
     ATH_MSG_FATAL("DetectorStore service not found");
     return StatusCode::FAILURE;
@@ -320,6 +320,7 @@ DumpSp::initialize()
   }
 
   ATH_CHECK(m_pixelLorentzAngleTool.retrieve());
+  ATH_CHECK(m_sctLorentzAngleTool.retrieve());
 
   return StatusCode::SUCCESS;
 }
@@ -828,7 +829,9 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap
         Identifier rdoId = (*iRDO)->identify();
         // get the det element from the det element collection
         const InDetDD::SiDetectorElement* sielement = m_PIX_mgr->getDetectorElement(rdoId); assert( sielement );
-        const InDetDD::SiLocalPosition localPos = sielement->localPositionOfCell(rdoId);
+        Amg::Vector2D localPos2D = sielement->rawLocalPositionOfCell(rdoId);
+        localPos2D[Trk::distPhi] += m_pixelLorentzAngleTool->getLorentzShift(sielement->identifyHash());
+        const InDetDD::SiLocalPosition localPos(localPos2D);
         const InDetDD::SiLocalPosition rawPos = sielement->rawLocalPositionOfCell(rdoId);
         const Amg::Vector3D gPos( sielement->globalPosition(localPos) );
         // update map between pixel identifier and event-unique hit index. 
@@ -941,7 +944,9 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap
           Identifier rdoId = (*iRDO)->identify();
           // get the det element from the det element collection
           const InDetDD::SiDetectorElement* sielement = m_PIX_mgr->getDetectorElement(rdoId); assert( sielement);
-          const InDetDD::SiLocalPosition localPos = sielement->localPositionOfCell(rdoId);
+          Amg::Vector2D localPos2D = sielement->rawLocalPositionOfCell(rdoId);
+          localPos2D[Trk::distPhi] += m_pixelLorentzAngleTool->getLorentzShift(sielement->identifyHash());
+          const InDetDD::SiLocalPosition localPos(localPos2D);
           const InDetDD::SiLocalPosition rawPos = sielement->rawLocalPositionOfCell(rdoId);
           const Amg::Vector3D gPos( sielement->globalPosition(localPos) );
           (*m_oflraw) << "# S\t" 
@@ -1382,7 +1387,8 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap
       {
         const InDetDD::SiLocalPosition localCentroid( (*iCluster)->localPosition() );
         const InDetDD::SiCellId cellIdCentroid( sielement->cellIdOfPosition( localCentroid ) );
-        const Amg::Vector2D localCellCentroid( sielement->localPositionOfCell( cellIdCentroid ) );
+        Amg::Vector2D localCellCentroid( sielement->rawLocalPositionOfCell( cellIdCentroid ) );
+        localCellCentroid[Trk::distPhi] += m_sctLorentzAngleTool->getLorentzShift(sielement->identifyHash());
         float deltaphi = (*iCluster)->localPosition()[Trk::distPhi] - localCellCentroid[Trk::distPhi];
         float deltaxphi = deltaphi / sielement->phiPitch();
         // do not add 0.5 to center in middle of strip; match SCT leading spatial edge convention
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx b/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx
index 0d7c9dd7fa04a9e417962ec621b8bfb9323c6f12..48775b6dfa7b54cb1711cf8c366d33da50970c52 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx
+++ b/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx
@@ -12,7 +12,6 @@
 #include "TrigFTKToolInterfaces/ITrigFTKClusterConverterTool.h"
 
 #include "PixelCabling/IPixelCablingSvc.h"
-#include "SCT_Cabling/ISCT_CablingSvc.h"
 #include "SCT_Cabling/SCT_OnlineId.h"
 #include "InDetRIO_OnTrack/SiClusterOnTrack.h"
 
@@ -47,7 +46,7 @@ FTKRegionalWrapper::FTKRegionalWrapper (const std::string& name, ISvcLocator* pS
   m_hitInputTool("FTK_SGHitInput/FTK_SGHitInput"),
   m_clusterConverterTool("TrigFTKClusterConverterTool"),
   m_pix_cabling_svc("PixelCablingSvc", name),
-  m_sct_cabling_svc("SCT_CablingSvc", name),
+  m_sct_cablingToolCB("SCT_CablingToolCB"),
   m_storeGate(0),
   m_detStore( 0 ),
   m_evtStore(0 ),
@@ -147,7 +146,7 @@ FTKRegionalWrapper::FTKRegionalWrapper (const std::string& name, ISvcLocator* pS
   declareProperty("FixEndcapL0", m_fixEndcapL0);
   declareProperty("ITkMode",m_ITkMode);
   declareProperty("PixelCablingSvc", m_pix_cabling_svc);
-  declareProperty("ISCT_CablingSvc",m_sct_cabling_svc);
+  declareProperty("SCT_CablingTool",m_sct_cablingToolCB);
 
   // hit type options
   declareProperty("SaveRawHits",m_SaveRawHits);
@@ -262,11 +261,11 @@ StatusCode FTKRegionalWrapper::initialize()
       log << MSG::FATAL << "SCT_Cabling not initialized so m_DumpTestVectors and m_EmulateDF must both be set to false!" << endmsg;
       return StatusCode::FAILURE;
     }
-  } else if (m_sct_cabling_svc.retrieve().isFailure()) {
-    log << MSG::FATAL << "Failed to retrieve tool " << m_sct_cabling_svc << endmsg;
+  } else if (m_sct_cablingToolCB.retrieve().isFailure()) {
+    log << MSG::FATAL << "Failed to retrieve tool " << m_sct_cablingToolCB << endmsg;
     return StatusCode::FAILURE;
   } else {
-    log << MSG::INFO << "Retrieved tool " << m_sct_cabling_svc << endmsg;
+    log << MSG::INFO << "Retrieved tool " << m_sct_cablingToolCB << endmsg;
   }
 
   if (!m_SaveRawHits && !m_SaveHits) {
@@ -391,14 +390,14 @@ StatusCode FTKRegionalWrapper::initialize()
       //uint id = mit->first;
       ATH_MSG_DEBUG("Pixel offline map hashID to RobId "<<MSG::dec<<mit->first<<" "<<MSG::hex<<mit->second<<MSG::dec);
     }
-    ATH_MSG_DEBUG("Printing full SCT map  via m_sct_cabling_svc->getAllRods()");
+    ATH_MSG_DEBUG("Printing full SCT map  via m_sct_cablingToolCB->getAllRods()");
     std::vector<uint32_t>  sctVector;
-    m_sct_cabling_svc->getAllRods(sctVector);
-    ATH_MSG_DEBUG("Printing full SCT map  via m_sct_cabling_svc->getAllRods() "<<sctVector.size()<<" rods ");
+    m_sct_cablingToolCB->getAllRods(sctVector);
+    ATH_MSG_DEBUG("Printing full SCT map  via m_sct_cablingToolCB->getAllRods() "<<sctVector.size()<<" rods ");
     
     for(auto mit = sctVector.begin(); mit != sctVector.end(); mit++){
 	// Retrive hashlist
-	m_sct_cabling_svc->getHashesForRod(m_identifierHashList,*mit );	
+	m_sct_cablingToolCB->getHashesForRod(m_identifierHashList,*mit );
 	ATH_MSG_DEBUG("Retrieved  "<<m_identifierHashList.size()<<" hashes ");
 
 	for (auto mhit = m_identifierHashList.begin(); mhit != m_identifierHashList.end(); mhit++)
@@ -642,7 +641,7 @@ StatusCode FTKRegionalWrapper::execute()
      	//SCT
 	
 	//then get the corresponding RobId
-	uint32_t robid = m_sct_cabling_svc->getRobIdFromHash(modHash);
+	uint32_t robid = m_sct_cablingToolCB->getRobIdFromHash(modHash);
 	
 	if (dumpedSCT == false){
 	  ATH_MSG_VERBOSE("Dumping SCT Rod List ");
@@ -1071,7 +1070,7 @@ bool FTKRegionalWrapper::dumpFTKTestVectors(FTKPlaneMap *pmap, FTKRegionMap *rma
 // The getAllRods returns all of the rods in the StoreGateSvc
     hitTyp = 0;
     vector<uint32_t> sctrods;
-    m_sct_cabling_svc->getAllRods(sctrods);
+    m_sct_cablingToolCB->getAllRods(sctrods);
     id = 0;
 
     for (uint32_t rod : sctrods) {
@@ -1087,7 +1086,7 @@ bool FTKRegionalWrapper::dumpFTKTestVectors(FTKPlaneMap *pmap, FTKRegionMap *rma
       if (myfile.is_open() ) {
 
 	// Retrive hashlist
-	 m_sct_cabling_svc->getHashesForRod(m_identifierHashList,rod );
+	 m_sct_cablingToolCB->getHashesForRod(m_identifierHashList,rod );
 
 	 // Some dumping variables
 	 vector<IdentifierHash>::const_iterator hashit = m_identifierHashList.begin();
@@ -1097,7 +1096,7 @@ bool FTKRegionalWrapper::dumpFTKTestVectors(FTKPlaneMap *pmap, FTKRegionMap *rma
 	 for (; hashit != hashit_e; ++hashit){  // TODO: Check for invalid onlineId && hashId numbers (?)
 
 	    // Retrieve OnlineId
-	      sct_onlineId = m_sct_cabling_svc->getOnlineIdFromHash( *hashit );
+	      sct_onlineId = m_sct_cablingToolCB->getOnlineIdFromHash( *hashit );
 	      if (sct_onlineId.rod()  == rod){ // Check for correct rodId
 
 		myfile.setf(ios::right | ios::showbase);
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTK_SGHitInput.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTK_SGHitInput.h
index 3a77e7b5f3721d729d6409835f2a64207acd8284..526b318f55c519494e3b63e487d7795f0b8faae3 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTK_SGHitInput.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTK_SGHitInput.h
@@ -33,6 +33,7 @@
 #include "TrkExInterfaces/IExtrapolator.h"
 #include "TrkParameters/TrackParameters.h"
 #include "InDetBeamSpotService/IBeamCondSvc.h"
+#include "InDetCondServices/ISiLorentzAngleTool.h"
 #include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/DataHandle.h"
@@ -85,6 +86,7 @@ private:
   ToolHandle<Trk::ITruthToTrack>            m_truthToTrack; //!< tool to create track parameters from a gen particle
 
   ToolHandle<Trk::IExtrapolator> m_extrapolator;
+  ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle"};
   ServiceHandle<IBeamCondSvc> m_beamSpotSvc;
 
   SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/TrigFTKSimLinkDef.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/TrigFTKSimLinkDef.h
index 485b65331e2713c42782de27cacd6ed4ac36b370..324898966afbf0e3d639a4c5461bd7ccd7ef8f77 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/TrigFTKSimLinkDef.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/TrigFTKSimLinkDef.h
@@ -11,9 +11,6 @@
 #ifndef FTK_STANDALONE
 #define FTK_STANDALONE
 #endif
-#pragma link off globals;
-#pragma link off classes;
-#pragma link off functions;
 
 #pragma link C++ class FTKPattern+;
 #pragma link C++ class std::vector<FTKPattern>+; 
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx
index b612ec053a9d4d146f247865c918d0ade8a99718..74c0cf301e753dc2973ae97fa20876e55a9a973b 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx
@@ -128,6 +128,8 @@ StatusCode FTK_SGHitInput::initialize(){
     m_log << MSG::INFO << m_extrapolator << " retrieved" << endmsg;
   }
 
+  ATH_CHECK(m_pixelLorentzAngleTool.retrieve());
+
   if( m_beamSpotSvc.retrieve().isFailure() ) {
     m_log << MSG::FATAL << m_beamSpotSvc << " beam spot service not found" << endmsg;
     return StatusCode::FAILURE;
@@ -315,7 +317,9 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl
         Identifier rdoId = (*iRDO)->identify();
         // get the det element from the det element collection
         const InDetDD::SiDetectorElement* sielement = m_PIX_mgr->getDetectorElement(rdoId); assert( sielement);
-        const InDetDD::SiLocalPosition localPos = sielement->localPositionOfCell(rdoId);
+        Amg::Vector2D localPos2D = sielement->rawLocalPositionOfCell(rdoId);
+        localPos2D[Trk::distPhi] += m_pixelLorentzAngleTool->getLorentzShift(sielement->identifyHash());
+        const InDetDD::SiLocalPosition localPos(localPos2D);
         const InDetDD::SiLocalPosition rawPos = sielement->rawLocalPositionOfCell(rdoId);
         const Amg::Vector3D gPos( sielement->globalPosition(localPos) );
         // update map between pixel identifier and event-unique hit index.
@@ -465,7 +469,9 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl
           Identifier rdoId = (*iRDO)->identify();
           // get the det element from the det element collection
           const InDetDD::SiDetectorElement* sielement = m_PIX_mgr->getDetectorElement(rdoId); assert( sielement);
-          const InDetDD::SiLocalPosition localPos = sielement->localPositionOfCell(rdoId);
+          Amg::Vector2D localPos2D = sielement->rawLocalPositionOfCell(rdoId);
+          localPos2D[Trk::distPhi] += m_pixelLorentzAngleTool->getLorentzShift(sielement->identifyHash());
+          const InDetDD::SiLocalPosition localPos(localPos2D);
           const InDetDD::SiLocalPosition rawPos = sielement->rawLocalPositionOfCell(rdoId);
           const Amg::Vector3D gPos( sielement->globalPosition(localPos) );
           if(m_dooutFileRawHits){
diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.h b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.h
index 3c1057413a0f1f3f3c39977df01a483852e484e8..42df00c2103112833262b360e969dcc84a6fa057 100644
--- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.h
+++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.h
@@ -104,8 +104,8 @@ public:
 
   const AtlasDetectorID* m_id_helper;
 
-  ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool{this, "PixelLorentzAngleTool", "PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"};
-  ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"};
+  ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool{this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"};
+  ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"};
 
   SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypoAlg.h b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypoAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..d1b8a8436f0f79e1a5b4806d28c31589b03334a9
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypoAlg.h
@@ -0,0 +1,50 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGMUONEFCOMBINERHYPO_TRIGMUONEFCOMBINERHYPOALG_H 
+#define TRIGMUONEFCOMBINERHYPO_TRIGMUONEFCOMBINERHYPOALG_H 1 
+
+#include <string>
+
+#include "AthenaBaseComps/AthReentrantAlgorithm.h" 
+#include "AthViews/View.h"
+#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
+#include "DecisionHandling/TrigCompositeUtils.h"
+
+#include "TrigMuonHypo/TrigMuonEFCombinerHypoTool.h"
+
+#include "DecisionHandling/HypoBase.h"
+
+class StoreGateSvc;
+class TriggerElement;
+
+// --------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------
+
+class TrigMuonEFCombinerHypoAlg
+   : public ::HypoBase
+{
+  public:
+
+   TrigMuonEFCombinerHypoAlg( const std::string& name, ISvcLocator* pSvcLocator );   
+
+   virtual ~TrigMuonEFCombinerHypoAlg();
+
+   virtual StatusCode  initialize() override;
+   virtual StatusCode  execute_r( const EventContext& context ) const override;
+   virtual StatusCode  finalize() override;
+    
+  private:
+ 
+    TrigMuonEFCombinerHypoAlg(); 
+    ToolHandleArray<TrigMuonEFCombinerHypoTool> m_hypoTools {this, "HypoTools", {}, "Tools to perform selection"}; 
+
+    SG::ReadHandleKey<xAOD::MuonContainer> m_muonKey{
+	this, "MuonDecisions", "MuonEFCombiner_MuonData", "Name of the input data on xAOD::MuonContainer produced by MuonCreatorAlg"};
+
+};
+
+#endif
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypoTool.h b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypoTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..e45d82593377d1f668da9e36595bf8a898f9eb14
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypoTool.h
@@ -0,0 +1,59 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGMUONEFCOMBINERHYPO_TRIGMUONEFCOMBINERHYPOTOOL_H 
+#define TRIGMUONEFCOMBINERHYPO_TRIGMUONEFCOMBINERHYPOTOOL_H 1
+#include <string>
+#include "AthenaBaseComps/AthAlgTool.h" 
+#include "DecisionHandling/HLTIdentifier.h"
+#include "DecisionHandling/TrigCompositeUtils.h" 
+#include "AthenaMonitoring/GenericMonitoringTool.h"
+#include "TrigSteeringEvent/TrigRoiDescriptor.h" 
+#include "xAODMuon/MuonContainer.h"
+class StoreGateSvc;
+class TriggerElement;
+class TrigMuonEFCombinerHypoTool: public ::AthAlgTool {
+  enum { MaxNumberTools = 20 };  
+ public:
+  TrigMuonEFCombinerHypoTool(const std::string& type, const std::string & name, const IInterface* parent);
+  ~TrigMuonEFCombinerHypoTool();
+ 
+  struct MuonEFInfo {
+  MuonEFInfo( TrigCompositeUtils::Decision* d, 
+              const TrigRoiDescriptor* r, 
+              const xAOD::Muon* m,
+	      const TrigCompositeUtils::Decision* previousDecision )
+    : decision( d ), 
+      roi( r ),
+      muon( m ),
+      previousDecisionIDs(TrigCompositeUtils::decisionIDs( previousDecision ).begin(), 
+			  TrigCompositeUtils::decisionIDs( previousDecision ).end() )
+    {}
+      
+    TrigCompositeUtils::Decision* decision;
+    const TrigRoiDescriptor* roi;
+    const xAOD::Muon* muon;
+    const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs;
+  };
+  StatusCode initialize() override;    
+  StatusCode decide(std::vector<TrigMuonEFCombinerHypoTool::MuonEFInfo>& toolInput) const ;
+  bool decideOnSingleObject(TrigMuonEFCombinerHypoTool::MuonEFInfo& input, size_t cutIndex) const;
+  StatusCode inclusiveSelection(std::vector<TrigMuonEFCombinerHypoTool::MuonEFInfo>& toolInput) const;
+  StatusCode multiplicitySelection(std::vector<TrigMuonEFCombinerHypoTool::MuonEFInfo>& toolInput) const;
+ private:
+  HLT::Identifier m_decisionId;
+  // Properties:
+  Gaudi::Property< std::vector<std::vector<double>> > m_ptBins {
+    this, "PtBins", { {0, 2.5} }, "Bins range of each pT threshold" };
+  Gaudi::Property< std::vector<std::vector<double>> > m_ptThresholds {
+    this, "PtThresholds", { {5.49*CLHEP::GeV} }, "Track pT requirement ( separate threshold for each muon )" };
+  Gaudi::Property< bool > m_acceptAll {
+    this, "AcceptAll", false, "Ignore selection" };
+  Gaudi::Property<bool>  m_decisionPerRoI { 
+    this, "DecisionPerRoI", true, "Is multiplicity requirement refering to muons ( false ) or RoIs with muons ( true ), relevant only in when multiplicity > 1" };
+  // Other members:   
+  std::vector<size_t> m_bins={0};
+  ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h
index eb4302d8bfa6f972d495ab372785903dcd7684e6..872d49ff88403490c662f11e1a5fa64bce5949a2 100644
--- a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h
@@ -4,7 +4,6 @@
 
 #ifndef TRIGMUONEFMSONLYHYPO_TRIGMUONEFMSONLYHYPOTOOL_H 
 #define TRIGMUONEFMSONLYHYPO_TRIGMUONEFMSONLYHYPOTOOL_H 1
-
 #include <string>
 #include "AthenaBaseComps/AthAlgTool.h" 
 #include "DecisionHandling/HLTIdentifier.h"
@@ -12,10 +11,8 @@
 #include "AthenaMonitoring/GenericMonitoringTool.h"
 #include "TrigSteeringEvent/TrigRoiDescriptor.h" 
 #include "xAODMuon/MuonContainer.h"
-
 class StoreGateSvc;
 class TriggerElement;
-
 class TrigMuonEFMSonlyHypoTool: public ::AthAlgTool {
   enum { MaxNumberTools = 20 };  
  public:
@@ -39,24 +36,24 @@ class TrigMuonEFMSonlyHypoTool: public ::AthAlgTool {
     const xAOD::Muon* muon;
     const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs;
   };
-
   StatusCode initialize() override;    
   StatusCode decide(std::vector<TrigMuonEFMSonlyHypoTool::MuonEFInfo>& toolInput) const ;
-  StatusCode decide(TrigMuonEFMSonlyHypoTool::MuonEFInfo& input) const;
-
+  bool decideOnSingleObject(TrigMuonEFMSonlyHypoTool::MuonEFInfo& input, size_t cutIndex) const;
+  StatusCode inclusiveSelection(std::vector<TrigMuonEFMSonlyHypoTool::MuonEFInfo>& toolInput) const;
+  StatusCode multiplicitySelection(std::vector<TrigMuonEFMSonlyHypoTool::MuonEFInfo>& toolInput) const;
  private:
-
   HLT::Identifier m_decisionId;
-
   // Properties:
-  std::vector<float> m_ptBins;
-  std::vector<float> m_ptThresholds; 
-  BooleanProperty m_acceptAll;
-
+  Gaudi::Property< std::vector<std::vector<double>> > m_ptBins {
+    this, "PtBins", { {0, 2.5} }, "Bins range of each pT threshold" };
+  Gaudi::Property< std::vector<std::vector<double>> > m_ptThresholds {
+    this, "PtThresholds", { {5.49*CLHEP::GeV} }, "Track pT requirement ( separate threshold for each muon )" };
+  Gaudi::Property< bool > m_acceptAll {
+    this, "AcceptAll", false, "Ignore selection" };
+  Gaudi::Property<bool>  m_decisionPerRoI { 
+    this, "DecisionPerRoI", true, "Is multiplicity requirement refering to muons ( false ) or RoIs with muons ( true ), relevant only in when multiplicity > 1" };
   // Other members:   
-  std::vector<float>::size_type m_bins;
-
+  std::vector<size_t> m_bins={0};
   ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
 };
-
 #endif
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfig.py b/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfig.py
index 0a5e277a3023c1811c7f8d471c0be445fc0cb311..ceb0af2e884decc333a48e9c053f59aaa162c180 100755
--- a/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfig.py
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfig.py
@@ -1651,52 +1651,3 @@ class TrigMuonIDTrackMultiHypoConfig(TrigMuonIDTrackMultiHypo) :
 	
         self.AthenaMonTools = [ online ]
 
-########MT EF hypo 
-class TrigMuonEFMSonlyHypoConfig(TrigMuonEFMSonlyHypoAlg) :
-
-    __slots__ = []
-
-    # nath: name threshold, for example HLT_mu6 etc
-    def TrigMuonEFMSonlyHypoToolFromName( self, name, nath ):	
-
-        from AthenaCommon.Constants import DEBUG
-        tool = TrigMuonEFMSonlyHypoTool( nath )  
-        tool.OutputLevel = DEBUG
-        bname = nath.split('_') 
-
-        # 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"]
-            if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in TriggerFlags.enableMonitoring() or 'Cosmic' in TriggerFlags.enableMonitoring():
-                tool.MonTool = TrigMuonEFMSonlyHypoMonitoring() 
-        except AttributeError:
-            tool.MonTool = ""
-            print name, ' Monitoring Tool failed'
-    
-        return tool
-    
-    def ConfigrationHypoTool( self, name, nath, threshold ): 
-        
-        tool = TrigMuonEFMSonlyHypoTool( nath )  
-    
-        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
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfigMT.py b/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfigMT.py
index c8a25633ab0a1ef69da16e3b755f41c6e957254d..18c48d4c66f319c90c029e707fe3b2317c69b3f6 100755
--- a/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfigMT.py
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfigMT.py
@@ -1,6 +1,6 @@
 # Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 
-from TrigMuonHypo.TrigMuonHypoConf import TrigMufastHypoAlg, TrigMufastHypoTool, TrigmuCombHypoAlg, TrigmuCombHypoTool, TrigMuonEFMSonlyHypoAlg, TrigMuonEFMSonlyHypoTool, TrigMuisoHypoAlg, TrigMuisoHypoTool
+from TrigMuonHypo.TrigMuonHypoConf import TrigMufastHypoAlg, TrigMufastHypoTool, TrigmuCombHypoAlg, TrigmuCombHypoTool, TrigMuonEFMSonlyHypoAlg, TrigMuonEFMSonlyHypoTool, TrigMuisoHypoAlg, TrigMuisoHypoTool,  TrigMuonEFCombinerHypoAlg, TrigMuonEFCombinerHypoTool
 from TrigMuonHypo.TrigMuonHypoMonitoringMT import *
 from AthenaCommon.SystemOfUnits import GeV
 #from MuonByteStream.MuonByteStreamFlags import muonByteStreamFlags
@@ -610,17 +610,13 @@ class TrigMuisoHypoConfig(TrigMuisoHypoAlg) :
 
 ########MT EF hypo 
 class TrigMuonEFMSonlyHypoConfig(TrigMuonEFMSonlyHypoAlg) :
-
     __slots__ = []
-
     # nath: name threshold, for example HLT_mu6 etc
     def TrigMuonEFMSonlyHypoToolFromName( self, name, nath ):	
-
         from AthenaCommon.Constants import DEBUG
         tool = TrigMuonEFMSonlyHypoTool( nath )  
         tool.OutputLevel = DEBUG
         bname = nath.split('_') 
-
         threshold=bname[1]
         thresholds=TrigMuonEFMSonlyHypoConfig().decodeThreshold(threshold)
         TrigMuonEFMSonlyHypoConfig().ConfigurationHypoTool( name, nath, thresholds )
@@ -634,7 +630,6 @@ class TrigMuonEFMSonlyHypoConfig(TrigMuonEFMSonlyHypoAlg) :
             print name, ' Monitoring Tool failed'
     
         return tool
-
     def decodeThreshold( self, threshold ):
         """ decodes the thresholds of the form mu6, 2mu6, ... """
         print "decoding ", threshold
@@ -647,7 +642,6 @@ class TrigMuonEFMSonlyHypoConfig(TrigMuonEFMSonlyHypoAlg) :
     
         # If the form is muX(inclusive), return as 1 element list
         return [ threshold[2:] ]    
-
     def ConfigurationHypoTool( self, name, nath, thresholds ): 
         
         tool = TrigMuonEFMSonlyHypoTool( nath )  
@@ -655,7 +649,6 @@ class TrigMuonEFMSonlyHypoConfig(TrigMuonEFMSonlyHypoAlg) :
         print "TrigMuonEFMSonlyHypoConfig: Set ", nt, " thresholds" 
         tool.PtBins = [ [ 0, 2.5 ] ] * nt
         tool.PtThresholds = [ [ 5.49 * GeV ] ] * nt
-
         for th, thvalue in enumerate(thresholds):
             thvaluename = thvalue + 'GeV'
             try:
@@ -673,3 +666,60 @@ class TrigMuonEFMSonlyHypoConfig(TrigMuonEFMSonlyHypoAlg) :
 
 
 
+############ EF combined hypo #################
+
+class TrigMuonEFCombinerHypoConfig(TrigMuonEFCombinerHypoAlg) :
+    __slots__ = []
+    # nath: name threshold, for example HLT_mu6 etc
+    def TrigMuonEFCombinerHypoToolFromName( self, name, nath ):	
+        from AthenaCommon.Constants import DEBUG
+        tool = TrigMuonEFCombinerHypoTool( nath )  
+        tool.OutputLevel = DEBUG
+        bname = nath.split('_') 
+        threshold=bname[1]
+        thresholds=TrigMuonEFCombinerHypoConfig().decodeThreshold(threshold)
+        TrigMuonEFCombinerHypoConfig().ConfigurationHypoTool( name, nath, thresholds )
+        # Setup MonTool for monitored variables in AthenaMonitoring package
+        try:
+            TriggerFlags.enableMonitoring = ["Validation"]
+            if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in TriggerFlags.enableMonitoring() or 'Cosmic' in TriggerFlags.enableMonitoring():
+                tool.MonTool = TrigMuonEFCombinerHypoMonitoring(name+"Monitoring_"+nath) 
+        except AttributeError:
+            tool.MonTool = ""
+            print name, ' Monitoring Tool failed'
+    
+        return tool
+    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')
+    
+        # If the form is muX(inclusive), return as 1 element list
+        return [ threshold[2:] ]    
+    def ConfigurationHypoTool( self, name, nath, thresholds ): 
+        
+        tool = TrigMuonEFCombinerHypoTool( nath )  
+        nt = len(thresholds)
+        print "TrigMuonEFCombinerHypoConfig: Set ", nt, " thresholds" 
+        tool.PtBins = [ [ 0, 2.5 ] ] * nt
+        tool.PtThresholds = [ [ 5.49 * GeV ] ] * nt
+        for th, thvalue in enumerate(thresholds):
+            thvaluename = thvalue + 'GeV'
+            try:
+                tool.AcceptAll = False
+                values = efCombinerThresholds[thvaluename]
+                tool.PtBins[th] = values[0]
+                tool.PtThresholds[th] = [ x * GeV for x in values[1] ]
+            except LookupError:
+                if (threshold=='passthrough'):
+                    tool.PtBins[th] = [-10000.,10000.]
+                    tool.PtThresholds[th] = [ -1. * GeV ]
+                else:
+                    raise Exception('MuonEFCB Hypo Misconfigured: threshold %r not supported' % threshold)
+        return thvaluename
+
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoMonitoringMT.py b/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoMonitoringMT.py
index a148438cd0fb2b891942be52312b00d1b99f77af..46deabea2cadbd7afa8b84aae858a062522ab958 100755
--- a/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoMonitoringMT.py
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoMonitoringMT.py
@@ -69,3 +69,22 @@ class TrigMuonEFMSonlyHypoMonitoring(GenericMonitoringTool):
                                             xbins=100, xmin=-3.2, xmax=3.2) ]
         self.Histograms += [ defineHistogram('Phi_sel', type='TH1F', title="Selected Phi reconstruction from #TrigMuonEFMSonlyHypo; Phi",
                                     xbins=100, xmin=-3.15, xmax=3.15) ]
+
+class TrigMuonEFCombinerHypoMonitoring(GenericMonitoringTool):
+
+    def __init__ (self, name="TrigMuonEFCombinerHypoMonitoring"):
+        super(TrigMuonEFMSonlyHypoMonitoring, self).__init__(name)
+        self.HistPath = name  
+
+        self.Histograms = [ defineHistogram('Pt', type='TH1F', title="P_{T} reconstruction from #TrigMuonEFCombinerHypo; P_{T} (MeV)",
+                                            xbins=200, xmin=-100, xmax=100) ]
+        self.Histograms += [ defineHistogram('Eta', type='TH1F', title="Eta reconstruction from #TrigMuonEFCombinerHypo; Eta",
+                                            xbins=100, xmin=-3.2, xmax=3.2) ]
+        self.Histograms += [ defineHistogram('Phi', type='TH1F', title="Phi reconstruction from #TrigMuonEFCombinerHypo; Phi",
+                                    xbins=100, xmin=-3.15, xmax=3.15) ]
+        self.Histograms += [ defineHistogram('Pt_sel', type='TH1F', title="Selected P_{T} reconstruction from #TrigMuonEFCombinerHypo; P_{T} (MeV)",
+                                            xbins=200, xmin=-100, xmax=100) ]
+        self.Histograms += [ defineHistogram('Eta_sel', type='TH1F', title="Selected Eta reconstruction from #TrigMuonEFCombinerHypo; Eta",
+                                            xbins=100, xmin=-3.2, xmax=3.2) ]
+        self.Histograms += [ defineHistogram('Phi_sel', type='TH1F', title="Selected Phi reconstruction from #TrigMuonEFCombinerHypo; Phi",
+                                    xbins=100, xmin=-3.15, xmax=3.15) ]
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py b/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py
index 7d592aa55954df6f2833b3ce41b2e6ed72f633c7..cdf44d0b7e3696a7013dc12b5353113d0e7b338a 100755
--- a/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py
@@ -664,17 +664,16 @@ class TrigMuonEFMSonlyHypoConfig():
         # If the form is muX(inclusive), return as 1 element list
         return [ threshold[2:] ]        
 
-    def ConfigurationHypoTool( self, toolName, thresholds ):
+    def ConfigurationHypoTool( self, thresholdHLT, thresholds ):
 
-        tool = TrigMuonEFMSonlyHypoTool( toolName )  
+        tool = TrigMuonEFMSonlyHypoTool( thresholdHLT )  
 
         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. 
+        tool.PtBins = [ [ 0, 2.5 ] ] * nt
+        tool.PtThresholds = [ [ 5.49 * GeV ] ] * nt
+
  
         for th, thvalue in enumerate(thresholds):
             thvaluename = thvalue + 'GeV'
@@ -683,18 +682,85 @@ class TrigMuonEFMSonlyHypoConfig():
             try:
                 tool.AcceptAll = False
                 values = trigMuonEFSAThresholds[thvaluename]
-                tool.PtBins = values[0]
-                tool.PtThresholds = [ x * GeV for x in values[1] ]
+                tool.PtBins[th] = values[0]
+                tool.PtThresholds[th] = [ x * GeV for x in values[1] ]
 
             except LookupError:
                 if (threshold=='passthrough'):
-                    tool.PtBins = [-10000.,10000.]
-                    tool.PtThresholds = [ -1. * GeV ]
+                    tool.PtBins[th] = [-10000.,10000.]
+                    tool.PtThresholds[th] = [ -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
+
+def TrigMuonEFCombinerHypoToolFromName( toolName, thresholdHLT ) :
+
+    name = "TrigMuonEFCombinerHypoTool"
+    config = TrigMuonEFCombinerHypoConfig()
+
+    # Separete HLT_NmuX to bname[0]=HLT and bname[1]=NmuX
+    bname = thresholdHLT.split('_') 
+    threshold = bname[1]
+    thresholds = config.decodeThreshold( threshold )
+    print "TrigMuonEFCombinerHypoConfig: Decoded ", thresholdHLT, " to ", thresholds
+
+    tool = config.ConfigurationHypoTool( toolName, thresholds )
+ 
+    # Setup MonTool for monitored variables in AthenaMonitoring package
+    TriggerFlags.enableMonitoring = ["Validation"]
+
+    try:
+            if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in TriggerFlags.enableMonitoring() or 'Cosmic' in TriggerFlags.enableMonitoring():
+                tool.MonTool = TrigMuonEFCombinerHypoMonitoring( name + "Monitoring_" + thresholdHLT ) 
+    except AttributeError:
+            tool.MonTool = ""
+            print name, ' Monitoring Tool failed'
+    
+    return tool
+
+class TrigMuonEFCombinerHypoConfig(): 
+        
+
+    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')
+    
+        # If the form is muX(inclusive), return as 1 element list
+        return [ threshold[2:] ]        
+
+    def ConfigurationHypoTool( self, thresholdHLT, thresholds ):
+
+        tool = TrigMuonEFCombinerHypoTool( thresholdHLT )  
+
+        nt = len(thresholds)
+        print "TrigMuonEFCombinerHypoConfig: Set ", nt, " thresholds" 
+        tool.PtBins = [ [ 0, 2.5 ] ] * nt
+        tool.PtThresholds = [ [ 5.49 * GeV ] ] * nt
+
+ 
+        for th, thvalue in enumerate(thresholds):
+            thvaluename = thvalue + 'GeV'
+            print "Number of threshold = ", th, ", Value of threshold = ", thvaluename
+
+            try:
+                tool.AcceptAll = False
+                values = efCombinerThresholds[thvaluename]
+                tool.PtBins[th] = values[0]
+                tool.PtThresholds[th] = [ x * GeV for x in values[1] ]
+
+            except LookupError:
+                if (threshold=='passthrough'):
+                    tool.PtBins[th] = [-10000.,10000.]
+                    tool.PtThresholds[th] = [ -1. * GeV ]
+                else:
+                    raise Exception('MuonEFCB Hypo Misconfigured: threshold %r not supported' % threshold)
 
         return tool
 
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoTool.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoTool.cxx
index 9eb74f09da0cd6e241f4a6637864ca99e2ba318b..0ebaacbc6296018240336d238cad5b0220f9bdda 100755
--- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoTool.cxx
@@ -97,7 +97,7 @@ bool TrigMufastHypoTool::decideOnSingleObject(TrigMufastHypoTool::MuonClusterInf
    auto xatBeam		= MonitoredScalar::declare("XatBe", -9999.);
    auto zatBeam		= MonitoredScalar::declare("ZatBe", -9999.);
 
-   auto monitorIt	= MonitoredScope::declare(m_monTool, fexPt, fexEta, fexPhi,fexPtFL, 
+   auto monitorIt	= MonitoredScope::declare(m_monTool, fexPt, fexEta, fexPhi, fexPtFL,
    					          xatStation, yatStation, zatStation, 
 					          xatBeam, zatBeam);
 
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypoAlg.cxx
new file mode 100755
index 0000000000000000000000000000000000000000..dfc027b4d8df805fbe7af1249fdd47fd7792b696
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypoAlg.cxx
@@ -0,0 +1,157 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include <math.h>
+
+#include "GaudiKernel/MsgStream.h"
+#include "GaudiKernel/StatusCode.h"
+
+#include "TrigMuonHypo/TrigMuonEFCombinerHypoAlg.h"
+#include "AthViews/ViewHelper.h"
+
+using namespace TrigCompositeUtils; 
+
+// --------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------
+
+TrigMuonEFCombinerHypoAlg::TrigMuonEFCombinerHypoAlg( const std::string& name,
+						  ISvcLocator* pSvcLocator ) :
+//  ::AthReentrantAlgorithm( name, pSvcLocator )
+  ::HypoBase( name, pSvcLocator )
+{
+
+} 
+
+TrigMuonEFCombinerHypoAlg::~TrigMuonEFCombinerHypoAlg() 
+{}
+
+// --------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------
+
+StatusCode TrigMuonEFCombinerHypoAlg::initialize()
+{
+  ATH_MSG_INFO ( "Initializing " << name() << "..." );
+  ATH_CHECK(m_hypoTools.retrieve());
+
+  renounce(m_muonKey);
+  ATH_CHECK(m_muonKey.initialize());
+
+  ATH_MSG_INFO( "Initialization completed successfully" );
+  return StatusCode::SUCCESS;
+}
+
+// --------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------
+
+StatusCode TrigMuonEFCombinerHypoAlg::finalize() 
+{   
+  ATH_MSG_INFO( "Finalizing " << name() << "..." );
+  ATH_MSG_INFO( "Finalization completed successfully" );
+  return StatusCode::SUCCESS;
+}
+
+// --------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------
+
+StatusCode TrigMuonEFCombinerHypoAlg::execute_r( const EventContext& context ) const
+{
+  ATH_MSG_DEBUG("StatusCode TrigMuonEFCombinerHypoAlg::execute_r start");
+
+  // 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( "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());
+  // end of common
+  
+  std::vector<TrigMuonEFCombinerHypoTool::MuonEFInfo> toolInput;
+  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++;
+  }
+
+  ATH_MSG_DEBUG("Found "<<toolInput.size()<<" inputs to tools");
+
+  // to TrigMuonEFCombinerHypoTool
+  StatusCode sc = StatusCode::SUCCESS;
+  for ( auto& tool: m_hypoTools ) {
+    ATH_MSG_DEBUG("Go to " << tool );
+    sc = tool->decide(toolInput);
+    if (!sc.isSuccess()) {
+      ATH_MSG_ERROR("MuonHypoTool is failed");
+      return StatusCode::FAILURE;
+    }
+  } // End of tool algorithms */	
+
+  { // 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 TrigMuonEFCombinerHypoAlg::execute_r success");
+  return StatusCode::SUCCESS;
+}
+
+// --------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------
+
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypoTool.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypoTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..8d0b969c0ea1685dde311e342e07d2943d0ede4f
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypoTool.cxx
@@ -0,0 +1,176 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "DecisionHandling/Combinators.h"
+#include "TrigMuonHypo/TrigMuonEFCombinerHypoTool.h"
+#include "CLHEP/Units/SystemOfUnits.h"
+#include "DecisionHandling/TrigCompositeUtils.h"
+#include "AthenaMonitoring/MonitoredScope.h"
+class ISvcLocator;
+TrigMuonEFCombinerHypoTool::TrigMuonEFCombinerHypoTool(const std::string & type, const std::string & name, const IInterface* parent):
+  AthAlgTool(type, name, parent),
+  m_decisionId(HLT::Identifier::fromToolName(name)){
+}
+TrigMuonEFCombinerHypoTool::~TrigMuonEFCombinerHypoTool(){
+}
+StatusCode TrigMuonEFCombinerHypoTool::initialize(){
+  if(m_acceptAll) {
+    ATH_MSG_INFO("Accepting all the events with not cut!");
+  } else {
+    if(m_ptBins.size()<=0){ 
+      ATH_MSG_ERROR("Trying to configure hypo with no pT bins. This is probably a configuration mistake.");
+      return StatusCode::FAILURE;
+    }
+    m_bins.resize(m_ptBins.size());
+    for(size_t j=0; j<m_ptBins.size(); j++){
+      m_bins[j] = m_ptBins[j].size() - 1;
+      if (m_bins[j] != m_ptThresholds[j].size()) {
+	ATH_MSG_ERROR("bad thresholds setup .... exiting!");
+	return StatusCode::FAILURE;
+      }
+      for (std::vector<float>::size_type i=0; i<m_bins[j];++i) {
+	ATH_MSG_INFO( "bin " << m_ptBins[j][i] << " - " <<  m_ptBins[j][i+1]<<" with Pt Threshold of " << (m_ptThresholds[j][i])/CLHEP::GeV<< " GeV");
+      }
+    }
+  }
+  if ( not m_monTool.name().empty() ) {
+    ATH_CHECK( m_monTool.retrieve() );
+    ATH_MSG_DEBUG("MonTool name: " << m_monTool);
+  }
+  ATH_MSG_INFO("Initialization completed successfully");
+  return StatusCode::SUCCESS;
+}
+bool TrigMuonEFCombinerHypoTool::decideOnSingleObject(TrigMuonEFCombinerHypoTool::MuonEFInfo& input, size_t cutIndex) const{
+  ATH_MSG_DEBUG( "deciding...");
+  using namespace Monitored;
+  //Monitored Variables
+  std::vector<float> fexPt, fexEta, fexPhi, selPt, selEta, selPhi;
+  auto muonPtMon = MonitoredCollection::declare("Pt", fexPt);
+  auto muonEtaMon = MonitoredCollection::declare("Eta", fexEta);
+  auto muonPhiMon = MonitoredCollection::declare("Phi", fexPhi);
+  auto muonPtSelMon = MonitoredCollection::declare("Pt_sel", selPt);
+  auto muonEtaSelMon = MonitoredCollection::declare("Eta_sel", selEta);
+  auto muonPhiSelMon = MonitoredCollection::declare("Phi_sel", selPhi);
+  auto monitorIt	= MonitoredScope::declare(m_monTool, muonPtMon, muonEtaMon, muonPhiMon, muonPtSelMon, muonEtaSelMon, muonPhiSelMon); 
+  bool result = false;
+  //for pass through mode
+  if(m_acceptAll) {
+    result = true;
+    ATH_MSG_DEBUG("Accept property is set: taking all the events");
+    return result;
+  }
+  //  decision making
+  //Get xAOD::MuonContainer from hypotool
+  const xAOD::Muon* muon = input.muon;
+  if( !muon ){
+    ATH_MSG_DEBUG("Retrieval of xAOD::MuonContainer failed");
+    return false;
+  }
+  if (muon->primaryTrackParticle()) { // was there a muon in this RoI ?
+    const xAOD::TrackParticle* tr = muon->trackParticle(xAOD::Muon::TrackParticleType::CombinedTrackParticle);
+    if (!tr) {
+      ATH_MSG_DEBUG("No CombinedTrackParticle found.");
+    } else {
+      ATH_MSG_DEBUG("Retrieved CombinedTrack 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[0]; ++k) {
+        if (absEta > m_ptBins[cutIndex][k] && absEta <= m_ptBins[cutIndex][k+1]) threshold = m_ptThresholds[cutIndex][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 result;	
+}
+  
+StatusCode TrigMuonEFCombinerHypoTool::decide(std::vector<MuonEFInfo>& toolInput) const {
+  size_t numTrigger = m_ptBins.size();
+  size_t numMuon=toolInput.size();
+  if(numTrigger==1){
+    ATH_MSG_DEBUG("Applying selection of single << " << m_decisionId);
+    return inclusiveSelection(toolInput);
+  }
+  else{
+    if(numMuon ==1) ATH_MSG_DEBUG("Not applying selection "<<m_decisionId<< " because the number of muons is "<<numMuon);
+    else{
+      ATH_MSG_DEBUG("Applying selection of multiplicity "<< m_decisionId);
+      return multiplicitySelection(toolInput);
+    }
+  }
+  return StatusCode::SUCCESS;
+}
+StatusCode TrigMuonEFCombinerHypoTool::inclusiveSelection(std::vector<MuonEFInfo>& toolInput) const{
+  for (auto& tool : toolInput){
+    if(TrigCompositeUtils::passed(m_decisionId.numeric(), tool.previousDecisionIDs)){
+      if(decideOnSingleObject(tool, 0)==true){
+	ATH_MSG_DEBUG("Passes selection");
+	TrigCompositeUtils::addDecisionID(m_decisionId, tool.decision);
+      }
+      else ATH_MSG_DEBUG("Does not pass selection");
+    }
+  }
+  return StatusCode::SUCCESS;
+}
+StatusCode TrigMuonEFCombinerHypoTool::multiplicitySelection(std::vector<MuonEFInfo>& toolInput) const{
+  HLT::Index2DVec passingSelection(toolInput.size());
+  for(size_t cutIndex=0; cutIndex < m_ptBins.size(); ++cutIndex) {
+    size_t elementIndex{0};
+    for(auto& i : toolInput){
+      if(TrigCompositeUtils::passed(m_decisionId.numeric(), i.previousDecisionIDs)){
+	if(decideOnSingleObject(i, cutIndex)==true){
+	  ATH_MSG_DEBUG("Passing selection "<<m_decisionId << " , Index["<<elementIndex<<"]");
+	  passingSelection[cutIndex].push_back(elementIndex);
+	}
+	else ATH_MSG_DEBUG("Not passing selection "<<m_decisionId << " , Index["<<elementIndex<<"]");
+      }
+      else{
+	ATH_MSG_DEBUG("No match for decisionId "<<m_decisionId);
+      }
+      elementIndex++;
+    }
+    //If nothing passes, then we should stop
+    if(passingSelection[cutIndex].empty()){
+      ATH_MSG_DEBUG("No muons passed the selection "<<cutIndex<<" rejecting...");
+      return StatusCode::SUCCESS;
+    }
+  }
+  std::set<size_t> passingIndices;
+  if(m_decisionPerRoI==true){
+    auto notFromSameRoI = [&](const HLT::Index1DVec& comb){
+      std::set<const xAOD::Muon*> setOfMuons;
+      for (auto index : comb){
+	setOfMuons.insert(toolInput[index].muon);
+      }
+      return setOfMuons.size()==comb.size();
+    };
+  
+    HLT::elementsInUniqueCombinations(passingSelection, passingIndices, notFromSameRoI);
+  }
+  else{
+    HLT::elementsInUniqueCombinations(passingSelection, passingIndices);
+  }
+  if(passingIndices.empty()){
+    ATH_MSG_DEBUG("No muons passed selection "<<m_decisionId);
+    return StatusCode::SUCCESS;
+  }
+  for(auto i : passingIndices){
+    ATH_MSG_DEBUG("Muon["<<i<<"] passes "<<m_decisionId<<" with pT = "<<toolInput[i].muon->pt() << "GeV");
+    TrigCompositeUtils::addDecisionID(m_decisionId.numeric(), toolInput[i].decision);
+  }
+  return StatusCode::SUCCESS;
+}
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFMSonlyHypoTool.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFMSonlyHypoTool.cxx
index aad88607c875e21f1732aee36f657e8713b64649..54766989511d241c9d020066a9f70f198eae1da8 100644
--- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFMSonlyHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFMSonlyHypoTool.cxx
@@ -2,120 +2,91 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
+#include "DecisionHandling/Combinators.h"
 #include "TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h"
 #include "CLHEP/Units/SystemOfUnits.h"
 #include "DecisionHandling/TrigCompositeUtils.h"
 #include "AthenaMonitoring/MonitoredScope.h"
-
 class ISvcLocator;
-
 TrigMuonEFMSonlyHypoTool::TrigMuonEFMSonlyHypoTool(const std::string & type, const std::string & name, const IInterface* parent):
   AthAlgTool(type, name, parent),
   m_decisionId(HLT::Identifier::fromToolName(name)){
-  declareProperty("AcceptAll", m_acceptAll=true);
-  std::vector<float> def_bins;
-  def_bins.push_back(0);
-  def_bins.push_back(9.9);
-  std::vector<float> def_thrs;
-  def_thrs.push_back(0.*CLHEP::GeV);
-  declareProperty("PtBins", m_ptBins=def_bins);
-  declareProperty("PtThresholds", m_ptThresholds=def_thrs);
-
-  m_bins = 0;
-
 }
-
 TrigMuonEFMSonlyHypoTool::~TrigMuonEFMSonlyHypoTool(){
 }
-
 StatusCode TrigMuonEFMSonlyHypoTool::initialize(){
-
-
   if(m_acceptAll) {
     ATH_MSG_INFO("Accepting all the events with not cut!");
   } else {
-    m_bins = m_ptBins.size() - 1;
-    if (m_bins != m_ptThresholds.size()) {
-      ATH_MSG_ERROR("bad thresholds setup .... exiting!");
+    if(m_ptBins.size()<=0){ 
+      ATH_MSG_ERROR("Trying to configure hypo with no pT bins. This is probably a configuration mistake.");
       return StatusCode::FAILURE;
     }
-
-    for (std::vector<float>::size_type i=0; i<m_bins;++i) {
-      ATH_MSG_INFO( "bin " << m_ptBins[i] << " - " <<  m_ptBins[i+1]<<" with Pt Threshold of " << (m_ptThresholds[i])/CLHEP::GeV<< " GeV");
+    m_bins.resize(m_ptBins.size());
+    for(size_t j=0; j<m_ptBins.size(); j++){
+      m_bins[j] = m_ptBins[j].size() - 1;
+      if (m_bins[j] != m_ptThresholds[j].size()) {
+	ATH_MSG_ERROR("bad thresholds setup .... exiting!");
+	return StatusCode::FAILURE;
+      }
+      for (std::vector<float>::size_type i=0; i<m_bins[j];++i) {
+	ATH_MSG_INFO( "bin " << m_ptBins[j][i] << " - " <<  m_ptBins[j][i+1]<<" with Pt Threshold of " << (m_ptThresholds[j][i])/CLHEP::GeV<< " GeV");
+      }
     }
   }
-
   if ( not m_monTool.name().empty() ) {
     ATH_CHECK( m_monTool.retrieve() );
     ATH_MSG_DEBUG("MonTool name: " << m_monTool);
   }
-
   ATH_MSG_INFO("Initialization completed successfully");
   return StatusCode::SUCCESS;
 }
-
-
-StatusCode TrigMuonEFMSonlyHypoTool::decide(TrigMuonEFMSonlyHypoTool::MuonEFInfo& input) const{
-
-
+bool TrigMuonEFMSonlyHypoTool::decideOnSingleObject(TrigMuonEFMSonlyHypoTool::MuonEFInfo& input, size_t cutIndex) const{
   ATH_MSG_DEBUG( "deciding...");
-
   using namespace Monitored;
   //Monitored Variables
   std::vector<float> fexPt, fexEta, fexPhi, selPt, selEta, selPhi;
-
   auto muonPtMon = MonitoredCollection::declare("Pt", fexPt);
   auto muonEtaMon = MonitoredCollection::declare("Eta", fexEta);
   auto muonPhiMon = MonitoredCollection::declare("Phi", fexPhi);
-
   auto muonPtSelMon = MonitoredCollection::declare("Pt_sel", selPt);
   auto muonEtaSelMon = MonitoredCollection::declare("Eta_sel", selEta);
   auto muonPhiSelMon = MonitoredCollection::declare("Phi_sel", selPhi);
-
   auto monitorIt	= MonitoredScope::declare(m_monTool, muonPtMon, muonEtaMon, muonPhiMon, muonPtSelMon, muonEtaSelMon, muonPhiSelMon); 
-
   bool result = false;
   //for pass through mode
   if(m_acceptAll) {
     result = true;
     ATH_MSG_DEBUG("Accept property is set: taking all the events");
-    return StatusCode(result);
+    return result;
   }
-
   //  decision making
   //Get xAOD::MuonContainer from hypotool
   const xAOD::Muon* muon = input.muon;
   if( !muon ){
     ATH_MSG_DEBUG("Retrieval of xAOD::MuonContainer failed");
-    return StatusCode::FAILURE;
+    return false;
   }
-
-
   if (muon->primaryTrackParticle()) { // was there a muon in this RoI ?
-
     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];
+      for (std::vector<float>::size_type k=0; k<m_bins[0]; ++k) {
+        if (absEta > m_ptBins[cutIndex][k] && absEta <= m_ptBins[cutIndex][k+1]) threshold = m_ptThresholds[cutIndex][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 "
@@ -124,21 +95,82 @@ StatusCode TrigMuonEFMSonlyHypoTool::decide(TrigMuonEFMSonlyHypoTool::MuonEFInfo
       	      << " so hypothesis is " << (result?"true":"false"));
     }
   }
-  return StatusCode(result);				
+  return result;	
 }
   
-
 StatusCode TrigMuonEFMSonlyHypoTool::decide(std::vector<MuonEFInfo>& toolInput) const {
-  ATH_MSG_DEBUG("Applying selection of single << " << m_decisionId.numeric());
-  for ( auto& i: toolInput) {
-    if (TrigCompositeUtils::passed(m_decisionId.numeric(), i.previousDecisionIDs)) {
-      if ( decide(i) ) {
-	ATH_MSG_DEBUG("hypothesis is true, so muon passed selection");
-	TrigCompositeUtils::addDecisionID(m_decisionId, i.decision);
-      } else {
-	ATH_MSG_DEBUG("hypothesis is false, so no muons passed selection");
+  size_t numTrigger = m_ptBins.size();
+  size_t numMuon=toolInput.size();
+  if(numTrigger==1){
+    ATH_MSG_DEBUG("Applying selection of single << " << m_decisionId);
+    return inclusiveSelection(toolInput);
+  }
+  else{
+    if(numMuon <=1) ATH_MSG_DEBUG("Not applying selection "<<m_decisionId<< " because the number of muons is "<<numMuon);
+    else{
+      ATH_MSG_DEBUG("Applying selection of multiplicity "<< m_decisionId);
+      return multiplicitySelection(toolInput);
+    }
+  }
+  return StatusCode::SUCCESS;
+}
+StatusCode TrigMuonEFMSonlyHypoTool::inclusiveSelection(std::vector<MuonEFInfo>& toolInput) const{
+  for (auto& tool : toolInput){
+    if(TrigCompositeUtils::passed(m_decisionId.numeric(), tool.previousDecisionIDs)){
+      if(decideOnSingleObject(tool, 0)==true){
+	ATH_MSG_DEBUG("Passes selection");
+	TrigCompositeUtils::addDecisionID(m_decisionId, tool.decision);
       }
-    } 
-  } 
+      else ATH_MSG_DEBUG("Does not pass selection");
+    }
+  }
+  return StatusCode::SUCCESS;
+}
+StatusCode TrigMuonEFMSonlyHypoTool::multiplicitySelection(std::vector<MuonEFInfo>& toolInput) const{
+  HLT::Index2DVec passingSelection(toolInput.size());
+  for(size_t cutIndex=0; cutIndex < m_ptBins.size(); ++cutIndex) {
+    size_t elementIndex{0};
+    for(auto& i : toolInput){
+      if(TrigCompositeUtils::passed(m_decisionId.numeric(), i.previousDecisionIDs)){
+	if(decideOnSingleObject(i, cutIndex)==true){
+	  ATH_MSG_DEBUG("Passing selection "<<m_decisionId << " , Index["<<elementIndex<<"]");
+	  passingSelection[cutIndex].push_back(elementIndex);
+	}
+	else ATH_MSG_DEBUG("Not passing selection "<<m_decisionId << " , Index["<<elementIndex<<"]");
+      }
+      else{
+	ATH_MSG_DEBUG("No match for decisionId "<<m_decisionId);
+      }
+      elementIndex++;
+    }
+    //If nothing passes, then we should stop
+    if(passingSelection[cutIndex].empty()){
+      ATH_MSG_DEBUG("No muons passed the selection "<<cutIndex<<" rejecting...");
+      return StatusCode::SUCCESS;
+    }
+  }
+  std::set<size_t> passingIndices;
+  if(m_decisionPerRoI==true){
+    auto notFromSameRoI = [&](const HLT::Index1DVec& comb){
+      std::set<const xAOD::Muon*> setOfMuons;
+      for (auto index : comb){
+	setOfMuons.insert(toolInput[index].muon);
+      }
+      return setOfMuons.size()==comb.size();
+    };
+  
+    HLT::elementsInUniqueCombinations(passingSelection, passingIndices, notFromSameRoI);
+  }
+  else{
+    HLT::elementsInUniqueCombinations(passingSelection, passingIndices);
+  }
+  if(passingIndices.empty()){
+    ATH_MSG_DEBUG("No muons passed selection "<<m_decisionId);
+    return StatusCode::SUCCESS;
+  }
+  for(auto i : passingIndices){
+    ATH_MSG_DEBUG("Muon["<<i<<"] passes "<<m_decisionId<<" with pT = "<<toolInput[i].muon->pt() << "GeV");
+    TrigCompositeUtils::addDecisionID(m_decisionId.numeric(), toolInput[i].decision);
+  }
   return StatusCode::SUCCESS;
 }
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/components/TrigMuonHypo_entries.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/components/TrigMuonHypo_entries.cxx
index f24a168fdbf79f3a3a32442145b5a14431c6acfe..73b61b21040b0dce5f33ef72845daaa848eeaacf 100644
--- a/Trigger/TrigHypothesis/TrigMuonHypo/src/components/TrigMuonHypo_entries.cxx
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/components/TrigMuonHypo_entries.cxx
@@ -38,6 +38,8 @@
 #include "TrigMuonHypo/TrigMuonEFCombinerDiMuonMassPtImpactsHypo.h"
 #include "TrigMuonHypo/TrigMuonEFMSonlyHypoAlg.h"
 #include "TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h"
+#include "TrigMuonHypo/TrigMuonEFCombinerHypoAlg.h"
+#include "TrigMuonHypo/TrigMuonEFCombinerHypoTool.h"
 #include "TrigMuonHypo/TrigMuonCaloTagHypo.h"
 #include "TrigMuonHypo/TrigMuonIDTrackMultiHypo.h"
 
@@ -81,6 +83,8 @@ DECLARE_COMPONENT( TrigMuonEFCombinerDiMuonMassHypo )
 DECLARE_COMPONENT( TrigMuonEFCombinerDiMuonMassPtImpactsHypo )
 DECLARE_COMPONENT( TrigMuonEFMSonlyHypoAlg )
 DECLARE_COMPONENT( TrigMuonEFMSonlyHypoTool )
+DECLARE_COMPONENT( TrigMuonEFCombinerHypoAlg )
+DECLARE_COMPONENT( TrigMuonEFCombinerHypoTool )
 DECLARE_COMPONENT( TrigMuonCaloTagHypo )
 DECLARE_COMPONENT( TrigMuonIDTrackMultiHypo )
 
diff --git a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx
index 33a8107e5e7eb3756d88190aca77d558060f4ee3..b4ad8e77e3e801ee41b713dda2e812fd0cedb750 100644
--- a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx
+++ b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx
@@ -50,7 +50,7 @@ StatusCode JRoIsUnpackingTool::unpack( const EventContext& ctx,
 
   // Additional FS RoI tagged with the decisions of all chains
   auto trigFSRoIs = std::make_unique< TrigRoiDescriptorCollection >();
-  trigFSRoIs->push_back( new TrigRoiDescriptor() ); // the argument-less c'tor is crating the FS RoI
+  trigFSRoIs->push_back( new TrigRoiDescriptor( true ) ); // the c'tor for the FS RoI
   auto fsDecisionOutput = std::make_unique<DecisionContainer>();
   auto fsDecisionAux    = std::make_unique<DecisionAuxContainer>();
   fsDecisionOutput->setStore( fsDecisionAux.get() );  
diff --git a/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt b/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt
index 881c48f66648d424ecf1cce68ebf43920370a8ff..2791775faf2cd1ec75521d844e511cf8bdd247cb 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt
+++ b/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt
@@ -19,6 +19,8 @@ atlas_depends_on_subdirs( PUBLIC
 			  Event/xAOD/xAODTrigger
 			  Event/xAOD/xAODTracking
 			  Trigger/TrigDataAccess/TrigSerializeResult
+			  Event/xAOD/xAODTrigMuon
+			  Event/xAOD/xAODMuon
 			  )
 
 
@@ -27,7 +29,11 @@ atlas_add_library( TrigOutputHandlingLib
                    src/*.cxx
                    PUBLIC_HEADERS TrigOutputHandling
                    LINK_LIBRARIES GaudiKernel AthViews AthenaBaseComps TrigSteeringEvent 
+<<<<<<< HEAD
                    xAODTrigCalo xAODTrigEgamma xAODTrigger xAODTracking TrigSerializeResult )                   
+=======
+                   xAODTrigCalo xAODTrigEgamma xAODTrigger xAODTracking xAODTrigMuon xAODMuon )                   
+>>>>>>> upstream/master
 
 atlas_add_component( TrigOutputHandling
                      src/components/*.cxx                      
diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
index be63d8be6aaa3edc00d3643d1b5f0a545c521930..0b5a76eeccea48d090eb3c4989030f224a5b7bae 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
@@ -52,6 +52,11 @@ StatusCode HLTEDMCreator::initialize()
   INIT_XAOD( TrigPhotonContainer );
   INIT_XAOD( TrackParticleContainer );
 
+  INIT_XAOD( L2StandAloneMuonContainer );
+  INIT_XAOD( L2CombinedMuonContainer );
+  INIT_XAOD( L2IsoMuonContainer );
+  INIT_XAOD( MuonContainer );
+
 #undef INIT
 #undef INIT_XAOD
   
@@ -253,6 +258,11 @@ StatusCode HLTEDMCreator::createOutput(const EventContext& context) const {
   CREATE_XAOD( TrigCaloClusterContainer, TrigCaloClusterAuxContainer )
   CREATE_XAOD( TrackParticleContainer, TrackParticleAuxContainer )
 
+  CREATE_XAOD( L2StandAloneMuonContainer, L2StandAloneMuonAuxContainer );
+  CREATE_XAOD( L2CombinedMuonContainer, L2CombinedMuonAuxContainer );
+  CREATE_XAOD( L2IsoMuonContainer, L2IsoMuonAuxContainer );
+  CREATE_XAOD( MuonContainer, MuonAuxContainer );
+
   // After view collections are merged, need to update collection links
   CHECK( fixLinks( ConstHandlesGroup<xAOD::TrigCompositeContainer>( m_TrigCompositeContainer, m_TrigCompositeContainerInViews, m_TrigCompositeContainerViews ) ) );
 
diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h
index b925cbeed651612430e5066fdf1b734ab5a7fde0..8eebb769d69b427793934bd195eae460497bda3e 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h
@@ -31,6 +31,15 @@
 #include "xAODTracking/TrackParticleContainer.h"
 #include "xAODTracking/TrackParticleAuxContainer.h"
 
+#include "xAODTrigMuon/L2StandAloneMuonContainer.h"
+#include "xAODTrigMuon/L2StandAloneMuonAuxContainer.h"
+#include "xAODTrigMuon/L2CombinedMuonContainer.h"
+#include "xAODTrigMuon/L2CombinedMuonAuxContainer.h"
+#include "xAODTrigMuon/L2IsoMuonContainer.h"
+#include "xAODTrigMuon/L2IsoMuonAuxContainer.h"
+#include "xAODMuon/MuonContainer.h"
+#include "xAODMuon/MuonAuxContainer.h"
+
 /**
  * @class Tool capable of creating collections missing (early rejection) after HLT processing
  * @brief It declares output handles for all possible collections produced by the trigger
@@ -85,6 +94,11 @@ class HLTEDMCreator: public extends<AthAlgTool, IHLTOutputTool>  {
   DEF_XAOD_KEY( TrigPhotonContainer );
   DEF_XAOD_KEY( TrackParticleContainer );
 
+  DEF_XAOD_KEY( L2StandAloneMuonContainer );
+  DEF_XAOD_KEY( L2CombinedMuonContainer );
+  DEF_XAOD_KEY( L2IsoMuonContainer );
+  DEF_XAOD_KEY( MuonContainer );
+
 #undef DEF_VIEWS
 #undef DEF_KEY
 #undef DEF_XAOD_KEY
diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultCreatorByteStream.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultCreatorByteStream.cxx
index 4d3338b98e822a3b94389df1ae9312e4ea20fc57..1fcfea11a5e10bc412426543db02496d5732c95d 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultCreatorByteStream.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultCreatorByteStream.cxx
@@ -29,29 +29,35 @@ StatusCode HLTResultCreatorByteStream::initialize() {
   ATH_CHECK( m_serializerSvc.retrieve() );
   ATH_CHECK( m_dictLoaderSvc.retrieve() );
 
-  System::ImageHandle handle = 0;
-  if ( System::loadDynamicLib( "xAODTrigger", &handle)  != 1 ) {
-    ATH_MSG_WARNING("Can not load the lib");
-  } else {
-    ATH_MSG_DEBUG("Could load the lib");
-  }
+  // System::ImageHandle handle = 0;
+  // if ( System::loadDynamicLib( "xAODTrigger", &handle)  != 1 ) {
+  //   ATH_MSG_WARNING("Can not load the lib");
+  // } else {
+  //   ATH_MSG_DEBUG("Could load the lib");
+  // }
 
 
 
   for ( std::string typeAndKey: m_collectionsToSerialize ) {
     const std::string type = typeAndKey.substr( 0, typeAndKey.find('#') );
+    if ( type.find('_') == std::string::npos ) {
+      ATH_MSG_ERROR( "Unversion object to be recorded " << typeAndKey );
+      return StatusCode::FAILURE;
+    }
+    const std::string transientType = typeAndKey.substr( 0, typeAndKey.find('_') );
+
     const std::string key = typeAndKey.substr( typeAndKey.find('#')+1 );    
     CLID clid;
-    if ( m_clidSvc->getIDOfTypeName(type, clid).isFailure() )  {
-      ATH_MSG_ERROR( "Can not find CLID for " << type << " that is needed to stream " << key );
+    if ( m_clidSvc->getIDOfTypeName(transientType, clid).isFailure() )  {
+      ATH_MSG_ERROR( "Can not find CLID for " << transientType << " that is needed to stream " << key );
       return StatusCode::FAILURE;
     } 
 
     RootType classDesc = RootType::ByName( type );
-    // if ( ! classDesc.IsComplete() ) {
-    //   ATH_MSG_ERROR( "The type " << type <<  " is not known" );
-    //   return StatusCode::FAILURE;
-    // }
+    if ( ! classDesc.IsComplete() ) {
+      ATH_MSG_ERROR( "The type " << type <<  " is not known" );
+      return StatusCode::FAILURE;
+    }
     
     ATH_MSG_DEBUG( "Type " << type << " key " << key <<  " serializable" );
     m_toSerialize.push_back( Address{ type, clid, classDesc, key } );      
diff --git a/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKClusterConverterTool.h b/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKClusterConverterTool.h
index 1c02a7f522c53f4b2d36b1146a85472167192c33..0bf0a5e524c5e0a251624acb5ae778d526b21bf0 100644
--- a/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKClusterConverterTool.h
+++ b/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKClusterConverterTool.h
@@ -80,8 +80,8 @@ private:
   
   const InDetDD::PixelDetectorManager* m_pixelManager;
 
-  ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool{this, "PixelLorentzAngleTool", "PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"};
-  ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"};
+  ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool{this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"};
+  ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SiLorentzAngleTool/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"};
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_RodDecoder.h b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_RodDecoder.h
index 69a3158723ed927418074458a9b0e9a47a2612f2..4ff24a5d304acf3e9618c07f4af24b2c0f5efd6b 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_RodDecoder.h
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_RodDecoder.h
@@ -65,7 +65,7 @@ public:
   IdContext m_cntx_sct; 
   FastSCT_Clusterization* m_pClusterization;
   ISCT_CablingTool* m_cablingTool;
-  ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
+  ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle"};
   SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
 };
 
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_physics_pp_v7_PSed_nightlyDayBefore_grid.sh b/Trigger/TrigValidation/TrigP1Test/test/test_physics_pp_v7_PSed_nightlyDayBefore_grid.sh
index b4c2e248ce23e3b6cbb4fb6270023307c853af6c..f0e6525ee644ce4d2878b906015af6d241aa2807 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_physics_pp_v7_PSed_nightlyDayBefore_grid.sh
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_physics_pp_v7_PSed_nightlyDayBefore_grid.sh
@@ -36,7 +36,8 @@ echo 'hltpsk' ${hltpsk} | tee ${JOB_LOG}
 
 echo "Reading release from SMK" | tee ${JOB_LOG} 
 get_files releaseFromSMK.py
-python releaseFromSMK.py TRIGGERDBART ${smk} | tee ${JOB_LOG}
+python releaseFromSMK.py TRIGGERDBART ${smk} > releaseFromSMK.log
+cat releaseFromSMK.log  | tee ${JOB_LOG}
 eval "$( grep 'export release=' releaseFromSMK.log)" 
 if [ -z ${release} ]; then
    echo "Release not found" | tee ${JOB_LOG} 
@@ -53,7 +54,7 @@ Trig_reco_tf.py --inputBSFile=HLT_physicsV7_prescaled._0001.data --outputNTUP_TR
 ATH_RETURN=${PIPESTATUS[0]}
 echo "art-result: ${ATH_RETURN} ${NAME}"
 
-exec_art_trigp1test_post.sh
+#exec_art_trigp1test_post.sh
 
 
 #echo 'ART Grid test with Physics_pp_v7 PSed menu'
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
index 5124dc70f06a7332bb6bb64c66f45de08ce3851c..d40658411d97468c037d0e016af43b819dd382e8 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
+++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
@@ -75,7 +75,6 @@ atlas_add_test( photonMenu
  		SCRIPT test/test_photon_menu.sh
                  PROPERTIES TIMEOUT 500
  		PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_photonMenu   )
-
 #		EXTRA_PATTERNS "TriggerSummary"
 file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_egammaMenu )
 atlas_add_test( egammaMenu
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py
index b5ac5973e493d63cc31c22d3b205a93ab175e2e9..f880bda14516fd013827d52758889bae30fff179 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py
@@ -58,8 +58,8 @@ def makeInDetAlgs():
     
     #SCT
     from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCT_RodDecoder
-    InDetSCTRodDecoder = SCT_RodDecoder(name        = "InDetSCTRodDecoder",
-                                        TriggerMode = False,)# OutputLevel = INFO)
+    InDetSCTRodDecoder = SCT_RodDecoder(name          = "InDetSCTRodDecoder",)
+                                        # OutputLevel = INFO)
     ToolSvc += InDetSCTRodDecoder
     
     from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCTRawDataProviderTool
@@ -168,8 +168,7 @@ def makeInDetAlgs():
   # InDetSCT_FlaggedConditionTool = sct_FlaggedConditionToolSetup.getTool()
   
   from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup
-  sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup()
-  sct_ConditionsSummaryToolSetup.setToolName("InDetSCT_ConditionsSummaryTool")
+  sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup("InDetSCT_ConditionsSummaryTool")
   sct_ConditionsSummaryToolSetup.setup()
   InDetSCT_ConditionsSummaryTool = sct_ConditionsSummaryToolSetup.getTool()
   condTools = []
@@ -179,8 +178,7 @@ def makeInDetAlgs():
     if condTool not in condTools:
       if condTool != "SCT_FlaggedConditionTool/InDetSCT_FlaggedConditionTool":
         condTools.append(condTool)
-  sct_ConditionsSummaryToolSetupWithoutFlagged = SCT_ConditionsSummaryToolSetup()
-  sct_ConditionsSummaryToolSetupWithoutFlagged.setToolName("InDetSCT_ConditionsSummaryToolWithoutFlagged")
+  sct_ConditionsSummaryToolSetupWithoutFlagged = SCT_ConditionsSummaryToolSetup("InDetSCT_ConditionsSummaryToolWithoutFlagged")
   sct_ConditionsSummaryToolSetupWithoutFlagged.setup()
   InDetSCT_ConditionsSummaryToolWithoutFlagged = sct_ConditionsSummaryToolSetupWithoutFlagged.getTool()
   InDetSCT_ConditionsSummaryToolWithoutFlagged.ConditionsTools = condTools
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py
index 15d3acdd51a5e9fbee952974c848f183b4423c5d..6519f70966c12f16999f3350229a109be069400e 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py
@@ -208,4 +208,7 @@ def makeMuonPrepDataAlgs( doL2SA, doEFSA ):
       viewAlgs_MuEFSA.append( MuonClusterAlg )
 
 
-  return ( eventAlgs_Muon, viewAlgs_MuL2SA, viewAlgs_MuEFSA ) 
+  return ( eventAlgs_Muon, viewAlgs_MuL2SA, viewAlgs_MuEFSA )
+
+
+
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py
index 43b0f0b8bfb65a5f248b4e6bb4fa0db091df820e..b616d45773f26490920a876cd56830cef6643398 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py
@@ -232,7 +232,9 @@ svcMgr.StoreGateSvc.OutputLevel = INFO
 
 streamnigTool = HLTResultCreatorByteStream(OutputLevel=VERBOSE)
 
-streamnigTool.CollectionsToSerialize = [ "xAOD::TrigCompositeContainer#EgammaCaloDecisions", "xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex", "xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux."  ]
+
+
+streamnigTool.CollectionsToSerialize = [ "xAOD::TrigCompositeContainer_v1#EgammaCaloDecisions" ] #, "xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex", "xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux."  ]
 summary.OutputTools = [ egammaViewsMerger, streamnigTool ]
 
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py
index af589dd02da16cdd19b13bce3549cfb0699c4262..6be6d8ac5a67602f33ce2e0063a440806bb60862 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py
@@ -74,6 +74,20 @@ AlgScheduler.setDataLoaderAlg( 'SGInputLoader' )
 from AthenaCommon.CfgGetter import getPublicTool, getPublicToolClone
 from AthenaCommon import CfgMgr
 
+TriggerFlags.doID   = False;
+TriggerFlags.doMuon = True;
+
+### Set muon sequence ###
+if not 'doL2SA' in dir():
+  doL2SA = True
+if not 'doL2CB' in dir():
+  doL2CB = True
+  TriggerFlags.doID = True
+if not 'doL2ISO' in dir():
+  doL2ISO = True 
+if not 'doEFSA' in dir():
+  doEFSA = True
+
 ### muon thresholds ###
 testChains = ["HLT_mu6", "HLT_2mu6"]
 
@@ -89,10 +103,8 @@ viewAlgs = []
 if doL2CB:
   # Only do setup of ID stuff if we run combined muon finding
   from TrigUpgradeTest.InDetSetup import makeInDetAlgs
-
   (viewAlgs, eventAlgs) = makeInDetAlgs()
 
-
   from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon
   theFTF = TrigFastTrackFinder_Muon()
   theFTF.OutputLevel = DEBUG
@@ -100,11 +112,11 @@ if doL2CB:
   theFTF.isRoI_Seeded = True
   viewAlgs.append(theFTF)
 
-### A simple algorithm to confirm that data has been inherited from parent view ###
-### Required to satisfy data dependencies                                       ###
-ViewVerify = CfgMgr.AthViews__ViewDataVerifier("muFastViewDataVerifier")
-ViewVerify.DataObjects = [('xAOD::L2StandAloneMuonContainer','StoreGateSvc+MuonL2SAInfo')]
-viewAlgs.append(ViewVerify)
+  ### A simple algorithm to confirm that data has been inherited from parent view ###
+  ### Required to satisfy data dependencies                                       ###
+  ViewVerify = CfgMgr.AthViews__ViewDataVerifier("muFastViewDataVerifier")
+  ViewVerify.DataObjects = [('xAOD::L2StandAloneMuonContainer','StoreGateSvc+MuonL2SAInfo')]
+  viewAlgs.append(ViewVerify)
 
 
 ### Used the algorithms as Step1 "muFast step" ###
@@ -422,6 +434,7 @@ if TriggerFlags.doMuon:
     themuoncreatoralg.MuonCreatorTool=thecreatortool
     themuoncreatoralg.CreateSAmuons=True
     themuoncreatoralg.MakeClusters=False
+    themuoncreatoralg.MuonContainerLocation = "Muons"
 
     #Algorithms to views
     efMuViewNode += theSegmentFinderAlg
@@ -494,173 +507,360 @@ if TriggerFlags.doMuon:
 #               Setup CF(Control Flow)
 # ===============================================================================================
 
-  ### CF construction ###
+### CF construction ###
+def summarySteps ( name, decisions ):
+  from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg
+  summarySteps = TriggerSummaryAlg( "TriggerSummary"+name )
+  summarySteps.InputDecision = "HLTChains"
+  summarySteps.HLTSummary = "MonitoringSummary"+name
+  summarySteps.OutputLevel = DEBUG
+  summarySteps.FinalDecisions = decisions
+  return summarySteps
 
-### NO Trackinhg ###
 
-if TriggerFlags.doMuon==True:    
+def muonViewsMergers( name ):
+  from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator
+  muonViewsMerger = HLTEDMCreator("muonViewsMerger_" + name )
+  muonViewsMerger.TrigCompositeContainer = [ "MURoIDecisions", "HLTChainsResult", "MonitoringSummaryStep1", "MonitoringSummaryStep2", "MonitoringSummaryStep3"]
+  muonViewsMerger.OutputLevel = VERBOSE
+
+  if doL2SA==True:
+    muonViewsMerger.TrigCompositeContainer += [ filterL1RoIsAlg.Output[0], trigMufastHypo.HypoOutputDecisions ]
+    muonViewsMerger.L2StandAloneMuonContainerViews = [ l2MuViewsMaker.Views ]
+    muonViewsMerger.L2StandAloneMuonContainerInViews = [ muFastAlg.MuonL2SAInfo ]
+    muonViewsMerger.L2StandAloneMuonContainer = [ muFastAlg.MuonL2SAInfo ]
+
+  if doL2CB==True:
+    muonViewsMerger.TrigCompositeContainer += [ filterL2SAAlg.Output[0], trigmuCombHypo.HypoOutputDecisions ]
+    muonViewsMerger.TrackParticleContainerViews = [ l2muCombViewsMaker.Views ]
+    muonViewsMerger.TrackParticleContainerInViews = [ TrackParticlesName ]
+    muonViewsMerger.TrackParticleContainer = [ TrackParticlesName ]
+
+    muonViewsMerger.L2CombinedMuonContainerViews = [ l2muCombViewsMaker.Views ]
+    muonViewsMerger.L2CombinedMuonContainerInViews = [ muCombAlg.L2CombinedMuonContainerName ]
+    muonViewsMerger.L2CombinedMuonContainer = [ muCombAlg.L2CombinedMuonContainerName ]
+
+  if doEFSA==True:
+    muonViewsMerger.TrigCompositeContainer += [ filterEFSAAlg.Output[0], trigMuonEFSAHypo.HypoOutputDecisions ]
+    muonViewsMerger.MuonContainerViews = [ efMuViewsMaker.Views ]
+    muonViewsMerger.MuonContainerInViews = [ themuoncreatoralg.MuonContainerLocation ]
+    muonViewsMerger.MuonContainer = [ themuoncreatoralg.MuonContainerLocation ]
+
+  if doL2CB==True and doL2ISO==True: # L2CB should be also executed with L2ISO
+    muonViewsMerger.TrigCompositeContainer += [ filterL2MuisoAlg.Output[0], trigmuIsoHypo.HypoOutputDecisions ]
+    muonViewsMerger.L2IsoMuonContainerViews = [ l2muIsoViewsMaker.Views ]
+    muonViewsMerger.L2IsoMuonContainerInViews = [ trigL2muIso.MuonL2ISInfoName ]
+    muonViewsMerger.L2IsoMuonContainer = [ trigL2muIso.MuonL2ISInfoName ]
+
+
+  return muonViewsMerger
+
+
+def muonStreamESD( muonViewsMerger ):
+  import AthenaPoolCnvSvc.WriteAthenaPool
+  from OutputStreamAthenaPool.OutputStreamAthenaPool import  createOutputStream
+  StreamESD=createOutputStream("StreamESD","myMuonESD.pool.root",True)
+  topSequence.remove( StreamESD )
+
+  def addTC(name):
+     StreamESD.ItemList += [ "xAOD::TrigCompositeContainer#"+name, "xAOD::TrigCompositeAuxContainer#"+name+"Aux." ]
+
+  for tc in muonViewsMerger.TrigCompositeContainer:
+     addTC( tc + "_remap" )
+
+  addTC("HLTSummary")
+
+  StreamESD.ItemList += [ "EventInfo#ByteStreamEventInfo" ]
+
+  StreamESD.ItemList += [ "TrigRoiDescriptorCollection#EMRoIs" ]
+  StreamESD.ItemList += [ "TrigRoiDescriptorCollection#JRoIs" ]
+  StreamESD.ItemList += [ "TrigRoiDescriptorCollection#METRoI" ]
+  StreamESD.ItemList += [ "TrigRoiDescriptorCollection#MURoIs" ]
+  StreamESD.ItemList += [ "TrigRoiDescriptorCollection#TAURoIs" ]
+
+  StreamESD.ItemList += [ "ROIB::RoIBResult#*" ]
+
+  if doL2SA==True:
+    StreamESD.ItemList += [ "xAOD::L2StandAloneMuonContainer#"+muFastAlg.MuonL2SAInfo ]
+    StreamESD.ItemList += [ "xAOD::L2StandAloneMuonAuxContainer#"+muFastAlg.MuonL2SAInfo+"Aux." ]
+
+  if doL2CB==True:
+    StreamESD.ItemList += [ "xAOD::TrackParticleContainer#"+TrackParticlesName,
+                            "xAOD::L2CombinedMuonContainer#"+muCombAlg.L2CombinedMuonContainerName ]
+    StreamESD.ItemList += [ "xAOD::TrackParticleAuxContainer#"+TrackParticlesName+"Aux.",
+                            "xAOD::L2CombinedMuonAuxContainer#"+muCombAlg.L2CombinedMuonContainerName+"Aux." ]
+
+  if doEFSA==True:
+    StreamESD.ItemList += [ "xAOD::MuonContainer#"+themuoncreatoralg.MuonContainerLocation ]
+    StreamESD.ItemList += [ "xAOD::MuonAuxContainer#"+themuoncreatoralg.MuonContainerLocation+"Aux." ]
+
+  if doL2CB==True and doL2ISO==True:
+    StreamESD.ItemList += [ "xAOD::L2IsoMuonContainer#"+trigL2muIso.MuonL2ISInfoName ]
+    StreamESD.ItemList += [ "xAOD::L2IsoMuonAuxContainer#"+trigL2muIso.MuonL2ISInfoName+"Aux." ]
+
+  print "ESD file content "
+  num = 0;
+  for Item in StreamESD.ItemList:
+    print " Contents["+str(num)+"] : "+Item
+    num+=1
+
+  return StreamESD
+
+
+
+
+### NO Trackinhg ###
+if TriggerFlags.doMuon==True and TriggerFlags.doID==False:    
   from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg 
   if doL2SA==True and doL2CB==False and doEFSA==False and doL2ISO==False:
-    summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) 
-    summary.InputDecision = "HLTChains" 
-    summary.FinalDecisions = [ trigMufastHypo.HypoOutputDecisions ]
-    summary.OutputLevel = DEBUG
+    summary0 = summarySteps("Step1", ["L2MuonFastDecisions"] )
+    step0 = parOR("step0", [ muFastStep, summary0 ] )
+    step0filter = parOR("step0filter", [ filterL1RoIsAlg ] )
+    HLTsteps = seqAND("HLTsteps", [ step0filter, step0 ]  )
+
+    muonViewsMerger = muonViewsMergers("onlyL2SA")
+
+    ### final summary
+    summary = summarySteps("FinalAlg", ["L2MuonFastDecisions"] )
+    summary.OutputTools = [ muonViewsMerger ]
 
-#    step = seqAND("firstStep", [parOR("FilterStep1",[filterL1RoIsAlg]), muFastStep])
+    ### final monitor algorithm
+    from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT, DecisionCollectorTool
+    mon = TrigSignatureMoniMT()
+    mon.FinalDecisions = [ "L2MuonFastDecisions", "WhateverElse" ]
+    from TrigUpgradeTest.TestUtils import MenuTest
+    mon.ChainsList = list( set( MenuTest.CTPToChainMapping.keys() ) )
+    mon.OutputLevel = DEBUG
 
-    step0 = parOR("step0", [ muFastStep ] )
-    stepfilter = parOR("stepfilter", [ filterL1RoIsAlg ] )
-    HLTsteps = seqAND("HLTsteps", [ stepfilter, step0, summary ]  ) 
+    step1Collector = DecisionCollectorTool("Step1Collector")
+    step1Collector.Decisions = [ "L2MuonFastDecisions" ]
+    mon.CollectorTools = [ step1Collector ]
 
-    mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) 
-    mon.InputDecision = "HLTChains" 
-    mon.FinalDecisions = [ trigMufastHypo.HypoOutputDecisions, "WhateverElse" ] 
-    mon.HLTSummary = "MonitoringSummary" 
-    mon.OutputLevel = DEBUG 
-    hltTop = seqOR( "hltTop", [ HLTsteps, mon] )
+    StreamESD = muonStreamESD(muonViewsMerger)
+
+    hltTop = seqOR( "hltTop", [ HLTsteps, mon, summary, StreamESD ] )
+    topSequence += hltTop   
 
-    topSequence += hltTop  
 
   if doL2SA==False and doL2CB==False and doEFSA==True and doL2ISO==False:
-    summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) 
-    summary.InputDecision = "HLTChains" 
-    summary.FinalDecisions = [ trigMuonEFSAHypo.HypoOutputDecisions ]
-    summary.OutputLevel = DEBUG 
-    step0 = parOR("step0", [ muonEFSAStep ] )
-    stepfilter = parOR("stepfilter", [ filterL1RoIsAlg ] )
-    HLTsteps = seqAND("HLTsteps", [ stepfilter, step0, summary ]  ) 
-
-    mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) 
-    mon.InputDecision = "HLTChains" 
-    mon.FinalDecisions = [ trigMuonEFSAHypo.HypoOutputDecisions, "WhateverElse" ] 
-    mon.HLTSummary = "MonitoringSummary" 
-    mon.OutputLevel = DEBUG 
-    hltTop = seqOR( "hltTop", [ HLTsteps, mon] )
-    topSequence += hltTop 
-
-  if doL2SA==True and doEFSA==True and doL2CB==False:
-    from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg 
-    summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) 
-    summary.InputDecision = "HLTChains" 
-    summary.FinalDecisions = [ trigMuonEFSAHypo.HypoOutputDecisions ]
-    summary.OutputLevel = DEBUG 
-    step0 = parOR("step0", [ muFastStep ] )
-    step1 = parOR("step1", [ muonEFSAStep ] )
+    summary0 = summarySteps("Step1", ["EFMuonSADecisions"] )
+    step0 = parOR("step0", [ muonEFSAStep, summary0 ] )
+    step0filter = parOR("step0filter", [ filterEFSAAlg ] )
+    HLTsteps = seqAND("HLTsteps", [ step0filter, step0 ]  )
+
+    muonViewsMerger = muonViewsMergers("onlyEFSA")
+
+    ### final summary
+    summary = summarySteps("FinalAlg", ["EFMuonSADecisions"] )
+    summary.OutputTools = [ muonViewsMerger ]
+
+    ### final monitor algorithm
+    from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT, DecisionCollectorTool
+    mon = TrigSignatureMoniMT()
+    mon.FinalDecisions = [ "EFMuonSADecisions", "WhateverElse" ]
+    from TrigUpgradeTest.TestUtils import MenuTest
+    mon.ChainsList = list( set( MenuTest.CTPToChainMapping.keys() ) )
+    mon.OutputLevel = DEBUG
+
+    step1Collector = DecisionCollectorTool("Step1Collector")
+    step1Collector.Decisions = [ "EFMuonSADecisions"]
+    mon.CollectorTools = [ step1Collector ]
 
+    StreamESD = muonStreamESD(muonViewsMerger)
+
+    hltTop = seqOR( "hltTop", [ HLTsteps, mon, summary, StreamESD ] )
+    topSequence += hltTop   
+
+
+  if doL2SA==True and doEFSA==True and doL2CB==False and doL2ISO==False:
+    summary0 = summarySteps("Step1", ["L2MuonFastDecisions"] )
+    step0 = parOR("step0", [ muFastStep, summary0 ] )
+    summary1 = summarySteps("Step2", ["EFMuonSADecisions"] )
+    step1 = parOR("step1", [ muonEFSAStep, summary1 ] )
     step0filter = parOR("step0filter", [ filterL1RoIsAlg ] )
     step1filter = parOR("step1filter", [ filterEFSAAlg ] )
+    HLTsteps = seqAND("HLTsteps", [ step0filter, step0, step1filter, step1 ]  )
+
+    muonViewsMerger = muonViewsMergers("MSonly")
 
-    HLTsteps = seqAND("HLTsteps", [ step0filter, step0, step1filter, step1, summary ]  ) 
+    ### final summary
+    summary = summarySteps("FinalAlg", ["EFMuonSADecisions"] )
+    summary.OutputTools = [ muonViewsMerger ]
 
-    mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) 
-    mon.InputDecision = "HLTChains" 
-    mon.FinalDecisions = [ trigMuonEFSAHypo.HypoOutputDecisions, "WhateverElse" ] 
-    mon.HLTSummary = "MonitoringSummary" 
-    mon.OutputLevel = DEBUG 
-    hltTop = seqOR( "hltTop", [ HLTsteps, mon] )
+    ### final monitor algorithm
+    from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT, DecisionCollectorTool
+    mon = TrigSignatureMoniMT()
+    mon.FinalDecisions = [ "EFMuonSADecisions", "WhateverElse" ]
+    from TrigUpgradeTest.TestUtils import MenuTest
+    mon.ChainsList = list( set( MenuTest.CTPToChainMapping.keys() ) )
+    mon.OutputLevel = DEBUG
 
+    step1Collector = DecisionCollectorTool("Step1Collector")
+    step1Collector.Decisions = [ "L2MuonFastDecisions" ]
+    step2Collector = DecisionCollectorTool("Step2Collector")
+    step2Collector.Decisions = [ "EFMuonSADecisions"]
+    mon.CollectorTools = [ step1Collector, step2Collector ]
+
+    StreamESD = muonStreamESD(muonViewsMerger)
+
+    hltTop = seqOR( "hltTop", [ HLTsteps, mon, summary, StreamESD ] )
     topSequence += hltTop   
 
 
 ### Use Tracking ###
 if TriggerFlags.doMuon==True and TriggerFlags.doID==True:    
   if doL2SA==True and doL2CB==True and doEFSA==False and doL2ISO==False:
-    from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg 
-    summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) 
-    summary.InputDecision = "HLTChains" 
-    summary.FinalDecisions = [ trigmuCombHypo.HypoOutputDecisions ]
-    summary.OutputLevel = DEBUG 
-    step0 = parOR("step0", [ muFastStep ] )
-    step1 = parOR("step1", [ muCombStep ] )
+    summary0 = summarySteps("Step1", ["L2MuonFastDecisions"] )
+    step0 = parOR("step0", [ muFastStep, summary0 ] )
+    summary1 = summarySteps("Step2", ["MuonL2CBDecisions"] )
+    step1 = parOR("step1", [ muCombStep, summary1 ] )
     step0filter = parOR("step0filter", [ filterL1RoIsAlg ] )
     step1filter = parOR("step1filter", [ filterL2SAAlg ] )
-    HLTsteps = seqAND("HLTsteps", [ step0filter, step0, step1filter, step1, summary ]  ) 
+    HLTsteps = seqAND("HLTsteps", [ step0filter, step0, step1filter, step1 ]  )
 
-    mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) 
-    mon.InputDecision = "HLTChains" 
-    mon.FinalDecisions = [ trigmuCombHypo.HypoOutputDecisions, "WhateverElse" ] 
-    mon.HLTSummary = "MonitoringSummary" 
-    mon.OutputLevel = DEBUG 
-    hltTop = seqOR( "hltTop", [ HLTsteps, mon] )
-
-    topSequence += hltTop   
+    muonViewsMerger = muonViewsMergers("L2SAandL2CB")
 
-if TriggerFlags.doMuon==True and TriggerFlags.doID==True:    
-  if doL2SA==True and doL2CB==True and doEFSA==True and doL2ISO==False:
-    from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg 
-    summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) 
-    summary.InputDecision = "HLTChains" 
-    summary.FinalDecisions = [ trigMuonEFSAHypo.HypoOutputDecisions ]
-    summary.OutputLevel = DEBUG 
-    step0 = parOR("step0", [ muFastStep ] )
-    step1 = parOR("step1", [ muCombStep ] )
-    step2 = parOR("step2", [ muonEFSAStep ] )
+    ### final summary
+    summary = summarySteps("FinalAlg", ["MuonL2CBDecisions"] )
+    summary.OutputTools = [ muonViewsMerger ]
 
-    step0filter = parOR("step0filter", [ filterL1RoIsAlg ] )
-    step1filter = parOR("step1filter", [ filterL2SAAlg ] )
-    step2filter = parOR("step2filter", [ filterEFSAAlg ] )
+    ### final monitor algorithm
+    from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT, DecisionCollectorTool
+    mon = TrigSignatureMoniMT()
+    mon.FinalDecisions = [ "MuonL2CBDecisions", "WhateverElse" ]
+    from TrigUpgradeTest.TestUtils import MenuTest
+    mon.ChainsList = list( set( MenuTest.CTPToChainMapping.keys() ) )
+    mon.OutputLevel = DEBUG
 
-    HLTsteps = seqAND("HLTsteps", [ step0filter, step0, step1filter, step1, step2filter, step2, summary ]  ) 
+    step1Collector = DecisionCollectorTool("Step1Collector")
+    step1Collector.Decisions = [ "L2MuonFastDecisions" ]
+    step2Collector = DecisionCollectorTool("Step2Collector")
+    step2Collector.Decisions = [ "MuonL2CBDecisions" ]
+    mon.CollectorTools = [ step1Collector, step2Collector ]
 
-    mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) 
-    mon.InputDecision = "HLTChains" 
-    mon.FinalDecisions = [ trigMuonEFSAHypo.HypoOutputDecisions, "WhateverElse" ] 
-    mon.HLTSummary = "MonitoringSummary" 
-    mon.OutputLevel = DEBUG 
-    hltTop = seqOR( "hltTop", [ HLTsteps, mon] )
+    StreamESD = muonStreamESD(muonViewsMerger)
 
+    hltTop = seqOR( "hltTop", [ HLTsteps, mon, summary, StreamESD ] )
     topSequence += hltTop   
 
-if TriggerFlags.doMuon==True and TriggerFlags.doID==True:    
-  if doL2SA==True and doL2CB==True and doEFSA==False and doL2ISO==True:
-    from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg 
-    summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) 
-    summary.InputDecision = "HLTChains" 
-    summary.FinalDecisions = [ trigmuCombHypo.HypoOutputDecisions ]
-    summary.OutputLevel = DEBUG 
-    step0 = parOR("step0", [ muFastStep ] )
-    step1 = parOR("step1", [ muCombStep ] )
-    step1 = parOR("step2", [ muIsoStep ] )
 
+  if doL2SA==True and doL2CB==True and doEFSA==True and doL2ISO==False:
+    summary0 = summarySteps("Step1", ["L2MuonFastDecisions"] )
+    step0 = parOR("step0", [ muFastStep, summary0 ] )
+    summary1 = summarySteps("Step2", ["MuonL2CBDecisions"] )
+    step1 = parOR("step1", [ muCombStep, summary1 ] )
+    summary2 = summarySteps("Step3", ["EFMuonSADecisions"] )
+    step2 = parOR("step2", [ muonEFSAStep, summary2 ] )
     step0filter = parOR("step0filter", [ filterL1RoIsAlg ] )
     step1filter = parOR("step1filter", [ filterL2SAAlg ] )
-    step2filter = parOR("step2filter", [ filterL2MuisoAlg ] )
-
-    HLTsteps = seqAND("HLTsteps", [ step0filter, step0, step1filter, step1, step2filter, step2, summary ]  ) 
+    step2filter = parOR("step2filter", [ filterEFSAAlg] )
+    HLTsteps = seqAND("HLTsteps", [ step0filter, step0, step1filter, step1, step2filter, step2 ]  )
+
+    muonViewsMerger = muonViewsMergers("L2SAandL2CBandEFSA")
+
+    ### final summary
+    summary = summarySteps("FinalAlg", ["EFMuonSADecisions"] )
+    summary.OutputTools = [ muonViewsMerger ]
+
+    ### final monitor algorithm
+    from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT, DecisionCollectorTool
+    mon = TrigSignatureMoniMT()
+    mon.FinalDecisions = [ "EFMuonSADecisions", "WhateverElse" ]
+    from TrigUpgradeTest.TestUtils import MenuTest
+    mon.ChainsList = list( set( MenuTest.CTPToChainMapping.keys() ) )
+    mon.OutputLevel = DEBUG
+
+    step1Collector = DecisionCollectorTool("Step1Collector")
+    step1Collector.Decisions = [ "L2MuonFastDecisions" ]
+    step2Collector = DecisionCollectorTool("Step2Collector")
+    step2Collector.Decisions = [ "MuonL2CBDecisions" ]
+    step3Collector = DecisionCollectorTool("Step3Collector")
+    step3Collector.Decisions = [ "EFMuonSADecisions"]
+    mon.CollectorTools = [ step1Collector, step2Collector, step3Collector ]
+
+    StreamESD = muonStreamESD(muonViewsMerger)
+
+    hltTop = seqOR( "hltTop", [ HLTsteps, mon, summary, StreamESD ] )
+    topSequence += hltTop   
 
-    mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) 
-    mon.InputDecision = "HLTChains" 
-    mon.FinalDecisions = [ trigmuCombHypo.HypoOutputDecisions, "WhateverElse" ] 
-    mon.HLTSummary = "MonitoringSummary" 
-    mon.OutputLevel = DEBUG 
-    hltTop = seqOR( "hltTop", [ HLTsteps, mon] )
 
+  if doL2SA==True and doL2CB==True and doEFSA==False and doL2ISO==True:
+    summary0 = summarySteps("Step1", ["L2MuonFastDecisions"] )
+    step0 = parOR("step0", [ muFastStep, summary0 ] )
+    summary1 = summarySteps("Step2", ["MuonL2CBDecisions"] )
+    step1 = parOR("step1", [ muCombStep, summary1 ] )
+    summary2 = summarySteps("Step3", ["MuonL2IsoDecisions"] )
+    step2 = parOR("step2", [ muIsoStep, summary2 ] )
+    step0filter = parOR("step0filter", [ filterL1RoIsAlg ] )
+    step1filter = parOR("step1filter", [ filterL2SAAlg ] )
+    step2filter = parOR("step2filter", [ filterL2MuisoAlg] )
+    HLTsteps = seqAND("HLTsteps", [ step0filter, step0, step1filter, step1, step2filter, step2 ]  )
+
+    muonViewsMerger = muonViewsMergers("L2SAandL2CBandL2Iso")
+
+    ### final summary
+    summary = summarySteps("FinalAlg", ["MuonL2IsoDecisions"] )
+    summary.OutputTools = [ muonViewsMerger ]
+
+    ### final monitor algorithm
+    from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT, DecisionCollectorTool
+    mon = TrigSignatureMoniMT()
+    mon.FinalDecisions = [ "MuonL2IsoDecisions", "WhateverElse" ]
+    from TrigUpgradeTest.TestUtils import MenuTest
+    mon.ChainsList = list( set( MenuTest.CTPToChainMapping.keys() ) )
+    mon.OutputLevel = DEBUG
+
+    step1Collector = DecisionCollectorTool("Step1Collector")
+    step1Collector.Decisions = [ "L2MuonFastDecisions" ]
+    step2Collector = DecisionCollectorTool("Step2Collector")
+    step2Collector.Decisions = [ "MuonL2CBDecisions" ]
+    step3Collector = DecisionCollectorTool("Step3Collector")
+    step3Collector.Decisions = [ "MuonL2IsoDecisions"]
+    mon.CollectorTools = [ step1Collector, step2Collector, step3Collector ]
+
+    StreamESD = muonStreamESD(muonViewsMerger)
+
+    hltTop = seqOR( "hltTop", [ HLTsteps, mon, summary, StreamESD ] )
     topSequence += hltTop   
 
-if TriggerFlags.doMuon==True and TriggerFlags.doID==True:    
+ 
   if doL2SA==True and doL2CB==True and doEFSA==True and doL2ISO==True:
-    from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg 
-    summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) 
-    summary.InputDecision = "HLTChains" 
-    summary.FinalDecisions = [ trigMuonEFSAHypo.HypoOutputDecisions, trigmuIsoHypo.HypoOutputDecisions ]
-    summary.OutputLevel = DEBUG 
-    step0 = parOR("step0", [ muFastStep ] )
-    step1 = parOR("step1", [ muCombStep ] )
-    step2 = parOR("step2", [ muonEFSAStep, muIsoStep ] )
-
+    summary0 = summarySteps("Step1", ["L2MuonFastDecisions"] )
+    step0 = parOR("step0", [ muFastStep, summary0 ] )
+    summary1 = summarySteps("Step2", ["MuonL2CBDecisions"] )
+    step1 = parOR("step1", [ muCombStep, summary1 ] )
+    summary2 = summarySteps("Step3", ["EFMuonSADecisions", "MuonL2IsoDecisions"] )
+    step2 = parOR("step2", [ muonEFSAStep, muIsoStep, summary2 ] )
     step0filter = parOR("step0filter", [ filterL1RoIsAlg ] )
     step1filter = parOR("step1filter", [ filterL2SAAlg ] )
-    step2filter = parOR("step2filter", [ filterEFSAAlg, filterL2MuisoAlg ] )
-
-    HLTsteps = seqAND("HLTsteps", [ step0filter, step0, step1filter, step1, step2filter, step2, summary ]  ) 
-
-    mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) 
-    mon.InputDecision = "HLTChains" 
-    mon.FinalDecisions = [ trigMuonEFSAHypo.HypoOutputDecisions, trigmuIsoHypo.HypoOutputDecisions, "WhateverElse" ] 
-    mon.HLTSummary = "MonitoringSummary" 
-    mon.OutputLevel = DEBUG 
-    hltTop = seqOR( "hltTop", [ HLTsteps, mon] )
-
+    step2filter = parOR("step2filter", [ filterEFSAAlg, filterL2MuisoAlg] )
+    HLTsteps = seqAND("HLTsteps", [ step0filter, step0, step1filter, step1, step2filter, step2 ]  )
+
+    muonViewsMerger = muonViewsMergers("all")
+
+    ### final summary
+    summary = summarySteps("FinalAlg", ["EFMuonSADecisions", "MuonL2IsoDecisions"] )
+    summary.OutputTools = [ muonViewsMerger ]
+
+    ### final monitor algorithm
+    from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT, DecisionCollectorTool
+    mon = TrigSignatureMoniMT()
+    mon.FinalDecisions = [ "EFMuonSADecisions", "WhateverElse" ]
+    from TrigUpgradeTest.TestUtils import MenuTest
+    mon.ChainsList = list( set( MenuTest.CTPToChainMapping.keys() ) )
+    mon.OutputLevel = DEBUG
+
+    step1Collector = DecisionCollectorTool("Step1Collector")
+    step1Collector.Decisions = [ "L2MuonFastDecisions" ]
+    step2Collector = DecisionCollectorTool("Step2Collector")
+    step2Collector.Decisions = [ "MuonL2CBDecisions" ]
+    step3Collector = DecisionCollectorTool("Step3Collector")
+    step3Collector.Decisions = [ "EFMuonSADecisions", "MuonL2IsoDecisions"]
+    mon.CollectorTools = [ step1Collector, step2Collector, step3Collector ]
+
+    StreamESD = muonStreamESD(muonViewsMerger)
+
+    hltTop = seqOR( "hltTop", [ HLTsteps, mon, summary, StreamESD ] )
     topSequence += hltTop   
 
    
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh
index bae9ec3830e699fadfdbbe59d11d46edb81d7c91..880934e77c38e1b45d0fdfb6caee9bce89ae3559 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh
@@ -3,6 +3,6 @@
 # art-ci: master
 
 ### BSfile ###
-athena --threads=1 --skipEvents=30 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" -c 'doL2CB=False;doL2ISO=False;doEFSA=False' TrigUpgradeTest/mu.withViews.py
+athena --threads=1 --skipEvents=30 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" -c 'doL2CB=False;doL2ISO=False;doEFSA=True' TrigUpgradeTest/mu.withViews.py
 ### RDOfile ###
 #athena --threads=1 -c 'EvtMax=50;FilesInput="/afs/cern.ch/user/s/shhayash/workspace/public/RDOfile/ttbar/RDO_TRIG.root"' TrigUpgradeTest/mu.withViews.py
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v4_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v4_grid.sh
index ac6b462f60cb3ae36f92fd0a0559dbf4158fe735..be9ae8819b06bacf326b22645d027745c2a00c56 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v4_grid.sh
+++ b/Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v4_grid.sh
@@ -24,7 +24,6 @@
 export NAME="mc_hi_v4_grid"
 export MENU="MC_HI_v4"
 export EVENTS="500"
-export INPUT="pbpb"
 
 source exec_athena_art_trigger_validation.sh
 source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v4_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v4_build.sh
index cf24779c9bea585e0397287631f32c13ba4ae966..512ae2aaf8ebe6a3a478e62f83b33a21f7b65563 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v4_build.sh
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v4_build.sh
@@ -24,7 +24,6 @@
 export NAME="physics_hi_v4_build"
 export MENU="Physics_HI_v4"
 export EVENTS="5"
-export INPUT="pbpb"
 export COST_MONITORING="False"
 
 source exec_athena_art_trigger_validation.sh
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 39bf4ecf52fc3759d6e4c4bc92cd91304c5f7124..2ff6299cd5e7b63f1cebaeb77b5fc283f5dc08e2 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v4_grid.sh
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v4_grid.sh
@@ -24,7 +24,6 @@
 export NAME="physics_hi_v4_grid"
 export MENU="Physics_HI_v4"
 export EVENTS="500"
-export INPUT="pbpb"
 
 source exec_athena_art_trigger_validation.sh
 source exec_art_triggertest_post.sh
diff --git a/Trigger/TriggerCommon/TrigTier0/share/BStoESD_Tier0_HLTConfig_jobOptions.py b/Trigger/TriggerCommon/TrigTier0/share/BStoESD_Tier0_HLTConfig_jobOptions.py
index 06ff151fae21f23d291708d9ab2dbda84df515b5..86fd3414b3d28693b1059354fe8b25f8b8b8219c 100644
--- a/Trigger/TriggerCommon/TrigTier0/share/BStoESD_Tier0_HLTConfig_jobOptions.py
+++ b/Trigger/TriggerCommon/TrigTier0/share/BStoESD_Tier0_HLTConfig_jobOptions.py
@@ -95,11 +95,8 @@ if rec.doTrigger():
         from AnalysisTriggerAlgs.AnalysisTriggerAlgsConfig import RoIBResultToAOD
         a2 = RoIBResultToAOD("RoIBResultToAOD")
         a2.LVL1ConfigSvc="TrigConf::TrigConfigSvc/TrigConfigSvc"
-        a2.L1JetTools.LVL1ConfigSvc="TrigConf::TrigConfigSvc/TrigConfigSvc"
-        a2.L1EmTauTools.LVL1ConfigSvc="TrigConf::TrigConfigSvc/TrigConfigSvc"
-        #L1JetTools exists after we've created RoIBResultToAOD
-        ToolSvc.L1JetTools.LVL1ConfigSvc="TrigConf::TrigConfigSvc/TrigConfigSvc"
-        ToolSvc.L1EmTauTools.LVL1ConfigSvc="TrigConf::TrigConfigSvc/TrigConfigSvc"
+        a2.L1JEMJetTools.LVL1ConfigSvc="TrigConf::TrigConfigSvc/TrigConfigSvc"
+        a2.L1CPMTools.LVL1ConfigSvc="TrigConf::TrigConfigSvc/TrigConfigSvc"
 
         from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__TriggerTowerMaker
         a4 = LVL1__TriggerTowerMaker("TriggerTowerMaker")
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasDef.py b/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasDef.py
index 9b6800064936c2f87b89b1df2cb6003d7933f09e..c8d888293c8dbade860b476067378f9d4b5e65fc 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasDef.py
@@ -51,10 +51,6 @@ atLeastOneTrack = HIEFTrackHypo_AtLeastOneTrack(name='HIEFTrackHypo_AtLeastOneTr
 from TrigHIHypo.TrigHIHypoConfig import *
 #hypos.update(hi_hypos)
 
-#L2 pileup suppression
-from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_FullScan_ZF_OnlyA  #TrigL2SiTrackFinder_FullScanA_ZF_OnlyA
-
-theL2PileupSup = TrigL2SiTrackFinder_FullScan_ZF_OnlyA()
 
 ###########################################################################
 #  All min bias
@@ -555,6 +551,10 @@ class L2EFChain_MB(L2EFChainDef):
             if "pusup" in self.chainPart['pileupInfo']:
                 doPusup=True
                 chainSuffixL2=l2hypo2+'_'+chainSuffixL2
+                #L2 pileup suppression
+                from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_FullScan_ZF_OnlyA  #TrigL2SiTrackFinder_FullScanA_ZF_OnlyA
+
+                theL2PileupSup = TrigL2SiTrackFinder_FullScan_ZF_OnlyA()
                 theL2Fex2  = theL2PileupSup
                 theL2Hypo2 = HIL2VtxMultHypo("HIL2VtxMultHyp_"+l2th2, int(l2th2))
         ########## EF algos ##################
@@ -655,7 +655,8 @@ class L2EFChain_MB(L2EFChainDef):
 
             theL2Fex1  = L2MbSpFex_noPix
             theL2Hypo1 = L2MbSpMhNoPixHypo_hip("L2MbSpMhNoPixHypo_hip_"+l2th1, float(l2th1))
-
+            from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_FullScan_ZF_OnlyA  #TrigL2SiTrackFinder_FullScanA_ZF_OnlyA
+            theL2PileupSup = TrigL2SiTrackFinder_FullScan_ZF_OnlyA()
             theL2Fex2  = theL2PileupSup
             theL2Hypo2 = HIL2VtxMultHypo("HIL2VtxMultHyp_PT")
             theL2Hypo2.AcceptAll = True
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDef.py b/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDef.py
index 98baa1ef530cc725120090e0653cc0ce25c1eee8..9cbe3cc06663c6c167b9f776388365ce1d432c75 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDef.py
@@ -16,9 +16,6 @@ from TrigCaloRec.TrigCaloRecConfig import TrigCaloCellMaker_tau, TrigCaloCluster
 from TrigFTK_RecAlgs.TrigFTK_RecAlgs_Config import TrigFTK_VxPrimary_EF
 from TrigInDetConf.TrigInDetFTKSequence import TrigInDetFTKSequence
 from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
-from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import (TrigL2SiTrackFinder_TauA,
-                                                            TrigL2SiTrackFinder_TauB,
-                                                            TrigL2SiTrackFinder_TauC)
 from TrigT2CaloTau.TrigT2CaloTauConfig import T2CaloTau_Tau_Med
 from TrigT2IDTau.T2IDTauConfig import T2IDTau_Tau_1GeV_dZ02_dR0103
 from TrigT2Tau.T2TauFinalConfig import T2TauFinal_Tau_dR03_1GeV_dZ02
@@ -418,6 +415,9 @@ class L2EFChain_tau(L2EFChainDef):
             theL2FinalHypo  = self.hypoProvider.GetHypo('L2', threshold, selection, '', 'r1')
             # Get the necessary fexes
 
+            from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import (TrigL2SiTrackFinder_TauA,
+                                                                        TrigL2SiTrackFinder_TauB,
+                                                                        TrigL2SiTrackFinder_TauC)
             t2calo_2012 = T2CaloTau_Tau_Med()
             l2sitrkfinder_tauB = TrigL2SiTrackFinder_TauB()
             t2id_2012 = T2IDTau_Tau_1GeV_dZ02_dR0103()
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_Pixel.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_Pixel.cxx
index 7ff552bb7cec811f5687d75208a5a36cdefa4199..c798244c83ade1e27b9573aa3dbfd2d7892f4360 100644
--- a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_Pixel.cxx
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_Pixel.cxx
@@ -39,7 +39,7 @@ void PRDHandle_Pixel::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
   errSimple->addChild(common()->nodeManager()->getShapeNode_Point());
 
   Amg::Vector2D localpos = m_cluster->localPosition();
-  Amg::Vector2D localposHIT = m_cluster->detectorElement()->localPositionOfCell( m_cluster->identify() );
+  Amg::Vector2D localposHIT = m_cluster->detectorElement()->rawLocalPositionOfCell( m_cluster->identify() ); // Lorentz shift is not corrected because this class cannot use SiLorentzAngleTool
   SoTranslation * localtrans0 = new SoTranslation;
 
   double xdiff = localposHIT[Trk::locX]-localpos[Trk::locX];
@@ -87,7 +87,7 @@ void PRDHandle_Pixel::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
       if (*it == m_cluster->identify() )
         continue;
 
-      const Amg::Vector2D localposRDO = m_cluster->detectorElement()->localPositionOfCell(*it);
+      const Amg::Vector2D localposRDO = m_cluster->detectorElement()->rawLocalPositionOfCell(*it); // Lorentz shift is not corrected because this class cannot use SiLorentzAngleTool
 
       SoTranslation * localtrans = new SoTranslation;
       localtrans->translation.setValue(localposRDO[Trk::locX]-localposOLD[Trk::locX],
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_SCT.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_SCT.cxx
index 7deae89e94c278a395798381464e7bfe601a0842..b7b5c3d8a8d91d9d8a8fa4163e7fc1e15b6006ac 100644
--- a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_SCT.cxx
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_SCT.cxx
@@ -35,7 +35,7 @@ void PRDHandle_SCT::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
   shape_simple=common()->nodeManager()->getShapeNode_Strip(striplength);
 
   const Amg::Vector2D& localpos = m_cluster->localPosition();
-  const Amg::Vector2D& localposHIT = m_cluster->detectorElement()->localPositionOfCell( m_cluster->identify() );
+  const Amg::Vector2D& localposHIT = m_cluster->detectorElement()->rawLocalPositionOfCell( m_cluster->identify() ); // Lorentz shift is not corrected because this class cannot use SiLorentzAngleTool
   SoTranslation * localtrans0 = new SoTranslation;
   localtrans0->translation.setValue(localposHIT[Trk::locX]-localpos[Trk::locX],localposHIT[Trk::locY]-localpos[Trk::locY],0);
 
@@ -75,7 +75,7 @@ void PRDHandle_SCT::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
       if (*it == m_cluster->identify() )
         continue;
 
-      const Amg::Vector2D& localposRDO = m_cluster->detectorElement()->localPositionOfCell(*it);
+      const Amg::Vector2D& localposRDO = m_cluster->detectorElement()->rawLocalPositionOfCell(*it); // Lorentz shift is not corrected because this class cannot use SiLorentzAngleTool
 
       SoTranslation * localtrans = new SoTranslation;
       localtrans->translation.setValue(localposRDO[Trk::locX]-localposOLD[Trk::locX],localposRDO[Trk::locY]-localposOLD[Trk::locY],0);
diff --git a/graphics/VP1/VP1Utils/src/HitToSodeNode.cxx b/graphics/VP1/VP1Utils/src/HitToSodeNode.cxx
index 99766ed111aee3dd0525862b05cc263f105f5e02..2802dc71c0b9643465e0bb354f2df505da36948b 100644
--- a/graphics/VP1/VP1Utils/src/HitToSodeNode.cxx
+++ b/graphics/VP1/VP1Utils/src/HitToSodeNode.cxx
@@ -515,7 +515,9 @@ void HitToSoNode::fillSiValues(Identifier& id, const Trk::TrkDetElementBase* bas
         return;
     }
 
-    localposStrip = new Amg::Vector2D(detEl->localPositionOfCell( id ));
+    localposStrip = new Amg::Vector2D(detEl->rawLocalPositionOfCell( id ));
+    //    (*localPosStrip)[Trk::distPhi] += (idhelper->is_pixel(id) ? m_pixelLorentzAngleTool : m_sctLorentzAngleTool)->getLorentzShift(detEl->identifyHash());
+    // SiLorentzAngleTool cannot be used here because HitToSoNode is not a tool nor algorithm
 
     striplength    = detEl->etaPitch() ;
     stripWidth     = detEl->phiPitch( *localposStrip );